i18n: complete internationalization for provider and usage query panels
- Add 45+ new translation keys for usage query and usage script features - Fix duplicate provider object in translation files that caused missing translations - Remove all hardcoded Chinese text and defaultValue fallbacks from components - Add proper translations for: * Usage footer (query status, plan usage display) * Usage script modal (script editor, validation, test controls) * Provider forms (basic fields, endpoints, model selectors) * Provider dialogs (add/edit hints and titles) Modified 16 files: - 2 translation files (zh.json, en.json) - 14 component files (removed defaultValue, added t() calls) All UI text now properly supports Chinese/English switching.
This commit is contained in:
@@ -73,13 +73,15 @@
|
||||
"sortUpdateFailed": "排序更新失败",
|
||||
"configureUsage": "配置用量查询",
|
||||
"name": "供应商名称",
|
||||
"namePlaceholder": "例如:Claude 官方",
|
||||
"websiteUrl": "官网链接",
|
||||
"configJson": "配置 JSON",
|
||||
"writeCommonConfig": "写入通用配置",
|
||||
"editCommonConfigButton": "编辑通用配置",
|
||||
"configJsonHint": "请填写完整的 Claude Code 配置",
|
||||
"editCommonConfigTitle": "编辑通用配置片段",
|
||||
"editCommonConfigHint": "通用配置片段将合并到所有启用它的供应商配置中"
|
||||
"editCommonConfigHint": "通用配置片段将合并到所有启用它的供应商配置中",
|
||||
"addProvider": "添加供应商"
|
||||
},
|
||||
"notifications": {
|
||||
"providerSaved": "供应商配置已保存",
|
||||
@@ -297,6 +299,48 @@
|
||||
"other": "其他",
|
||||
"hint": "选择预设后可继续调整下方字段。"
|
||||
},
|
||||
"usage": {
|
||||
"queryFailed": "查询失败",
|
||||
"refreshUsage": "刷新用量",
|
||||
"planUsage": "套餐用量",
|
||||
"invalid": "已失效",
|
||||
"total": "总:",
|
||||
"used": "使用:",
|
||||
"remaining": "剩余:"
|
||||
},
|
||||
"usageScript": {
|
||||
"title": "配置用量查询",
|
||||
"enableUsageQuery": "启用用量查询",
|
||||
"presetTemplate": "预设模板",
|
||||
"queryScript": "查询脚本(JavaScript)",
|
||||
"timeoutSeconds": "超时时间(秒)",
|
||||
"scriptHelp": "脚本编写说明:",
|
||||
"configFormat": "配置格式:",
|
||||
"extractorFormat": "extractor 返回格式(所有字段均为可选):",
|
||||
"tips": "💡 提示:",
|
||||
"testing": "测试中...",
|
||||
"testScript": "测试脚本",
|
||||
"format": "格式化",
|
||||
"saveConfig": "保存配置",
|
||||
"scriptEmpty": "脚本配置不能为空",
|
||||
"mustHaveReturn": "脚本必须包含 return 语句",
|
||||
"testSuccess": "测试成功!",
|
||||
"testFailed": "测试失败",
|
||||
"formatSuccess": "格式化成功",
|
||||
"formatFailed": "格式化失败",
|
||||
"variablesHint": "支持变量: {{apiKey}}, {{baseUrl}} | extractor 函数接收 API 响应的 JSON 对象",
|
||||
"fieldIsValid": "• isValid: 布尔值,套餐是否有效",
|
||||
"fieldInvalidMessage": "• invalidMessage: 字符串,失效原因说明(当 isValid 为 false 时显示)",
|
||||
"fieldRemaining": "• remaining: 数字,剩余额度",
|
||||
"fieldUnit": "• unit: 字符串,单位(如 \"USD\")",
|
||||
"fieldPlanName": "• planName: 字符串,套餐名称",
|
||||
"fieldTotal": "• total: 数字,总额度",
|
||||
"fieldUsed": "• used: 数字,已用额度",
|
||||
"fieldExtra": "• extra: 字符串,扩展字段,可自由补充需要展示的文本",
|
||||
"tip1": "• 变量 {{apiKey}} 和 {{baseUrl}} 会自动替换",
|
||||
"tip2": "• extractor 函数在沙箱环境中执行,支持 ES2020+ 语法",
|
||||
"tip3": "• 整个配置必须用 () 包裹,形成对象字面量表达式"
|
||||
},
|
||||
"kimiSelector": {
|
||||
"modelConfig": "模型配置",
|
||||
"mainModel": "主模型",
|
||||
|
||||
Reference in New Issue
Block a user