Skip to content

Commit 5b78ff1

Browse files
committed
fix: replace hardcoded TOTP strings with i18n
1 parent b268c63 commit 5b78ff1

File tree

3 files changed

+79
-47
lines changed

3 files changed

+79
-47
lines changed

src/locales/en.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,25 @@
8080
"totpManualSecret": "Manual secret",
8181
"totpRequired": "Enter verification code",
8282
"invalidTotp": "Invalid verification code",
83-
"totpPendingExpired": "Verification session expired, please sign in again"
83+
"totpPendingExpired": "Verification session expired, please sign in again",
84+
"tooManyAttempts": "Too many login attempts. Try again in 15 minutes.",
85+
"tooManyTotpAttempts": "Too many verification attempts. Try again later.",
86+
"invalidCurrentPassword": "Invalid current password",
87+
"enterCurrentPassword": "Enter current password",
88+
"enterCurrentTotp": "Enter current TOTP code",
89+
"invalidCurrentTotp": "Invalid current TOTP code",
90+
"enterPasswordAndTotp": "Enter current password and TOTP code",
91+
"totpConfigError": "TOTP configuration error. Contact administrator",
92+
"totpFlowError": "Error starting TOTP flow",
93+
"totpConfirmError": "TOTP confirmation error",
94+
"totpDisableError": "Error disabling TOTP",
95+
"totpAlreadyEnabled": "TOTP is already enabled",
96+
"totpAlreadyDisabled": "TOTP is already disabled",
97+
"totpRequiredForRotate": "TOTP must be enabled to rotate secret",
98+
"totpDisabled": "TOTP successfully disabled",
99+
"totpEnabled": "TOTP successfully enabled",
100+
"totpRotated": "New TOTP secret successfully configured",
101+
"passwordChanged": "Password successfully changed"
84102
},
85103
"dashboard": {
86104
"title": "Dashboard",

src/locales/ru.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,25 @@
8080
"totpManualSecret": "Секрет для ручного ввода",
8181
"totpRequired": "Введите код подтверждения",
8282
"invalidTotp": "Неверный код подтверждения",
83-
"totpPendingExpired": "Сессия подтверждения истекла, войдите заново"
83+
"totpPendingExpired": "Сессия подтверждения истекла, войдите заново",
84+
"tooManyAttempts": "Слишком много попыток входа. Попробуйте через 15 минут.",
85+
"tooManyTotpAttempts": "Слишком много попыток подтверждения. Попробуйте позже.",
86+
"invalidCurrentPassword": "Неверный текущий пароль",
87+
"enterCurrentPassword": "Введите текущий пароль",
88+
"enterCurrentTotp": "Введите текущий TOTP-код",
89+
"invalidCurrentTotp": "Неверный текущий TOTP-код",
90+
"enterPasswordAndTotp": "Введите текущий пароль и TOTP-код",
91+
"totpConfigError": "Ошибка настройки TOTP. Обратитесь к администратору",
92+
"totpFlowError": "Ошибка запуска TOTP-flow",
93+
"totpConfirmError": "Ошибка подтверждения TOTP",
94+
"totpDisableError": "Ошибка отключения TOTP",
95+
"totpAlreadyEnabled": "TOTP уже включен",
96+
"totpAlreadyDisabled": "TOTP уже отключен",
97+
"totpRequiredForRotate": "Для перевыпуска TOTP должен быть включен",
98+
"totpDisabled": "TOTP успешно отключен",
99+
"totpEnabled": "TOTP успешно подключен",
100+
"totpRotated": "Новый TOTP-секрет успешно подключен",
101+
"passwordChanged": "Пароль успешно изменён"
84102
},
85103
"dashboard": {
86104
"title": "Главная",

0 commit comments

Comments
 (0)