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")}
-
+
diff --git a/uniEmpleos/src/pages/OfferDetails/OfferDetails.jsx b/uniEmpleos/src/pages/OfferDetails/OfferDetails.jsx
index a3177979..8780f984 100644
--- a/uniEmpleos/src/pages/OfferDetails/OfferDetails.jsx
+++ b/uniEmpleos/src/pages/OfferDetails/OfferDetails.jsx
@@ -15,6 +15,7 @@ import useApi from "../../Hooks/useApi"
import "react-quill/dist/quill.snow.css"
import useConfig from "../../Hooks/Useconfig"
import Popup from "../../components/Popup/Popup"
+import { useTranslation } from "react-i18next"
const schema = Joi.object({
token: Joi.string().required(),
@@ -26,6 +27,7 @@ const OfferDetails = ({ id }) => {
const { user } = useStoreon("user")
const api = useApi()
const apiCareers = useApi()
+ const { t } = useTranslation()
const [requisitos, setRequisitos] = useState("")
const [salario, setSalario] = useState("")
@@ -49,8 +51,8 @@ const OfferDetails = ({ id }) => {
return isoString.split("T")[1].split("Z")[0]
}
const options = [
- { value: "Medio Tiempo", label: "Medio Tiempo" },
- { value: "Tiempo Completo", label: "Tiempo Completo" },
+ { value: "Medio Tiempo", label: t("newOffer.page.partTime") },
+ { value: "Tiempo Completo", label: t("newOffer.page.fullTime") },
]
useEffect(() => {
@@ -108,7 +110,7 @@ const OfferDetails = ({ id }) => {
requisitos === "" ||
carrera === ""
) {
- setError("Solamente el campo de descripción puede estar vacío")
+ setError(t("newOffer.popUp.error1"))
setWarning(true)
} else {
console.log(horarioInicioUpdate)
@@ -128,7 +130,7 @@ const OfferDetails = ({ id }) => {
if (apiResponse.status === 200) {
navigate("/postulacionempresa")
} else {
- setError("Upss algo salió mal, intentalo de nuevo")
+ setError(t("newOffer.popUp.error2"))
setWarning(true)
}
}
@@ -200,7 +202,7 @@ const OfferDetails = ({ id }) => {
const succcessJobOffer = () => {
setdeleteJob(false)
- setError("Oferta eliminada con éxito")
+ setError(t("newOffer.popUp.error3"))
setWarning(true)
setTimeout(() => {
navigate("/postulacionempresa")
@@ -213,7 +215,7 @@ const OfferDetails = ({ id }) => {
if (apiResponse.status === 200) {
succcessJobOffer()
} else {
- setError("Upss algo salió mal, intentalo de nuevo")
+ setError(t("newOffer.popUp.error2"))
setWarning(true)
}
}
@@ -235,7 +237,7 @@ const OfferDetails = ({ id }) => {
-
Detalles de la oferta
+
{t("newOffer.page.title1")}
@@ -244,7 +246,7 @@ const OfferDetails = ({ id }) => {
- Puesto
+ {t("newOffer.page.position")}
{
/>
- Salario
+ {t("newOffer.page.salary")}
{
{horarioInicioDisplay && horarioFinDisplay && (
- Horario
- Inicio
+ {t("newOffer.page.schedule")}
+ {t("newOffer.page.startShift")}
{
value={horarioInicioDisplay}
className={styles.inputHorario}
/>
- Fin
+ {t("newOffer.page.endShift")}
{
)}
- Jornada
+ {t("newOffer.page.jornada")}
- Carrera
+ {t("newOffer.page.career")}
- Requisitos
+ {t("newOffer.page.requirements")}
-
Descripción
+
{t("newOffer.page.description")}