@micha.bigler/ui-core-micha 3.8.0 → 3.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/WORK_ORDERS.md +2 -0
- package/dist/auth/apiClient.js +8 -0
- package/dist/components/AccessCodeManager.js +5 -5
- package/dist/components/AccessCodeSingleUseToggle.js +3 -2
- package/dist/components/AllowedEmailDomainsManager.js +3 -2
- package/dist/components/AuthFactorRequirementCard.js +3 -2
- package/dist/components/BulkInviteCsvTab.js +3 -2
- package/dist/components/MFAComponent.js +9 -8
- package/dist/components/MfaLoginComponent.js +7 -6
- package/dist/components/PasskeysComponent.js +7 -6
- package/dist/components/ProfileComponent.js +4 -3
- package/dist/components/QrSignupManager.js +4 -3
- package/dist/components/QrSignupValidityManager.js +3 -2
- package/dist/components/RegistrationMethodsManager.js +3 -2
- package/dist/components/SecurityComponent.js +5 -4
- package/dist/components/SupportRecoveryRequestsTab.js +8 -7
- package/dist/components/UserInviteComponent.js +3 -2
- package/dist/components/UserListComponent.js +14 -7
- package/dist/i18n/authTranslations.js +420 -0
- package/dist/pages/AccountPage.js +3 -2
- package/dist/pages/LoginPage.js +10 -9
- package/dist/pages/PasswordChangePage.js +4 -3
- package/dist/pages/PasswordInvitePage.js +7 -6
- package/dist/pages/PasswordResetRequestPage.js +5 -4
- package/dist/pages/SignUpPage.js +7 -6
- package/dist/pages/SignupConfirmPage.js +7 -6
- package/dist/utils/auth-errors.js +45 -8
- package/dist/utils/resolveErrorText.js +24 -0
- package/package.json +1 -1
- package/src/auth/apiClient.jsx +9 -0
- package/src/components/AccessCodeManager.jsx +5 -5
- package/src/components/AccessCodeSingleUseToggle.jsx +3 -2
- package/src/components/AllowedEmailDomainsManager.jsx +3 -2
- package/src/components/AuthFactorRequirementCard.jsx +3 -2
- package/src/components/BulkInviteCsvTab.jsx +3 -2
- package/src/components/MFAComponent.jsx +9 -8
- package/src/components/MfaLoginComponent.jsx +7 -6
- package/src/components/PasskeysComponent.jsx +7 -6
- package/src/components/ProfileComponent.jsx +4 -3
- package/src/components/QrSignupManager.jsx +4 -3
- package/src/components/QrSignupValidityManager.jsx +3 -2
- package/src/components/RegistrationMethodsManager.jsx +3 -2
- package/src/components/SecurityComponent.jsx +5 -4
- package/src/components/SupportRecoveryRequestsTab.jsx +9 -8
- package/src/components/UserInviteComponent.jsx +3 -2
- package/src/components/UserListComponent.jsx +14 -7
- package/src/i18n/authTranslations.ts +421 -0
- package/src/pages/AccountPage.jsx +3 -4
- package/src/pages/LoginPage.jsx +10 -9
- package/src/pages/PasswordChangePage.jsx +4 -3
- package/src/pages/PasswordInvitePage.jsx +7 -6
- package/src/pages/PasswordResetRequestPage.jsx +5 -4
- package/src/pages/SignUpPage.jsx +7 -6
- package/src/pages/SignupConfirmPage.jsx +7 -6
- package/src/utils/auth-errors.js +44 -7
- package/src/utils/resolveErrorText.js +28 -0
- package/tests/AccountPage.test.jsx +27 -20
- package/tests/PasswordInvitePage.test.jsx +28 -21
- package/tests/QrSignupManager.registrationContext.test.jsx +5 -1
- package/tests/SignUpPage.test.jsx +14 -3
- package/tests/UserListComponent.test.jsx +100 -16
- package/tests/apiClientLanguage.test.js +33 -0
- package/tests/authErrors.test.js +31 -0
- package/tests/errorCallSiteGuard.test.js +32 -0
- package/tests/loginPageErrorResolution.test.jsx +102 -0
- package/tests/resolveErrorText.test.js +72 -0
- package/work-orders/UCM-AUTH-10.md +490 -0
- package/work-orders/UCM-AUTH-11.md +185 -0
|
@@ -2138,6 +2138,427 @@ export const authTranslations = {
|
|
|
2138
2138
|
"sw": "{{count}} zimefaulu"
|
|
2139
2139
|
},
|
|
2140
2140
|
|
|
2141
|
+
"Auth.field.email.invalid": {
|
|
2142
|
+
"de": "Bitte geben Sie eine gültige E-Mail-Adresse ein.",
|
|
2143
|
+
"de_informal": "Bitte gib eine gültige E-Mail-Adresse ein.",
|
|
2144
|
+
"fr": "Saisissez une adresse e-mail valide.",
|
|
2145
|
+
"en": "Enter a valid email address.",
|
|
2146
|
+
"sw": "Weka anwani sahihi ya barua pepe."
|
|
2147
|
+
},
|
|
2148
|
+
"Auth.field.email.required": {
|
|
2149
|
+
"de": "Bitte geben Sie eine E-Mail-Adresse ein.",
|
|
2150
|
+
"de_informal": "Bitte gib eine E-Mail-Adresse ein.",
|
|
2151
|
+
"fr": "Saisissez une adresse e-mail.",
|
|
2152
|
+
"en": "Enter an email address.",
|
|
2153
|
+
"sw": "Weka anwani ya barua pepe."
|
|
2154
|
+
},
|
|
2155
|
+
"Auth.field.password.invalid": {
|
|
2156
|
+
"de": "Bitte geben Sie ein gültiges Passwort ein.",
|
|
2157
|
+
"de_informal": "Bitte gib ein gültiges Passwort ein.",
|
|
2158
|
+
"fr": "Saisissez un mot de passe valide.",
|
|
2159
|
+
"en": "Enter a valid password.",
|
|
2160
|
+
"sw": "Weka nenosiri sahihi."
|
|
2161
|
+
},
|
|
2162
|
+
"Auth.field.password.required": {
|
|
2163
|
+
"de": "Bitte geben Sie ein Passwort ein.",
|
|
2164
|
+
"de_informal": "Bitte gib ein Passwort ein.",
|
|
2165
|
+
"fr": "Saisissez un mot de passe.",
|
|
2166
|
+
"en": "Enter a password.",
|
|
2167
|
+
"sw": "Weka nenosiri."
|
|
2168
|
+
},
|
|
2169
|
+
"Auth.field.new_password.invalid": {
|
|
2170
|
+
"de": "Bitte geben Sie ein gültiges neues Passwort ein.",
|
|
2171
|
+
"de_informal": "Bitte gib ein gültiges neues Passwort ein.",
|
|
2172
|
+
"fr": "Saisissez un nouveau mot de passe valide.",
|
|
2173
|
+
"en": "Enter a valid new password.",
|
|
2174
|
+
"sw": "Weka nenosiri jipya sahihi."
|
|
2175
|
+
},
|
|
2176
|
+
"Auth.field.new_password.required": {
|
|
2177
|
+
"de": "Bitte geben Sie ein neues Passwort ein.",
|
|
2178
|
+
"de_informal": "Bitte gib ein neues Passwort ein.",
|
|
2179
|
+
"fr": "Saisissez un nouveau mot de passe.",
|
|
2180
|
+
"en": "Enter a new password.",
|
|
2181
|
+
"sw": "Weka nenosiri jipya."
|
|
2182
|
+
},
|
|
2183
|
+
"Auth.field.current_password.invalid": {
|
|
2184
|
+
"de": "Bitte geben Sie Ihr aktuelles Passwort korrekt ein.",
|
|
2185
|
+
"de_informal": "Bitte gib dein aktuelles Passwort korrekt ein.",
|
|
2186
|
+
"fr": "Saisissez correctement votre mot de passe actuel.",
|
|
2187
|
+
"en": "Enter your current password correctly.",
|
|
2188
|
+
"sw": "Weka nenosiri lako la sasa kwa usahihi."
|
|
2189
|
+
},
|
|
2190
|
+
"Auth.field.current_password.required": {
|
|
2191
|
+
"de": "Bitte geben Sie Ihr aktuelles Passwort ein.",
|
|
2192
|
+
"de_informal": "Bitte gib dein aktuelles Passwort ein.",
|
|
2193
|
+
"fr": "Saisissez votre mot de passe actuel.",
|
|
2194
|
+
"en": "Enter your current password.",
|
|
2195
|
+
"sw": "Weka nenosiri lako la sasa."
|
|
2196
|
+
},
|
|
2197
|
+
"Auth.field.key.invalid": {
|
|
2198
|
+
"de": "Bitte geben Sie einen gültigen Schlüssel ein.",
|
|
2199
|
+
"de_informal": "Bitte gib einen gültigen Schlüssel ein.",
|
|
2200
|
+
"fr": "Saisissez une clé valide.",
|
|
2201
|
+
"en": "Enter a valid key.",
|
|
2202
|
+
"sw": "Weka ufunguo sahihi."
|
|
2203
|
+
},
|
|
2204
|
+
"Auth.field.key.required": {
|
|
2205
|
+
"de": "Bitte geben Sie einen Schlüssel ein.",
|
|
2206
|
+
"de_informal": "Bitte gib einen Schlüssel ein.",
|
|
2207
|
+
"fr": "Saisissez une clé.",
|
|
2208
|
+
"en": "Enter a key.",
|
|
2209
|
+
"sw": "Weka ufunguo."
|
|
2210
|
+
},
|
|
2211
|
+
"Auth.field.code.invalid": {
|
|
2212
|
+
"de": "Bitte geben Sie einen gültigen Code ein.",
|
|
2213
|
+
"de_informal": "Bitte gib einen gültigen Code ein.",
|
|
2214
|
+
"fr": "Saisissez un code valide.",
|
|
2215
|
+
"en": "Enter a valid code.",
|
|
2216
|
+
"sw": "Weka msimbo sahihi."
|
|
2217
|
+
},
|
|
2218
|
+
"Auth.field.code.required": {
|
|
2219
|
+
"de": "Bitte geben Sie einen Code ein.",
|
|
2220
|
+
"de_informal": "Bitte gib einen Code ein.",
|
|
2221
|
+
"fr": "Saisissez un code.",
|
|
2222
|
+
"en": "Enter a code.",
|
|
2223
|
+
"sw": "Weka msimbo."
|
|
2224
|
+
},
|
|
2225
|
+
"Auth.field.credential.invalid": {
|
|
2226
|
+
"de": "Bitte verwenden Sie eine gültige Sicherheitsmethode.",
|
|
2227
|
+
"de_informal": "Bitte verwende eine gültige Sicherheitsmethode.",
|
|
2228
|
+
"fr": "Utilisez une méthode de sécurité valide.",
|
|
2229
|
+
"en": "Use a valid security method.",
|
|
2230
|
+
"sw": "Tumia njia sahihi ya usalama."
|
|
2231
|
+
},
|
|
2232
|
+
"Auth.field.credential.required": {
|
|
2233
|
+
"de": "Bitte verwenden Sie eine Sicherheitsmethode.",
|
|
2234
|
+
"de_informal": "Bitte verwende eine Sicherheitsmethode.",
|
|
2235
|
+
"fr": "Utilisez une méthode de sécurité.",
|
|
2236
|
+
"en": "Use a security method.",
|
|
2237
|
+
"sw": "Tumia njia ya usalama."
|
|
2238
|
+
},
|
|
2239
|
+
"Auth.field.name.invalid": {
|
|
2240
|
+
"de": "Bitte geben Sie einen gültigen Namen ein.",
|
|
2241
|
+
"de_informal": "Bitte gib einen gültigen Namen ein.",
|
|
2242
|
+
"fr": "Saisissez un nom valide.",
|
|
2243
|
+
"en": "Enter a valid name.",
|
|
2244
|
+
"sw": "Weka jina sahihi."
|
|
2245
|
+
},
|
|
2246
|
+
"Auth.field.name.required": {
|
|
2247
|
+
"de": "Bitte geben Sie einen Namen ein.",
|
|
2248
|
+
"de_informal": "Bitte gib einen Namen ein.",
|
|
2249
|
+
"fr": "Saisissez un nom.",
|
|
2250
|
+
"en": "Enter a name.",
|
|
2251
|
+
"sw": "Weka jina."
|
|
2252
|
+
},
|
|
2253
|
+
"Auth.field.mode.invalid": {
|
|
2254
|
+
"de": "Bitte wählen Sie eine gültige Anmeldemethode.",
|
|
2255
|
+
"de_informal": "Bitte wähle eine gültige Anmeldemethode.",
|
|
2256
|
+
"fr": "Sélectionnez un mode d'inscription valide.",
|
|
2257
|
+
"en": "Choose a valid sign-up method.",
|
|
2258
|
+
"sw": "Chagua njia sahihi ya kujisajili."
|
|
2259
|
+
},
|
|
2260
|
+
"Auth.field.mode.required": {
|
|
2261
|
+
"de": "Bitte wählen Sie eine Anmeldemethode.",
|
|
2262
|
+
"de_informal": "Bitte wähle eine Anmeldemethode.",
|
|
2263
|
+
"fr": "Sélectionnez un mode d'inscription.",
|
|
2264
|
+
"en": "Choose a sign-up method.",
|
|
2265
|
+
"sw": "Chagua njia ya kujisajili."
|
|
2266
|
+
},
|
|
2267
|
+
"Auth.field.access_code.invalid": {
|
|
2268
|
+
"de": "Bitte geben Sie einen gültigen Zugangscode ein.",
|
|
2269
|
+
"de_informal": "Bitte gib einen gültigen Zugangscode ein.",
|
|
2270
|
+
"fr": "Saisissez un code d'accès valide.",
|
|
2271
|
+
"en": "Enter a valid access code.",
|
|
2272
|
+
"sw": "Weka msimbo sahihi wa ufikiaji."
|
|
2273
|
+
},
|
|
2274
|
+
"Auth.field.access_code.required": {
|
|
2275
|
+
"de": "Bitte geben Sie einen Zugangscode ein.",
|
|
2276
|
+
"de_informal": "Bitte gib einen Zugangscode ein.",
|
|
2277
|
+
"fr": "Saisissez un code d'accès.",
|
|
2278
|
+
"en": "Enter an access code.",
|
|
2279
|
+
"sw": "Weka msimbo wa ufikiaji."
|
|
2280
|
+
},
|
|
2281
|
+
"Auth.field.registration_context_token.invalid": {
|
|
2282
|
+
"de": "Bitte verwenden Sie einen gültigen Registrierungslink.",
|
|
2283
|
+
"de_informal": "Bitte verwende einen gültigen Registrierungslink.",
|
|
2284
|
+
"fr": "Utilisez un lien d'inscription valide.",
|
|
2285
|
+
"en": "Use a valid registration link.",
|
|
2286
|
+
"sw": "Tumia kiungo sahihi cha usajili."
|
|
2287
|
+
},
|
|
2288
|
+
"Auth.field.registration_context_token.required": {
|
|
2289
|
+
"de": "Bitte verwenden Sie einen Registrierungslink.",
|
|
2290
|
+
"de_informal": "Bitte verwende einen Registrierungslink.",
|
|
2291
|
+
"fr": "Utilisez un lien d'inscription.",
|
|
2292
|
+
"en": "Use a registration link.",
|
|
2293
|
+
"sw": "Tumia kiungo cha usajili."
|
|
2294
|
+
},
|
|
2295
|
+
"Auth.field.registration_context.invalid": {
|
|
2296
|
+
"de": "Die Registrierungsdaten sind ungültig.",
|
|
2297
|
+
"de_informal": "Die Registrierungsdaten sind ungültig.",
|
|
2298
|
+
"fr": "Les données d'inscription sont invalides.",
|
|
2299
|
+
"en": "The registration data is invalid.",
|
|
2300
|
+
"sw": "Data ya usajili si sahihi."
|
|
2301
|
+
},
|
|
2302
|
+
"Auth.field.registration_context.required": {
|
|
2303
|
+
"de": "Bitte geben Sie die Registrierungsdaten an.",
|
|
2304
|
+
"de_informal": "Bitte gib die Registrierungsdaten an.",
|
|
2305
|
+
"fr": "Indiquez les données d'inscription.",
|
|
2306
|
+
"en": "Provide the registration data.",
|
|
2307
|
+
"sw": "Weka data ya usajili."
|
|
2308
|
+
},
|
|
2309
|
+
"Auth.field.turnstile_token.invalid": {
|
|
2310
|
+
"de": "Bitte bestätigen Sie die Sicherheitsprüfung erneut.",
|
|
2311
|
+
"de_informal": "Bitte bestätige die Sicherheitsprüfung erneut.",
|
|
2312
|
+
"fr": "Recommencez la vérification de sécurité.",
|
|
2313
|
+
"en": "Complete the security check again.",
|
|
2314
|
+
"sw": "Kamilisha ukaguzi wa usalama tena."
|
|
2315
|
+
},
|
|
2316
|
+
"Auth.field.turnstile_token.required": {
|
|
2317
|
+
"de": "Bitte bestätigen Sie die Sicherheitsprüfung.",
|
|
2318
|
+
"de_informal": "Bitte bestätige die Sicherheitsprüfung.",
|
|
2319
|
+
"fr": "Confirmez la vérification de sécurité.",
|
|
2320
|
+
"en": "Complete the security check.",
|
|
2321
|
+
"sw": "Kamilisha ukaguzi wa usalama."
|
|
2322
|
+
},
|
|
2323
|
+
"Auth.field.token.invalid": {
|
|
2324
|
+
"de": "Bitte verwenden Sie einen gültigen Bestätigungstoken.",
|
|
2325
|
+
"de_informal": "Bitte verwende einen gültigen Bestätigungstoken.",
|
|
2326
|
+
"fr": "Utilisez un jeton de confirmation valide.",
|
|
2327
|
+
"en": "Use a valid confirmation token.",
|
|
2328
|
+
"sw": "Tumia tokeni sahihi ya uthibitishaji."
|
|
2329
|
+
},
|
|
2330
|
+
"Auth.field.token.required": {
|
|
2331
|
+
"de": "Bitte geben Sie den Bestätigungstoken an.",
|
|
2332
|
+
"de_informal": "Bitte gib den Bestätigungstoken an.",
|
|
2333
|
+
"fr": "Indiquez le jeton de confirmation.",
|
|
2334
|
+
"en": "Provide the confirmation token.",
|
|
2335
|
+
"sw": "Weka tokeni ya uthibitishaji."
|
|
2336
|
+
},
|
|
2337
|
+
"Auth.field.first_name.invalid": {
|
|
2338
|
+
"de": "Bitte geben Sie einen gültigen Vornamen ein.",
|
|
2339
|
+
"de_informal": "Bitte gib einen gültigen Vornamen ein.",
|
|
2340
|
+
"fr": "Saisissez un prénom valide.",
|
|
2341
|
+
"en": "Enter a valid first name.",
|
|
2342
|
+
"sw": "Weka jina la kwanza sahihi."
|
|
2343
|
+
},
|
|
2344
|
+
"Auth.field.first_name.required": {
|
|
2345
|
+
"de": "Bitte geben Sie Ihren Vornamen ein.",
|
|
2346
|
+
"de_informal": "Bitte gib deinen Vornamen ein.",
|
|
2347
|
+
"fr": "Saisissez votre prénom.",
|
|
2348
|
+
"en": "Enter your first name.",
|
|
2349
|
+
"sw": "Weka jina lako la kwanza."
|
|
2350
|
+
},
|
|
2351
|
+
"Auth.field.last_name.invalid": {
|
|
2352
|
+
"de": "Bitte geben Sie einen gültigen Nachnamen ein.",
|
|
2353
|
+
"de_informal": "Bitte gib einen gültigen Nachnamen ein.",
|
|
2354
|
+
"fr": "Saisissez un nom de famille valide.",
|
|
2355
|
+
"en": "Enter a valid last name.",
|
|
2356
|
+
"sw": "Weka jina la mwisho sahihi."
|
|
2357
|
+
},
|
|
2358
|
+
"Auth.field.last_name.required": {
|
|
2359
|
+
"de": "Bitte geben Sie Ihren Nachnamen ein.",
|
|
2360
|
+
"de_informal": "Bitte gib deinen Nachnamen ein.",
|
|
2361
|
+
"fr": "Saisissez votre nom de famille.",
|
|
2362
|
+
"en": "Enter your last name.",
|
|
2363
|
+
"sw": "Weka jina lako la mwisho."
|
|
2364
|
+
},
|
|
2365
|
+
"Auth.field.accepted_privacy_statement.invalid": {
|
|
2366
|
+
"de": "Bitte bestätigen Sie die Datenschutzerklärung.",
|
|
2367
|
+
"de_informal": "Bitte bestätige die Datenschutzerklärung.",
|
|
2368
|
+
"fr": "Confirmez la déclaration de confidentialité.",
|
|
2369
|
+
"en": "Confirm the privacy statement.",
|
|
2370
|
+
"sw": "Thibitisha taarifa ya faragha."
|
|
2371
|
+
},
|
|
2372
|
+
"Auth.field.accepted_privacy_statement.required": {
|
|
2373
|
+
"de": "Bitte bestätigen Sie die Datenschutzerklärung.",
|
|
2374
|
+
"de_informal": "Bitte bestätige die Datenschutzerklärung.",
|
|
2375
|
+
"fr": "Confirmez la déclaration de confidentialité.",
|
|
2376
|
+
"en": "Confirm the privacy statement.",
|
|
2377
|
+
"sw": "Thibitisha taarifa ya faragha."
|
|
2378
|
+
},
|
|
2379
|
+
"Auth.field.accepted_convenience_cookies.invalid": {
|
|
2380
|
+
"de": "Die Cookie-Einstellung ist ungültig.",
|
|
2381
|
+
"de_informal": "Die Cookie-Einstellung ist ungültig.",
|
|
2382
|
+
"fr": "Le choix des cookies est invalide.",
|
|
2383
|
+
"en": "The cookie preference is invalid.",
|
|
2384
|
+
"sw": "Chaguo la vidakuzi si sahihi."
|
|
2385
|
+
},
|
|
2386
|
+
"Auth.field.accepted_convenience_cookies.required": {
|
|
2387
|
+
"de": "Bitte geben Sie Ihre Cookie-Einstellung an.",
|
|
2388
|
+
"de_informal": "Bitte gib deine Cookie-Einstellung an.",
|
|
2389
|
+
"fr": "Indiquez votre choix de cookies.",
|
|
2390
|
+
"en": "Provide your cookie preference.",
|
|
2391
|
+
"sw": "Weka chaguo lako la vidakuzi."
|
|
2392
|
+
},
|
|
2393
|
+
"Auth.field.expires_minutes.invalid": {
|
|
2394
|
+
"de": "Bitte geben Sie eine gültige Ablaufzeit ein.",
|
|
2395
|
+
"de_informal": "Bitte gib eine gültige Ablaufzeit ein.",
|
|
2396
|
+
"fr": "Saisissez une durée de validité valide.",
|
|
2397
|
+
"en": "Enter a valid expiry period.",
|
|
2398
|
+
"sw": "Weka muda sahihi wa kuisha."
|
|
2399
|
+
},
|
|
2400
|
+
"Auth.field.expires_minutes.required": {
|
|
2401
|
+
"de": "Bitte geben Sie eine Ablaufzeit an.",
|
|
2402
|
+
"de_informal": "Bitte gib eine Ablaufzeit an.",
|
|
2403
|
+
"fr": "Indiquez une durée de validité.",
|
|
2404
|
+
"en": "Provide an expiry period.",
|
|
2405
|
+
"sw": "Weka muda wa kuisha."
|
|
2406
|
+
},
|
|
2407
|
+
"Auth.field.max_redemptions.invalid": {
|
|
2408
|
+
"de": "Bitte geben Sie eine gültige Anzahl von Einlösungen ein.",
|
|
2409
|
+
"de_informal": "Bitte gib eine gültige Anzahl von Einlösungen ein.",
|
|
2410
|
+
"fr": "Saisissez un nombre de validations valide.",
|
|
2411
|
+
"en": "Enter a valid redemption count.",
|
|
2412
|
+
"sw": "Weka idadi sahihi ya matumizi."
|
|
2413
|
+
},
|
|
2414
|
+
"Auth.field.max_redemptions.required": {
|
|
2415
|
+
"de": "Bitte geben Sie die maximale Anzahl von Einlösungen an.",
|
|
2416
|
+
"de_informal": "Bitte gib die maximale Anzahl von Einlösungen an.",
|
|
2417
|
+
"fr": "Indiquez le nombre maximal de validations.",
|
|
2418
|
+
"en": "Provide the maximum redemption count.",
|
|
2419
|
+
"sw": "Weka idadi ya juu ya matumizi."
|
|
2420
|
+
},
|
|
2421
|
+
"Auth.field.signup_qr_expiry_days.invalid": {
|
|
2422
|
+
"de": "Bitte geben Sie eine gültige QR-Gültigkeitsdauer ein.",
|
|
2423
|
+
"de_informal": "Bitte gib eine gültige QR-Gültigkeitsdauer ein.",
|
|
2424
|
+
"fr": "Saisissez une durée de validité QR valide.",
|
|
2425
|
+
"en": "Enter a valid QR validity period.",
|
|
2426
|
+
"sw": "Weka muda sahihi wa QR."
|
|
2427
|
+
},
|
|
2428
|
+
"Auth.field.signup_qr_expiry_days.required": {
|
|
2429
|
+
"de": "Bitte geben Sie die QR-Gültigkeitsdauer an.",
|
|
2430
|
+
"de_informal": "Bitte gib die QR-Gültigkeitsdauer an.",
|
|
2431
|
+
"fr": "Indiquez la durée de validité QR.",
|
|
2432
|
+
"en": "Provide the QR validity period.",
|
|
2433
|
+
"sw": "Weka muda wa QR."
|
|
2434
|
+
},
|
|
2435
|
+
"Auth.field.allowed_email_domains.invalid": {
|
|
2436
|
+
"de": "Bitte geben Sie gültige E-Mail-Domains ein.",
|
|
2437
|
+
"de_informal": "Bitte gib gültige E-Mail-Domains ein.",
|
|
2438
|
+
"fr": "Saisissez des domaines e-mail valides.",
|
|
2439
|
+
"en": "Enter valid email domains.",
|
|
2440
|
+
"sw": "Weka vikoa sahihi vya barua pepe."
|
|
2441
|
+
},
|
|
2442
|
+
"Auth.field.allowed_email_domains.required": {
|
|
2443
|
+
"de": "Bitte geben Sie die erlaubten E-Mail-Domains an.",
|
|
2444
|
+
"de_informal": "Bitte gib die erlaubten E-Mail-Domains an.",
|
|
2445
|
+
"fr": "Indiquez les domaines e-mail autorisés.",
|
|
2446
|
+
"en": "Provide the allowed email domains.",
|
|
2447
|
+
"sw": "Weka vikoa vinavyoruhusiwa vya barua pepe."
|
|
2448
|
+
},
|
|
2449
|
+
"Auth.field.required_auth_factor_count.invalid": {
|
|
2450
|
+
"de": "Bitte wählen Sie eine gültige Anzahl von Sicherheitsfaktoren.",
|
|
2451
|
+
"de_informal": "Bitte wähle eine gültige Anzahl von Sicherheitsfaktoren.",
|
|
2452
|
+
"fr": "Sélectionnez un nombre de facteurs de sécurité valide.",
|
|
2453
|
+
"en": "Choose a valid number of security factors.",
|
|
2454
|
+
"sw": "Chagua idadi sahihi ya vipengele vya usalama."
|
|
2455
|
+
},
|
|
2456
|
+
"Auth.field.required_auth_factor_count.required": {
|
|
2457
|
+
"de": "Bitte wählen Sie die Anzahl der Sicherheitsfaktoren.",
|
|
2458
|
+
"de_informal": "Bitte wähle die Anzahl der Sicherheitsfaktoren.",
|
|
2459
|
+
"fr": "Sélectionnez le nombre de facteurs de sécurité.",
|
|
2460
|
+
"en": "Choose the number of security factors.",
|
|
2461
|
+
"sw": "Chagua idadi ya vipengele vya usalama."
|
|
2462
|
+
},
|
|
2463
|
+
"Auth.field.allow_admin_invite.invalid": {
|
|
2464
|
+
"de": "Diese Einstellung für Admin-Einladungen ist ungültig.",
|
|
2465
|
+
"de_informal": "Diese Einstellung für Admin-Einladungen ist ungültig.",
|
|
2466
|
+
"fr": "Ce paramètre d'invitation administrateur est invalide.",
|
|
2467
|
+
"en": "This admin-invite setting is invalid.",
|
|
2468
|
+
"sw": "Mpangilio huu wa mialiko ya msimamizi si sahihi."
|
|
2469
|
+
},
|
|
2470
|
+
"Auth.field.allow_admin_invite.required": {
|
|
2471
|
+
"de": "Bitte geben Sie die Einstellung für Admin-Einladungen an.",
|
|
2472
|
+
"de_informal": "Bitte gib die Einstellung für Admin-Einladungen an.",
|
|
2473
|
+
"fr": "Indiquez le paramètre d'invitation administrateur.",
|
|
2474
|
+
"en": "Provide the admin-invite setting.",
|
|
2475
|
+
"sw": "Toa mpangilio wa mialiko ya msimamizi."
|
|
2476
|
+
},
|
|
2477
|
+
"Auth.field.allow_self_signup_access_code.invalid": {
|
|
2478
|
+
"de": "Diese Einstellung für die Registrierung per Zugangscode ist ungültig.",
|
|
2479
|
+
"de_informal": "Diese Einstellung für die Registrierung per Zugangscode ist ungültig.",
|
|
2480
|
+
"fr": "Ce paramètre d'inscription par code d'accès est invalide.",
|
|
2481
|
+
"en": "This access-code sign-up setting is invalid.",
|
|
2482
|
+
"sw": "Mpangilio huu wa kujisajili kwa msimbo wa ufikiaji si sahihi."
|
|
2483
|
+
},
|
|
2484
|
+
"Auth.field.allow_self_signup_access_code.required": {
|
|
2485
|
+
"de": "Bitte geben Sie die Einstellung für die Registrierung per Zugangscode an.",
|
|
2486
|
+
"de_informal": "Bitte gib die Einstellung für die Registrierung per Zugangscode an.",
|
|
2487
|
+
"fr": "Indiquez le paramètre d'inscription par code d'accès.",
|
|
2488
|
+
"en": "Provide the access-code sign-up setting.",
|
|
2489
|
+
"sw": "Toa mpangilio wa kujisajili kwa msimbo wa ufikiaji."
|
|
2490
|
+
},
|
|
2491
|
+
"Auth.field.allow_self_signup_open.invalid": {
|
|
2492
|
+
"de": "Diese Einstellung für die offene Registrierung ist ungültig.",
|
|
2493
|
+
"de_informal": "Diese Einstellung für die offene Registrierung ist ungültig.",
|
|
2494
|
+
"fr": "Ce paramètre d'inscription ouverte est invalide.",
|
|
2495
|
+
"en": "This open sign-up setting is invalid.",
|
|
2496
|
+
"sw": "Mpangilio huu wa kujisajili wazi si sahihi."
|
|
2497
|
+
},
|
|
2498
|
+
"Auth.field.allow_self_signup_open.required": {
|
|
2499
|
+
"de": "Bitte geben Sie die Einstellung für die offene Registrierung an.",
|
|
2500
|
+
"de_informal": "Bitte gib die Einstellung für die offene Registrierung an.",
|
|
2501
|
+
"fr": "Indiquez le paramètre d'inscription ouverte.",
|
|
2502
|
+
"en": "Provide the open sign-up setting.",
|
|
2503
|
+
"sw": "Toa mpangilio wa kujisajili wazi."
|
|
2504
|
+
},
|
|
2505
|
+
"Auth.field.allow_self_signup_email_domain.invalid": {
|
|
2506
|
+
"de": "Diese Einstellung für die Registrierung per E-Mail-Domain ist ungültig.",
|
|
2507
|
+
"de_informal": "Diese Einstellung für die Registrierung per E-Mail-Domain ist ungültig.",
|
|
2508
|
+
"fr": "Ce paramètre d'inscription par domaine e-mail est invalide.",
|
|
2509
|
+
"en": "This email-domain sign-up setting is invalid.",
|
|
2510
|
+
"sw": "Mpangilio huu wa kujisajili kwa domeni ya barua pepe si sahihi."
|
|
2511
|
+
},
|
|
2512
|
+
"Auth.field.allow_self_signup_email_domain.required": {
|
|
2513
|
+
"de": "Bitte geben Sie die Einstellung für die Registrierung per E-Mail-Domain an.",
|
|
2514
|
+
"de_informal": "Bitte gib die Einstellung für die Registrierung per E-Mail-Domain an.",
|
|
2515
|
+
"fr": "Indiquez le paramètre d'inscription par domaine e-mail.",
|
|
2516
|
+
"en": "Provide the email-domain sign-up setting.",
|
|
2517
|
+
"sw": "Toa mpangilio wa kujisajili kwa domeni ya barua pepe."
|
|
2518
|
+
},
|
|
2519
|
+
"Auth.field.allow_self_signup_qr.invalid": {
|
|
2520
|
+
"de": "Diese Einstellung für die QR-Registrierung ist ungültig.",
|
|
2521
|
+
"de_informal": "Diese Einstellung für die QR-Registrierung ist ungültig.",
|
|
2522
|
+
"fr": "Ce paramètre d'inscription par QR est invalide.",
|
|
2523
|
+
"en": "This QR sign-up setting is invalid.",
|
|
2524
|
+
"sw": "Mpangilio huu wa kujisajili kwa QR si sahihi."
|
|
2525
|
+
},
|
|
2526
|
+
"Auth.field.allow_self_signup_qr.required": {
|
|
2527
|
+
"de": "Bitte geben Sie die Einstellung für die QR-Registrierung an.",
|
|
2528
|
+
"de_informal": "Bitte gib die Einstellung für die QR-Registrierung an.",
|
|
2529
|
+
"fr": "Indiquez le paramètre d'inscription par QR.",
|
|
2530
|
+
"en": "Provide the QR sign-up setting.",
|
|
2531
|
+
"sw": "Toa mpangilio wa kujisajili kwa QR."
|
|
2532
|
+
},
|
|
2533
|
+
"Auth.field.message.invalid": {
|
|
2534
|
+
"de": "Bitte geben Sie eine gültige Nachricht ein.",
|
|
2535
|
+
"de_informal": "Bitte gib eine gültige Nachricht ein.",
|
|
2536
|
+
"fr": "Saisissez un message valide.",
|
|
2537
|
+
"en": "Enter a valid message.",
|
|
2538
|
+
"sw": "Weka ujumbe sahihi."
|
|
2539
|
+
},
|
|
2540
|
+
"Auth.field.message.required": {
|
|
2541
|
+
"de": "Bitte geben Sie eine Nachricht ein.",
|
|
2542
|
+
"de_informal": "Bitte gib eine Nachricht ein.",
|
|
2543
|
+
"fr": "Saisissez un message.",
|
|
2544
|
+
"en": "Enter a message.",
|
|
2545
|
+
"sw": "Weka ujumbe."
|
|
2546
|
+
},
|
|
2547
|
+
"Auth.field.support_note.invalid": {
|
|
2548
|
+
"de": "Bitte geben Sie eine gültige Supportnotiz ein.",
|
|
2549
|
+
"de_informal": "Bitte gib eine gültige Supportnotiz ein.",
|
|
2550
|
+
"fr": "Saisissez une note de support valide.",
|
|
2551
|
+
"en": "Enter a valid support note.",
|
|
2552
|
+
"sw": "Weka dokezo sahihi la usaidizi."
|
|
2553
|
+
},
|
|
2554
|
+
"Auth.field.support_note.required": {
|
|
2555
|
+
"de": "Bitte geben Sie eine Supportnotiz ein.",
|
|
2556
|
+
"de_informal": "Bitte gib eine Supportnotiz ein.",
|
|
2557
|
+
"fr": "Saisissez une note de support.",
|
|
2558
|
+
"en": "Enter a support note.",
|
|
2559
|
+
"sw": "Weka dokezo la usaidizi."
|
|
2560
|
+
},
|
|
2561
|
+
|
|
2141
2562
|
// Raw backend auth error codes (allauth-headless + Django password validators).
|
|
2142
2563
|
// Keyed by the exact code string so the existing `t(err.code)` call sites resolve
|
|
2143
2564
|
// as a drop-in, without any component change. See AUTH-2.
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
} from '@mui/material';
|
|
13
13
|
import { useTheme } from '@mui/material/styles';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import { resolveErrorText } from '../utils/resolveErrorText';
|
|
15
16
|
|
|
16
17
|
// Internal context
|
|
17
18
|
import { AuthContext } from '../auth/AuthContext';
|
|
@@ -53,7 +54,7 @@ export function AccountPage({
|
|
|
53
54
|
bulkInviteCsvProps = {},
|
|
54
55
|
extraTabs = [],
|
|
55
56
|
}) {
|
|
56
|
-
const { t } = useTranslation();
|
|
57
|
+
const { t, i18n } = useTranslation();
|
|
57
58
|
const { user, login, loading } = useContext(AuthContext);
|
|
58
59
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
59
60
|
const [authPolicy, setAuthPolicy] = useState(null);
|
|
@@ -111,9 +112,7 @@ export function AccountPage({
|
|
|
111
112
|
} catch (err) {
|
|
112
113
|
if (!active) return;
|
|
113
114
|
setAuthPolicy(null);
|
|
114
|
-
setAuthPolicyError(
|
|
115
|
-
t(err?.code || 'Auth.AUTH_POLICY_FETCH_FAILED', 'Could not load authentication policy.'),
|
|
116
|
-
);
|
|
115
|
+
setAuthPolicyError(resolveErrorText(i18n, err, 'Auth.AUTH_POLICY_FETCH_FAILED'));
|
|
117
116
|
}
|
|
118
117
|
};
|
|
119
118
|
|
package/src/pages/LoginPage.jsx
CHANGED
|
@@ -19,6 +19,7 @@ import { loginWithPasskey, startSocialLogin } from '../utils/authService';
|
|
|
19
19
|
// Components
|
|
20
20
|
import { LoginForm } from '../components/LoginForm';
|
|
21
21
|
import { MfaLoginComponent } from '../components/MfaLoginComponent';
|
|
22
|
+
import { resolveErrorText } from '../utils/resolveErrorText';
|
|
22
23
|
|
|
23
24
|
export const LOGIN_PAGE_ALERT_SX = { mb: 2 };
|
|
24
25
|
|
|
@@ -26,7 +27,7 @@ export function LoginPage() {
|
|
|
26
27
|
const navigate = useNavigate();
|
|
27
28
|
const location = useLocation();
|
|
28
29
|
const { user, loading, login, authMethods } = useContext(AuthContext);
|
|
29
|
-
const { t } = useTranslation();
|
|
30
|
+
const { t, i18n } = useTranslation();
|
|
30
31
|
|
|
31
32
|
// State
|
|
32
33
|
const [step, setStep] = useState('credentials'); // 'credentials' | 'mfa'
|
|
@@ -96,7 +97,7 @@ export function LoginPage() {
|
|
|
96
97
|
useEffect(() => {
|
|
97
98
|
const socialError = params.get('error') || params.get('social');
|
|
98
99
|
if (socialError) {
|
|
99
|
-
setErrorKey('Auth.SOCIAL_LOGIN_FAILED');
|
|
100
|
+
setErrorKey(t('Auth.SOCIAL_LOGIN_FAILED'));
|
|
100
101
|
}
|
|
101
102
|
}, [location.search]);
|
|
102
103
|
|
|
@@ -132,14 +133,14 @@ export function LoginPage() {
|
|
|
132
133
|
window.history.replaceState(null, '', cleanUrl);
|
|
133
134
|
}
|
|
134
135
|
if (recoveryStatus === 'expired') {
|
|
135
|
-
setErrorKey('Auth.RECOVERY_TOKEN_EXPIRED');
|
|
136
|
+
setErrorKey(t('Auth.RECOVERY_TOKEN_EXPIRED'));
|
|
136
137
|
setRecoveryToken(null);
|
|
137
138
|
return;
|
|
138
139
|
}
|
|
139
140
|
if (recoveryStatus !== 'ok') {
|
|
140
141
|
// Catches `invalid` and any unknown value (including legacy email
|
|
141
142
|
// links that carried the plaintext token before S164).
|
|
142
|
-
setErrorKey('Auth.RECOVERY_TOKEN_INVALID');
|
|
143
|
+
setErrorKey(t('Auth.RECOVERY_TOKEN_INVALID'));
|
|
143
144
|
setRecoveryToken(null);
|
|
144
145
|
return;
|
|
145
146
|
}
|
|
@@ -150,7 +151,7 @@ export function LoginPage() {
|
|
|
150
151
|
if (cancelled) return;
|
|
151
152
|
if (!token) {
|
|
152
153
|
// Session entry missing or already consumed — treat as invalid.
|
|
153
|
-
setErrorKey('Auth.RECOVERY_TOKEN_INVALID');
|
|
154
|
+
setErrorKey(t('Auth.RECOVERY_TOKEN_INVALID'));
|
|
154
155
|
setRecoveryToken(null);
|
|
155
156
|
return;
|
|
156
157
|
}
|
|
@@ -158,7 +159,7 @@ export function LoginPage() {
|
|
|
158
159
|
})
|
|
159
160
|
.catch((err) => {
|
|
160
161
|
if (cancelled) return;
|
|
161
|
-
setErrorKey(err
|
|
162
|
+
setErrorKey(resolveErrorText(i18n, err, 'Auth.RECOVERY_TOKEN_INVALID'));
|
|
162
163
|
setRecoveryToken(null);
|
|
163
164
|
})
|
|
164
165
|
.finally(() => {
|
|
@@ -217,7 +218,7 @@ export function LoginPage() {
|
|
|
217
218
|
handleLoginSuccess(result.user);
|
|
218
219
|
}
|
|
219
220
|
} catch (err) {
|
|
220
|
-
setErrorKey(err
|
|
221
|
+
setErrorKey(resolveErrorText(i18n, err, 'Auth.LOGIN_FAILED'));
|
|
221
222
|
} finally {
|
|
222
223
|
setSubmitting(false);
|
|
223
224
|
}
|
|
@@ -233,7 +234,7 @@ export function LoginPage() {
|
|
|
233
234
|
} catch (err) {
|
|
234
235
|
// 'Auth.PASSKEY_CANCELLED' is generic, maybe ignore visually or show specific hint
|
|
235
236
|
if (err.code !== 'Auth.PASSKEY_CANCELLED') {
|
|
236
|
-
setErrorKey(err
|
|
237
|
+
setErrorKey(resolveErrorText(i18n, err, 'Auth.PASSKEY_FAILED'));
|
|
237
238
|
}
|
|
238
239
|
} finally {
|
|
239
240
|
setSubmitting(false);
|
|
@@ -287,7 +288,7 @@ export function LoginPage() {
|
|
|
287
288
|
|
|
288
289
|
{errorKey && (
|
|
289
290
|
<Alert severity="error" sx={LOGIN_PAGE_ALERT_SX}>
|
|
290
|
-
{
|
|
291
|
+
{errorKey}
|
|
291
292
|
</Alert>
|
|
292
293
|
)}
|
|
293
294
|
|
|
@@ -6,9 +6,10 @@ import { useTranslation } from 'react-i18next';
|
|
|
6
6
|
import { NarrowPage } from '../layout/PageLayout';
|
|
7
7
|
import { PasswordChangeForm } from '../components/PasswordChangeForm';
|
|
8
8
|
import { changePassword } from '../auth/authApi';
|
|
9
|
+
import { resolveErrorText } from '../utils/resolveErrorText';
|
|
9
10
|
|
|
10
11
|
export function PasswordChangePage() {
|
|
11
|
-
const { t } = useTranslation();
|
|
12
|
+
const { t, i18n } = useTranslation();
|
|
12
13
|
|
|
13
14
|
const [submitting, setSubmitting] = useState(false);
|
|
14
15
|
const [successKey, setSuccessKey] = useState(null);
|
|
@@ -23,7 +24,7 @@ export function PasswordChangePage() {
|
|
|
23
24
|
await changePassword(oldPassword, newPassword);
|
|
24
25
|
setSuccessKey('Auth.RESET_PASSWORD_SUCCESS');
|
|
25
26
|
} catch (err) {
|
|
26
|
-
setErrorKey(err
|
|
27
|
+
setErrorKey(resolveErrorText(i18n, err, 'Auth.PASSWORD_CHANGE_FAILED'));
|
|
27
28
|
} finally {
|
|
28
29
|
setSubmitting(false);
|
|
29
30
|
}
|
|
@@ -48,7 +49,7 @@ export function PasswordChangePage() {
|
|
|
48
49
|
|
|
49
50
|
{errorKey && (
|
|
50
51
|
<Typography color="error" gutterBottom>
|
|
51
|
-
{
|
|
52
|
+
{errorKey}
|
|
52
53
|
</Typography>
|
|
53
54
|
)}
|
|
54
55
|
|
|
@@ -7,12 +7,13 @@ import { useTranslation } from 'react-i18next';
|
|
|
7
7
|
import { NarrowPage } from '../layout/PageLayout';
|
|
8
8
|
import { PasswordSetForm } from '../components/PasswordSetForm';
|
|
9
9
|
import { verifyResetToken, setNewPassword } from '../auth/authApi';
|
|
10
|
+
import { resolveErrorText } from '../utils/resolveErrorText';
|
|
10
11
|
|
|
11
12
|
export function PasswordInvitePage() {
|
|
12
13
|
const { uid, token } = useParams();
|
|
13
14
|
const location = useLocation();
|
|
14
15
|
const navigate = useNavigate();
|
|
15
|
-
const { t } = useTranslation();
|
|
16
|
+
const { t, i18n } = useTranslation();
|
|
16
17
|
const searchParams = new URLSearchParams(location.search);
|
|
17
18
|
const nextPath = searchParams.get('next');
|
|
18
19
|
|
|
@@ -37,7 +38,7 @@ export function PasswordInvitePage() {
|
|
|
37
38
|
|
|
38
39
|
useEffect(() => {
|
|
39
40
|
if (!uid || !token) {
|
|
40
|
-
setErrorKey('Auth.RESET_LINK_INVALID');
|
|
41
|
+
setErrorKey(t('Auth.RESET_LINK_INVALID'));
|
|
41
42
|
setChecked(true);
|
|
42
43
|
return;
|
|
43
44
|
}
|
|
@@ -47,7 +48,7 @@ export function PasswordInvitePage() {
|
|
|
47
48
|
await verifyResetToken(uid, token);
|
|
48
49
|
setChecked(true);
|
|
49
50
|
} catch (err) {
|
|
50
|
-
setErrorKey(err
|
|
51
|
+
setErrorKey(resolveErrorText(i18n, err, 'Auth.RESET_LINK_INVALID'));
|
|
51
52
|
setChecked(true);
|
|
52
53
|
}
|
|
53
54
|
};
|
|
@@ -108,13 +109,13 @@ export function PasswordInvitePage() {
|
|
|
108
109
|
// only a password rejection keeps the form; a link problem must still
|
|
109
110
|
// end in the same invalid-link state the initial check produces.
|
|
110
111
|
if (err.code === 'Auth.RESET_LINK_INVALID') {
|
|
111
|
-
setErrorKey(err.
|
|
112
|
+
setErrorKey(resolveErrorText(i18n, err, 'Auth.RESET_LINK_INVALID'));
|
|
112
113
|
} else {
|
|
113
114
|
const responseMessages = err.raw?.messages || err.response?.data?.messages;
|
|
114
115
|
setSubmitErrorKey(
|
|
115
116
|
Array.isArray(responseMessages) && responseMessages.length > 0
|
|
116
117
|
? responseMessages.join(' ')
|
|
117
|
-
:
|
|
118
|
+
: resolveErrorText(i18n, err, 'Auth.RESET_PASSWORD_FAILED'),
|
|
118
119
|
);
|
|
119
120
|
}
|
|
120
121
|
} finally {
|
|
@@ -144,7 +145,7 @@ export function PasswordInvitePage() {
|
|
|
144
145
|
|
|
145
146
|
{errorKey && (
|
|
146
147
|
<Typography color="error" gutterBottom>
|
|
147
|
-
{
|
|
148
|
+
{errorKey}
|
|
148
149
|
</Typography>
|
|
149
150
|
)}
|
|
150
151
|
|
|
@@ -6,9 +6,10 @@ import { useTranslation } from 'react-i18next';
|
|
|
6
6
|
import { NarrowPage } from '../layout/PageLayout';
|
|
7
7
|
import { requestPasswordReset } from '../auth/authApi';
|
|
8
8
|
import {PasswordResetRequestForm } from '../components/PasswordResetRequestForm';
|
|
9
|
+
import { resolveErrorText } from '../utils/resolveErrorText';
|
|
9
10
|
|
|
10
11
|
export function PasswordResetRequestPage() {
|
|
11
|
-
const { t } = useTranslation();
|
|
12
|
+
const { t, i18n } = useTranslation();
|
|
12
13
|
|
|
13
14
|
const [submitting, setSubmitting] = useState(false);
|
|
14
15
|
const [successKey, setSuccessKey] = useState(null);
|
|
@@ -19,7 +20,7 @@ export function PasswordResetRequestPage() {
|
|
|
19
20
|
setErrorKey(null);
|
|
20
21
|
|
|
21
22
|
if (!email) {
|
|
22
|
-
setErrorKey('Auth.EMAIL_REQUIRED');
|
|
23
|
+
setErrorKey(t('Auth.EMAIL_REQUIRED'));
|
|
23
24
|
return;
|
|
24
25
|
}
|
|
25
26
|
|
|
@@ -29,7 +30,7 @@ export function PasswordResetRequestPage() {
|
|
|
29
30
|
// Kein User-Leak, immer gleiche Success-Meldung
|
|
30
31
|
setSuccessKey('Auth.RESET_REQUEST_ACCEPTED');
|
|
31
32
|
} catch (err) {
|
|
32
|
-
setErrorKey(err
|
|
33
|
+
setErrorKey(resolveErrorText(i18n, err, 'Auth.RESET_REQUEST_FAILED'));
|
|
33
34
|
} finally {
|
|
34
35
|
setSubmitting(false);
|
|
35
36
|
}
|
|
@@ -54,7 +55,7 @@ export function PasswordResetRequestPage() {
|
|
|
54
55
|
|
|
55
56
|
{errorKey && (
|
|
56
57
|
<Typography color="error" gutterBottom>
|
|
57
|
-
{
|
|
58
|
+
{errorKey}
|
|
58
59
|
</Typography>
|
|
59
60
|
)}
|
|
60
61
|
|