Repository navigation
Bugfix: add lost keys - #4098
Merged
Merged
Conversation
修改 i18n 配置和 Memory 组件,使英文界面正确显示英文,中文界面保持中文。 - i18n.tsx: 设置 keySeparator=false, nsSeparator=false,强制 i18next 用 flat key 查找 locale 文件,避免带点 key 被当作嵌套结构查找失败 - MemoryManager.tsx: JSX 中文字面量(tooltip、aria-label、placeholder、按钮文案、列标题、状态映射等)改为 t() 调用形式,新增 56 个 memory.manager.* i18n key - en/common.json: 新增对应 56 个英文翻译 - zh/common.json: 新增对应 56 个中文翻译,确保两个 locale 完全对齐 Co-authored-by: Trae <noreply@trae.ai> Generated-by: glm-5.2
上传英文/中文界面国际化对比截图作为验证证据。 Co-authored-by: Trae <noreply@trae.ai> Generated-by: glm-5.2
移除截图文件,改为通过 PR 评论方式提供验证截图。 Co-authored-by: Trae <noreply@trae.ai> Generated-by: glm-5.2
为模型提供商连接失败场景补充 en/zh 文案(title/noModels/connectionFailed/authenticationFailed/accessDenied/endpointNotFound/serverError/timeout/sslError)。 Co-authored-by: Trae <noreply@trae.ai> Generated-by: deepseek-v4.1-flash
补齐两边 locale 缺失 key,使 en/zh 完全对齐: - zh 补 77 个:model.connectivity/status/filter、modelConfig.addDialog/button/ defaultConfig/delete/editDialog/library/list/pagination/search/spec/table/ update/verify、model.dialog.v2.searchModels、nl2agent.toolRecommendations 复数形式 - en 补 17 个:agent.a2a、agent.deployment、agent.mainAgent、agent.permission、 agent.runPolicy - 同时移除未生效的嵌套 model.dialog.error.provider 块(keySeparator=false 下 不会被解析,扁平 key 已存在) Co-authored-by: Trae <noreply@trae.ai> Generated-by: kimi-k3
恢复 i18next 默认分隔符行为:
- i18next 的 deepFind 会先把整串 key 当作扁平属性查找,与 keySeparator 无关;
默认 "." 是 keySeparator: false 的超集,显式关闭反而让嵌套数据与数组索引
路径(如 page.features.0.title)静默失效并返回裸 key。
- 全仓无含 ":" 的 key、也无 t("common:...") 形式的调用,nsSeparator 无实际作用。
- 已对 en/zh 全部语言包条目做等价性验证(5940 x 2 key,新旧配置解析差异 0),
并确认移除后 page.features.0.title 恢复为正常文案。
Refs #4084
Co-authored-by: Trae <noreply@trae.ai>
Generated-by: deepseek-v4.1-flash
InstallOfficialAgentsModal.tsx 中 34 个 officialAgent.* key 在 en/zh 语言包中均缺失(含 INSTALL_STEP_NAMES 动态引用的 4 个 step key), 导致界面直接显示裸 key。本次补齐两边翻译,补齐后 en/zh 各 5974 个 key,保持完全对齐。 Refs #4084 Co-authored-by: Trae <noreply@trae.ai> Generated-by: kimi-k3
CreationResultCards.tsx 中 9 个 workbench.creation.* key 在 en/zh 语言包 中均缺失,组件 t() 第二参数为中文 fallback,导致英文界面显示中文。 本次补齐两边翻译(zh 沿用组件内现有中文文案),补齐后 en/zh 各 5983 个 key,保持完全对齐。 Refs #4084 Co-authored-by: Trae <noreply@trae.ai> Generated-by: kimi-k3
模型配置相关弹窗中 7 个 modelConfig.* key 在 en/zh 语言包中均缺失, 组件 t() 以英文 defaultValue 兜底,导致中文界面显示英文: - modelConfig.addDialog.baseUrl / apiKey(ModelAddDialog.tsx) - modelConfig.advancedConfig.topP(ModelAdvancedConfig.tsx) - modelConfig.editDialog.apiKey / baseUrl(ModelEditDialog.tsx) - modelConfig.batchEdit.apiKey / baseUrl(ModelManagerDialog.tsx) zh 沿用既有文案风格保留 Base URL / API Key / Top P 英文术语。 补齐后 en/zh 各 5990 个 key,保持完全对齐。 Refs #4084 Co-authored-by: Trae <noreply@trae.ai> Generated-by: kimi-k3
修复 6 处 en/zh 占位符不匹配(统一以 en 的占位符为契约):
代码在用的 2 处(此前 en 缺少占位符,英文界面丢失变量信息):
- businessLogic.config.modal.deleteContent:en 补上 {{name}}
(调用处均传 { name },zh 已有)
- mcpTools.repository.authorFallback:en 补上 {{name}}
(mcp-detail.tsx 传 { name },zh 已有)
未被代码引用的 4 处死 key(补齐对齐,避免未来启用后出错):
- chatStreamFinalMessage.maxStepsMessage:zh 补 {{completedSteps}} 并对齐语义
- agentEvaluation.step1.runningHint:zh 补 {{done}}/{{total}}
- agentEvaluation.history.caseCount:zh 的 {{n}} 改为 {{count}}
- agentEvaluation.step1.runningProgress:zh 对齐为 {{current}}/{{total}}
修复后 5990 对 key 占位符全部一致。
Refs #4084
Co-authored-by: Trae <noreply@trae.ai>
Generated-by: kimi-k3
conversation-knowledge-scope-modal.tsx 使用的 common.select(选择)与 common.selected(已选择)在 en/zh 语言包中均缺失,组件以中文 fallback 兜底,导致英文界面显示中文。补齐后 en/zh 各 5992 个 key,保持完全对齐。 Refs #4084 Co-authored-by: Trae <noreply@trae.ai> Generated-by: kimi-k3
modelConfig.tsx 加载模型列表失败时使用的 cfg.error.loadList(日志)与 cfg.error.loadListFailed(用户提示)在 en/zh 语言包中均缺失且无 defaultValue,中英文界面都会显示裸 key。补齐后 en/zh 各 5994 个 key, 保持完全对齐。 Refs #4084 Co-authored-by: Trae <noreply@trae.ai> Generated-by: kimi-k3
以下 5 个 key 在 en/zh 语言包中均缺失且无 defaultValue,界面会显示裸 key: - knowledgeBase.message.noFiles(KnowledgeBaseConfiguration.tsx 上传未选文件提示) - mcpTools.publish.tagsInheritedHint(PublishConfirmModal.tsx 标签继承说明) - notifications.deepLink.mcpNotFound(my-mcp.tsx 深链接未找到提示) - a2a.security.requirementRequired(A2AAgentDiscoveryModal.tsx 认证方式必选提示) - common.error.loadFailed(space/evaluators/page.tsx 加载失败提示) 补齐后 en/zh 各 5999 个 key,保持完全对齐。 Refs #4084 Co-authored-by: Trae <noreply@trae.ai> Generated-by: kimi-k3
yunshuang-hw
requested review from
Dallas98,
WMC001,
YehongPan and
jeffwu-1999
as code owners
October 14, 2026 10:01
jeffwu-1999
reviewed
Oct 15, 2026
RepositoryMcpCard calls t("mcpTools.repository.authorFallback") without
a name parameter, so the {{name}} placeholder leaked into the rendered
author label. Remove it from the en value.
Refs #4098
Co-authored-by: Trae <noreply@trae.ai>
Generated-by: kimi-k3
- agentEvaluation.step1.runningHint: simplify, drop unused placeholders
- agentEvaluation.step1.runningProgress: more descriptive Chinese text
- agentEvaluation.history.caseCount: align placeholder with en ({{count}} → {{n}} vs caller)
- chatStreamFinalMessage.maxStepsMessage: simplify
Refs #4098
Co-authored-by: Trae <noreply@trae.ai>
Generated-by: kimi-k3
yunshuang-hw
commented
Oct 15, 2026
jeffwu-1999
approved these changes
Oct 15, 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.
Summary
补齐前端
t()引用但语言包缺失的 i18n key,修复界面显示裸 key 或错误语言(英文界面显示中文 fallback / 中文界面显示英文 defaultValue)的问题。变更内容(仅 2 个语言包文件,+126/-8)
验证
Test plan
t()key 与语言包 diff,缺失为 0