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:
Jason
2025-10-11 16:20:12 +08:00
parent c2b27a4949
commit ea7080a42e
7 changed files with 90 additions and 13 deletions

View File

@@ -293,6 +293,8 @@
"title": "MCP Configuration Wizard",
"hint": "Quickly configure MCP server and auto-generate JSON configuration",
"type": "Type",
"typeStdio": "stdio",
"typeHttp": "http",
"command": "Command",
"commandPlaceholder": "npx or uvx",
"args": "Arguments",

View File

@@ -293,6 +293,8 @@
"title": "MCP 配置向导",
"hint": "快速配置 MCP 服务器,自动生成 JSON 配置",
"type": "类型",
"typeStdio": "stdio",
"typeHttp": "http",
"command": "命令",
"commandPlaceholder": "npx 或 uvx",
"args": "参数",