fix(login-i18n): translate the 3 hardcoded JS toasts in customer login
Some checks failed
Some checks failed
Three more hardcoded English strings in customers/storefront/login.html were still bypassing i18n because they were emitted from Alpine showAlert() calls in <script>: - "Account created successfully! Please sign in." (post-register toast) - "Login successful! Redirecting..." (post-login toast) - "Invalid email or password" (login-error fallback) Same pattern as the earlier forgot/reset-password sweep: defined window.__customerLoginI18n with `tojson` server-rendered values, read them once at function entry as `const i18n = ...`, and swapped each hardcoded string for an i18n property. Two new auth.* keys × 4 locales (registration_success_signin, login_success_redirecting). The third reuses the existing auth.invalid_credentials. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -142,6 +142,8 @@
|
||||
"try_again": "versuchen Sie es erneut",
|
||||
"remember_password": "Passwort wieder eingefallen?",
|
||||
"login_subtitle": "Willkommen zurück in Ihrem Konto",
|
||||
"registration_success_signin": "Konto erfolgreich erstellt! Bitte anmelden.",
|
||||
"login_success_redirecting": "Anmeldung erfolgreich! Weiterleitung...",
|
||||
"reset_password_subtitle": "Neues Passwort erstellen",
|
||||
"reset_your_password": "Passwort zurücksetzen",
|
||||
"reset_password_form_desc": "Geben Sie unten Ihr neues Passwort ein. Es muss mindestens 8 Zeichen lang sein.",
|
||||
|
||||
@@ -142,6 +142,8 @@
|
||||
"try_again": "try again",
|
||||
"remember_password": "Remember your password?",
|
||||
"login_subtitle": "Welcome back to your account",
|
||||
"registration_success_signin": "Account created successfully! Please sign in.",
|
||||
"login_success_redirecting": "Login successful! Redirecting...",
|
||||
"reset_password_subtitle": "Create new password",
|
||||
"reset_your_password": "Reset Your Password",
|
||||
"reset_password_form_desc": "Enter your new password below. Password must be at least 8 characters.",
|
||||
|
||||
@@ -142,6 +142,8 @@
|
||||
"try_again": "réessayez",
|
||||
"remember_password": "Vous vous souvenez de votre mot de passe ?",
|
||||
"login_subtitle": "Heureux de vous revoir",
|
||||
"registration_success_signin": "Compte créé avec succès ! Veuillez vous connecter.",
|
||||
"login_success_redirecting": "Connexion réussie ! Redirection...",
|
||||
"reset_password_subtitle": "Créer un nouveau mot de passe",
|
||||
"reset_your_password": "Réinitialisez votre mot de passe",
|
||||
"reset_password_form_desc": "Saisissez votre nouveau mot de passe ci-dessous. Il doit comporter au moins 8 caractères.",
|
||||
|
||||
@@ -142,6 +142,8 @@
|
||||
"try_again": "probéiert et nach eng Kéier",
|
||||
"remember_password": "Passwuert erëm agefall?",
|
||||
"login_subtitle": "Wëllkomm zréck an Ärem Kont",
|
||||
"registration_success_signin": "Kont erfollegräich erstallt! Loggt Iech w.e.g. an.",
|
||||
"login_success_redirecting": "Login erfollegräich! Weiderleeden...",
|
||||
"reset_password_subtitle": "Neit Passwuert erstellen",
|
||||
"reset_your_password": "Ärt Passwuert zrécksetzen",
|
||||
"reset_password_form_desc": "Gitt hei drënner Ärt neit Passwuert an. Et muss mindestens 8 Zeechen laang sinn.",
|
||||
|
||||
Reference in New Issue
Block a user