mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-10-25 17:22:27 +08:00
fix(i18n): add the missing pi.form.providerKeyDuplicate and common.collapse keys
translatePiProviderMutationError returns pi.form.providerKeyDuplicate for the Pi backend's duplicate-key error, but the key existed in none of the four locale files, so the toast showed the raw key. common.collapse (aria-label of the thinking-map toggle) was missing the same way. Add both keys to zh/en/ja/zh-TW and lock them in the locale coverage test.
This commit is contained in:
1 parent
12296aeb4d
commit
75be16cbf6
5 files changed
+22
-8
No files matched your search
@@ -42,7 +42,8 @@
|
||||
"deleting": "Deleting...",
|
||||
"auto": "Auto",
|
||||
"enabled": "Enabled",
|
||||
"notSet": "Not Set"
|
||||
"notSet": "Not Set",
|
||||
"collapse": "Collapse"
|
||||
},
|
||||
"firstRunNotice": {
|
||||
"title": "Welcome to CC Switch",
|
||||
@@ -978,7 +979,8 @@
|
||||
"effectiveApiRequired": "Model {{id}} needs an API, either directly or from the provider",
|
||||
"effectiveBaseUrlRequired": "Model {{id}} needs a base URL, either directly or from the provider",
|
||||
"duplicateModel": "Model ID {{id}} is duplicated",
|
||||
"modelRequired": "Add at least one model"
|
||||
"modelRequired": "Add at least one model",
|
||||
"providerKeyDuplicate": "This provider key already exists"
|
||||
},
|
||||
"current": {
|
||||
"readFailed": "Could not read Pi's provider configuration",
|
||||
|
||||
@@ -42,7 +42,8 @@
|
||||
"deleting": "削除中...",
|
||||
"auto": "自動",
|
||||
"enabled": "有効",
|
||||
"notSet": "未設定"
|
||||
"notSet": "未設定",
|
||||
"collapse": "折りたたむ"
|
||||
},
|
||||
"firstRunNotice": {
|
||||
"title": "CC Switch へようこそ",
|
||||
@@ -978,7 +979,8 @@
|
||||
"effectiveApiRequired": "モデル {{id}} には、直接またはプロバイダーから継承した API が必要です",
|
||||
"effectiveBaseUrlRequired": "モデル {{id}} には、直接またはプロバイダーから継承したベース URL が必要です",
|
||||
"duplicateModel": "モデル ID {{id}} が重複しています",
|
||||
"modelRequired": "モデルを 1 つ以上追加してください"
|
||||
"modelRequired": "モデルを 1 つ以上追加してください",
|
||||
"providerKeyDuplicate": "このプロバイダーキーは既に存在します"
|
||||
},
|
||||
"current": {
|
||||
"readFailed": "Pi のプロバイダー設定を読み込めません",
|
||||
|
||||
@@ -42,7 +42,8 @@
|
||||
"deleting": "刪除中...",
|
||||
"auto": "自動",
|
||||
"enabled": "已啟用",
|
||||
"notSet": "未設定"
|
||||
"notSet": "未設定",
|
||||
"collapse": "收合"
|
||||
},
|
||||
"firstRunNotice": {
|
||||
"title": "歡迎使用 CC Switch",
|
||||
@@ -979,7 +980,8 @@
|
||||
"effectiveApiRequired": "模型 {{id}} 必須直接設定或從供應商繼承 API",
|
||||
"effectiveBaseUrlRequired": "模型 {{id}} 必須直接設定或從供應商繼承基礎 URL",
|
||||
"duplicateModel": "模型 ID {{id}} 重複",
|
||||
"modelRequired": "請至少新增一個模型"
|
||||
"modelRequired": "請至少新增一個模型",
|
||||
"providerKeyDuplicate": "該供應商標識已存在"
|
||||
},
|
||||
"current": {
|
||||
"readFailed": "無法讀取 Pi 供應商設定",
|
||||
|
||||
@@ -42,7 +42,8 @@
|
||||
"deleting": "删除中...",
|
||||
"auto": "自动",
|
||||
"enabled": "已开启",
|
||||
"notSet": "未设置"
|
||||
"notSet": "未设置",
|
||||
"collapse": "收起"
|
||||
},
|
||||
"firstRunNotice": {
|
||||
"title": "欢迎使用 CC Switch",
|
||||
@@ -978,7 +979,8 @@
|
||||
"effectiveApiRequired": "模型 {{id}} 必须直接配置或继承一个 API",
|
||||
"effectiveBaseUrlRequired": "模型 {{id}} 必须直接配置或继承一个基础地址",
|
||||
"duplicateModel": "模型 ID {{id}} 重复",
|
||||
"modelRequired": "请至少添加一个模型"
|
||||
"modelRequired": "请至少添加一个模型",
|
||||
"providerKeyDuplicate": "该供应商标识已存在"
|
||||
},
|
||||
"current": {
|
||||
"readFailed": "无法读取 Pi 供应商配置",
|
||||
|
||||
@@ -17,6 +17,12 @@ const requiredPaths = [
|
||||
"prompts.searchPlaceholder",
|
||||
"prompts.searchAriaLabel",
|
||||
"prompts.noSearchResults",
|
||||
// `translatePiProviderMutationError` returns this key for the duplicate-key error
|
||||
// the Pi backend raises, and it existed in no locale -- so the toast showed the raw
|
||||
// key. Its own test mocks `t` as identity, so it stayed green throughout.
|
||||
"pi.form.providerKeyDuplicate",
|
||||
// Rendered as the aria-label of the thinking-map toggle in PiProviderForm.
|
||||
"common.collapse",
|
||||
] as const;
|
||||
|
||||
type Locale = Record<string, unknown>;
|
||||
|
||||
Reference in new issue
Block a user