Skip to content

fix(i18n): consistent and complete Simplified Chinese, with an English terminal mock on the Mobile page - #50340

Closed
x-Ai wants to merge 3 commits into
stablyai:mainfrom
x-Ai:fix/i18n-zh-consistency
Closed

x-Ai wants to merge 3 commits into
stablyai:mainfrom
x-Ai:fix/i18n-zh-consistency

Conversation

@x-Ai

@x-Ai x-Ai commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

ELI5

With Orca in Simplified Chinese, the current release mixes styles and leaves gaps: some strings end with 。 or use “ ” or 您 while their neighbours don't, a few newer strings are still English, the Mobile page's terminal picture is machine-translated (feat/mobile-page became 壮举/手机页面), and a few notices built in code run two sentences together. This PR makes the zh catalogs consistent, fills the missing translations, joins code-built sentences properly, and keeps the terminal picture in English.

This is #47701 rebuilt as three commits on current main, without its merge history. Same changes, refreshed counts and screenshots.

What Changed

Area Change Desktop Phone
Final 。 Dropped at the end of a value 701 277, plus the 5 iOS permission strings
Quotes “ ” and 「 」 become ASCII " 402 134
Form of address 您 becomes 你 176 48
Missing zh Translated; only _one forms, which zh never uses, remain 55 299
Upstream's #48040 Literal renderings reworded 25, plus 1 sibling –
Settings › Voice Short sentences joined with ,, so the pane has no 。 16 –
Sentences built in code joinSentences instead of a space 9 places 4 places
Terminal mock English constants; its 23 keys leave every locale 1 file –
Platform badges iOS and Android, as NEVER_TRANSLATE_VALUES already says 2 –

Coverage: all 6,950 phone strings have zh (main leaves 299 of them English), and desktop zh goes from 24638 to 24693 of this branch's 25068 strings.

Commits

  1. fix(mobile-page): keep the terminal mock in English: TerminalSlide.tsx plus the 23 keys removed from every locale.
  2. fix(i18n): join code-built sentences with joinSentences: the 13 places listed under Code.
  3. fix(i18n): consistent Simplified Chinese and the missing zh strings: the zh catalogs (desktop, phone, iOS) and the zh values in the locale override scripts.

Examples

