Skip to content

Commit

Permalink
Update wrong login message
Browse files Browse the repository at this point in the history
  • Loading branch information
Jona-Internxt committed Oct 3, 2024
1 parent 37b532a commit 07a17bd
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 9 deletions.
6 changes: 5 additions & 1 deletion src/app/auth/components/LogIn/LogIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion src/app/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion src/app/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion src/app/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion src/app/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion src/app/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion src/app/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
"dontHaveAccount": "У вас нет учетной записи?",
"createAccount": "Создать учетную запись",
"2FA": "Двухфакторный код",
"twoFactorAuthenticationCode": "Код двухфакторной аутентификации"
"twoFactorAuthenticationCode": "Код двухфакторной аутентификации",
"wrongLogin": "Неверное имя пользователя или пароль"
},
"signup": {
"title": "Создать учетную запись",
Expand Down
3 changes: 2 additions & 1 deletion src/app/i18n/locales/tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
"dontHaveAccount": "沒有帳戶?",
"createAccount": "創建帳戶",
"2FA": "雙重身份驗證代碼",
"twoFactorAuthenticationCode": "雙重身份驗證代碼"
"twoFactorAuthenticationCode": "雙重身份驗證代碼",
"wrongLogin": "使用者名稱或密碼無效"
},
"signup": {
"title": "創建帳戶",
Expand Down
3 changes: 2 additions & 1 deletion src/app/i18n/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
"dontHaveAccount": "没有账户?",
"createAccount": "创建账户",
"2FA": "双因素代码",
"twoFactorAuthenticationCode": "双因素验证码"
"twoFactorAuthenticationCode": "双因素验证码",
"wrongLogin": "用户名或密码无效"
},
"signup": {
"title": "创建账户",
Expand Down

0 comments on commit 07a17bd

Please sign in to comment.