Skip to content

fix(i18n): show the Bots UI in Simplified Chinese - #45750

Merged
AmoabaKelvin merged 1 commit into
mainfrom
n20-bots-zh-locale
Nov 20, 2026
Merged

AmoabaKelvin merged 1 commit into
mainfrom
n20-bots-zh-locale

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

With Simplified Chinese selected, almost every Bots screen stayed in English. It now shows Chinese.

Files Added Deleted Net
Test 0 0 0 0
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2751 $\color{#cf222e}{\Huge{\mathbf{−}}}$​11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2740

What Changed

Before: zh.json had 27 of the 1,995 bots.* 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 reads settings.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 in locale-key-overrides.mjs, following the pattern of the #43011 automation overrides:

  • bot "Active" toggles read 已启用
  • "Next" on a run time reads 下次运行
  • "New" badges read 新/新增
  • "Review" on needs-you items, access requests, finished setups and tidy-up reads 查看/审核, not 评审 (code review)

Terminology follows the existing zh catalog: 机器人, 智能体, 工作区, 连接器, 条目, 自动化, 议题, 仓库, and 你. Product names stay Latin, and Home/Home Chat stay 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:

  • Other desktop locales have the same gap: about 1,967–1,970 bots.* keys missing in each of de, es, fr, ja, ko, pt, ru, tr and zh-Hant.
  • Mobile catalogs have 486 of 499 bots.* keys missing in every locale.
  • Built-in bot templates (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
before-BotChatsPanel--normalDay.png
after-BotChatsPanel--normalDay.png

New bot first screen
before-BotFirstScreen--allRead.png
after-BotFirstScreen--allRead.png

Bot settings (memory tidy-up)
before-BotTidyUp--settings.png
after-BotTidyUp--settings.png

Testing

Reproduced on main by counting en keys missing from zh.json (1,968 bots.*), and by rendering Bots fixtures with the zh setting, which showed English as in the before shots. After the change, pnpm verify:localization-catalogs passes with zh.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:changed passed on macOS.

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below: catalog entries only; project policy excludes copy tests
  • Every added test fails without this change and avoids the test anti-patterns

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.json grows 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

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

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.
@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Simplified Chinese locale gains strings for bot setup, memory, templates, conversations, work items, integrations, automations, sharing, and access flows. The locale-key override file adds context-specific translations for selected bot labels. These changes add localization text; the supplied summaries do not describe changes to application behavior.

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 634b0

This adds Chinese translations for the Bots UI and context-specific wording for a few labels. It does not change application logic, so the risk of merging is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(i18n): show the Bots UI in Simplified Chinese" names the primary change. The PR adds Simplified Chinese catalog entries (zh.json) and six zh key overrides so the desktop Bots UI renders…
Description check Passed The description follows the template well. It has ELI5, What Changed (before/after and mechanism), Why (alternatives considered), a linked issue (Fixes #45646), Visual Proof with before/after images, …
Linked Issues check Passed Issue #45646 requires Simplified Chinese strings for the desktop Bots UI. The PR adds the 1,968 missing bots.* keys to src/renderer/src/i18n/locales/zh.json. It also adds 410 bot-related keys in other…
Out of Scope Changes check Passed All changed areas support the Bots zh localization objective. These areas are the zh.json catalog entries, the locale-key-overrides.mjs overrides for Bots wording, and the reported verification. The P…
Full details: Title check

Explanation

The title "fix(i18n): show the Bots UI in Simplified Chinese" names the primary change. The PR adds Simplified Chinese catalog entries (zh.json) and six zh key overrides so the desktop Bots UI renders in Chinese instead of falling back to English. The title is specific and matches the objectives and linked issue #45646.

Full details: Description check

Explanation

The description follows the template well. It has ELI5, What Changed (before/after and mechanism), Why (alternatives considered), a linked issue (Fixes #45646), Visual Proof with before/after images, Testing with checked items, Risk with level Low and revert approach, and the Review and Notes sections. The AI Disclosure section is left empty, which the template allows for internal contributors, and the Level and checklist items are filled in. Minor gaps: the Testing section does not name the platforms beyond macOS for check:changed, and the Agent skill and AI Disclosure sections have no content beyond the checkbox. These gaps are non-critical.

Full details: Linked Issues check

Explanation

Issue #45646 requires Simplified Chinese strings for the desktop Bots UI. The PR adds the 1,968 missing bots.* keys to src/renderer/src/i18n/locales/zh.json. It also adds 410 bot-related keys in other namespaces (settings.bots., automations.botTarget/botEvents, components.bots., and bot feature tips). The PR description reports zero missing bots.* keys after the change. Six zh key overrides in config/scripts/locale-catalog/locale-key-overrides.mjs fix context-specific wording for Active, Next, New, and Review. The reviewed summary supports these changes. The issue lists built-in bot templates (src/shared/bots/bot-template-catalog/) as hardcoded English. The PR defers that work and states the reason. The issue presents this only as an observation in its 'Anything else' section, not as an explicit requirement. This leaves a documented gap, but the main requirement is met. No automated test is added. The issue does not request tests, and the PR cites project policy that excludes copy tests. Scope of the evidence is the summary and PR description. Source files were not read in detail.

Full details: Out of Scope Changes check

Explanation

All changed areas support the Bots zh localization objective. These areas are the zh.json catalog entries, the locale-key-overrides.mjs overrides for Bots wording, and the reported verification. The PR description explicitly excludes other desktop locales, mobile catalogs, and built-in template code, so it does not change them. The 41 keys shared with PR #45403 use the same values to avoid conflict. The reviewed summary shows no unrelated code path changes.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2e6c2ce7-17f8-4df4-8c7f-e9ff2c658ded
Commits

Reviewing files that changed from the base of the PR and between 50e537f and 634b066.

Files selected for processing: 2

  • config/scripts/locale-catalog/locale-key-overrides.mjs
  • src/renderer/src/i18n/locales/zh.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Simplified Chinese (zh-CN) localization for Bots UI is largely missing (~1,976 of 2,000 bots.* keys fall back to English)

1 participant