Repository navigation
feat(mobile): add Simplified Chinese localization - #11587
Gyarados4157 wants to merge 16 commits into
Conversation
…18n-audit # Conflicts: # package.json
…18n-audit # Conflicts: # mobile/app/h/[hostId]/edit.tsx
| "qE1-68U": "正在创建审阅...", | ||
| "JokOS5o": "用租约强制推送...", | ||
| "0BMXLfE": "推送 commits...", | ||
| "PnL-W2o": "出版分社...", |
There was a problem hiding this comment.
This entry still uses "出版分社" (publishing company/branch office), which is a machine-translation error for "Publishing branch…". The neighbouring entries
JokOS5o and 0BMXLfE were corrected from "推动" → "推送" in this PR; the in-progress "Publish branch…" label warrants the same pass.
| "PnL-W2o": "出版分社...", | |
| "PnL-W2o": "正在发布分支...", |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| @@ -458,7 +458,7 @@ | |||
| "SzcIpKs": "舞台文件", | |||
There was a problem hiding this comment.
"舞台文件" uses "舞台" (theatrical stage) rather than the git staging area term "暂存". Every other occurrence of "stage" in this file was corrected to "暂存" (e.g.
a1hiCFE → "暂存已审阅内容", WTkbKTE → "暂存 {{value0}}") — this entry appears to have been missed.
| "SzcIpKs": "舞台文件", | |
| "SzcIpKs": "暂存文件", |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Greptile SummaryThis PR hardens the mobile i18n infrastructure across four independent axes: keeping the GitHub SSH remote sentinel locale-independent, preventing missing-repository grouping from colliding with real repo names, correcting ~60 Simplified Chinese catalog mistranslations, and adding timeout + payload validation to the Google Translate bootstrap script.
Confidence Score: 5/5Safe to merge — all three logic changes are well-tested and self-contained. Each changed code path is covered by new or updated tests that pass. The SSH sentinel fix, Symbol-keyed missing-repo grouping, and bootstrap fetch hardening are all targeted, non-breaking changes with no cross-cutting side effects. Files Needing Attention: No files require special attention. The zh.json corrections are numerous but mechanical; the logic files have matching test coverage.
|
| Filename | Overview |
|---|---|
| config/scripts/bootstrap-mobile-locale-catalog.mjs | Adds AbortController timeout (10s) per fetch attempt, extracts and exports parseTranslationPayload with structured validation, and fixes retry-delay placement to only run between attempts. Logic is correct and well-covered by new tests. |
| config/scripts/bootstrap-mobile-locale-catalog.test.mjs | Adds tests for parseTranslationPayload edge cases and two timer-based integration tests for translateText covering abort-and-retry and successful-retry paths with fake timers. |
| mobile/app.json | Adds CFBundleAllowMixedLocalizations: true to iOS infoPlist to enable native permission string catalogs alongside the JS bundle locale. |
| mobile/src/i18n/locales/zh.json | Corrects ~60 Simplified Chinese mistranslations: '控制' → '管理' for source control, '推动/拉动' → '推送/拉取' for git push/pull, '阶段' → '暂存' for staging, '评论' → '审阅' for review contexts, '线程' → '讨论串' for threads, and several other machine-translation artifacts. |
| mobile/src/tasks/mobile-work-items.ts | Replaces t('m.oBMMuM8') with the hardcoded English backend sentinel string so isGitHubWorkItemsSshRemoteRequiredError works correctly regardless of the active UI locale. |
| mobile/src/tasks/mobile-work-items.test.ts | New test file verifying that isGitHubWorkItemsSshRemoteRequiredError matches the canonical English sentinel and rejects the Chinese-translated form. |
| mobile/src/worktree/workspace-list-sections.ts | Uses a Symbol('missing-repo') as the Map identity key for worktrees with no repo, preventing collision with a repo literally named with the old string sentinel; section key is now the stable constant 'missing-repo' while display title remains localized. |
| mobile/src/worktree/workspace-list-sections.test.ts | Adds a targeted test proving that a worktree with an empty repo and a repo literally named 'missing_repo' produce distinct, correctly-keyed sections. |
Reviews (2): Last reviewed commit: "test(i18n): cover translation request ti..." | Re-trigger Greptile
…bile-i18n-followup # Conflicts: # src/main/daemon/daemon-pty-router.ts
|
Too many files changed for review. ( Bypass the limit by tagging |
|
Resolved the upstream Conflict resolution:
Validation after the merge:
The root full suite under Node 24 reached 3,920 passing files / 41,348 passing tests, but is not fully green on this host: 3 suites could not install Electron because the binary download failed, and 6 unrelated existing test cases failed or timed out ( |
|
Thank you @Gyarados4157, and @brennanb2025 for #11446 before it. Orca Mobile localization has now landed in #35399 and the follow-up PRs linked from it, and it builds directly on your work. These ideas came from here:
The final version differs in a few places. It uses readable keys with the desktop Since this branch is superseded and far behind main, I'm closing it. Thanks again for pushing this forward. Simplified Chinese, Japanese, Korean and Spanish all shipped with it. |
Summary
zh-Hans) localization across the Orca mobile UI while preserving the existing English, Spanish, Japanese, and Korean catalogsmainand resolve theDaemonPtyRouterconflict using upstream's subscription-fanout architectureThis PR now targets
maindirectly and supersedes #11446, whose source branch remains conflicted and is not writable by this contributor.Relates to #9536.
Validation
pnpm run typecheckmobile/pnpm run typecheckpnpm run verify:mobile-localization-catalog— 2,564 translation calls and 2,171 keys across 5 localesoxlinton conflict/follow-up filesoxfmt --checkon conflict/follow-up fileszh-Hans.lproj/InfoPlist.stringsThe root full suite under Node 24 reached 3,920 passing files / 41,348 passing tests, but is not fully green on this host: three suites could not install the Electron binary after download failures, and six unrelated existing test cases failed or timed out. Details are recorded in the latest validation comment.