From 8d387886727b9088de18504e588c65b7c5fffb2c Mon Sep 17 00:00:00 2001 From: IanShaw027 <131567472+IanShaw027@users.noreply.github.com> Date: Sat, 27 Dec 2025 16:04:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20=E6=9B=B4=E6=96=B0=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增英文翻译条目 - 完善中文翻译内容 - 改进多语言支持 --- frontend/src/i18n/locales/en.ts | 25 ++++++++++++++++--- frontend/src/i18n/locales/zh.ts | 43 +++++++++++++++++++++++++++++---- 2 files changed, 59 insertions(+), 9 deletions(-) diff --git a/frontend/src/i18n/locales/en.ts b/frontend/src/i18n/locales/en.ts index 269f1a1a..3c3e2a93 100644 --- a/frontend/src/i18n/locales/en.ts +++ b/frontend/src/i18n/locales/en.ts @@ -52,6 +52,7 @@ export default { password: 'Password', databaseName: 'Database Name', sslMode: 'SSL Mode', + passwordPlaceholder: 'Password', ssl: { disable: 'Disable', require: 'Require', @@ -64,13 +65,17 @@ export default { host: 'Host', port: 'Port', password: 'Password (optional)', - database: 'Database' + database: 'Database', + passwordPlaceholder: 'Password' }, admin: { title: 'Admin Account', email: 'Email', password: 'Password', - confirmPassword: 'Confirm Password' + confirmPassword: 'Confirm Password', + passwordPlaceholder: 'Min 6 characters', + confirmPasswordPlaceholder: 'Confirm password', + passwordMismatch: 'Passwords do not match' }, ready: { title: 'Ready to Install', @@ -127,7 +132,14 @@ export default { searchPlaceholder: 'Search...', noOptionsFound: 'No options found', saving: 'Saving...', - refresh: 'Refresh' + refresh: 'Refresh', + time: { + never: 'Never', + justNow: 'Just now', + minutesAgo: '{n}m ago', + hoursAgo: '{n}h ago', + daysAgo: '{n}d ago' + } }, // Navigation @@ -263,7 +275,7 @@ export default { created: 'Created', copyToClipboard: 'Copy to clipboard', copied: 'Copied!', - importToCcSwitch: 'Import to CC Switch', + importToCcSwitch: 'Import to CCS', enable: 'Enable', disable: 'Disable', nameLabel: 'Name', @@ -517,6 +529,7 @@ export default { actual: 'Actual', standard: 'Standard', noDataAvailable: 'No data available', + recentUsage: 'Recent Usage', failedToLoad: 'Failed to load dashboard statistics' }, @@ -569,9 +582,13 @@ export default { noSubscription: 'No subscription', daysRemaining: '{days}d', expired: 'Expired', + disable: 'Disable', + enable: 'Enable', disableUser: 'Disable User', enableUser: 'Enable User', viewApiKeys: 'View API Keys', + groups: 'Groups', + apiKeys: 'API Keys', userApiKeys: 'User API Keys', noApiKeys: 'This user has no API keys', group: 'Group', diff --git a/frontend/src/i18n/locales/zh.ts b/frontend/src/i18n/locales/zh.ts index baf851ce..50aa911b 100644 --- a/frontend/src/i18n/locales/zh.ts +++ b/frontend/src/i18n/locales/zh.ts @@ -49,6 +49,7 @@ export default { password: '密码', databaseName: '数据库名称', sslMode: 'SSL 模式', + passwordPlaceholder: '密码', ssl: { disable: '禁用', require: '要求', @@ -61,13 +62,17 @@ export default { host: '主机', port: '端口', password: '密码(可选)', - database: '数据库' + database: '数据库', + passwordPlaceholder: '密码' }, admin: { title: '管理员账户', email: '邮箱', password: '密码', - confirmPassword: '确认密码' + confirmPassword: '确认密码', + passwordPlaceholder: '至少 6 个字符', + confirmPasswordPlaceholder: '确认密码', + passwordMismatch: '密码不匹配' }, ready: { title: '准备安装', @@ -124,7 +129,14 @@ export default { searchPlaceholder: '搜索...', noOptionsFound: '无匹配选项', saving: '保存中...', - refresh: '刷新' + refresh: '刷新', + time: { + never: '从未', + justNow: '刚刚', + minutesAgo: '{n}分钟前', + hoursAgo: '{n}小时前', + daysAgo: '{n}天前' + } }, // Navigation @@ -260,7 +272,7 @@ export default { created: '创建时间', copyToClipboard: '复制到剪贴板', copied: '已复制!', - importToCcSwitch: '导入到 CC Switch', + importToCcSwitch: '导入到 CCS', enable: '启用', disable: '禁用', nameLabel: '名称', @@ -589,9 +601,13 @@ export default { noSubscription: '暂无订阅', daysRemaining: '{days}天', expired: '已过期', + disable: '禁用', + enable: '启用', disableUser: '禁用用户', enableUser: '启用用户', viewApiKeys: '查看 API 密钥', + groups: '分组', + apiKeys: 'API密钥', userApiKeys: '用户 API 密钥', noApiKeys: '此用户暂无 API 密钥', group: '分组', @@ -727,10 +743,13 @@ export default { priorityHint: '数值越高优先级越高,用于账号调度', statusLabel: '状态' }, - exclusive: { + exclusiveObj: { yes: '是', no: '否' }, + exclusive: '独占', + exclusiveHint: '启用后,此分组的用户将独占使用分配的账号', + rateMultiplierHint: '1.0 = 标准费率,0.5 = 半价,2.0 = 双倍', platforms: { all: '全部平台', claude: 'Claude', @@ -876,6 +895,7 @@ export default { deleteConfirmMessage: "确定要删除账号 '{name}' 吗?", refreshCookie: '刷新 Cookie', testAccount: '测试账号', + searchAccounts: '搜索账号...', // Filter options allPlatforms: '全部平台', allTypes: '全部类型', @@ -903,6 +923,19 @@ export default { lastUsed: '最近使用', actions: '操作' }, + clearRateLimit: '清除速率限制', + testConnection: '测试连接', + reAuthorize: '重新授权', + refreshToken: '刷新令牌', + noAccountsYet: '暂无账号', + createFirstAccount: '添加 AI 平台账号以开始使用 API 网关。', + tokenRefreshed: 'Token 刷新成功', + accountDeleted: '账号删除成功', + rateLimitCleared: '速率限制已清除', + setupToken: 'Setup Token', + apiKey: 'API Key', + deleteConfirm: "确定要删除账号 '{name}' 吗?此操作无法撤销。", + failedToClearRateLimit: '清除速率限制失败', platforms: { claude: 'Claude', openai: 'OpenAI',