diff --git a/uniEmpleos/src/locales/en/translation.json b/uniEmpleos/src/locales/en/translation.json index 5b1a3525..7f1d624f 100644 --- a/uniEmpleos/src/locales/en/translation.json +++ b/uniEmpleos/src/locales/en/translation.json @@ -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", @@ -61,10 +60,10 @@ "semester": "Semester", "save": "Save" }, - "previewPostulations":{ + "previewPostulations": { "delete": "Delete Postulation" }, - "signUpEmpresa":{ + "signUpEmpresa": { "name": "Name", "email": "Email", "password": "Password", @@ -72,8 +71,81 @@ "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" } } diff --git a/uniEmpleos/src/locales/es/translation.json b/uniEmpleos/src/locales/es/translation.json index ec330497..5af9c28b 100644 --- a/uniEmpleos/src/locales/es/translation.json +++ b/uniEmpleos/src/locales/es/translation.json @@ -51,7 +51,7 @@ "details": "Detalles", "postulants": "Postulantes" }, - "profileStudent":{ + "profileStudent": { "name": "Nombres", "lastName": "Apellidos", "dateBirth": "Fecha de Nacimiento", @@ -61,10 +61,10 @@ "semester": "Semestre", "save": "Guardar" }, - "previewPostulations":{ + "previewPostulations": { "delete": "Eliminar Postulación" }, - "signUpEmpresa":{ + "signUpEmpresa": { "name": "Nombre", "email": "Correo", "password": "Contraseña", @@ -72,9 +72,82 @@ "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" } - } diff --git a/uniEmpleos/src/pages/ChatPage/ChatPage.jsx b/uniEmpleos/src/pages/ChatPage/ChatPage.jsx index dc2d2ac6..c8c9f899 100644 --- a/uniEmpleos/src/pages/ChatPage/ChatPage.jsx +++ b/uniEmpleos/src/pages/ChatPage/ChatPage.jsx @@ -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("") @@ -153,7 +155,7 @@ const ChatPage = () => { ) ) ) : ( -
No hay chats recientes.
+
{t("chatPage.noChats")}
)}
{ ) }) ) : ( -
No hay mensajes.
+
{t("chatPage.noMessages")}
)}
@@ -191,7 +193,7 @@ const ChatPage = () => { name="message" type="text" value={textMessage} - placeholder="Escribe un mensaje" + placeholder={t("chatPage.writeAMessage")} onChange={handleInputChange} />
diff --git a/uniEmpleos/src/pages/EditProfileEmpresas/EditProfileEmpresa.jsx b/uniEmpleos/src/pages/EditProfileEmpresas/EditProfileEmpresa.jsx index 1573a688..173f7ea7 100644 --- a/uniEmpleos/src/pages/EditProfileEmpresas/EditProfileEmpresa.jsx +++ b/uniEmpleos/src/pages/EditProfileEmpresas/EditProfileEmpresa.jsx @@ -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("") @@ -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( @@ -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) } } @@ -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) } } @@ -166,7 +166,7 @@ const EditProfileEmpresa = () => {
- Nombre + {t("editProfileEnterprise.page.name")} { />
- Telefono + {t("editProfileEnterprise.page.phone")} { />
- Detalles + {t("editProfileEnterprise.page.details")}