Where Upstream main This PR
Mobile page terminal mock 壮举/手机页面 · 经过 · 选项卡 · Esc键 feat/mobile-page · PASS · Tab · Esc
Platform badges iOS系统 · 安卓 iOS · Android
Cookie import banner Imported 3,694 cookies · Reload 已导入 3,694 个 Cookie · 重新加载
Unreachable server …且此电脑能访问其地址 这是 Tailscale 地址… …且此电脑能访问其地址。这是 Tailscale 地址…
Voice model 速度快。仅支持英语,英语最准确。 速度快,仅支持英语,英语识别最准确
Speech model update 请在“设置 > 语音”中更新到更快的版本。 请在"设置 > 语音"中更新到更快的版本
Mobile page hero 工作区就在您的口袋里 工作区就在你的口袋里
Source control (#48040) 不支持 Fork 头 不支持 Fork 中的源分支

Code

  • TerminalSlide.tsx: the mock session's worktree name, tabs, transcript, test output and key caps are English constants instead of t() calls. They picture what the desktop streams to the phone, which isn't translated either. The phone chrome around them (Back, the status line, the input placeholder, Paste) stays translated.
  • joinSentences replaces a pasted space where code joins catalog sentences, as the desktop's write notices already do. Desktop: the routed-page cookie-import note, the image gallery's step announcement, the unreachable server hint, the AI vault's empty-session note, the plugin remove dialog, the Option as Alt description, the WSL move note, the Google disconnect confirmation and the worktree palette's screen-reader status. Phone: the write notices, the Google disconnect confirmation, the GitHub connect footer and the skills note (moved into mobile-bot-sheet-copy.ts to keep the skills page under the line limit).

Simplified Chinese details

  • Three phone fragments that code places before another sentence (settings.notificationDisplayTest.{unsupportedHost,noToken,registrationPending}) keep their 。.
  • The iOS photo-library string drops its quotes (照片图库), since verify:mobile-localization rejects " there.
  • The zh values in locale-cross-locale-key-overrides.mjs, locale-macos-tcc-key-overrides.mjs, locale-zh-value-overrides.mjs, locale-value-overrides.mjs and locale-key-overrides.mjs follow the same style, so a repair run keeps it.
  • Phone strings with a desktop twin (same key and English) use the desktop's wording; bot outfit names match on both (评审人, 保安).
  • New values follow the glossary (智能体, 工作者, 协调者, 支线聊天, 签名密钥, 主聊天, bots, 令牌, 密钥, 议题, 注释, 抓取, 绘制) and pass repairTranslatedValue unchanged. The policy still rewrites 31 existing values (mostly their 代理); this PR only changed their punctuation or pronoun.
  • The CLI tip's second example prompt opened no quote; it now opens and closes one, wording unchanged.

Why

  • The terminal picture is terminal output; translating it produced nonsense (壮举 is "feat" as in "achievement"), and the phone never translates a real session.
  • Earlier zh work (fix(i18n): fill Simplified Chinese coverage gaps on desktop and mobile #43011) settled on no final 。 and 你; strings added since brought back 。 and 您, so lines on one screen disagree.
  • Quotes: the catalog has both styles (396 values with “ ”, 98 with ASCII only). This PR settles on ASCII, the style the Chinese users I localize for prefer. If maintainers would rather keep “ ”, the conversion is mechanical and I can flip it.
  • With final stops gone, sentences that code pasted together with a space ran on; joinSentences adds 。 between Chinese sentences and keeps the space in English.
  • Newer strings shipped without zh, so those screens showed English inside Chinese pages.
  • Why a new PR: fix(i18n): tidy Simplified Chinese (你, ASCII quotes, no final 。), translate new strings, join code-built sentences, keep the terminal mock in English #47701 grew to 32 commits, 13 of them merges, as upstream kept adding zh strings next to its lines. This branch carries the same end state in three reviewable commits on today's main.

Linked Issue

Part of #32207, the localization issue; this PR covers Simplified Chinese, and other locales stay tracked there. Follows #43011 and #46255. Supersedes #47701.

Visual Proof

Simplified Chinese, rendered through component fixtures (headless Chrome in a zh-CN locale, light theme, 2x). "Upstream main" is main at fe6bd53 with this branch's files reverted; "This PR" is this branch.

Screen Upstream main This PR
Mobile page › terminal mock ¹
Mock stays in English (was 壮举/手机页面, 经过, 选项卡, Esc键)
Mobile page › terminal mock on main Mobile page › terminal mock with this PR
Mobile page › hero ¹
iOS and Android badges; 您 → 你
Mobile page › hero on main Mobile page › hero with this PR
Settings › Experimental
Final 。 dropped; “ ” → "; Shared Codex servers wording
Settings › Experimental on main Settings › Experimental with this PR
Settings › Voice › Speech model
Short sentences joined with ,, no 。
Settings › Voice › Speech model on main Settings › Voice › Speech model with this PR
Browser › annotate palette
Translated (was 3 notes)
Browser › annotate palette on main Browser › annotate palette with this PR
Browser › cookie import banner
Translated (was Imported 3,694 cookies · Reload)
Browser › cookie import banner on main Browser › cookie import banner with this PR
macOS update dialog
Final 。 dropped
macOS update dialog on main macOS update dialog with this PR
Chat resume toast
Final 。 dropped
Chat resume toast on main Chat resume toast with this PR
Local main not updated toast
Final 。 dropped
Local main not updated toast on main Local main not updated toast with this PR
CLI tip
“ ” → "; the second example now opens and closes its quote
CLI tip on main CLI tip with this PR
Session search tip
您 → 你
Session search tip on main Session search tip with this PR
Plugin remove dialog ¹
joinSentences: 。 between the sentences instead of a space
Plugin remove dialog on main Plugin remove dialog with this PR
WSL move progress ¹
joinSentences: 。 between the sentences instead of a space
WSL move progress on main WSL move progress with this PR
Cookie import on a paired page ¹
joinSentences: no space after 。, no final 。
Cookie import on a paired page on main Cookie import on a paired page with this PR

¹ Temporary fixture written for these shots, not committed.

Testing

  • pnpm check:changed passes on the branch (localization catalogs, extraction and coverage, mobile localization, typecheck, lint, unit tests, ratchets).

  • The branch's tree is identical to fix(i18n): tidy Simplified Chinese (你, ASCII quotes, no final 。), translate new strings, join code-built sentences, keep the terminal mock in English #47701's head merged with today's main.

  • Every changed desktop zh value was run through repairTranslatedValue.

  • joinSentences was run directly: English matches the old space join, Chinese gets 。 between sentences. The plugin remove, WSL move and cookie import shots above show it rendered.

  • The fixture renders above, on macOS. Not run in a packaged app or on a phone; phone catalog changes were checked by the mobile localization verifier. pnpm -C mobile typecheck reports two errors in mobile/src/bots/use-open-bot-home.ts that are on main too.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

  • Every added test fails without this change and avoids the test anti-patterns

No new tests: the change is catalog values, constants in a static mock, and joinSentences at existing call sites; the catalog verifiers cover keys, placeholders and coverage.

Performance

None, because this changes catalog strings, replaces t() calls in a static mock with constants, and swaps a space join for joinSentences (one regex test per sentence) where text is already built; nothing new runs on startup, polls, or touches disk or IPC.

Risk

Level: Low

  • English UI is unchanged: joinSentences keeps the space after English sentences, the mock already showed English, and other locales only lose 23 keys nothing reads.
  • Simplified Chinese changes in punctuation, quotes and the pronoun, plus the reworded fix(i18n): translate English terms left in 64 Simplified Chinese strings #48040 values, the Voice pane lines and the new translations; zh-Hant keeps its own conventions.
  • The riskiest part is code that pastes catalog sentences together with a space: without the final 。 they run together. Every such place a scan of the t() call sites found now uses joinSentences; a missed one would show two sentences without a stop between them, which is cosmetic.
  • joinSentences counts a closing bracket as a sentence end, so the Option as Alt line still has a space after "(安全的默认设置)" where 。 would read better. That is how main renders it too; this PR doesn't change the helper.
  • Phones paired with an older desktop keep that desktop's bundle and see no change.
  • Back out with a plain revert.

AI Disclosure

Prepared with help from an AI coding assistant (code changes, translations, checks and the fixture screenshots).

Review

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 (focused on Simplified Chinese: catalogs, plus small code changes in 15 files, split into three commits)
  • 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): copy only; remote hosts and phones use the same catalogs
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred): lint, typecheck and the affected tests ran through check:changed; the build is left to CI

x-Ai added 3 commits November 27, 2026 11:34
The Mobile page's phone mock pictures a terminal session the desktop streams
to the phone, which is never translated. Routing its worktree name, tabs,
transcript, test output and key caps through t() machine-translated them
(feat/mobile-page became 壮举/手机页面, PASS 经过, Tab 选项卡, Esc Esc键).

They are now English constants, and their 23 keys leave every locale. The
phone chrome around them (Back, the status line, the input placeholder,
Paste) stays translated.
Where code put two catalog sentences side by side with a space, Chinese
ran them together once a value had no final 。. These places now use
joinSentences, as the desktop's write notices already do: English keeps the
space, Chinese gets 。 between sentences.

Desktop: the routed-page cookie-import note, the image gallery's step
announcement, the unreachable server hint, the AI vault's empty-session
note, the plugin remove dialog, the Option as Alt description, the WSL move
note, the Google disconnect confirmation and the worktree palette's
screen-reader status. Phone: the write notices, the Google disconnect
confirmation, the GitHub connect footer and the skills note, which moves
into mobile-bot-sheet-copy.ts to keep the skills page under the line limit.
Desktop, phone and iOS zh now follow one style, the one the earlier zh pass set:
- no final 。 at the end of a value (three phone fragments that code places
  before another sentence keep theirs)
- ASCII " instead of “ ” and 「 」
- 你 instead of 您

Also:
- Translate the desktop and phone strings that had no zh, so newer settings
  stop showing English inside Chinese pages (only _one forms, which zh never
  uses, remain).
- Settings › Voice: short sentences joined with ,, so the pane has no 。.
- Reword literal renderings from the last zh pass (Fork 头 → Fork 中的源分支,
  and 24 more) and use the glossary terms (智能体, 令牌, 密钥, 议题).
- Platform badges read iOS and Android, as NEVER_TRANSLATE_VALUES already
  says.
- The CLI tip's second example prompt now opens and closes its quote.
- The iOS photo-library string drops its quotes, which
  verify:mobile-localization rejects there.
- The zh values in the locale override scripts follow the same style, so a
  repair run keeps it.
@x-Ai
x-Ai requested a review from brennanb2025 as a code owner November 27, 2026 03:48
@coderabbitai

coderabbitai Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pull request updates Chinese localization across mobile and renderer interfaces, including punctuation, quotation marks, wording, and new message entries. Several components now use joinSentences to combine translated text. The mobile terminal slide uses local English mockup content, and its locale entries replace mock transcript strings with concise interface labels.

Merge Risk: Minimal · up to 58457

This change standardizes Simplified Chinese wording and punctuation and keeps the mobile terminal mock in English. No concrete defect or performance regression was identified, so it looks safe to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the two main parts of the change: consistent and complete Simplified Chinese catalogs, and an English terminal mock on the Mobile page. The changeset covers both, including zh catalog …
Description check Passed The description follows the repository template closely. It includes ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, AI Disclosure, Review, Notes, and Checklist sectio…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the two main parts of the change: consistent and complete Simplified Chinese catalogs, and an English terminal mock on the Mobile page. The changeset covers both, including zh catalog edits, the new translations, and the TerminalSlide mock constants. The title is long and mixes two topics, but it is related to the main change and does not describe anything absent from the changeset.

Full details: Description check

Explanation

The description follows the repository template closely. It includes ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, AI Disclosure, Review, Notes, and Checklist sections. It gives concrete before/after examples, commit breakdown, and risk level with a revert plan. The Linked Issue section cites a localization tracking issue (#32207) rather than a specific fixed issue, and the Testing checkboxes are partly unchecked. Those are minor gaps against the template's required content.

  • 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: 2ac6f8ea-b85e-4191-8376-fcb3e7ee121b
Commits

Reviewing files that changed from the base of the PR and between e070931 and 58457a7.

Files selected for processing: 33

  • config/scripts/locale-catalog/locale-cross-locale-key-overrides.mjs
  • config/scripts/locale-catalog/locale-key-overrides.mjs
  • config/scripts/locale-catalog/locale-macos-tcc-key-overrides.mjs
  • config/scripts/locale-catalog/locale-value-overrides.mjs
  • config/scripts/locale-catalog/locale-zh-value-overrides.mjs
  • mobile/locales/zh-Hans.json
  • mobile/src/bots/connectors/MobileBotGitHubSetup.tsx
  • mobile/src/bots/connectors/phone-google-accounts.tsx
  • mobile/src/bots/mobile-bot-sheet-copy.ts
  • mobile/src/bots/skills/MobileBotSkills.tsx
  • mobile/src/i18n/locales/zh.json
  • mobile/src/session/native-chat/agent-session/agent-session-write-notice-copy.ts
  • src/renderer/src/components/bots/google/GoogleAccountRow.tsx
  • src/renderer/src/components/mobile/slides/TerminalSlide.tsx
  • src/renderer/src/components/native-chat/media/images/gallery/NativeChatImageGallery.tsx
  • src/renderer/src/components/plugins/dialogs/PluginRemoveDialog.tsx
  • src/renderer/src/components/right-sidebar/ai-vault/session-list/AiVaultSessionUnsavedNotice.tsx
  • src/renderer/src/components/settings/browser/profiles/BrowserCookieImportMachineNotice.tsx
  • src/renderer/src/components/settings/runtime-environments/server-rows/runtime-server-row-details.tsx
  • src/renderer/src/components/settings/terminal/platform/TerminalMacKeyboardSection.tsx
  • src/renderer/src/components/worktree-jump/worktree-jump-palette-surface.tsx
  • src/renderer/src/components/wsl-move/WslMoveProgressBody.tsx
  • src/renderer/src/i18n/locales/de.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/ru.json
  • src/renderer/src/i18n/locales/tr.json
  • src/renderer/src/i18n/locales/zh-Hant.json
  • src/renderer/src/i18n/locales/zh.json
Files with no reviewable changes: 10

  • src/renderer/src/i18n/locales/de.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/ru.json
  • src/renderer/src/i18n/locales/tr.json
  • src/renderer/src/i18n/locales/zh-Hant.json

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

@nwparker

Copy link
Copy Markdown
Contributor

Thanks for the work on this! It's a broad Simplified Chinese style change (sentence-final 。, quote style, 您 → 你) across about 2,600 lines in 33 files, and it also refactors several components. It needs a translation-style decision from the maintainers rather than a bug-fix review. Splitting any actual mistranslations or missing strings into a small, focused PR would let those land quickly.

@x-Ai

x-Ai commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

Splitting this as you suggested. The style change keeps its own PR, and the parts that can land on their own are now separate PRs, each from today's main with one change:

Each PR's screenshots show that change alone on top of main. Closing this one so there is a single place to review each piece; thank you for the steer.

@x-Ai x-Ai closed this Nov 27, 2026
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.

2 participants