fix(i18n): add missing en-US dashboard translations - #9896
Merged
Conversation
Fill 26 keys present in zh-CN but missing from en-US locale files: - tool-use: the whole dialogs.syncProvider subtree (MCP server sync dialog showed untranslated keys in English UI) - config-metadata: section hints for knowledgebase and websearch - provider: vllm_rerank description - subagent: personaPreview label Verified all en-US locale files now have full key parity with zh-CN.
Contributor
Author
|
Closing this for now — will revisit with a cleaner patch after double-checking key usage against the components. |
McpServersSection.vue resolves features.tooluse.syncProvider.* (the subtree must sit at the file root); the previous commit had mirrored zh-CN's placement under dialogs, which the namespace lookup never reaches. Also drop form.personaPreview: the component consumes cards.personaPreview (already present); form.personaPreview is an unused key.
Contributor
Author
|
Reopened after corrections — see the new commit. Every added key is now verified against actual component usage (grep of tm()/t() calls resolved through the i18n namespace map in loader.ts):
Diff is now +15/−52 across 2 files (moved subtree + removed one dead key). Verification script and method available on request. |
Soulter
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
英文界面的 MCP 服务器同步对话框直接渲染了原始键名(如
[MISSING: features.tooluse.syncProvider.status.selectProvider]),另有几处文案回退为中文。根因:en-US相比zh-CN缺失 26 个翻译键。问题出在哪
涉及 4 个语言文件,两类问题:
1. 不只是缺翻译,而是放错了位置 ——
features/tool-use.json整个
syncProvider子树(22 个键)zh-CN里有,但嵌在dialogs.之下。键解析逻辑如下:loader.ts将features/tool-use.json映射到命名空间features.tooluse(无连字符)McpServersSection.vue通过useModuleI18n('features/tooluse')消费,tm('syncProvider.status.selectProvider')解析为features.tooluse.syncProvider.status.selectProvider所以这个子树必须位于
tool-use.json的根级;嵌在dialogs.下(zh-CN 目前就是这么放的)命名空间查找永远不可达,界面就会渲染[MISSING: ...]。zh 界面同样受此影响(存量问题,见下文)。2. 单纯缺失 —— 三个文件
features/provider.json:providers.description.vllm_rerank(由utils/providerUtils.js消费)features/config-metadata.json:ai_group.knowledgebase.hint/ai_group.websearch.hint(default.py中 schema 的 hint 为空串,i18n_utils.py仍会转换为 i18n 键,语言包必须提供文案)features/subagent.json:form.personaPreview—— 核实为死键:SubAgentPage.vue消费的是cards.personaPreview(两种语言都已存在),因此刻意未复制。解决方案
syncProvider移至tool-use.json根级,落入正确的命名空间(diff 为纯子树迁移)。zh-CN保持一致。验证
audit_i18n.py,可提供):解析 loader.ts 模块映射,扫描 62 个 dashboard 文件的全部 942 个字面量tm()/t()键,经命名空间映射解析后对照三种语言包。结果:en-US 全量可解析;全部语言包中仅存的缺口是 zh-CN 的 3 个 syncProvider 键(即上述存量 bug)与 ru-RU 的约 70 键。pnpm build(vue-tsc + vite)通过——locale JSON 在构建期解析,可捕获任何语法错误。后续(刻意不在本 PR 范围内)
syncProvider子树同样移到根级(修复 zh 界面的[MISSING: ...])。ru-RU缺失约 70 键(集中在 config-metadata 与 extension)——可另行 PR 补齐。