🌐 feat(i18n): add internationalization support for TwoFASetting component
- Add comprehensive i18n support to TwoFASetting.js component
- Add all required English translations to en.json for 2FA settings
- Update component to accept t function as prop and use translation keys
- Fix prop passing in PersonalSetting.js to provide t function
- Maintain all existing UI improvements and functionality
- Support both Chinese and English interfaces for:
* Main 2FA settings card with status indicators
* Setup modal with guided steps (QR scan, backup codes, verification)
* Disable 2FA modal with impact warnings and confirmation
* Regenerate backup codes modal with success states
* All buttons, placeholders, messages, and notifications
- Follow project i18n conventions using t('key') pattern
- Ensure seamless language switching for enhanced user experience
This enables the 2FA settings to be fully localized while preserving
the modern UI design and improved user workflow from previous updates.
This commit is contained in:
@@ -697,7 +697,7 @@
|
||||
"令牌分组": "Token grouping",
|
||||
"隐": "hidden",
|
||||
"本站当前已启用模型": "The model is currently enabled on this site",
|
||||
"个": "indivual",
|
||||
"个": " indivual",
|
||||
"倍率是本站的计算方式,不同模型有着不同的倍率,并非官方价格的多少倍,请务必知晓。": "The magnification is the calculation method of this website. Different models have different magnifications, which are not multiples of the official price. Please be sure to know.",
|
||||
"所有各厂聊天模型请统一使用OpenAI方式请求,支持OpenAI官方库<br/>Claude()Claude官方格式请求": "Please use the OpenAI method to request all chat models from each factory, and support the OpenAI official library<br/>Claude()Claude official format request",
|
||||
"分组说明": "Group description",
|
||||
@@ -1918,5 +1918,60 @@
|
||||
"后缀名称匹配": "Suffix name matching",
|
||||
"包含名称匹配": "Contains name matching",
|
||||
"展开更多": "Expand more",
|
||||
"已切换至最优倍率视图,每个模型使用其最低倍率分组": "Switched to the optimal ratio view, each model uses its lowest ratio group"
|
||||
"已切换至最优倍率视图,每个模型使用其最低倍率分组": "Switched to the optimal ratio view, each model uses its lowest ratio group",
|
||||
"两步验证设置": "Two-factor authentication settings",
|
||||
"两步验证(2FA)为您的账户提供额外的安全保护。启用后,登录时需要输入密码和验证器应用生成的验证码。": "Two-factor authentication (2FA) provides additional security protection for your account. After enabling, you need to enter your password and the verification code generated by the authenticator application when logging in.",
|
||||
"启用两步验证": "Enable two-factor authentication",
|
||||
"禁用两步验证": "Disable two-factor authentication",
|
||||
"启用两步验证后,登录时需要输入密码和验证器应用生成的验证码": "After enabling two-factor authentication, you need to enter your password and the verification code generated by the authenticator application when logging in",
|
||||
"禁用两步验证后,登录时只需要输入密码": "After disabling two-factor authentication, you only need to enter your password when logging in",
|
||||
"验证身份": "Verify identity",
|
||||
"为了保护您的账户安全,请输入认证器验证码来确认身份": "To protect your account security, please enter the authenticator verification code to confirm your identity",
|
||||
"输入认证器应用显示的6位数字验证码": "Enter the 6-digit verification code displayed on the authenticator application",
|
||||
"新的备用恢复代码": "New backup recovery code",
|
||||
"新的备用码已生成": "New backup code has been generated",
|
||||
"我已了解禁用两步验证将永久删除所有相关设置和备用码,此操作不可撤销": "I have understood that disabling two-factor authentication will permanently delete all related settings and backup codes, this operation cannot be undone",
|
||||
"账户已锁定": "Account locked",
|
||||
"剩余备用码:": "Remaining backup codes: ",
|
||||
"启用验证": "Enable Authentication",
|
||||
"重新生成备用码": "Regenerate backup codes",
|
||||
"设置两步验证": "Set up two-factor authentication",
|
||||
"扫描二维码": "Scan QR code",
|
||||
"使用认证器应用扫描二维码": "Scan QR code with authenticator app",
|
||||
"保存备用码": "Save backup codes",
|
||||
"保存备用码以备不时之需": "Save backup codes for emergencies",
|
||||
"验证设置": "Verify setup",
|
||||
"输入验证码完成设置": "Enter verification code to complete setup",
|
||||
"使用认证器应用(如 Google Authenticator、Microsoft Authenticator)扫描下方二维码:": "Use an authenticator app (such as Google Authenticator, Microsoft Authenticator) to scan the QR code below:",
|
||||
"或手动输入密钥:": "Or manually enter the secret:",
|
||||
"备用恢复代码": "Backup recovery codes",
|
||||
"复制所有代码": "Copy all codes",
|
||||
"上一步": "Previous",
|
||||
"下一步": "Next",
|
||||
"完成设置并启用两步验证": "Complete setup and enable two-factor authentication",
|
||||
"确认禁用": "Confirm disable",
|
||||
"完成": "Complete",
|
||||
"生成新的备用码": "Generate new backup codes",
|
||||
"警告:禁用两步验证将永久删除您的验证设置和所有备用码,此操作不可撤销!": "Warning: Disabling two-factor authentication will permanently delete your verification settings and all backup codes. This action is irreversible!",
|
||||
"禁用后的影响:": "Impact after disabling:",
|
||||
"降低您账户的安全性": "Reduce your account security",
|
||||
"需要重新完整设置才能再次启用": "Need to set up again to re-enable",
|
||||
"永久删除您的两步验证设置": "Permanently delete your two-factor authentication settings",
|
||||
"永久删除所有备用码(包括未使用的)": "Permanently delete all backup codes (including unused ones)",
|
||||
"请输入认证器验证码或备用码": "Please enter authenticator verification code or backup code",
|
||||
"重新生成备用码将使现有的备用码失效,请确保您已保存了当前的备用码。": "Regenerating backup codes will invalidate existing backup codes. Please ensure you have saved the current backup codes.",
|
||||
"请输入认证器验证码": "Please enter authenticator verification code",
|
||||
"旧的备用码已失效,请保存新的备用码": "Old backup codes have been invalidated, please save the new backup codes",
|
||||
"获取2FA状态失败": "Failed to get 2FA status",
|
||||
"设置2FA失败": "Failed to set up 2FA",
|
||||
"请输入验证码": "Please enter verification code",
|
||||
"两步验证启用成功!": "Two-factor authentication enabled successfully!",
|
||||
"启用2FA失败": "Failed to enable 2FA",
|
||||
"请输入验证码或备用码": "Please enter verification code or backup code",
|
||||
"请确认您已了解禁用两步验证的后果": "Please confirm that you understand the consequences of disabling two-factor authentication",
|
||||
"两步验证已禁用": "Two-factor authentication has been disabled",
|
||||
"禁用2FA失败": "Failed to disable 2FA",
|
||||
"备用码重新生成成功": "Backup codes regenerated successfully",
|
||||
"重新生成备用码失败": "Failed to regenerate backup codes",
|
||||
"备用码已复制到剪贴板": "Backup codes copied to clipboard"
|
||||
}
|
||||
Reference in New Issue
Block a user