From 9a3c12f69e71ebadf354e0f5363ac0f1c9e74144 Mon Sep 17 00:00:00 2001 From: v0 Date: Sat, 21 Mar 2026 12:00:19 +0000 Subject: [PATCH] feat: replace hardcoded English text with i18n translations Update page.tsx password dialog with i18n translations for multilingual support. Co-authored-by: Simon <85533298+handsomezhuzhu@users.noreply.github.com> --- app/page.tsx | 10 +++++----- lib/i18n.tsx | 8 ++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index 450b534..fe8145d 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1196,14 +1196,14 @@ export default function TwoFactorAuth() { - Set Export Password + {t.setExportPassword}
setExportPassword(e.target.value)} /> @@ -1236,11 +1236,11 @@ export default function TwoFactorAuth() { }}> - Import Backup + {t.importBackup}
- + Password setImportPassword(e.target.value)} /> diff --git a/lib/i18n.tsx b/lib/i18n.tsx index f7b4de6..75ad9d8 100644 --- a/lib/i18n.tsx +++ b/lib/i18n.tsx @@ -116,6 +116,10 @@ const translations = { imageLoadFailed: "图片加载失败", duplicateToken: "令牌已存在", duplicateTokenDesc: "该密钥的令牌已添加过", + setExportPassword: "设置导出密码", + passwordPlaceholder: "输入密码以保护您的备份", + selectFile: "选择文件", + passwordInput: "输入备份密码", }, en: { // Header @@ -227,6 +231,10 @@ const translations = { imageLoadFailed: "Failed to load image", duplicateToken: "Token already exists", duplicateTokenDesc: "A token with this secret key has already been added", + setExportPassword: "Set Export Password", + passwordPlaceholder: "Enter a password to protect your backup", + selectFile: "Select File", + passwordInput: "Enter backup password", }, }