From a0fd3d41bf86bb845d49a7b3856c3ec5687309fb Mon Sep 17 00:00:00 2001 From: aelassas Date: Sat, 14 Dec 2024 08:43:15 +0100 Subject: [PATCH] Fix localization issues --- frontend/src/lang/contact-form.ts | 7 ------- frontend/src/lang/map.ts | 4 ++++ frontend/src/lang/master.ts | 6 ++++++ frontend/src/lang/no-match.ts | 3 +++ frontend/src/lang/settings.ts | 5 +++++ frontend/src/lang/sign-in.ts | 5 +---- frontend/src/pages/SignIn.tsx | 3 ++- 7 files changed, 21 insertions(+), 12 deletions(-) diff --git a/frontend/src/lang/contact-form.ts b/frontend/src/lang/contact-form.ts index 3510d07af..d3e71cfe4 100644 --- a/frontend/src/lang/contact-form.ts +++ b/frontend/src/lang/contact-form.ts @@ -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', diff --git a/frontend/src/lang/map.ts b/frontend/src/lang/map.ts index 12b0f528f..f555607c9 100644 --- a/frontend/src/lang/map.ts +++ b/frontend/src/lang/map.ts @@ -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) diff --git a/frontend/src/lang/master.ts b/frontend/src/lang/master.ts index 4cf542389..3e2a54100 100644 --- a/frontend/src/lang/master.ts +++ b/frontend/src/lang/master.ts @@ -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) diff --git a/frontend/src/lang/no-match.ts b/frontend/src/lang/no-match.ts index c25c8d160..8ab43af4b 100644 --- a/frontend/src/lang/no-match.ts +++ b/frontend/src/lang/no-match.ts @@ -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) diff --git a/frontend/src/lang/settings.ts b/frontend/src/lang/settings.ts index 3aa35bf43..814bdf95b 100644 --- a/frontend/src/lang/settings.ts +++ b/frontend/src/lang/settings.ts @@ -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) diff --git a/frontend/src/lang/sign-in.ts b/frontend/src/lang/sign-in.ts index 481ec6cac..4775b92f6 100644 --- a/frontend/src/lang/sign-in.ts +++ b/frontend/src/lang/sign-in.ts @@ -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é ?', @@ -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?', @@ -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', }, diff --git a/frontend/src/pages/SignIn.tsx b/frontend/src/pages/SignIn.tsx index 94fe2300b..e4b2f4677 100644 --- a/frontend/src/pages/SignIn.tsx +++ b/frontend/src/pages/SignIn.tsx @@ -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' @@ -144,7 +145,7 @@ const SignIn = () => {