diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 20669904a..cbc75d726 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -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", diff --git a/src/i18n/locales/ja.json b/src/i18n/locales/ja.json index 123be27c5..946aa8dc4 100644 --- a/src/i18n/locales/ja.json +++ b/src/i18n/locales/ja.json @@ -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 のプロバイダー設定を読み込めません", diff --git a/src/i18n/locales/zh-TW.json b/src/i18n/locales/zh-TW.json index a8b6e988b..a859a1a39 100644 --- a/src/i18n/locales/zh-TW.json +++ b/src/i18n/locales/zh-TW.json @@ -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 供應商設定", diff --git a/src/i18n/locales/zh.json b/src/i18n/locales/zh.json index 85bb395b3..610f99588 100644 --- a/src/i18n/locales/zh.json +++ b/src/i18n/locales/zh.json @@ -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 供应商配置", diff --git a/tests/config/managementListLocales.test.ts b/tests/config/managementListLocales.test.ts index a639b5fb2..e9ee18040 100644 --- a/tests/config/managementListLocales.test.ts +++ b/tests/config/managementListLocales.test.ts @@ -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;