mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-14 03:52:26 +08:00
fix(i18n): CN 余额单元格误引 grokBalance 键致渲染原始 key
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 直属),全源码零消费方属死键,不在本次 范围内处理
This commit is contained in:
@@ -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(' · ')
|
||||
})
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -328,6 +328,7 @@ export default {
|
||||
responses: 'Responses',
|
||||
responsesDesc: '供应商原生 Responses 端点,适配 Codex。',
|
||||
},
|
||||
balance: '余额 --',
|
||||
window5h: '5 小时窗口',
|
||||
windowWeekly: '每周窗口',
|
||||
probeTooltip: '请求供应商额度端点,查询 5 小时 / 每周滚动窗口用量',
|
||||
|
||||
Reference in New Issue
Block a user