From c38c5beef81227f19b27356053a6db7c7e4072f4 Mon Sep 17 00:00:00 2001 From: shaw Date: Mon, 17 Aug 2026 17:44:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(i18n):=20CN=20=E4=BD=99=E9=A2=9D=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=A0=BC=E8=AF=AF=E5=BC=95=20grokBalance=20=E9=94=AE?= =?UTF-8?q?=E8=87=B4=E6=B8=B2=E6=9F=93=E5=8E=9F=E5=A7=8B=20key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CNProviderBalanceCell 无快照占位标签引用 admin.accounts.grokBalance, 但该键实际嵌套在 admin.accounts.usageWindow 下,未命中时 DeepSeek/Kimi payg 账号的用量窗口列直接显示原始键名。 - cnProviders 块新增自有占位键 balance(zh: '余额 --' / en: 'Balance --'), 单元格改引该键 - 用 esbuild 实际加载模块对 zh/en 全部 admin 语言包做键路径深度比对: 除本处外 CN 相关键(静态 14 个 + 动态拼接 accountMode/apiProtocol 系列) 双语全部对齐;唯一存量漂移是 claudeMaxSimulation 块(zh 嵌套于 modelRouting 下/en 为 groups 直属),全源码零消费方属死键,不在本次 范围内处理 --- frontend/src/components/account/CNProviderBalanceCell.vue | 4 +++- frontend/src/i18n/locales/en/admin/accounts.ts | 1 + frontend/src/i18n/locales/zh/admin/accounts.ts | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/account/CNProviderBalanceCell.vue b/frontend/src/components/account/CNProviderBalanceCell.vue index 93127cbf98..2ad2cbf3ab 100644 --- a/frontend/src/components/account/CNProviderBalanceCell.vue +++ b/frontend/src/components/account/CNProviderBalanceCell.vue @@ -113,7 +113,9 @@ const formatEntry = (entry: CNProviderBalanceEntry): string => { const balanceLabel = computed(() => { if (currentEntries.value.length === 0) { - return t('admin.accounts.grokBalance')?.trim() || 'Balance' + // 修复:此前误引 admin.accounts.grokBalance(实际嵌套在 usageWindow 下), + // 未命中时渲染原始 key。CN 供应商使用自己的占位键。 + return t('admin.accounts.cnProviders.balance') } return currentEntries.value.map(formatEntry).join(' · ') }) diff --git a/frontend/src/i18n/locales/en/admin/accounts.ts b/frontend/src/i18n/locales/en/admin/accounts.ts index de85669443..352b9fb474 100644 --- a/frontend/src/i18n/locales/en/admin/accounts.ts +++ b/frontend/src/i18n/locales/en/admin/accounts.ts @@ -125,6 +125,7 @@ export default { responses: 'Responses', responsesDesc: 'Provider’s native Responses endpoint — ideal for Codex.', }, + balance: 'Balance --', window5h: '5-hour window', windowWeekly: 'Weekly window', probeTooltip: 'Query the provider quota endpoint for 5-hour / weekly rolling window usage', diff --git a/frontend/src/i18n/locales/zh/admin/accounts.ts b/frontend/src/i18n/locales/zh/admin/accounts.ts index be47ced57e..8962764186 100644 --- a/frontend/src/i18n/locales/zh/admin/accounts.ts +++ b/frontend/src/i18n/locales/zh/admin/accounts.ts @@ -328,6 +328,7 @@ export default { responses: 'Responses', responsesDesc: '供应商原生 Responses 端点,适配 Codex。', }, + balance: '余额 --', window5h: '5 小时窗口', windowWeekly: '每周窗口', probeTooltip: '请求供应商额度端点,查询 5 小时 / 每周滚动窗口用量',