From 3258f7c620e98ae73c378c19310871aebc816ed0 Mon Sep 17 00:00:00 2001 From: suuuuuu-1 Date: Mon, 20 Jul 2026 19:11:21 +0800 Subject: [PATCH] =?UTF-8?q?refactor(i18n):=20=E6=B8=85=E7=90=86=20zh/admin?= =?UTF-8?q?/accounts.ts=20=E4=B8=AD=E9=87=8D=E6=9E=84=E9=81=97=E7=95=99?= =?UTF-8?q?=E7=9A=84=2029=20=E4=B8=AA=E5=86=97=E4=BD=99=20keys?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在 d9e514f98 (2026-07-07) 重构拆分语言包时,部分中文 keys 被错误保留 在 admin/accounts.ts 中。这些 keys 在英文文件中不存在,且代码中无引用。 删除的冗余 keys: - form 对象(13 个子 keys):nameLabel, platformLabel, typeLabel 等 - filters 对象(6 个子 keys):platform, type, status 等 - 独立 keys(10 个): * accountCreatedSuccess, accountUpdatedSuccess, accountDeletedSuccess * noAccounts, noAccountsDescription * saving, refreshing, testSuccess * cookieRefreshedSuccess, failedToSave * deleteConfirmMessage, refreshCookie, testAccount * api_key, cookie 验证: - 英文 keys: 1184, 中文 keys: 1184 (修复前: 1220) - 差异: 0 (修复前: -36) - 已确认代码中无对 admin.accounts.* 路径的引用 - 正确的翻译在 common.ts 等文件中已存在 --- .../src/i18n/locales/zh/admin/accounts.ts | 40 +------------------ 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/frontend/src/i18n/locales/zh/admin/accounts.ts b/frontend/src/i18n/locales/zh/admin/accounts.ts index 547842b42..d7c34dc44 100644 --- a/frontend/src/i18n/locales/zh/admin/accounts.ts +++ b/frontend/src/i18n/locales/zh/admin/accounts.ts @@ -77,9 +77,6 @@ export default { crsBack: '返回', editAccount: '编辑账号', deleteAccount: '删除账号', - deleteConfirmMessage: "确定要删除账号 '{name}' 吗?", - refreshCookie: '刷新 Cookie', - testAccount: '测试账号', searchAccounts: '搜索账号...', notes: '备注', notesPlaceholder: '请输入备注', @@ -268,9 +265,7 @@ export default { grokOauth: 'Grok OAuth', antigravityApikey: '通过 Base URL + API Key 连接', upstream: '对接上游', - upstreamDesc: '通过 Base URL + API Key 连接上游', - api_key: 'API Key', - cookie: 'Cookie' + upstreamDesc: '通过 Base URL + API Key 连接上游' }, antigravityProjectIdLabel: 'GCP Project ID(可选)', antigravityProjectIdPlaceholder: 'your-gcp-project-id', @@ -406,37 +401,7 @@ export default { needsReauth: '需要重新授权', rateLimited: '限流中', usageError: '获取失败', - form: { - nameLabel: '账号名称', - namePlaceholder: '请输入账号名称', - platformLabel: '平台', - selectPlatform: '选择平台', - typeLabel: '类型', - selectType: '选择类型', - credentialsLabel: '凭证', - credentialsPlaceholder: '请输入 Cookie 或 API Key', - priorityLabel: '优先级', - priorityHint: '数值越小优先级越高', - weightLabel: '权重', - weightHint: '用于负载均衡的权重值', - statusLabel: '状态' - }, - filters: { - platform: '平台', - allPlatforms: '全部平台', - type: '类型', - allTypes: '全部类型', - status: '状态', - allStatuses: '全部状态' - }, - saving: '保存中...', - refreshing: '刷新中...', testing: '测试中...', - noAccounts: '暂无账号', - noAccountsDescription: '添加 AI 平台账号以开始使用 API 网关。', - accountCreatedSuccess: '账号添加成功', - accountUpdatedSuccess: '账号更新成功', - accountDeletedSuccess: '账号删除成功', bulkSchedulableEnabled: '成功启用 {count} 个账号的调度', bulkSchedulableDisabled: '成功停止 {count} 个账号的调度', bulkSchedulablePartial: '部分调度更新成功:成功 {success} 个,失败 {failed} 个', @@ -494,11 +459,8 @@ export default { resetStatus: '重置状态', statusReset: '账号状态已重置', failedToResetStatus: '重置账号状态失败', - cookieRefreshedSuccess: 'Cookie 刷新成功', - testSuccess: '账号测试通过', testFailed: '账号测试失败', failedToLoad: '加载账号列表失败', - failedToSave: '保存账号失败', failedToDelete: '删除账号失败', failedToRefresh: '刷新 Cookie 失败', // Create/Edit Account Modal