Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

translate and fixes #254

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 78 additions & 6 deletions uniEmpleos/src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,13 @@
"previewOffer": {
"enterprise": "Enterprise",
"salary": "Salary",
"type": "Type",
"type": "Shift",
"schedule": "Schedule",
"apply": "Apply",
"details": "Details",
"postulants": "Postulants"

},
"profileStudent":{
"profileStudent": {
"name": "Name",
"lastName": "Last Name",
"dateBirth": "Date of Birth",
Expand All @@ -61,19 +60,92 @@
"semester": "Semester",
"save": "Save"
},
"previewPostulations":{
"previewPostulations": {
"delete": "Delete Postulation"
},
"signUpEmpresa":{
"signUpEmpresa": {
"name": "Name",
"email": "Email",
"password": "Password",
"phone": "Phone",
"details": "Details",
"register": "Register"
},
"signUp":{
"signUp": {
"student": "Searching for a job",
"enterprise": "Offering a job"
},
"signUpStudent": {
"popUp": {
"error1": "All fields are mandatory",
"error2": "Invalid phone number",
"error3": "Oops... Unable to update your resume, please try again later",
"error4": "Oops... Unable to update your profile picture, please try again later",
"error5": "Successful registration",
"error6": "Email is already registered",
"error7": "Oops, something went wrong, please try again later",
"error8": "You must select a PNG, JPG, or JPEG file",
"error9": "You must select a PDF file",
"error10": "You don't have a resume"
},
"page": {
"cv": "Resume",
"placeHolderCv": "Upload your resume",
"names": "Names",
"lastNames": "Last Names",
"dateBirth": "Date of Birth",
"DPI": "ID",
"phone": "Phone",
"email": "Email",
"password": "Password",
"career": "Career",
"university": "University",
"semester": "Semester",
"register": "Register"
}
},
"editProfileEnterprise": {
"popUp": {
"error1": "Oops... Unable to update your profile picture, please try again later",
"error2": "All fields are mandatory",
"error3": "Invalid phone number",
"error4": "Oops... Something went wrong, please try again later",
"error5": "You must select a PNG, JPG, or JPEG file"
},
"page": {
"name": "Name",
"phone": "Phone",
"details": "Details",
"save": "Save"
}
},
"newOffer": {
"popUp": {
"error1": "Only the description field can be empty",
"error2": "Oops... Something went wrong, please try again later"
},
"page": {
"title1": "Offer Details",
"title": "New Job Offer",
"position": "Position",
"salary": "Salary",
"schedule": "Schedule",
"startShift": "Start",
"endShift": "End",
"jornada": "Work Schedule",
"partTime": "Part-Time",
"fullTime": "Full-Time",
"career": "Career",
"requirements": "Requirements",
"description": "Description",
"return": "Back",
"create": "Create",
"save": "Save"
}
},
"chatPage": {
"noChats": "You have no chats",
"noMessages": "You have no messages",
"writeAMessage": "Write a message"
}
}
83 changes: 78 additions & 5 deletions uniEmpleos/src/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"details": "Detalles",
"postulants": "Postulantes"
},
"profileStudent":{
"profileStudent": {
"name": "Nombres",
"lastName": "Apellidos",
"dateBirth": "Fecha de Nacimiento",
Expand All @@ -61,20 +61,93 @@
"semester": "Semestre",
"save": "Guardar"
},
"previewPostulations":{
"previewPostulations": {
"delete": "Eliminar Postulación"
},
"signUpEmpresa":{
"signUpEmpresa": {
"name": "Nombre",
"email": "Correo",
"password": "Contraseña",
"phone": "Teléfono",
"details": "Detalles",
"register": "Registrarse"
},
"signUp":{
"signUp": {
"student": "Buscando empleo",
"enterprise": "Soy reclutador"
},
"signUpStudent": {
"popUp": {
"error1": "Todos los campos son obligatorios",
"error2": "Teléfono inválido",
"error3": "Upss... No se pudo actualizar tu CV, intenta más tarde",
"error4": "Upss... No se pudo actualizar tu foto de perfil, intenta más tarde",
"error5": "Registro exitoso",
"error6": "El correo ya está registrado",
"error7": "Upss algo salió mal, intenta más tarde",
"error8": "Debes seleccionar un archivo PNG, JPG o JPEG",
"error9": "Debes seleccionar un archivo PDF",
"error10": "No tienes un CV"
},
"page": {
"cv": "CV",
"placeHolderCv": "Sube tu CV",
"names": "Nombres",
"lastNames": "Apellidos",
"dateBirth": "Fecha de Nacimiento",
"DPI": "DPI",
"phone": "Teléfono",
"email": "Correo",
"password": "Contraseña",
"career": "Carrera",
"university": "Universidad",
"semester": "Semestre",
"register": "Registrarse"
}
},
"editProfileEnterprise": {
"popUp": {
"error1": "Upss... No se pudo actualizar tu foto de perfil, intenta más tarde",
"error2": "Todos los campos son obligatorios",
"error3": "El número de teléfono es inválido",
"error4": "Upss... Algo salio mal, intenta más tarde",
"error5": "Debes seleccionar un archivo PNG, JPG o JPEG"
},
"page": {
"name": "Nombre",
"phone": "Teléfono",
"details": "Detalles",
"save": "Guardar"
}
},
"newOffer": {
"popUp": {
"error1": "Solamente el campo de descripción puede estar vacío",
"error2": "Upss... Algo salio mal, intenta más tarde",
"error3": "Oferta eliminada con éxito"
},
"page": {
"title1": "Detalles de la oferta",
"title": "Nueva oferta laboral",
"position": "Puesto",
"salary": "Salario",
"schedule": "Horario",
"startShift": "Inicio",
"endShift": "Fin",
"jornada": "Jornada",
"partTime": "Medio Tiempo",
"fullTime": "Tiempo Completo",
"career": "Carrera",
"requirements": "Requisitos",
"description": "Descripción",
"return": "Regresar",
"create": "Crear",
"save": "Guardar"
}
},
"chatPage": {
"noChats": "No tienes chats",
"noMessages": "No tienes mensajes",
"writeAMessage": "Escribe un mensaje"
}

}
8 changes: 5 additions & 3 deletions uniEmpleos/src/pages/ChatPage/ChatPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ import Popup from "../../components/Popup/Popup"
import useIsImage from "../../Hooks/useIsImage"
import { formatDuration } from "date-fns"
import API_URL from "@/api.js"
import { useTranslation } from "react-i18next"

const ChatPage = () => {
const { user } = useStoreon("user")
const apiLastChats = useApi()
const apiMessages = useApi()
const apiSendMessage = useApi()
const { t } = useTranslation()
const isImage = useIsImage()

const [currentChat, setCurrentChat] = useState("")
Expand Down Expand Up @@ -153,7 +155,7 @@ const ChatPage = () => {
)
)
) : (
<div className={style.noUsersMessage}>No hay chats recientes.</div>
<div className={style.noUsersMessage}>{t("chatPage.noChats")}</div>
)}
</div>
<div
Expand Down Expand Up @@ -183,15 +185,15 @@ const ChatPage = () => {
)
})
) : (
<div className={style.noMessagesMessage}>No hay mensajes.</div>
<div className={style.noMessagesMessage}>{t("chatPage.noMessages")}</div>
)}
<div className={style.inputContainer}>
<div className={style.inputBar}>
<Input
name="message"
type="text"
value={textMessage}
placeholder="Escribe un mensaje"
placeholder={t("chatPage.writeAMessage")}
onChange={handleInputChange}
/>
</div>
Expand Down
22 changes: 11 additions & 11 deletions uniEmpleos/src/pages/EditProfileEmpresas/EditProfileEmpresa.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ import ImageDirectUploader from "../../components/ImageDirectUploader/ImageDirec
import API_URL from "@/api.js"
import InputFile from "../../components/InputFile/InputFile"
import { TbEdit } from "react-icons/tb"
import { useTranslation } from "react-i18next"

