mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-27 16:26:16 +08:00
fix: pre-release fixes for code formatting, i18n, and test suite
- Run cargo fmt to fix Rust code formatting (lib.rs) - Add missing i18n keys: migration.success, agents.title (zh/en/ja) - Replace hardcoded strings "Agents" and "MCP" with t() calls in App.tsx - Fix test mocks and assertions: - Add providersApi.updateTrayMenu to useSettings.test.tsx mock - Update SettingsPage mock path in App.test.tsx - Fix toast message assertion in integration/SettingsDialog.test.tsx - Add autoSaveSettings to SettingsDialog component test mock - Fix loading state test to check spinner instead of title - Update import button name matching for selected file state - Fix save button test to switch to advanced tab first - Remove obsolete cancel button test (button no longer exists) Test results improved from 99 passed / 17 failed to 104 passed / 11 failed
This commit is contained in:
+2
-2
@@ -391,7 +391,7 @@ function App() {
|
||||
t("prompts.title", { appName: t(`apps.${activeApp}`) })}
|
||||
{currentView === "skills" && t("skills.title")}
|
||||
{currentView === "mcp" && t("mcp.unifiedPanel.title")}
|
||||
{currentView === "agents" && "Agents"}
|
||||
{currentView === "agents" && t("agents.title")}
|
||||
</h1>
|
||||
</div>
|
||||
) : (
|
||||
@@ -512,7 +512,7 @@ function App() {
|
||||
size="sm"
|
||||
onClick={() => setCurrentView("mcp")}
|
||||
className="text-muted-foreground hover:text-foreground hover:bg-black/5 dark:hover:bg-white/5"
|
||||
title="MCP"
|
||||
title={t("mcp.title")}
|
||||
>
|
||||
<Server className="h-4 w-4" />
|
||||
</Button>
|
||||
|
||||
@@ -833,5 +833,11 @@
|
||||
"colorLabel": "Icon Color",
|
||||
"selectIcon": "Select Icon",
|
||||
"preview": "Preview"
|
||||
},
|
||||
"migration": {
|
||||
"success": "Configuration migrated successfully"
|
||||
},
|
||||
"agents": {
|
||||
"title": "Agents"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -833,5 +833,11 @@
|
||||
"colorLabel": "アイコンカラー",
|
||||
"selectIcon": "アイコンを選択",
|
||||
"preview": "プレビュー"
|
||||
},
|
||||
"migration": {
|
||||
"success": "設定の移行が完了しました"
|
||||
},
|
||||
"agents": {
|
||||
"title": "エージェント"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -833,5 +833,11 @@
|
||||
"colorLabel": "图标颜色",
|
||||
"selectIcon": "选择图标",
|
||||
"preview": "预览"
|
||||
},
|
||||
"migration": {
|
||||
"success": "配置迁移成功"
|
||||
},
|
||||
"agents": {
|
||||
"title": "智能体"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user