Skip to content

Commit

Permalink
addHeaderTranslation
Browse files Browse the repository at this point in the history
  • Loading branch information
angelcast2002 committed Nov 15, 2023
1 parent fc9c9f1 commit e7f6e02
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 77 deletions.
2 changes: 2 additions & 0 deletions uniEmpleos/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ import React from "react"
import Page from "./pages/index"
import "./assets/fonts/fonts.css"
import "./App.css"
import LanguageButton from "./components/LanguageButton/LanguageButton"

function App() {
return (
<StoreContext.Provider value={store}>
<div className="App">
<Page />
</div>
<LanguageButton />
</StoreContext.Provider>
)
}
Expand Down
22 changes: 12 additions & 10 deletions uniEmpleos/src/components/Header/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ import { LuLogOut } from "react-icons/lu"
import Logo from "../Logo/Logo"
import "./header.css"
import { navigate } from "../../store"
import { useTranslation } from "react-i18next"

const handleClick = () => {
navigate("/login")
}

export const Header = () => {
const { t } = useTranslation()
const [showNavbar, setShowNavbar] = useState(false)

const handleShowNavbar = () => {
Expand Down Expand Up @@ -41,10 +43,10 @@ export const Header = () => {
return (
<div className="actions">
<div className="actionlinks">
<a href="/editprofileestudiante">Perfil</a>
<a href="/profile">Vacantes</a>
<a href="/postulaciones">Postulaciones</a>
<a href="/chat">Chat</a>
<a href="/editprofileestudiante">{t("header.student.profile")}</a>
<a href="/profile">{t("header.student.offers")}</a>
<a href="/postulaciones">{t("header.student.postulations")}</a>
<a href="/chat">{t("header.student.chat")}</a>
</div>
<div className="buttonLogoutMobile" onClick={handleClick}>
<LuLogOut size={30} style={{ color: "#000" }} />
Expand All @@ -55,10 +57,10 @@ export const Header = () => {
return (
<div className="actions">
<div className="actionlinks">
<a href="/editprofileempresa">Perfil</a>
<a href="/newoffer">Crear Empleo</a>
<a href="/postulacionempresa">Mis Ofertas</a>
<a href="/chat">Chat</a>
<a href="/editprofileempresa">{t("header.enterprise.profile")}</a>
<a href="/newoffer">{t("header.enterprise.newOffer")}</a>
<a href="/postulacionempresa">{t("header.enterprise.myOffers")}</a>
<a href="/chat">{t("header.enterprise.chat")}</a>
</div>
<div className="buttonLogoutMobile" onClick={handleClick}>
<LuLogOut size={30} style={{ color: "#000" }} />
Expand All @@ -69,8 +71,8 @@ export const Header = () => {
return (
<div className="actions">
<div className="actionlinks">
<a href="/profileadmin">Empresas</a>
<a href="/profileadminstudent">Estudiantes</a>
<a href="/profileadmin">{t("header.admin.enterprises")}</a>
<a href="/profileadminstudent">{t("header.admin.students")}</a>
</div>
<div className="buttonLogoutMobile" onClick={handleClick}>
<LuLogOut size={30} style={{ color: "#000" }} />
Expand Down
44 changes: 19 additions & 25 deletions uniEmpleos/src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,37 @@
"desc1": "UniEmpleos is a platform that enables students from various universities in Guatemala to find job offers and professional internships.",
"title2": "How does it work?",
"desc2": "Companies publish their job offers and students can apply to them. The companies can view the profiles of the students and contact them."

},
"offerPostulation": {
"details": "Details",
"button1": "Back",
"button2": "Apply"
},
"intro": {
"description": "Guatemalan lawyer with experience in strategic analysis, political analysis and advisory to boards. Currently, I am the Executive President of the National Civic Movement. I participated in the 2022-2023 cohort of the Millennium Leadership Program at the Atlantic Council. On this website, I share reflections and resources to understand the sociopolitical environment in which we live."

},
"login": {
"email": "Enter your email",
"password": "Enter your password",
"new":"New to UniEmpleos?",
"new": "New to UniEmpleos?",
"register": "Register",
"login": "Login"

},
"podcast": {
"title": "Podcast",
"listen": "Listen",
"description": "We educate about the impact that politics, social relations, and economics have on society. We motivate to exercise individual sovereignty to achieve positive impacts on society. Being increasingly aware of the potential impact of our actions."
},
"resources": {
"title": "Resources",
"categories": ["All", "Press", "News", "Articles"]
},
"analysis": {
"title": "Analysis"
},
"contact": {
"title": "Get in Touch",
"subtitle": "Contact",
"collaborate": "I want to collaborate",
"motto": "The republic is still alive",
"address": "Address",
"media": "Social Media"

"header": {
"student": {
"profile": "Profile",
"offers": "Offers",
"postulations": "Applications",
"chat": "Chat"
},
"enterprise": {
"profile": "Profile",
"newOffer": "Create Job",
"myOffers": "My Offers",
"chat": "Chat"
},
"admin": {
"enterprises": "Enterprises",
"students": "Students"
}
}
}
51 changes: 21 additions & 30 deletions uniEmpleos/src/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,35 @@
},

"offerPostulation": {
"details":"Detalles",
"details": "Detalles",
"button1": "Regresar",
"button2": "Postularme"
},
"intro": {
"description": "Abogado guatemalteco con experiencia en análisis estratégico, análisis político y asesorías a directivas. Actualmente soy Presidente Ejecutivo del Movimiento Cívico Nacional. Participé en el cohorte 2022-2023 del Millenium Leadership Program del Atlantic Council. En este website comparto reflexiones y recursos para comprender el entorno sociopolítico en el que vivimos."
},

"login": {
"email": "Ingrese su correo",
"password": "Ingrese su contraseña",
"new":"¿Eres nuevo?",
"new": "¿Eres nuevo?",
"register": "Regístrate",
"login": "Iniciar Sesión"

},
"podcast": {
"title": "Podcast",
"listen": "Escuchar",
"description": "Educamos sobre el impacto que la política, relaciones sociales y economía tiene en la sociedad. Motivamos a ejercer la soberanía individual para lograr impactos positivos en la sociedad. Ser cada vez más conscientes del potencial impacto de nuestras acciones."
},
"resources": {
"title": "Recursos",
"categories": [
"Todo",
"Prensa",
"Noticias",
"Artículos"
]
},
"analysis": {
"title": "Análisis"
},
"contact": {
"title": "Ponte en Contacto",
"subtitle": "Contacto",
"collaborate": "Quiero colaborar",
"motto": "La república sigue viva",
"address": "Address",
"media": "Redes Sociales"

"header": {
"student": {
"profile": "Perfil",
"offers": "Ofertas",
"postulations": "Postulaciones",
"chat": "Chat"
},
"enterprise": {
"profile": "Perfil",
"newOffer": "Crear Empleo",
"myOffers": "Mis Ofertas",
"chat": "Chat"
},
"admin": {
"enterprises": "Empresas",
"students": "Estudiantes"
}
}
}
4 changes: 0 additions & 4 deletions uniEmpleos/src/pages/Home/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import styles from "./Home.module.css"
import Infocontainer from "../../components/Infocontainer/Infocontainer"
import HeaderHome from "../../components/HeaderHome/HeaderHome"
import students from "./students.json"
import LanguageButton from "../../components/LanguageButton/LanguageButton"
import { useTranslation } from "react-i18next"

const Home = () => {
Expand Down Expand Up @@ -57,9 +56,6 @@ const Home = () => {
/>
</div>
</div>
<div className={styles.footer}>
<LanguageButton />
</div>
</div>
)
}
Expand Down
4 changes: 0 additions & 4 deletions uniEmpleos/src/pages/Login/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import Popup from "../../components/Popup/Popup"
import API_URL from "../../api"
import { useStoreon } from "storeon/react"
import { useTranslation } from "react-i18next"
import LanguageButton from "../../components/LanguageButton/LanguageButton"

const LogIn = () => {
const { t } = useTranslation()
Expand Down Expand Up @@ -125,9 +124,6 @@ const LogIn = () => {
320C960,320,840,320,720,320C600,320,480,320,360,320C240,320,120,320,60,320L0,320Z"
/>
</svg>
<div className={styles.footer}>
<LanguageButton />
</div>
</div>
)
}
Expand Down
4 changes: 0 additions & 4 deletions uniEmpleos/src/pages/postulacion/Postulacion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { navigate } from "../../store"
import useApi from "../../Hooks/useApi"
import Popup from "../../components/Popup/Popup"
import { useTranslation } from "react-i18next"
import LanguageButton from "../../components/LanguageButton/LanguageButton"

const Postulacion = ({ id }) => {
const { t } = useTranslation()
Expand Down Expand Up @@ -161,9 +160,6 @@ const Postulacion = ({ id }) => {
) : (
<h1>Cargando...</h1>
)}
<div className={style.footer}>
<LanguageButton />
</div>
</div>
)
}
Expand Down

0 comments on commit e7f6e02

Please sign in to comment.