Repository navigation
Conversation
The 19 browser.loadFailure.* keys shipped as untranslated English in
zh.json, ja.json, ko.json, and es.json since the browser
certificate-error work landed. This localizes them for all four
catalogs, keeping Orca, HTTPS, and the {{value0}} interpolation tokens
verbatim.
📝 WalkthroughWalkthroughUpdated the 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
The browser.loadFailure.* keys were still raw English in es/ja/ko/zh. en.json is
untouched; every {{value0}} token and the Orca/HTTPS brand terms are preserved.
13 of the zh keys were already covered by #12368, so only the 6 it did not
reach are taken here.
Co-authored-by: MumuTW <42820974+MumuTW@users.noreply.github.com>
|
Merged into Closing this in favour of that. Thank you for the fix, and sorry it took as long as it did to get through. |
Summary
The 19
browser.loadFailure.*keys have been shipping as untranslated English in every target catalog since the browser certificate-error work (#9104, #9070). A user on a Chinese, Japanese, Korean, or Spanish UI who hits a TLS failure gets an English error page inside an otherwise localized app — and a certificate warning is a bad place to lose the reader.This localizes all 19 for
zh,ja,ko, andes.Nothing else changes: no new keys, no
en.jsonedit, no reordering. Exactly 19 values per file.The strings cover connection/certificate headings (
connectionNotSecure,certificateAuthorityInvalid, …), the action buttons (retry,copyAddress,openExternally,tryHttps,proceedUnsafe), and the challenge-lifecycle messages (certificateChallengeExpired,certificateProceedFailed, …).Translation constraints followed:
OrcaandHTTPSstay verbatim, perlocale-translation-policy.mjs.{{value0}}is preserved one-for-one — verified programmatically across all 19 × 4.Note on scope
This is one instance of a broader pattern — feature copy lands in
en.jsonand the target catalogs are never filled — which is the premise of #8512. This PR only fills the hole for these 19 keys; it doesn't attempt to fix the process.Screenshots
No visual change — string values only, no layout or component change.
Testing
pnpm lint— fails identically on a cleanupstream/maincheckout, unrelated to this PR:verify:localization-coveragereports 6 pre-existing unlocalized"Ghostty"keyword strings interminal-advanced-platform-search.tsandterminal-pane-appearance-search.ts. I verified this by running the same check on a detachedmainworktree. The localization checks this PR does affect pass —verify:localization-catalogconfirms parity at 11,158 keys for all four catalogs.pnpm typecheck— clean (all three projects).pnpm test— 3422 files / 36470 tests pass. 2 tests fail insrc/relay/agent-exec-handler.test.ts, and both fail identically on a cleanupstream/maincheckout (verified in a separate detached worktree: same 2 failed / 8 passed). Pre-existing and unrelated to localization — this PR touches no relay or spawn code.pnpm build— clean, including the Swiftcomputer-use-macosnative target.verify-localization-catalog.mjsparity check plus the locale tests already cover the invariants that can regress here (key parity, placeholder compatibility). A test asserting specific translated strings would just restate the catalog.AI Review Report
Reviewed with Claude Code. What it checked and what came back:
HEAD~1vsHEADfor each of the four catalogs. Result: exactly 19 changed keys per file, zero outsidebrowser.loadFailure.*. This was the main risk, since a careless edit to an 11k-key JSON file can reorder or drop entries.{{...}}token in eachen.jsonsource appears with matching multiplicity in all four translations. Zero mismatches. A dropped placeholder here would render a hostname-less certificate error.zhoutput closely;ja,ko, andeswere spot-checked for terminology and button length but would benefit from a native reader. One deliberate judgment call flagged for review:zhrenders "Retry the page" as 重试页面 to stay consistent with the 重试 button label, where Chrome's convention would be 重新加载页面. Happy to switch if a reviewer prefers.Security Audit
Low surface. No input handling, command execution, path handling, auth, secrets, or IPC is touched — the change is four JSON catalog files, values only, no new dependency.
The one security-adjacent consideration is that this copy sits on a TLS failure path, where mistranslation has real consequences: a user deciding whether to click through a certificate warning must understand what they're agreeing to. So the review specifically checked that the risk-bearing strings preserve their warning force rather than softening it —
proceedUnsafekeeps the explicit unsafe marker in every locale (仍要继续(不安全) / 続行(安全ではない) / 계속(안전하지 않음) / Continuar (no seguro)), andcertificateAuthorityInvalidkeeps Orca as the subject that does not trust the issuer, rather than the vaguer "this certificate is untrusted".No follow-up needed.
Notes
The same gap almost certainly exists elsewhere in the catalogs; this PR does not audit for it. If maintainers want, the check is cheap to run repo-wide — comparing each target catalog against
en.jsonfor byte-identical values, excluding brand-name passthroughs.ELI5
Browser load-failure and certificate error pages were English-only even in localized UIs. Those strings are translated for Chinese, Japanese, Korean, and Spanish so TLS errors match the rest of the app.