fix(auth): localize reset password confirmation (#4769)

* fix(auth): localize reset password confirmation

Wrap reset confirmation page copy in frontend i18n calls and add matching locale entries so the page no longer mixes translated labels with hardcoded English copy.

* fix(auth): use semantic reset i18n keys
This commit is contained in:
Neo
2026-05-19 16:14:49 +08:00
committed by GitHub
parent fc08c133e2
commit cb9270ed23
7 changed files with 37 additions and 5 deletions
@@ -112,8 +112,8 @@ export function ResetPasswordConfirm({
</h2> </h2>
<p className='text-muted-foreground text-left text-sm sm:text-base'> <p className='text-muted-foreground text-left text-sm sm:text-base'>
{newPassword {newPassword
? 'Your password has been reset successfully' ? t('auth.resetPasswordConfirm.success')
: 'Confirm the reset request to generate a new password.'} : t('auth.resetPasswordConfirm.description')}
</p> </p>
</div> </div>
@@ -178,10 +178,12 @@ export function ResetPasswordConfirm({
} }
> >
{newPassword {newPassword
? 'Return to login' ? t('auth.resetPasswordConfirm.backToLogin')
: isActive : isActive
? `Retry (${secondsLeft}s)` ? t('auth.resetPasswordConfirm.retry', {
: 'Confirm reset password'} seconds: secondsLeft,
})
: t('auth.resetPasswordConfirm.confirm')}
</Button> </Button>
{!newPassword && ( {!newPassword && (
+5
View File
@@ -886,6 +886,8 @@
"Confirm New Password": "Confirm New Password", "Confirm New Password": "Confirm New Password",
"Confirm password": "Confirm password", "Confirm password": "Confirm password",
"Confirm Payment": "Confirm Payment", "Confirm Payment": "Confirm Payment",
"auth.resetPasswordConfirm.confirm": "Confirm reset password",
"auth.resetPasswordConfirm.description": "Confirm the reset request to generate a new password.",
"Confirm Selection": "Confirm Selection", "Confirm Selection": "Confirm Selection",
"Confirm settings and finish setup": "Confirm settings and finish setup", "Confirm settings and finish setup": "Confirm settings and finish setup",
"confirm that I bear legal responsibility arising from deployment": "confirm that I bear legal responsibility arising from deployment", "confirm that I bear legal responsibility arising from deployment": "confirm that I bear legal responsibility arising from deployment",
@@ -3349,6 +3351,7 @@
"Retain last N files": "Retain last N files", "Retain last N files": "Retain last N files",
"Retention days": "Retention days", "Retention days": "Retention days",
"Retry": "Retry", "Retry": "Retry",
"auth.resetPasswordConfirm.retry": "Retry ({{seconds}}s)",
"Retry Chain": "Retry Chain", "Retry Chain": "Retry Chain",
"Retry Suggestion": "Retry Suggestion", "Retry Suggestion": "Retry Suggestion",
"Retry Times": "Retry Times", "Retry Times": "Retry Times",
@@ -3358,6 +3361,7 @@
"Return Error": "Return Error", "Return Error": "Return Error",
"Return per-token log probabilities": "Return per-token log probabilities", "Return per-token log probabilities": "Return per-token log probabilities",
"Return to dashboard": "Return to dashboard", "Return to dashboard": "Return to dashboard",
"auth.resetPasswordConfirm.backToLogin": "Return to login",
"Return vector embeddings for inputs": "Return vector embeddings for inputs", "Return vector embeddings for inputs": "Return vector embeddings for inputs",
"Reveal API key": "Reveal API key", "Reveal API key": "Reveal API key",
"Reveal key": "Reveal key", "Reveal key": "Reveal key",
@@ -4466,6 +4470,7 @@
"Your GitHub OAuth Client ID": "Your GitHub OAuth Client ID", "Your GitHub OAuth Client ID": "Your GitHub OAuth Client ID",
"Your GitHub OAuth Client Secret": "Your GitHub OAuth Client Secret", "Your GitHub OAuth Client Secret": "Your GitHub OAuth Client Secret",
"Your new backup codes are ready": "Your new backup codes are ready", "Your new backup codes are ready": "Your new backup codes are ready",
"auth.resetPasswordConfirm.success": "Your password has been reset successfully",
"Your Referral Link": "Your Referral Link", "Your Referral Link": "Your Referral Link",
"Your setup guide is collapsed so usage stays in focus.": "Your setup guide is collapsed so usage stays in focus.", "Your setup guide is collapsed so usage stays in focus.": "Your setup guide is collapsed so usage stays in focus.",
"Your system access token for API authentication. Keep it secure and don't share it with others.": "Your system access token for API authentication. Keep it secure and don't share it with others.", "Your system access token for API authentication. Keep it secure and don't share it with others.": "Your system access token for API authentication. Keep it secure and don't share it with others.",
+5
View File
@@ -886,6 +886,8 @@
"Confirm New Password": "Confirmer le nouveau mot de passe", "Confirm New Password": "Confirmer le nouveau mot de passe",
"Confirm password": "Confirmer le mot de passe", "Confirm password": "Confirmer le mot de passe",
"Confirm Payment": "Confirmer le paiement", "Confirm Payment": "Confirmer le paiement",
"auth.resetPasswordConfirm.confirm": "Confirmer la réinitialisation du mot de passe",
"auth.resetPasswordConfirm.description": "Confirmez la demande de réinitialisation pour générer un nouveau mot de passe.",
"Confirm Selection": "Confirmer la sélection", "Confirm Selection": "Confirmer la sélection",
"Confirm settings and finish setup": "Confirmez les paramètres et terminez la configuration", "Confirm settings and finish setup": "Confirmez les paramètres et terminez la configuration",
"confirm that I bear legal responsibility arising from deployment": "confirm that I bear legal responsibility arising from deployment", "confirm that I bear legal responsibility arising from deployment": "confirm that I bear legal responsibility arising from deployment",
@@ -3349,6 +3351,7 @@
"Retain last N files": "Conserver les N derniers fichiers", "Retain last N files": "Conserver les N derniers fichiers",
"Retention days": "Jours de rétention", "Retention days": "Jours de rétention",
"Retry": "Réessayer", "Retry": "Réessayer",
"auth.resetPasswordConfirm.retry": "Réessayer ({{seconds}}s)",
"Retry Chain": "Chaîne de tentatives", "Retry Chain": "Chaîne de tentatives",
"Retry Suggestion": "Suggestion de relance", "Retry Suggestion": "Suggestion de relance",
"Retry Times": "Nombre de tentatives", "Retry Times": "Nombre de tentatives",
@@ -3358,6 +3361,7 @@
"Return Error": "Retourner l'erreur", "Return Error": "Retourner l'erreur",
"Return per-token log probabilities": "Retourner les log-probabilités par jeton", "Return per-token log probabilities": "Retourner les log-probabilités par jeton",
"Return to dashboard": "Retour au tableau de bord", "Return to dashboard": "Retour au tableau de bord",
"auth.resetPasswordConfirm.backToLogin": "Retour à la connexion",
"Return vector embeddings for inputs": "Renvoyer des embeddings vectoriels pour les entrées", "Return vector embeddings for inputs": "Renvoyer des embeddings vectoriels pour les entrées",
"Reveal API key": "Afficher la clé API", "Reveal API key": "Afficher la clé API",
"Reveal key": "Révéler la clé", "Reveal key": "Révéler la clé",
@@ -4466,6 +4470,7 @@
"Your GitHub OAuth Client ID": "Votre ID Client OAuth GitHub", "Your GitHub OAuth Client ID": "Votre ID Client OAuth GitHub",
"Your GitHub OAuth Client Secret": "Votre Secret Client OAuth GitHub", "Your GitHub OAuth Client Secret": "Votre Secret Client OAuth GitHub",
"Your new backup codes are ready": "Vos nouveaux codes de secours sont prêts", "Your new backup codes are ready": "Vos nouveaux codes de secours sont prêts",
"auth.resetPasswordConfirm.success": "Votre mot de passe a été réinitialisé avec succès",
"Your Referral Link": "Votre lien de parrainage", "Your Referral Link": "Votre lien de parrainage",
"Your setup guide is collapsed so usage stays in focus.": "Le guide de configuration est réduit afin de garder l'utilisation au premier plan.", "Your setup guide is collapsed so usage stays in focus.": "Le guide de configuration est réduit afin de garder l'utilisation au premier plan.",
"Your system access token for API authentication. Keep it secure and don't share it with others.": "Votre jeton d'accès système pour l'authentification API. Gardez-le en sécurité et ne le partagez pas avec d'autres.", "Your system access token for API authentication. Keep it secure and don't share it with others.": "Votre jeton d'accès système pour l'authentification API. Gardez-le en sécurité et ne le partagez pas avec d'autres.",
+5
View File
@@ -886,6 +886,8 @@
"Confirm New Password": "新しいパスワードの確認", "Confirm New Password": "新しいパスワードの確認",
"Confirm password": "パスワードの確認", "Confirm password": "パスワードの確認",
"Confirm Payment": "支払いの確認", "Confirm Payment": "支払いの確認",
"auth.resetPasswordConfirm.confirm": "パスワードリセットを確認",
"auth.resetPasswordConfirm.description": "新しいパスワードを生成するには、リセット要求を確認してください。",
"Confirm Selection": "選択の確認", "Confirm Selection": "選択の確認",
"Confirm settings and finish setup": "設定を確認してセットアップを完了", "Confirm settings and finish setup": "設定を確認してセットアップを完了",
"confirm that I bear legal responsibility arising from deployment": "confirm that I bear legal responsibility arising from deployment", "confirm that I bear legal responsibility arising from deployment": "confirm that I bear legal responsibility arising from deployment",
@@ -3349,6 +3351,7 @@
"Retain last N files": "最新N個のファイルを保持", "Retain last N files": "最新N個のファイルを保持",
"Retention days": "保持日数", "Retention days": "保持日数",
"Retry": "再試行", "Retry": "再試行",
"auth.resetPasswordConfirm.retry": "再試行 ({{seconds}}秒)",
"Retry Chain": "リトライチェーン", "Retry Chain": "リトライチェーン",
"Retry Suggestion": "リトライ提案", "Retry Suggestion": "リトライ提案",
"Retry Times": "再試行回数", "Retry Times": "再試行回数",
@@ -3358,6 +3361,7 @@
"Return Error": "エラーを返す", "Return Error": "エラーを返す",
"Return per-token log probabilities": "トークンごとの対数確率を返します", "Return per-token log probabilities": "トークンごとの対数確率を返します",
"Return to dashboard": "ダッシュボードに戻る", "Return to dashboard": "ダッシュボードに戻る",
"auth.resetPasswordConfirm.backToLogin": "ログインに戻る",
"Return vector embeddings for inputs": "入力に対してベクトル埋め込みを返却", "Return vector embeddings for inputs": "入力に対してベクトル埋め込みを返却",
"Reveal API key": "APIキーを表示", "Reveal API key": "APIキーを表示",
"Reveal key": "キーを表示", "Reveal key": "キーを表示",
@@ -4466,6 +4470,7 @@
"Your GitHub OAuth Client ID": "あなたのGitHub OAuthクライアントID", "Your GitHub OAuth Client ID": "あなたのGitHub OAuthクライアントID",
"Your GitHub OAuth Client Secret": "あなたのGitHub OAuthクライアントシークレット", "Your GitHub OAuth Client Secret": "あなたのGitHub OAuthクライアントシークレット",
"Your new backup codes are ready": "新しいバックアップコードの準備ができました", "Your new backup codes are ready": "新しいバックアップコードの準備ができました",
"auth.resetPasswordConfirm.success": "パスワードが正常にリセットされました",
"Your Referral Link": "あなたの紹介リンク", "Your Referral Link": "あなたの紹介リンク",
"Your setup guide is collapsed so usage stays in focus.": "利用状況に集中できるよう、セットアップガイドを折りたたみました。", "Your setup guide is collapsed so usage stays in focus.": "利用状況に集中できるよう、セットアップガイドを折りたたみました。",
"Your system access token for API authentication. Keep it secure and don't share it with others.": "API認証用のシステムアクセストークンです。安全に保管し、他者と共有しないでください。", "Your system access token for API authentication. Keep it secure and don't share it with others.": "API認証用のシステムアクセストークンです。安全に保管し、他者と共有しないでください。",
+5
View File
@@ -886,6 +886,8 @@
"Confirm New Password": "Подтвердить новый пароль", "Confirm New Password": "Подтвердить новый пароль",
"Confirm password": "Подтвердить пароль", "Confirm password": "Подтвердить пароль",
"Confirm Payment": "Подтвердить оплату", "Confirm Payment": "Подтвердить оплату",
"auth.resetPasswordConfirm.confirm": "Подтвердить сброс пароля",
"auth.resetPasswordConfirm.description": "Подтвердите запрос на сброс, чтобы создать новый пароль.",
"Confirm Selection": "Подтвердить выбор", "Confirm Selection": "Подтвердить выбор",
"Confirm settings and finish setup": "Подтвердите настройки и завершите установку", "Confirm settings and finish setup": "Подтвердите настройки и завершите установку",
"confirm that I bear legal responsibility arising from deployment": "confirm that I bear legal responsibility arising from deployment", "confirm that I bear legal responsibility arising from deployment": "confirm that I bear legal responsibility arising from deployment",
@@ -3349,6 +3351,7 @@
"Retain last N files": "Хранить последние N файлов", "Retain last N files": "Хранить последние N файлов",
"Retention days": "Дней хранения", "Retention days": "Дней хранения",
"Retry": "Повторить попытку", "Retry": "Повторить попытку",
"auth.resetPasswordConfirm.retry": "Повторить ({{seconds}}с)",
"Retry Chain": "Цепочка повторов", "Retry Chain": "Цепочка повторов",
"Retry Suggestion": "Рекомендация по повтору", "Retry Suggestion": "Рекомендация по повтору",
"Retry Times": "Количество повторных попыток", "Retry Times": "Количество повторных попыток",
@@ -3358,6 +3361,7 @@
"Return Error": "Вернуть ошибку", "Return Error": "Вернуть ошибку",
"Return per-token log probabilities": "Возвращать логарифмические вероятности по токенам", "Return per-token log probabilities": "Возвращать логарифмические вероятности по токенам",
"Return to dashboard": "Вернуться на панель управления", "Return to dashboard": "Вернуться на панель управления",
"auth.resetPasswordConfirm.backToLogin": "Вернуться ко входу",
"Return vector embeddings for inputs": "Возвращать векторные эмбеддинги для входных данных", "Return vector embeddings for inputs": "Возвращать векторные эмбеддинги для входных данных",
"Reveal API key": "Показать API ключ", "Reveal API key": "Показать API ключ",
"Reveal key": "Показать ключ", "Reveal key": "Показать ключ",
@@ -4466,6 +4470,7 @@
"Your GitHub OAuth Client ID": "Ваш ID клиента GitHub OAuth", "Your GitHub OAuth Client ID": "Ваш ID клиента GitHub OAuth",
"Your GitHub OAuth Client Secret": "Ваш секрет клиента GitHub OAuth", "Your GitHub OAuth Client Secret": "Ваш секрет клиента GitHub OAuth",
"Your new backup codes are ready": "Ваши новые резервные коды готовы", "Your new backup codes are ready": "Ваши новые резервные коды готовы",
"auth.resetPasswordConfirm.success": "Ваш пароль успешно сброшен",
"Your Referral Link": "Ваша реферальная ссылка", "Your Referral Link": "Ваша реферальная ссылка",
"Your setup guide is collapsed so usage stays in focus.": "Руководство свернуто, чтобы основные показатели оставались в фокусе.", "Your setup guide is collapsed so usage stays in focus.": "Руководство свернуто, чтобы основные показатели оставались в фокусе.",
"Your system access token for API authentication. Keep it secure and don't share it with others.": "Ваш системный токен доступа для аутентификации API. Храните его в безопасности и не делитесь им с другими.", "Your system access token for API authentication. Keep it secure and don't share it with others.": "Ваш системный токен доступа для аутентификации API. Храните его в безопасности и не делитесь им с другими.",
+5
View File
@@ -886,6 +886,8 @@
"Confirm New Password": "Xác nhận mật khẩu mới", "Confirm New Password": "Xác nhận mật khẩu mới",
"Confirm password": "Xác nhận mật khẩu", "Confirm password": "Xác nhận mật khẩu",
"Confirm Payment": "Xác nhận Thanh toán", "Confirm Payment": "Xác nhận Thanh toán",
"auth.resetPasswordConfirm.confirm": "Xác nhận đặt lại mật khẩu",
"auth.resetPasswordConfirm.description": "Xác nhận yêu cầu đặt lại để tạo mật khẩu mới.",
"Confirm Selection": "Xác nhận lựa chọn", "Confirm Selection": "Xác nhận lựa chọn",
"Confirm settings and finish setup": "Xác nhận cài đặt và hoàn tất thiết lập", "Confirm settings and finish setup": "Xác nhận cài đặt và hoàn tất thiết lập",
"confirm that I bear legal responsibility arising from deployment": "confirm that I bear legal responsibility arising from deployment", "confirm that I bear legal responsibility arising from deployment": "confirm that I bear legal responsibility arising from deployment",
@@ -3349,6 +3351,7 @@
"Retain last N files": "Giữ lại N tệp gần nhất", "Retain last N files": "Giữ lại N tệp gần nhất",
"Retention days": "Số ngày lưu giữ", "Retention days": "Số ngày lưu giữ",
"Retry": "Thử lại", "Retry": "Thử lại",
"auth.resetPasswordConfirm.retry": "Thử lại ({{seconds}} giây)",
"Retry Chain": "Chuỗi thử lại", "Retry Chain": "Chuỗi thử lại",
"Retry Suggestion": "Gợi ý thử lại", "Retry Suggestion": "Gợi ý thử lại",
"Retry Times": "Số lần thử lại", "Retry Times": "Số lần thử lại",
@@ -3358,6 +3361,7 @@
"Return Error": "Trả về lỗi", "Return Error": "Trả về lỗi",
"Return per-token log probabilities": "Trả về log probabilities cho từng token", "Return per-token log probabilities": "Trả về log probabilities cho từng token",
"Return to dashboard": "Quay lại bảng điều khiển", "Return to dashboard": "Quay lại bảng điều khiển",
"auth.resetPasswordConfirm.backToLogin": "Quay lại đăng nhập",
"Return vector embeddings for inputs": "Trả về vector embedding cho đầu vào", "Return vector embeddings for inputs": "Trả về vector embedding cho đầu vào",
"Reveal API key": "Hiển thị khóa API", "Reveal API key": "Hiển thị khóa API",
"Reveal key": "Display key", "Reveal key": "Display key",
@@ -4466,6 +4470,7 @@
"Your GitHub OAuth Client ID": "Client ID OAuth GitHub của bạn", "Your GitHub OAuth Client ID": "Client ID OAuth GitHub của bạn",
"Your GitHub OAuth Client Secret": "Bí mật ứng dụng OAuth của GitHub của bạn", "Your GitHub OAuth Client Secret": "Bí mật ứng dụng OAuth của GitHub của bạn",
"Your new backup codes are ready": "Mã dự phòng mới của bạn đã sẵn sàng", "Your new backup codes are ready": "Mã dự phòng mới của bạn đã sẵn sàng",
"auth.resetPasswordConfirm.success": "Mật khẩu của bạn đã được đặt lại thành công",
"Your Referral Link": "Liên kết giới thiệu của bạn", "Your Referral Link": "Liên kết giới thiệu của bạn",
"Your setup guide is collapsed so usage stays in focus.": "Hướng dẫn thiết lập đã thu gọn để giữ phần sử dụng ở vị trí nổi bật.", "Your setup guide is collapsed so usage stays in focus.": "Hướng dẫn thiết lập đã thu gọn để giữ phần sử dụng ở vị trí nổi bật.",
"Your system access token for API authentication. Keep it secure and don't share it with others.": "Mã truy cập hệ thống của bạn để xác thực API. Hãy giữ nó an toàn và đừng chia sẻ nó với người khác.", "Your system access token for API authentication. Keep it secure and don't share it with others.": "Mã truy cập hệ thống của bạn để xác thực API. Hãy giữ nó an toàn và đừng chia sẻ nó với người khác.",
+5
View File
@@ -886,6 +886,8 @@
"Confirm New Password": "确认新密码", "Confirm New Password": "确认新密码",
"Confirm password": "确认密码", "Confirm password": "确认密码",
"Confirm Payment": "确认付款", "Confirm Payment": "确认付款",
"auth.resetPasswordConfirm.confirm": "确认重置密码",
"auth.resetPasswordConfirm.description": "确认重置请求以生成新密码。",
"Confirm Selection": "确认选择", "Confirm Selection": "确认选择",
"Confirm settings and finish setup": "确认设置并完成安装", "Confirm settings and finish setup": "确认设置并完成安装",
"confirm that I bear legal responsibility arising from deployment": "并确认自行承担部署", "confirm that I bear legal responsibility arising from deployment": "并确认自行承担部署",
@@ -3349,6 +3351,7 @@
"Retain last N files": "保留最近 N 个文件", "Retain last N files": "保留最近 N 个文件",
"Retention days": "保留天数", "Retention days": "保留天数",
"Retry": "重试", "Retry": "重试",
"auth.resetPasswordConfirm.retry": "重试 ({{seconds}}s)",
"Retry Chain": "重试链路", "Retry Chain": "重试链路",
"Retry Suggestion": "重试建议", "Retry Suggestion": "重试建议",
"Retry Times": "重试次数", "Retry Times": "重试次数",
@@ -3358,6 +3361,7 @@
"Return Error": "返回错误", "Return Error": "返回错误",
"Return per-token log probabilities": "返回每个 token 的对数概率", "Return per-token log probabilities": "返回每个 token 的对数概率",
"Return to dashboard": "返回仪表盘", "Return to dashboard": "返回仪表盘",
"auth.resetPasswordConfirm.backToLogin": "返回登录",
"Return vector embeddings for inputs": "为输入返回向量嵌入", "Return vector embeddings for inputs": "为输入返回向量嵌入",
"Reveal API key": "显示 API 密钥", "Reveal API key": "显示 API 密钥",
"Reveal key": "显示密钥", "Reveal key": "显示密钥",
@@ -4466,6 +4470,7 @@
"Your GitHub OAuth Client ID": "您的 GitHub OAuth 客户端 ID", "Your GitHub OAuth Client ID": "您的 GitHub OAuth 客户端 ID",
"Your GitHub OAuth Client Secret": "您的 GitHub OAuth 客户端密钥", "Your GitHub OAuth Client Secret": "您的 GitHub OAuth 客户端密钥",
"Your new backup codes are ready": "您的新备份代码已准备就绪", "Your new backup codes are ready": "您的新备份代码已准备就绪",
"auth.resetPasswordConfirm.success": "您的密码已成功重置",
"Your Referral Link": "您的推荐链接", "Your Referral Link": "您的推荐链接",
"Your setup guide is collapsed so usage stays in focus.": "设置引导已收起,让用量信息保持在焦点位置。", "Your setup guide is collapsed so usage stays in focus.": "设置引导已收起,让用量信息保持在焦点位置。",
"Your system access token for API authentication. Keep it secure and don't share it with others.": "您的系统访问令牌,用于 API 认证。请妥善保管,不要与他人分享。", "Your system access token for API authentication. Keep it secure and don't share it with others.": "您的系统访问令牌,用于 API 认证。请妥善保管,不要与他人分享。",