const EditProfileEmpresa = () => {
const api = useApi()
const apiImage = useApi()
const isImage = useIsImage()
const { user } = useStoreon("user")
const { t } = useTranslation()

const [nombre, setNombre] = useState("")
const [correo, setCorreo] = useState("")
Expand Down Expand Up @@ -87,19 +89,17 @@ const EditProfileEmpresa = () => {
console.log("Foto actualizada")
} else {
setTypePopUp(2)
setError(
"Upss... No se pudo actualizar tu foto de perfil, intenta mas tarde"
)
setError(t("editProfileEnterprise.popUp.error1"))
setWarning(true)
}
}
if (nombre === "" || detalles === "" || telefono === "") {
setTypePopUp(2)
setError("Todos los campos son obligatorios")
setError(t("editProfileEnterprise.popUp.error2"))
setWarning(true)
} else if (telefono.length < 8) {
setTypePopUp(2)
setError("El numero de telefono no es valido")
setError(t("editProfileEnterprise.popUp.error3"))
setWarning(true)
} else {
const apiResponse = await api.handleRequest(
Expand All @@ -111,7 +111,7 @@ const EditProfileEmpresa = () => {
navigate("/postulacionempresa")
} else {
setTypePopUp(1)
setError("Upss... Algo salio mal atras, intenta mas tarde")
setError(t("editProfileEnterprise.popUp.error4"))
setWarning(true)
}
}
Expand All @@ -130,7 +130,7 @@ const EditProfileEmpresa = () => {
setPfpPreview(URL.createObjectURL(selectedFile))
} else {
setTypePopUp(2)
setError("Debes seleccionar un archivo PNG, JPG o JPEG")
setError(t("editProfileEnterprise.popUp.error5"))
setWarning(true)
}
}
Expand Down Expand Up @@ -166,7 +166,7 @@ const EditProfileEmpresa = () => {
<div className={style.inputsContainer}>
<div className={style.grupoDatos1}>
<div className={style.inputSubContainer}>
<span>Nombre</span>
<span>{t("editProfileEnterprise.page.name")}</span>
<ComponentInput
value={nombre}
name="nombre"
Expand All @@ -176,7 +176,7 @@ const EditProfileEmpresa = () => {
/>
</div>
<div className={style.inputSubContainer}>
<span>Telefono</span>
<span>{t("editProfileEnterprise.page.phone")}</span>
<ComponentInput
value={telefono}
name="telefono"
Expand All @@ -186,7 +186,7 @@ const EditProfileEmpresa = () => {
/>
</div>
<div className={style.inputTextArea}>
<span>Detalles</span>
<span>{t("editProfileEnterprise.page.details")}</span>
<TextArea
value={detalles}
name="detalles"
Expand All @@ -199,7 +199,7 @@ const EditProfileEmpresa = () => {
</div>
</div>
<div className={style.buttonContainer}>
<Button label="Guardar" onClick={handleButton} />
<Button label={t("editProfileEnterprise.page.save")} onClick={handleButton} />
</div>
</div>
</div>
Expand Down
Loading
Loading