feat(claude-code): 只读展示重置机会(cedar_ember)并补齐额度文案国际化

This commit is contained in:
dalamudx
2026-09-29 23:55:27 +08:00
parent 125cd40aa5
commit b49f5c0fd7
11 changed files with 211 additions and 6 deletions
@@ -1,4 +1,7 @@
export const legacyAdminEnglishMessages: Record<string, string> = {
'缺少 OAuth 认证信息,请先授权/刷新 Token': 'Missing OAuth credentials; please authorize or refresh the token first',
'Key 状态写入失败': 'Failed to save key status',
'找不到有效的 claude:messages 端点': 'No active claude:messages endpoint found',
'响应中未包含配额信息': 'The response contains no quota information',
'响应中未包含额度窗口': 'The response contains no quota windows',
'oauth/usage 请求执行失败': 'oauth/usage request failed',
+1
View File
@@ -1420,6 +1420,7 @@ export const legacyUiEnglishMessages: Record<string, string> = {
'批量导入': 'Bulk import',
'继续确认重置': 'Continue checking reset',
'临近过期': 'Expiring soon',
'Claude 重置机会': 'Claude quota reset',
'暂无密钥配置': 'No keys configured',
'暂无账号配置': 'No accounts configured',
'点击上方"添加密钥"按钮创建第一个密钥': 'Add your first key to get started',
+2
View File
@@ -3077,6 +3077,8 @@ const legacyDynamicPatterns: Array<[RegExp, (match: RegExpMatchArray) => string]
[/^总可用:(.+)$/u, match => `Total available: ${match[1]}`],
[/^余额:(.+)$/u, match => `Balance: ${match[1]}`],
[/^oauth\/usage 返回状态码 (\d+)$/u, match => `oauth/usage returned status ${match[1]}`],
[/^共 (\d+) 次机会$/u, match => `${match[1]} ${match[1] === '1' ? 'chance' : 'chances'} in total`],
[/^已处理 (\d+) 个 Key$/u, match => `Processed ${match[1]} ${match[1] === '1' ? 'key' : 'keys'}`],
[/^(.+) 秒$/u, match => `${translateLegacyText(match[1], 'en-US')}s`],
[/^(.+) 分钟$/u, match => `${translateLegacyText(match[1], 'en-US')} min`],
[/^(.+) 小时$/u, match => `${translateLegacyText(match[1], 'en-US')} h`],