[Bug] Hardcoded Chinese strings and missing translation keys in the dashboard
Description
Several user-facing strings bypass the existing internationalization helpers and remain hardcoded in Chinese. As a result, selecting English does not affect these labels, validation messages, error notifications, or generated MCP configuration defaults.
This was identified through static source inspection. The affected files below were verified against upstream master at commit 8eb1958a3c9a966ff5713260e383d552238ad5dd; browser reproduction has not yet been performed.
Affected areas
| Area | Examples | Source |
|---|---|---|
| Shared HTTP request handling | HTTP status descriptions and the request-error notification title remain in Chinese. This affects consumers of the shared request helper. | request.js:24–47 |
| Downloads | The request-error notification title and download-failure error prefix remain in Chinese. | download.js:37, download.js:119 |
| MCP configuration dialog | Gateway address labels, input placeholder, current address, enabled/disabled states, base path, and URL explanation remain in Chinese. Generated service names and fallback descriptions also contain Chinese text. | McpConfigModal.js:326–356, defaults |
| MCP tool parameter validation | Missing parameter fields, row references, and nesting-depth limits produce Chinese messages. | ToolsModal.js:416–428, ToolsModal.js:617 |
| Exception pages | Descriptions for 403/404/500 and the return-home button remain in Chinese. | typeConfig.js:22–32, Exception/index.js:55 |
| Resource management | The warning asking the user to select a menu on the left remains in Chinese. | Resource/index.js:177 |
| Instance management | The chart series name for the item count remains in Chinese. | Instance/index.js:260 |
Missing translation keys
Both locale files contain 674 keys and have matching key sets. However, these five keys referenced by the application are absent from both en-US.json and zh-CN.json:
| Missing key | References |
|---|---|
SHENYU.SYSTEM.ALERT.LABELS.NAME |
Alert/AddModal.js:269 |
SHENYU.SYSTEM.ALERT.LABELS.VALUE |
Alert/AddModal.js:288 |
SHENYU.COMMON.SAVE |
ApiKeys/index.js:81, also line 138 |
SHENYU.SYSTEM.DESCRIBE |
ApiKeys/index.js:90, also lines 147 and 220 |
SHENYU.COMMON.BACK |
ApiKeys/index.js:413 |
Some call sites provide an English fallback, while others have no explicit fallback. Comparing the two locale files alone does not detect these missing keys.
Suggested verification steps
- Select English in the dashboard.
- Open an MCP configuration dialog and inspect its labels, placeholders, and generated defaults.
- Submit incomplete MCP tool parameters or exceed the supported nesting depth.
- Simulate HTTP 4xx/5xx responses and download failures in a test environment, then inspect the notifications.
- Visit the 403/404/500 pages and inspect their descriptions and return-home action.
- Check the resource-selection warning, instance chart, alert label inputs, and API Key dialogs.
Expected behavior / acceptance criteria
- [ ] User-facing strings in these paths use the existing internationalization mechanism and follow the selected locale.
- [ ] The five missing keys are added or corrected in both locale files.
- [ ] Dynamic values such as row numbers and nesting-depth limits are preserved in translated messages.
- [ ] Changes to generated MCP configuration names are checked for compatibility with configuration references and consumers.
- [ ] English and Chinese behavior is verified for the affected paths, including validation and failure cases.
Language self-names in the language selector, Chinese comments, test fixtures, and intentional Chinese currency-conversion characters should not be treated as translation defects. Legacy result-page examples and unused components can be assessed separately after checking their actual usage.
I'd like to work on this — replacing the hardcoded Chinese strings with i18n keys and adding the five missing keys to both locale files. I'll open a PR shortly.