fix(login): translated error messages for failed and rate-limited logins

Map INVALID_CREDENTIALS and TOO_MANY_ATTEMPTS to i18n keys. A non-JSON error body (Traefik 502/504) no longer shows as a network error.
This commit is contained in:
lobo committed 2026-09-24 10:29:57 +02:00
1 parent e480369a98
commit 6773040d59
3 files changed
+18 -8

No files matched your search

+4 -1
View File
@@ -11,7 +11,10 @@
"SUBMIT": "Enter the game",
"NO_ACCOUNT": "No account yet?",
"ERROR_EMAIL": "Enter a valid email address with '@' and with '.'.",
"ERROR_PASSWORD": "The password must have at least one character."
"ERROR_PASSWORD": "The password must have at least one character.",
"ERROR_INVALID_CREDENTIALS": "Email or password is wrong.",
"ERROR_TOO_MANY_ATTEMPTS": "Too many failed attempts. Please try again in {{minutes}} minutes.",
"ERROR_GENERIC": "Login failed. Please try again later."
},
"REGISTRATION": {
"TITLE": "Register",