mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
fix(mcp): improve error message internationalization
- Add translateMcpBackendError utility to map backend errors to i18n keys - Update error handling in McpPanel, McpFormModal, and McpWizardModal - Internationalize stdio/http type selectors in Wizard - Implement three-tier fallback strategy: translation → raw error → default message - No backend changes required, fully frontend-based i18n implementation
This commit is contained in:
@@ -389,7 +389,11 @@ export default function SettingsModal({
|
||||
const filePath = await window.api.saveFileDialog(defaultName);
|
||||
|
||||
if (!filePath) {
|
||||
onNotify?.(`${t("settings.exportFailed")}: ${t("settings.selectFileFailed")}`, "error", 4000);
|
||||
onNotify?.(
|
||||
`${t("settings.exportFailed")}: ${t("settings.selectFileFailed")}`,
|
||||
"error",
|
||||
4000,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user