Repository navigation
fix(i18n): show the Bots UI in Simplified Chinese - #45750
Conversation
The zh catalog had 27 of 1,995 bots.* keys, so Bots screens fell back to English with Simplified Chinese selected. Add the 1,968 missing bots.* entries plus the 410 bot keys that live under settings.bots, automations.botTarget/botEvents, components.bots and the bots feature tips. Entries went through apply-translation-delta, so placeholders and the zh term policy are enforced. Key overrides keep context-specific wording where the generic policy mapping reads wrong: bot Active toggles read 已启用, "Next" on a run reads 下次运行, "New" badges read 新/新增, and "Review" on needs-you items, access requests and tidy-up reads 查看/审核 instead of code review.
|
No actionable comments were generated in the recent review. Walkthrough
Severity of issue fixed: Medium Merge Risk:
|
ELI5
With Simplified Chinese selected, almost every Bots screen stayed in English. It now shows Chinese.
What Changed
Before:
zh.jsonhad 27 of the 1,995bots.*keys, so i18next fell back to English for the other 1,968 on every Bots screen (chats, items, connectors, Slack/GitHub/Linear/Google/Composio setup, sharing, import, groups, webhooks, automations). The Bots settings page readssettings.bots.*and was English too.After: zh has every key the Bots UI uses. That's 1,968
bots.*keys, plus 410 bot keys stored elsewhere:settings.bots.*,automations.botTarget/botEvents,components.bots.*and the bots feature tips. Total coverage goes from 3,539 missing keys to 1,161, and none of the missing ones are Bots keys.Mechanism: the existing catalog path. The strings went into
config/scripts/locale-catalog/apply-translation-delta.mjs, which checks placeholders and applies the zh term policy (locale-translation-policy.mjs). A few English words read wrong in Bots context under the generic policy mapping. For those I added zh key overrides inlocale-key-overrides.mjs, following the pattern of the #43011 automation overrides:Terminology follows the existing zh catalog: 机器人, 智能体, 工作区, 连接器, 条目, 自动化, 议题, 仓库, and 你. Product names stay Latin, and
Home/Home Chatstay as #45403 has them. The 41 keys that #45403 also adds use its exact values, so whichever PR lands second rebases cleanly.Why
Nothing marks Bots copy as English-only. No protected-key list, extraction rule or doc says so, and the open team i18n PR #45403 translates a few bot keys itself. These were plain untranslated catalog entries. The alternatives were the Google MT bootstrap script, whose output needed the 智能体 cleanup in #43434, or translating in components, which would duplicate the lookup. Neither is better than filling the catalog through the existing delta tool.
Not in this PR:
bots.*keys missing in each of de, es, fr, ja, ko, pt, ru, tr and zh-Hant.bots.*keys missing in every locale.src/shared/bots/bot-template-catalog/) are hardcoded English in a shared module, and their prompts go to agents. Localizing them needs a decision on mechanism.Linked Issue
Fixes #45646
Visual Proof
Component fixtures rendered with
uiLanguage: 'zh', before (main) and after.Chats panel


New bot first screen


Bot settings (memory tidy-up)


Testing
Reproduced on main by counting en keys missing from
zh.json(1,968bots.*), and by rendering Bots fixtures with the zh setting, which showed English as in the before shots. After the change,pnpm verify:localization-catalogspasses withzh.json coverage: 22606/23767, and no Bots key is missing. I spot-checked the connectors panel, chats panel, first screen, access confirm, item pane and tidy-up settings fixtures in zh. A second pass compared every string against the English for meaning and terms, which led to 4 fixes.pnpm check:changedpassed on macOS.Risk
Catalog strings and six zh key overrides only; no code paths change. The worst case is a wording a zh reader finds off, which is a one-line catalog fix. Performance:
zh.jsongrows from 1.32 MB to 1.46 MB (397 KB → 435 KB gzipped). That's still smaller than ja (1.72 MB) and ru (1.96 MB). Only the selected locale is fetched, so other languages see no change. Revert is a plain revert.Level: Low
AI Disclosure
Review
Desktop renderer catalog only. Mobile has its own catalog (gap listed above). SSH, remote hosts and folder workspaces aren't affected because no path, host or workspace logic changed. Placeholders and
<tag/>markup were checked against English for every entry.Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)