Repository navigation
fix(mobile-page): keep the terminal mock in English - #50433
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
The Mobile page's phone mock renders a terminal session. Its worktree name, tab labels, transcript, test output and key caps went through t(), so locales translated code and terminal output (feat/mobile-page became 壮举/手机页面, PASS became 经过). The phone never translates a real terminal session, so these strings are now English constants and their 23 now-unused keys are removed from every renderer locale and the Korean override catalog. The surrounding phone chrome stays translated. Refs stablyai#32207 Co-authored-by: Neil <[email protected]>
e76c629 to
4cb1378
Compare
ELI5
The Mobile page shows a picture of a phone running a terminal session. That picture's text went through the translation system, so in Chinese the "terminal" showed translated code:
feat/mobile-pagebecame 壮举/手机页面,PASSbecame 经过, and theTab/Esckeys became 选项卡 / Esc键. A real terminal is never translated, so the mock now stays in English while the phone's own buttons and labels stay translated.What Changed
TerminalSlide(worktree name, tab labels, prompt, tool-call transcript, test output, agent reply, accessory key caps) rendered translated strings viat().WORKTREE,TABS,TRANSCRIPT,ACCESSORY_KEYS) with a short comment saying why they must not go throught(). The accessory keys render from one array. The agent reply is now one paragraph that wraps at the frame width instead of three hard-split lines.en.jsonand all ten other renderer locales, plus the matching entries inconfig/scripts/locale-catalog/locale-ko-key-overrides.json.Why
Translating terminal output misrepresents what the phone actually shows: Orca mirrors the desktop terminal byte-for-byte, so a Chinese user would see English output in reality. 壮举 is "feat" as in "achievement", so the translated mock was nonsense. Making the strings constants, rather than marking them do-not-translate in every catalog, removes the dead keys too and leaves nothing for future translation passes to get wrong.
Linked Issue
Refs #32207 (part of the localization effort; does not close it).
Visual Proof
Mobile page › terminal mock, Chinese locale:
English locale (unchanged apart from the reply wrapping as one paragraph):
Testing
Rendered the
TerminalSlidecomponent fixture in English and Chinese before and after the change (screenshots above, macOS).Localization verifiers all pass on the rebased commit:
verify:localization-catalogs,verify:localization-catalog,verify:localization-runtime-catalog,verify:localization-protected-copy,verify:localization-extraction(0 inline defaults differ fromen.json),verify:localization-coverage.CI static gates on the touched file pass: anti-slop oxlint, code-quality native plugins, ast-grep, the changed-code quality gate, and
oxfmt --checkon all 13 files.No new automated test: the change is static mock copy and catalog removals, which the localization verifiers above cover (they reject unused or missing keys).
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
Performance
None, because this only runs when the Mobile page's static mock renders, and it replaces 23
t()lookups per render with module-level constants (slightly less work). Removing 23 keys from each locale also shrinks the catalogs a little. No hot path, I/O, polling, or subprocess work is touched.Risk
Level: Low
Agent skill upstream boundary
Notes
Original fix by @x-Ai in #50433 (rebased and squashed onto current main; authorship preserved).
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance