Repository navigation
Conversation
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.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
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. |
|
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
Each PR's screenshots show that change alone on top of |
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
"_oneforms, which zh never uses, remainjoinSentencesinstead of a spaceNEVER_TRANSLATE_VALUESalready saysCoverage: 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
fix(mobile-page): keep the terminal mock in English:TerminalSlide.tsxplus the 23 keys removed from every locale.fix(i18n): join code-built sentences with joinSentences: the 13 places listed under Code.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
Code
TerminalSlide.tsx: the mock session's worktree name, tabs, transcript, test output and key caps are English constants instead oft()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.joinSentencesreplaces 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 intomobile-bot-sheet-copy.tsto keep the skills page under the line limit).Simplified Chinese details
settings.notificationDisplayTest.{unsupportedHost,noToken,registrationPending}) keep their 。.verify:mobile-localizationrejects"there.locale-cross-locale-key-overrides.mjs,locale-macos-tcc-key-overrides.mjs,locale-zh-value-overrides.mjs,locale-value-overrides.mjsandlocale-key-overrides.mjsfollow the same style, so a repair run keeps it.repairTranslatedValueunchanged. The policy still rewrites 31 existing values (mostly their 代理); this PR only changed their punctuation or pronoun.Why
joinSentencesadds 。 between Chinese sentences and keeps the space in English.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
mainat fe6bd53 with this branch's files reverted; "This PR" is this branch.Mock stays in English (was 壮举/手机页面, 经过, 选项卡, Esc键)
iOS and Android badges; 您 → 你
Final 。 dropped; “ ” → "; Shared Codex servers wording
Short sentences joined with ,, no 。
Translated (was 3 notes)
Translated (was Imported 3,694 cookies · Reload)
Final 。 dropped
Final 。 dropped
Final 。 dropped
“ ” → "; the second example now opens and closes its quote
您 → 你
joinSentences: 。 between the sentences instead of a space
joinSentences: 。 between the sentences instead of a space
joinSentences: no space after 。, no final 。
¹ Temporary fixture written for these shots, not committed.
Testing
pnpm check:changedpasses 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.joinSentenceswas 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 typecheckreports two errors inmobile/src/bots/use-open-bot-home.tsthat are onmaintoo.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
joinSentencesat 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 forjoinSentences(one regex test per sentence) where text is already built; nothing new runs on startup, polls, or touches disk or IPC.Risk
Level: Low
joinSentenceskeeps the space after English sentences, the mock already showed English, and other locales only lose 23 keys nothing reads.t()call sites found now usesjoinSentences; a missed one would show two sentences without a stop between them, which is cosmetic.joinSentencescounts a closing bracket as a sentence end, so the Option as Alt line still has a space after "(安全的默认设置)" where 。 would read better. That is howmainrenders it too; this PR doesn't change the helper.AI Disclosure
Prepared with help from an AI coding assistant (code changes, translations, checks and the fixture screenshots).
Review
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): lint, typecheck and the affected tests ran throughcheck:changed; the build is left to CI