Skip to content

fix(i18n): add missing zh/zht translations for pairing, provider connect, and file viewer - #52040

Open
imyu37 wants to merge 2 commits into
anomalyco:devfrom
imyu37:fix/zh-missing-keys
Open

imyu37 wants to merge 2 commits into
anomalyco:devfrom
imyu37:fix/zh-missing-keys

Conversation

@imyu37

@imyu37 imyu37 commented Sep 29, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #53858

Supersedes #52039 (auto-closed by the issue-compliance workflow before its body was converted to the template structure; preserved there for history).

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Restores full zh/zht parity with en.ts (986/986 keys, missing=0, extra=0), so Chinese locales stop falling back to English.

History of this branch: the original commit filled the 93-key gap that #52039 reported (pairing page, provider-connect wizard, file viewer, plus smaller session.*/settings.* gaps). Since then upstream restructured the dictionaries (GUI features moved into built-in extensions, ~677 lines removed per file), so the branch was merged with current v2 and the gap recomputed:

  • Kept 61 of the original 93 additions (their English keys still exist).
  • Removed 32 additions whose English keys upstream deleted — they would have become orphan keys (zh-only entries the parity test in refactor(i18n): add locale dictionary parity tests #50835 rejects).
  • Added 67 new translations for the gap as it exists on current v2 (including session.location.* keys upstream accidentally dropped from zh/zht while keeping them in en.ts).

Original scope detail:

Translation notes: placeholders ({{...}}) and $OPENCODE_* env vars untouched; terminology follows packages/app/AGENTS.md §Localization (提供商/会话/工作树/…); zht uses Taiwanese vocabulary (連線/設定/檔案) and was scanned for simplified-character leakage; file.view.fontSample intentionally keeps the English pangram since it previews Latin glyph coverage.

How did you verify your code works?

  • Key-set diff (imports the three dictionaries, exact set difference): en=986, zh=986, zht=986, missing=0, extra=0 for both, zh and zht key sets identical
  • Placeholder consistency check across all added keys: {{...}} match en.ts exactly (0 mismatches)
  • Parity test from refactor(i18n): add locale dictionary parity tests #50835 (temporarily applied, not committed): 27 pass / 0 fail
  • bunx prettier --check on both files → clean
  • packages/app full suite → 740 pass / 0 fail; browser suite → 167 pass / 0 fail

Screenshots / recordings

Text-only locale additions; the Pairing page (previously English) now renders in Chinese. No layout change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Resolve zh.ts/zht.ts conflicts after the upstream GUI refactor: keep added keys that still exist in en.ts and drop the ones removed upstream, remove orphan keys, and add the 67 keys that became newly missing in both locales so zh/zht match en (986 keys, missing=0, orphan=0).

This branch has not been deployed

No deployments
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.

[BUG]: zh/zht locale dictionaries missing 93 keys present in en (pairing, provider connect, file viewer)

1 participant