From 07a17bd6ae77f6beb1e05320c46aa86f0613b958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20P=C3=A9rez?= Date: Thu, 3 Oct 2024 12:42:20 +0200 Subject: [PATCH] Update wrong login message --- src/app/auth/components/LogIn/LogIn.tsx | 6 +++++- src/app/i18n/locales/de.json | 3 ++- src/app/i18n/locales/en.json | 3 ++- src/app/i18n/locales/es.json | 3 ++- src/app/i18n/locales/fr.json | 3 ++- src/app/i18n/locales/it.json | 3 ++- src/app/i18n/locales/ru.json | 3 ++- src/app/i18n/locales/tw.json | 3 ++- src/app/i18n/locales/zh.json | 3 ++- 9 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/app/auth/components/LogIn/LogIn.tsx b/src/app/auth/components/LogIn/LogIn.tsx index fc73026a5..c0ff18cdf 100644 --- a/src/app/auth/components/LogIn/LogIn.tsx +++ b/src/app/auth/components/LogIn/LogIn.tsx @@ -172,7 +172,11 @@ export default function LogIn(): JSX.Element { navigationService.history.push(`/activate/${email}`); } - setLoginError([castedError.message]); + setLoginError([ + castedError.message.includes('Wrong login credentials') + ? translate('auth.login.wrongLogin') + : castedError.message, + ]); setShowErrors(true); if ((err as AppError)?.status === 403) { await sendUnblockAccountEmail(email); diff --git a/src/app/i18n/locales/de.json b/src/app/i18n/locales/de.json index c0bd40fc0..04d990517 100644 --- a/src/app/i18n/locales/de.json +++ b/src/app/i18n/locales/de.json @@ -60,7 +60,8 @@ "dontHaveAccount": "Sie haben kein Konto?", "createAccount": "Konto erstellen", "2FA": "Zwei-Faktor-Code", - "twoFactorAuthenticationCode": "Zwei-Faktor-Authentifizierungscode" + "twoFactorAuthenticationCode": "Zwei-Faktor-Authentifizierungscode", + "wrongLogin": "Ungültiger Benutzername oder Passwort" }, "signup": { "title": "Konto erstellen", diff --git a/src/app/i18n/locales/en.json b/src/app/i18n/locales/en.json index 2997d0e41..275ae4e12 100644 --- a/src/app/i18n/locales/en.json +++ b/src/app/i18n/locales/en.json @@ -81,7 +81,8 @@ "dontHaveAccount": "Don't have an account?", "createAccount": "Create account", "2FA": "Two factor code", - "twoFactorAuthenticationCode": "Two factor authentication code" + "twoFactorAuthenticationCode": "Two factor authentication code", + "wrongLogin": "Invalid username or password" }, "signup": { "title": "Create account", diff --git a/src/app/i18n/locales/es.json b/src/app/i18n/locales/es.json index f82263454..20fd10777 100644 --- a/src/app/i18n/locales/es.json +++ b/src/app/i18n/locales/es.json @@ -60,7 +60,8 @@ "dontHaveAccount": "¿No tienes cuenta?", "createAccount": "Crear cuenta", "2FA": "Código de dos factores", - "twoFactorAuthenticationCode": "Código de autenticación de dos factores" + "twoFactorAuthenticationCode": "Código de autenticación de dos factores", + "wrongLogin": "Nombre de usuario o contraseña no válidos" }, "signup": { "title": "Crear cuenta", diff --git a/src/app/i18n/locales/fr.json b/src/app/i18n/locales/fr.json index 8ff1e9445..7cbda4000 100644 --- a/src/app/i18n/locales/fr.json +++ b/src/app/i18n/locales/fr.json @@ -60,7 +60,8 @@ "dontHaveAccount": "Vous n'avez pas de compte ?", "createAccount": "Créer un compte", "2FA": "Code à deux facteurs", - "twoFactorAuthenticationCode": "Code d'authentification à deux facteurs" + "twoFactorAuthenticationCode": "Code d'authentification à deux facteurs", + "wrongLogin": "Nom d'utilisateur ou mot de passe invalide" }, "signup": { "title": "Créer un compte", diff --git a/src/app/i18n/locales/it.json b/src/app/i18n/locales/it.json index f810d5282..4dbdd156a 100644 --- a/src/app/i18n/locales/it.json +++ b/src/app/i18n/locales/it.json @@ -81,7 +81,8 @@ "dontHaveAccount": "Non hai un account?", "createAccount": "Creare un account", "2FA": "Codice a due fattori", - "twoFactorAuthenticationCode": "Codice di autenticazione a due fattori" + "twoFactorAuthenticationCode": "Codice di autenticazione a due fattori", + "wrongLogin": "Nome utente o password non validi" }, "signup": { "title": "Creare un account", diff --git a/src/app/i18n/locales/ru.json b/src/app/i18n/locales/ru.json index fee8eec2e..d99b28071 100644 --- a/src/app/i18n/locales/ru.json +++ b/src/app/i18n/locales/ru.json @@ -60,7 +60,8 @@ "dontHaveAccount": "У вас нет учетной записи?", "createAccount": "Создать учетную запись", "2FA": "Двухфакторный код", - "twoFactorAuthenticationCode": "Код двухфакторной аутентификации" + "twoFactorAuthenticationCode": "Код двухфакторной аутентификации", + "wrongLogin": "Неверное имя пользователя или пароль" }, "signup": { "title": "Создать учетную запись", diff --git a/src/app/i18n/locales/tw.json b/src/app/i18n/locales/tw.json index 1e6f34b05..29c135f89 100644 --- a/src/app/i18n/locales/tw.json +++ b/src/app/i18n/locales/tw.json @@ -81,7 +81,8 @@ "dontHaveAccount": "沒有帳戶?", "createAccount": "創建帳戶", "2FA": "雙重身份驗證代碼", - "twoFactorAuthenticationCode": "雙重身份驗證代碼" + "twoFactorAuthenticationCode": "雙重身份驗證代碼", + "wrongLogin": "使用者名稱或密碼無效" }, "signup": { "title": "創建帳戶", diff --git a/src/app/i18n/locales/zh.json b/src/app/i18n/locales/zh.json index 1e4e1e797..2f1d4c697 100644 --- a/src/app/i18n/locales/zh.json +++ b/src/app/i18n/locales/zh.json @@ -81,7 +81,8 @@ "dontHaveAccount": "没有账户?", "createAccount": "创建账户", "2FA": "双因素代码", - "twoFactorAuthenticationCode": "双因素验证码" + "twoFactorAuthenticationCode": "双因素验证码", + "wrongLogin": "用户名或密码无效" }, "signup": { "title": "创建账户",