Skip to content

Commit

Permalink
Fix localization issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Dec 14, 2024
1 parent e1e9460 commit a0fd3d4
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 12 deletions.
7 changes: 0 additions & 7 deletions frontend/src/lang/contact-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ const strings = new LocalizedStrings({
SEND: 'Send',
MESSAGE_SENT: 'Message sent'
},
el: {
CONTACT_HEADING: 'Επικοινωνία',
SUBJECT: 'Θέμα',
MESSAGE: 'Μήνυμα',
SEND: 'Στείλετε',
MESSAGE_SENT: 'Το μήνυμα στάλθηκε'
},
es: {
CONTACT_HEADING: 'Contacto',
SUBJECT: 'Asunto',
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/lang/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ const strings = new LocalizedStrings({
SELECT_PICK_UP_LOCATION: 'Select Location',
SELECT_DROP_OFF_LOCATION: 'Set as Drop-off Location',
},
es: {
SELECT_PICK_UP_LOCATION: 'Seleccionar ubicación',
SELECT_DROP_OFF_LOCATION: 'Establecer como ubicación de entrega',
},
})

langHelper.setLanguage(strings)
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/lang/master.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ const strings = new LocalizedStrings({
VALIDATION_EMAIL_SENT: 'Validation email sent.',
VALIDATION_EMAIL_ERROR: 'An error occurred while sending validation email.',
},
es: {
VALIDATE_EMAIL: 'Se ha enviado un correo electrónico de validación a su dirección de correo electrónico. Revise su casilla de correo y valide su cuenta haciendo clic en el enlace del correo electrónico. Expirará después de un día. Si no recibió el correo electrónico de validación, haga clic en reenviar.',
RESEND: 'Reenviar',
VALIDATION_EMAIL_SENT: 'Correo electrónico de validación enviado.',
VALIDATION_EMAIL_ERROR: 'Se produjo un error al enviar el correo electrónico de validación.',
},
})

langHelper.setLanguage(strings)
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/lang/no-match.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ const strings = new LocalizedStrings({
en: {
NO_MATCH: 'Nothing to see here!',
},
es: {
NO_MATCH: '¡No hay nada que ver aquí!',
},
})

langHelper.setLanguage(strings)
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/lang/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ const strings = new LocalizedStrings({
NETWORK_SETTINGS: 'Network settings',
SETTINGS_EMAIL_NOTIFICATIONS: 'Enable email notifications',
},
es: {
SETTINGS_UPDATED: 'Configuración actualizada correctamente.',
NETWORK_SETTINGS: 'Configuración de red',
SETTINGS_EMAIL_NOTIFICATIONS: 'Habilitar notificaciones por correo electrónico',
},
})

langHelper.setLanguage(strings)
Expand Down
5 changes: 1 addition & 4 deletions frontend/src/lang/sign-in.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const strings = new LocalizedStrings({
fr: {
SIGN_IN_HEADING: 'Connexion',
SIGN_IN: 'Se connecter',
SIGN_UP: "S'inscrire",
ERROR_IN_SIGN_IN: 'E-mail ou mot de passe incorrect.',
IS_BLACKLISTED: 'Votre compte est suspendu.',
RESET_PASSWORD: 'Mot de passe oublié ?',
Expand All @@ -14,7 +13,6 @@ const strings = new LocalizedStrings({
en: {
SIGN_IN_HEADING: 'Sign in',
SIGN_IN: 'Sign in',
SIGN_UP: 'Sign up',
ERROR_IN_SIGN_IN: 'Incorrect email or password.',
IS_BLACKLISTED: 'Your account is suspended.',
RESET_PASSWORD: 'Forgot password?',
Expand All @@ -23,9 +21,8 @@ const strings = new LocalizedStrings({
es: {
SIGN_IN_HEADING: 'Iniciar sesión',
SIGN_IN: 'Iniciar sesión',
SIGN_UP: 'Registrarse',
ERROR_IN_SIGN_IN: 'Correo electrónico o contraseña incorrectos.',
IS_BLACKLISTED: 'Su cuenta está suspendida.',
IS_BLACKLISTED: 'Su cuenta está suspendida?',
RESET_PASSWORD: '¿Olvidó su contraseña?',
STAY_CONNECTED: 'Manténgase conectado',
},
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/pages/SignIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
import { useNavigate } from 'react-router-dom'
import * as bookcarsTypes from ':bookcars-types'
import { strings as commonStrings } from '@/lang/common'
import { strings as suStrings } from '@/lang/sign-up'
import { strings } from '@/lang/sign-in'
import * as UserService from '@/services/UserService'
import Error from '@/components/Error'
Expand Down Expand Up @@ -144,7 +145,7 @@ const SignIn = () => {

<div className="signin-buttons">
<Button variant="outlined" color="primary" href="/sign-up" className="btn-margin btn-margin-bottom">
{strings.SIGN_UP}
{suStrings.SIGN_UP}
</Button>
<Button type="submit" variant="contained" className="btn-primary btn-margin btn-margin-bottom">
{strings.SIGN_IN}
Expand Down

0 comments on commit a0fd3d4

Please sign in to comment.