diff --git a/src/components/mode-toggle.tsx b/src/components/mode-toggle.tsx
index a099afd..20a606f 100644
--- a/src/components/mode-toggle.tsx
+++ b/src/components/mode-toggle.tsx
@@ -22,7 +22,7 @@ export function ModeToggle() {
- {t("common.toggleTheme", { defaultValue: "切换主题" })}
+ {t("common.toggleTheme")}
);
diff --git a/src/components/settings/AboutSection.tsx b/src/components/settings/AboutSection.tsx
index 4ab1205..435f626 100644
--- a/src/components/settings/AboutSection.tsx
+++ b/src/components/settings/AboutSection.tsx
@@ -75,9 +75,7 @@ export function AboutSection({ isPortable }: AboutSectionProps) {
} catch (error) {
console.error("[AboutSection] Failed to open release notes", error);
toast.error(
- t("settings.openReleaseNotesFailed", {
- defaultValue: "打开更新日志失败",
- }),
+ t("settings.openReleaseNotesFailed"),
);
}
}, [t, updateInfo?.availableVersion, version]);
@@ -101,9 +99,7 @@ export function AboutSection({ isPortable }: AboutSectionProps) {
} catch (error) {
console.error("[AboutSection] Update failed", error);
toast.error(
- t("settings.updateFailed", {
- defaultValue: "更新安装失败,已尝试打开下载页面。",
- }),
+ t("settings.updateFailed"),
);
try {
await settingsApi.checkUpdates();
@@ -122,29 +118,25 @@ export function AboutSection({ isPortable }: AboutSectionProps) {
try {
const available = await checkUpdate();
if (!available) {
- toast.success(t("settings.upToDate", { defaultValue: "已是最新版本" }));
+ toast.success(t("settings.upToDate"));
}
} catch (error) {
console.error("[AboutSection] Check update failed", error);
toast.error(
- t("settings.checkUpdateFailed", {
- defaultValue: "检查更新失败,请稍后重试。",
- }),
+ t("settings.checkUpdateFailed"),
);
}
}, [checkUpdate, hasUpdate, isPortable, resetDismiss, t, updateHandle]);
const displayVersion =
- version ?? t("common.unknown", { defaultValue: "未知" });
+ version ?? t("common.unknown");
return (
@@ -163,9 +155,7 @@ export function AboutSection({ isPortable }: AboutSectionProps) {
{isPortable ? (
- {t("settings.portableMode", {
- defaultValue: "当前为便携版,更新需手动下载。",
- })}
+ {t("settings.portableMode")}
) : null}
@@ -190,20 +180,19 @@ export function AboutSection({ isPortable }: AboutSectionProps) {
{isDownloading ? (
- {t("settings.updating", { defaultValue: "安装更新..." })}
+ {t("settings.updating")}
) : hasUpdate ? (
{t("settings.updateTo", {
- defaultValue: "更新到 {{version}}",
version: updateInfo?.availableVersion ?? "",
})}
) : isChecking ? (
- {t("settings.checking", { defaultValue: "检查中..." })}
+ {t("settings.checking")}
) : (
t("settings.checkForUpdates")
@@ -216,7 +205,6 @@ export function AboutSection({ isPortable }: AboutSectionProps) {
{t("settings.updateAvailable", {
- defaultValue: "检测到新版本:{{version}}",
version: updateInfo.availableVersion,
})}
diff --git a/src/components/settings/DirectorySettings.tsx b/src/components/settings/DirectorySettings.tsx
index 46ccca6..e55352c 100644
--- a/src/components/settings/DirectorySettings.tsx
+++ b/src/components/settings/DirectorySettings.tsx
@@ -57,9 +57,7 @@ export function DirectorySettings({
{t("settings.importExport")}
- {t("settings.importExportHint", {
- defaultValue: "导入导出 cc-switch 配置,便于备份或迁移。",
- })}
+ {t("settings.importExportHint")}
@@ -92,7 +90,7 @@ export function ImportExportSection({
{selectedFile ? (
) : null}
@@ -103,9 +101,7 @@ export function ImportExportSection({
) : (
- {t("settings.noFileSelected", {
- defaultValue: "尚未选择配置文件。",
- })}
+ {t("settings.noFileSelected")}
)}
@@ -147,7 +143,7 @@ function ImportStatusMessage({
{t("settings.importing")}
- {t("common.loading", { defaultValue: "正在处理..." })}
+ {t("common.loading")}
@@ -164,10 +160,10 @@ function ImportStatusMessage({
{t("settings.importSuccess")}
{backupId ? (
- {t("settings.backupId", { defaultValue: "备份 ID" })}: {backupId}
+ {t("settings.backupId")}: {backupId}
) : null}
- {t("settings.autoReload", { defaultValue: "即将刷新列表。" })}
+ {t("settings.autoReload")}
);
@@ -175,14 +171,14 @@ function ImportStatusMessage({
const message =
errorMessage ||
- t("settings.importFailed", { defaultValue: "导入失败,请重试。" });
+ t("settings.importFailed");
return (
- {t("settings.importFailed", { defaultValue: "导入失败" })}
+ {t("settings.importFailed")}
{message}
diff --git a/src/components/settings/LanguageSettings.tsx b/src/components/settings/LanguageSettings.tsx
index 005dc98..56da518 100644
--- a/src/components/settings/LanguageSettings.tsx
+++ b/src/components/settings/LanguageSettings.tsx
@@ -15,9 +15,7 @@ export function LanguageSettings({ value, onChange }: LanguageSettingsProps) {
{t("settings.language")}
- {t("settings.languageHint", {
- defaultValue: "切换后立即预览界面语言,保存后永久生效。",
- })}
+ {t("settings.languageHint")}
diff --git a/src/components/settings/SettingsDialog.tsx b/src/components/settings/SettingsDialog.tsx
index 378a59f..89a342f 100644
--- a/src/components/settings/SettingsDialog.tsx
+++ b/src/components/settings/SettingsDialog.tsx
@@ -143,9 +143,7 @@ export function SettingsDialog({
setShowRestartPrompt(false);
if (import.meta.env.DEV) {
toast.success(
- t("settings.devModeRestartHint", {
- defaultValue: "开发模式下不支持自动重启,请手动重新启动应用。",
- }),
+ t("settings.devModeRestartHint"),
);
closeAfterSave();
return;
@@ -156,9 +154,7 @@ export function SettingsDialog({
} catch (error) {
console.error("[SettingsDialog] Failed to restart app", error);
toast.error(
- t("settings.restartFailed", {
- defaultValue: "应用重启失败,请手动关闭后重新打开。",
- }),
+ t("settings.restartFailed"),
);
} finally {
closeAfterSave();
@@ -187,10 +183,10 @@ export function SettingsDialog({
>
- {t("settings.tabGeneral", { defaultValue: "通用" })}
+ {t("settings.tabGeneral")}
- {t("settings.tabAdvanced", { defaultValue: "高级" })}
+ {t("settings.tabAdvanced")}
{t("common.about")}
@@ -262,7 +258,7 @@ export function SettingsDialog({
{isSaving ? (
- {t("settings.saving", { defaultValue: "正在保存..." })}
+ {t("settings.saving")}
) : (
<>
@@ -284,9 +280,7 @@ export function SettingsDialog({
- {t("settings.restartRequiredMessage", {
- defaultValue: "配置目录已变更,需要重启应用生效。",
- })}
+ {t("settings.restartRequiredMessage")}
diff --git a/src/components/settings/ThemeSettings.tsx b/src/components/settings/ThemeSettings.tsx
index c26b248..1f0e7ce 100644
--- a/src/components/settings/ThemeSettings.tsx
+++ b/src/components/settings/ThemeSettings.tsx
@@ -13,9 +13,7 @@ export function ThemeSettings() {
@@ -24,21 +22,21 @@ export function ThemeSettings() {
onClick={() => setTheme("light")}
icon={Sun}
>
- {t("settings.themeLight", { defaultValue: "浅色" })}
+ {t("settings.themeLight")}
setTheme("dark")}
icon={Moon}
>
- {t("settings.themeDark", { defaultValue: "深色" })}
+ {t("settings.themeDark")}
setTheme("system")}
icon={Monitor}
>
- {t("settings.themeSystem", { defaultValue: "跟随系统" })}
+ {t("settings.themeSystem")}
diff --git a/src/components/settings/WindowSettings.tsx b/src/components/settings/WindowSettings.tsx
index 567f1ed..cb6e19f 100644
--- a/src/components/settings/WindowSettings.tsx
+++ b/src/components/settings/WindowSettings.tsx
@@ -15,9 +15,7 @@ export function WindowSettings({ settings, onChange }: WindowSettingsProps) {
{t("settings.windowBehavior")}
- {t("settings.windowBehaviorHint", {
- defaultValue: "配置窗口最小化与 Claude 插件联动策略。",
- })}
+ {t("settings.windowBehaviorHint")}
diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json
index 77b4b12..739df61 100644
--- a/src/i18n/locales/en.json
+++ b/src/i18n/locales/en.json
@@ -20,7 +20,9 @@
"success": "Success",
"error": "Error",
"unknown": "Unknown",
- "enterValidValue": "Please enter a valid value"
+ "enterValidValue": "Please enter a valid value",
+ "clear": "Clear",
+ "toggleTheme": "Toggle theme"
},
"apiKeyInput": {
"placeholder": "Enter API Key",
@@ -54,10 +56,12 @@
"enable": "Enable",
"inUse": "In Use",
"editProvider": "Edit Provider",
+ "editProviderHint": "Configuration will be applied to the current provider immediately after update.",
"deleteProvider": "Delete Provider",
"addNewProvider": "Add New Provider",
"addClaudeProvider": "Add Claude Code Provider",
"addCodexProvider": "Add Codex Provider",
+ "addProviderHint": "Fill in the information to quickly switch providers in the list.",
"editClaudeProvider": "Edit Claude Code Provider",
"editCodexProvider": "Edit Codex Provider",
"configError": "Configuration Error",
@@ -65,7 +69,17 @@
"applyToClaudePlugin": "Apply to Claude plugin",
"removeFromClaudePlugin": "Remove from Claude plugin",
"dragToReorder": "Drag to reorder",
- "sortUpdateFailed": "Failed to update sort order"
+ "dragHandle": "Drag to reorder",
+ "sortUpdateFailed": "Failed to update sort order",
+ "configureUsage": "Configure usage query",
+ "name": "Provider Name",
+ "websiteUrl": "Website URL",
+ "configJson": "Config JSON",
+ "writeCommonConfig": "Write common config",
+ "editCommonConfigButton": "Edit common config",
+ "configJsonHint": "Please fill in complete Claude Code configuration",
+ "editCommonConfigTitle": "Edit common config snippet",
+ "editCommonConfigHint": "Common config snippet will be merged into all providers that enable it"
},
"notifications": {
"providerSaved": "Provider configuration saved",
@@ -86,6 +100,8 @@
"settings": {
"title": "Settings",
"general": "General",
+ "tabGeneral": "General",
+ "tabAdvanced": "Advanced",
"language": "Language",
"languageHint": "Preview interface language immediately after switching, takes effect permanently after saving.",
"theme": "Theme",
@@ -94,8 +110,10 @@
"themeDark": "Dark",
"themeSystem": "System",
"importExport": "Import/Export Config",
+ "importExportHint": "Import or export cc-switch configuration for backup or migration.",
"exportConfig": "Export Config to File",
"selectConfigFile": "Select Config File",
+ "noFileSelected": "No configuration file selected.",
"import": "Import",
"importing": "Importing...",
"importSuccess": "Import Successful!",
@@ -109,6 +127,7 @@
"languageOptionChinese": "中文",
"languageOptionEnglish": "English",
"windowBehavior": "Window Behavior",
+ "windowBehaviorHint": "Configure window minimize and Claude plugin integration policies.",
"minimizeToTray": "Minimize to tray on close",
"minimizeToTrayDescription": "When checked, clicking the close button will hide to system tray, otherwise the app will exit directly.",
"enableClaudePluginIntegration": "Apply to Claude Code extension",
@@ -119,7 +138,9 @@
"appConfigDirDescription": "Customize the storage location for CC-Switch configuration files (config.json, etc.)",
"browsePlaceholderApp": "e.g., C:\\Users\\Administrator\\.cc-switch",
"claudeConfigDir": "Claude Code Configuration Directory",
+ "claudeConfigDirDescription": "Override Claude configuration directory (settings.json).",
"codexConfigDir": "Codex Configuration Directory",
+ "codexConfigDirDescription": "Override Codex configuration directory.",
"browsePlaceholderClaude": "e.g., /home//.claude",
"browsePlaceholderCodex": "e.g., /home//.codex",
"browseDirectory": "Browse Directory",
@@ -129,6 +150,12 @@
"updating": "Updating...",
"checking": "Checking...",
"upToDate": "Up to Date",
+ "aboutHint": "View version information and update status.",
+ "portableMode": "Portable mode: updates require manual download.",
+ "updateAvailable": "New version available: {{version}}",
+ "updateFailed": "Update installation failed, attempted to open download page.",
+ "checkUpdateFailed": "Failed to check for updates, please try again later.",
+ "openReleaseNotesFailed": "Failed to open release notes",
"releaseNotes": "Release Notes",
"viewReleaseNotes": "View release notes for this version",
"viewCurrentReleaseNotes": "View current version release notes",
@@ -137,7 +164,9 @@
"restartRequiredMessage": "Modifying the CC-Switch configuration directory requires restarting the application to take effect. Restart now?",
"restartNow": "Restart Now",
"restartLater": "Restart Later",
- "devModeRestartHint": "Dev Mode: Configuration saved. Please manually restart the application for changes to take effect"
+ "restartFailed": "Application restart failed, please manually close and reopen.",
+ "devModeRestartHint": "Dev Mode: Automatic restart not supported, please manually restart the application.",
+ "saving": "Saving..."
},
"apps": {
"claude": "Claude Code",
@@ -177,9 +206,9 @@
"manualConfig": "Manually configure provider, requires complete configuration, or",
"officialNoApiKey": "Official login does not require API Key, save directly",
"codexOfficialNoApiKey": "Official does not require API Key, save directly",
+ "codexApiKeyAutoFill": "Just fill in here, auth.json below will be auto-filled",
"kimiApiKeyHint": "Fill in to get model list",
"apiKeyAutoFill": "Just fill in here, config below will be auto-filled",
- "codexApiKeyAutoFill": "Just fill in here, auth.json below will be auto-filled",
"getApiKey": "Get API Key",
"parameterConfig": "Parameter Config - {{name}} *",
"mainModel": "Main Model (optional)",
@@ -192,12 +221,22 @@
"fillSupplierName": "Please fill in provider name",
"fillConfigContent": "Please fill in configuration content",
"fillParameter": "Please fill in {{label}}",
+ "fillTemplateValue": "Please fill in {{label}}",
"configJsonError": "Config JSON format error, please check syntax",
"authJsonRequired": "auth.json must be a JSON object",
"authJsonError": "auth.json format error, please check JSON syntax",
"fillAuthJson": "Please fill in auth.json configuration",
"fillApiKey": "Please fill in OPENAI_API_KEY",
- "visitWebsite": "Visit {{url}}"
+ "visitWebsite": "Visit {{url}}",
+ "anthropicModel": "Main Model",
+ "anthropicSmallFastModel": "Fast Model",
+ "modelPlaceholder": "claude-3-7-sonnet-20250219",
+ "smallModelPlaceholder": "claude-3-5-haiku-20241022",
+ "modelHelper": "Optional: Specify default Claude model to use, leave blank to use system default.",
+ "categoryOfficial": "Official",
+ "categoryCnOfficial": "China Official",
+ "categoryAggregation": "Aggregation",
+ "categoryThirdParty": "Third Party"
},
"endpointTest": {
"title": "API Endpoint Management",
@@ -252,6 +291,12 @@
"configPreview": "Configuration Preview",
"applyConfig": "Apply Configuration"
},
+ "providerPreset": {
+ "label": "Provider Preset",
+ "custom": "Custom Configuration",
+ "other": "Other",
+ "hint": "You can continue to adjust the fields below after selecting a preset."
+ },
"kimiSelector": {
"modelConfig": "Model Configuration",
"mainModel": "Main Model",
diff --git a/src/i18n/locales/zh.json b/src/i18n/locales/zh.json
index e24ecae..09a6632 100644
--- a/src/i18n/locales/zh.json
+++ b/src/i18n/locales/zh.json
@@ -20,7 +20,9 @@
"success": "成功",
"error": "错误",
"unknown": "未知",
- "enterValidValue": "请输入有效的内容"
+ "enterValidValue": "请输入有效的内容",
+ "clear": "清除",
+ "toggleTheme": "切换主题"
},
"apiKeyInput": {
"placeholder": "请输入API Key",
@@ -54,10 +56,12 @@
"enable": "启用",
"inUse": "使用中",
"editProvider": "编辑供应商",
+ "editProviderHint": "更新配置后将立即应用到当前供应商。",
"deleteProvider": "删除供应商",
"addNewProvider": "添加新供应商",
"addClaudeProvider": "添加 Claude Code 供应商",
"addCodexProvider": "添加 Codex 供应商",
+ "addProviderHint": "填写信息后即可在列表中快速切换供应商。",
"editClaudeProvider": "编辑 Claude Code 供应商",
"editCodexProvider": "编辑 Codex 供应商",
"configError": "配置错误",
@@ -65,7 +69,17 @@
"applyToClaudePlugin": "应用到 Claude 插件",
"removeFromClaudePlugin": "从 Claude 插件移除",
"dragToReorder": "拖拽以重新排序",
- "sortUpdateFailed": "排序更新失败"
+ "dragHandle": "拖拽排序",
+ "sortUpdateFailed": "排序更新失败",
+ "configureUsage": "配置用量查询",
+ "name": "供应商名称",
+ "websiteUrl": "官网链接",
+ "configJson": "配置 JSON",
+ "writeCommonConfig": "写入通用配置",
+ "editCommonConfigButton": "编辑通用配置",
+ "configJsonHint": "请填写完整的 Claude Code 配置",
+ "editCommonConfigTitle": "编辑通用配置片段",
+ "editCommonConfigHint": "通用配置片段将合并到所有启用它的供应商配置中"
},
"notifications": {
"providerSaved": "供应商配置已保存",
@@ -86,6 +100,8 @@
"settings": {
"title": "设置",
"general": "通用",
+ "tabGeneral": "通用",
+ "tabAdvanced": "高级",
"language": "界面语言",
"languageHint": "切换后立即预览界面语言,保存后永久生效。",
"theme": "外观主题",
@@ -94,8 +110,10 @@
"themeDark": "深色",
"themeSystem": "跟随系统",
"importExport": "导入导出配置",
+ "importExportHint": "导入导出 cc-switch 配置,便于备份或迁移。",
"exportConfig": "导出配置到文件",
"selectConfigFile": "选择配置文件",
+ "noFileSelected": "尚未选择配置文件。",
"import": "导入",
"importing": "导入中...",
"importSuccess": "导入成功!",
@@ -109,6 +127,7 @@
"languageOptionChinese": "中文",
"languageOptionEnglish": "English",
"windowBehavior": "窗口行为",
+ "windowBehaviorHint": "配置窗口最小化与 Claude 插件联动策略。",
"minimizeToTray": "关闭时最小化到托盘",
"minimizeToTrayDescription": "勾选后点击关闭按钮会隐藏到系统托盘,取消则直接退出应用。",
"enableClaudePluginIntegration": "应用到 Claude Code 插件",
@@ -119,7 +138,9 @@
"appConfigDirDescription": "自定义 CC-Switch 的配置存储位置(config.json 等文件)",
"browsePlaceholderApp": "例如:C:\\Users\\Administrator\\.cc-switch",
"claudeConfigDir": "Claude Code 配置目录",
+ "claudeConfigDirDescription": "覆盖 Claude 配置目录 (settings.json)。",
"codexConfigDir": "Codex 配置目录",
+ "codexConfigDirDescription": "覆盖 Codex 配置目录。",
"browsePlaceholderClaude": "例如:/home/<你的用户名>/.claude",
"browsePlaceholderCodex": "例如:/home/<你的用户名>/.codex",
"browseDirectory": "浏览目录",
@@ -129,6 +150,12 @@
"updating": "更新中...",
"checking": "检查中...",
"upToDate": "已是最新",
+ "aboutHint": "查看版本信息与更新状态。",
+ "portableMode": "当前为便携版,更新需手动下载。",
+ "updateAvailable": "检测到新版本:{{version}}",
+ "updateFailed": "更新安装失败,已尝试打开下载页面。",
+ "checkUpdateFailed": "检查更新失败,请稍后重试。",
+ "openReleaseNotesFailed": "打开更新日志失败",
"releaseNotes": "更新日志",
"viewReleaseNotes": "查看该版本更新日志",
"viewCurrentReleaseNotes": "查看当前版本更新日志",
@@ -137,7 +164,9 @@
"restartRequiredMessage": "修改 CC-Switch 配置目录后需要重启应用才能生效,是否立即重启?",
"restartNow": "立即重启",
"restartLater": "稍后重启",
- "devModeRestartHint": "开发模式:配置已保存,请手动重启应用以使新配置生效"
+ "restartFailed": "应用重启失败,请手动关闭后重新打开。",
+ "devModeRestartHint": "开发模式下不支持自动重启,请手动重新启动应用。",
+ "saving": "正在保存..."
},
"apps": {
"claude": "Claude Code",
@@ -177,9 +206,9 @@
"manualConfig": "手动配置供应商,需要填写完整的配置信息,或者",
"officialNoApiKey": "官方登录无需填写 API Key,直接保存即可",
"codexOfficialNoApiKey": "官方无需填写 API Key,直接保存即可",
+ "codexApiKeyAutoFill": "只需要填这里,下方 auth.json 会自动填充",
"kimiApiKeyHint": "填写后可获取模型列表",
"apiKeyAutoFill": "只需要填这里,下方配置会自动填充",
- "codexApiKeyAutoFill": "只需要填这里,下方 auth.json 会自动填充",
"getApiKey": "获取 API Key",
"parameterConfig": "参数配置 - {{name}} *",
"mainModel": "主模型 (可选)",
@@ -192,12 +221,22 @@
"fillSupplierName": "请填写供应商名称",
"fillConfigContent": "请填写配置内容",
"fillParameter": "请填写 {{label}}",
+ "fillTemplateValue": "请填写 {{label}}",
"configJsonError": "配置JSON格式错误,请检查语法",
"authJsonRequired": "auth.json 必须是 JSON 对象",
"authJsonError": "auth.json 格式错误,请检查JSON语法",
"fillAuthJson": "请填写 auth.json 配置",
"fillApiKey": "请填写 OPENAI_API_KEY",
- "visitWebsite": "访问 {{url}}"
+ "visitWebsite": "访问 {{url}}",
+ "anthropicModel": "主模型",
+ "anthropicSmallFastModel": "快速模型",
+ "modelPlaceholder": "claude-3-7-sonnet-20250219",
+ "smallModelPlaceholder": "claude-3-5-haiku-20241022",
+ "modelHelper": "可选:指定默认使用的 Claude 模型,留空则使用系统默认。",
+ "categoryOfficial": "官方",
+ "categoryCnOfficial": "国内官方",
+ "categoryAggregation": "聚合服务",
+ "categoryThirdParty": "第三方"
},
"endpointTest": {
"title": "请求地址管理",
@@ -252,6 +291,12 @@
"configPreview": "配置预览",
"applyConfig": "应用配置"
},
+ "providerPreset": {
+ "label": "预设供应商",
+ "custom": "自定义配置",
+ "other": "其他",
+ "hint": "选择预设后可继续调整下方字段。"
+ },
"kimiSelector": {
"modelConfig": "模型配置",
"mainModel": "主模型",