Skip to content

feat(i18n): add zh-TW (Traditional Chinese) locale - #14223

Closed
chilung-cgu wants to merge 5 commits into
stablyai:mainfrom
chilung-cgu:feat/i18n-zh-tw
Closed

chilung-cgu wants to merge 5 commits into
stablyai:mainfrom
chilung-cgu:feat/i18n-zh-tw

Conversation

@chilung-cgu

Copy link
Copy Markdown
Contributor

ELI5

Orca can now run its interface in Traditional Chinese. If your system is set to Taiwan, Hong Kong, or Macau, you get it automatically instead of falling back to English, and you can also pick 繁體中文 from Settings → Appearance → Language.

What Changed

The locale

  • New src/renderer/src/i18n/locales/zh-TW.json (11,794 entries — the highest coverage of any non-English catalog).
  • zh-TW registered in SUPPORTED_UI_LOCALES, BuiltInUiLanguage, the language picker, and the lazy locale loaders on both sides of the IPC border (renderer i18n.ts and main main-i18n.ts).
  • normalizeSupportedUiLocale maps the Traditional-script system locales (zh-TW, zh-HK, zh-MO, zh-Hant*) to zh-TW. Every other zh-* tag still resolves to the Simplified catalog. Before this change all four fell back to English.
  • settings.appearance.language.traditionalChinese added to en/zh/ja/ko/es as well, so the new option is labelled in every locale. en.json is the source of truth for verify-localization-catalog, so a zh-TW-only key fails the lint gate.

Translation quality

The catalog began as a script conversion of zh.json, which carries two failure modes that key-parity checks cannot see. Both are fixed:

  • Over-converted words — Traditional glyphs, wrong term, from an OpenCC phrase table: 許可權→權限, 全域性→全域, 型別→類型, 控制元件→控制項, 高階→進階, 引數→參數, 釋出→發布, 進位制→進位, 賬→帳, 臺→台, plus 例項, 對映, 映象, 擴充套件, 首選項, 稽核, 只讀→唯讀.
  • Mainland vocabulary → Taiwan usage: 本地→本機, 評審→審查, 倉庫→存放庫, 配置→設定, 選項卡/標籤頁→分頁, 訪問→存取, 當前→目前, 計算機→電腦, 程序→行程, 匹配→符合, 後台→背景, 更改→變更, 自定義→自訂, 地址→位址, 身份→身分, 重置→重設, 禁用→停用, 構建→建置, 埠→連接埠. 存放庫 and 連接埠 follow the VS Code / GitHub zh-TW UI.
  • Terms Taiwan developers keep in English are no longer translated: Token, fast-forward, Agent, Session, Clone.
  • Outright mistranslations: "Mermaid Diagram" rendered as M z圖; five on SSH host labels had dropped SSH entirely; both "Grab" and "Hold" became 抓住; Git URL / Git Username lost the brand casing.
  • Running the repo's own repair policy over the catalog restored 39 code literals that machine translation had localized — MD→醫學博士, PLAN.md→計劃.md, /pricing→/定價, throw src/auth→丟擲 src/auth — and re-spaced 97 CJK/Latin runs.

Toolchain registration

zh-TW is registered with the localization policy so sync:localization-catalog maintains the catalog instead of reverting it: generic-term renderings, brand mistranslations, NATIVE_PICKER_LABELS, and the CJK/Latin spacing locale list. zh-TW now has zero drift against repairTranslatedValue.

NATIVE_PICKER_LABELS became a single shared object, because the language endonyms are identical in every catalog and must never be script-converted — that is what keeps 中文(简体) Simplified inside the Traditional catalog.

A zh-TW key override was added for the two bare "Cursor" labels that name the on-screen cursor: NEVER_TRANSLATE_VALUES pins the value to English before isScreenCursorContext gets a chance to exempt it.

Why

Traditional Chinese users previously got English. normalizeSupportedUiLocale explicitly routed zh-TW/zh-HK/zh-Hant to the default locale rather than to the Simplified catalog — a deliberate placeholder (the old test was literally named "does not map Traditional Chinese to Simplified yet"), because Simplified text in a Traditional UI is worse than English.

A machine conversion of zh.json alone would not have been shippable: it produces text that is technically Traditional but reads as Mainland Chinese, and OpenCC phrase tables silently corrupt terms (权限 → 許可權, which is not a word). Neither problem is visible to verify-localization-catalog, which is why this PR also adds a gate for it.

Linked Issue

No tracking issue exists for this. Happy to open one if the project prefers — this is a self-contained locale addition with no behavior change for existing locales.

Fixes #

Visual Proof

N/A for existing locales — no rendering or behavior change for en/zh/ja/ko/es. The only shared-surface edit is one added key per catalog (the 繁體中文 picker label).

For the new locale, screenshots of the rendered app in zh-TW are attached below by the author (Settings → Appearance with the language picker, the terminal pane, and the workbench).

Testing

Verified on macOS. Not exercised on Linux, Windows, or SSH — but the change is a locale catalog plus locale-tag normalization, with no platform-conditional code paths.

Automated

  • pnpm lint — passes, including all five localization verifiers.
  • pnpm typecheck — passes.
  • pnpm test for src/shared, src/renderer/src/i18n, src/main/i18n, config/scripts, src/renderer/src/components/settings — 6,438 passed, 0 failed.
  • New zh-tw-traditional-usage.test.ts gates the script (no Simplified-only characters outside the Simplified endonym) and the glossary, so neither pasted Simplified text nor a reverted term can land unnoticed. The gate was verified to actually fail by injecting each of its four violation classes.
  • The renderer and main lazy-loader specs now assert zh-TW serves 檔案 rather than falling back to the zh catalog's 文件. zh-TW is the only region-tagged loader key, so an i18next code-formatting or fallback-hierarchy regression would otherwise be silent.
  • zh-TW added to the locale lists in the link-routing localization spec, the repair-catalog missing-leaves spec, and the macOS TCC repair-idempotence spec.

Manual

Driven in the running Electron app through Playwright CDP: the picker shows 繁體中文, the catalog renders across the workbench and settings panes, and zero elements clip — scrollWidth > clientWidth was measured across every leaf node, which matters because Agent/Session reverting to English changed label widths.

electron-vite build in both --mode e2e and production mode emits zh-TW as its own lazy chunk, so the catalog is not pulled into the startup bundle.

Not done: full pnpm build (the native-module half was not run).

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

AI Disclosure

Claude Opus 5 (Claude Code) was used to audit the machine-converted catalog, apply the terminology corrections, register the locale with the localization toolchain, and write the regression tests. Every claim above is backed by a command that was actually run; the terminology decisions follow the VS Code / GitHub zh-TW UI and this repo's own NEVER_TRANSLATE_VALUES policy.

Review

  • Security — no new code paths; the diff is a data catalog plus locale-tag string matching.
  • Cross-platform — no platform-conditional code. Locale tags are lower-cased and _-normalized before matching, so Windows zh_TW forms resolve correctly (covered by a test).
  • Remote SSH — zh-TW is registered in the main process loader as well, so menus, tray, and dialogs on a remote-backed workspace localize identically to the renderer.
  • Mobile — untouched.
  • Backwards compatibility — the only edits to existing catalogs are one added key each. A persisted uiLanguage of zh still resolves to zh; no existing preference changes meaning.
  • Performance — the catalog is lazy-loaded like the other five and ships as its own chunk. Note that i18next's default load: 'all' means a zh-TW user also loads zh as a fallback layer; keys present in both are unaffected, but a key added to zh and not zh-TW would surface as Simplified rather than English. Called out rather than changed, since load is a global setting.

Checklist

  • This PR is small and focused
  • I explained what changed and why (including ELI5)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred) — lint/typecheck/test pass locally; full pnpm build not run

Follow-ups (not in this PR)

  • zh.json carries the same translated-code-literal defects (MD → 医学博士, PLAN.md → 计划.md, and ~648 entries the repair policy would rewrite). Left alone to keep this PR focused.
  • worktreeJumpPalette.filter.projects is missing from every non-English catalog, so that sidebar header renders English in es/ja/ko/zh too. Added for zh-TW here; the cross-locale gap remains.

Adds Traditional Chinese as a selectable UI language and wires it through both
the renderer and the main process.

## What

- `src/renderer/src/i18n/locales/zh-TW.json` — 11,794-entry catalog.
- `zh-TW` registered in `SUPPORTED_UI_LOCALES`, `BuiltInUiLanguage`, the
  language picker, and the lazy locale loaders on both sides of the IPC border.
- `normalizeSupportedUiLocale` now maps the Traditional-script system locales
  (`zh-TW`, `zh-HK`, `zh-MO`, `zh-Hant*`) to `zh-TW`; every other `zh-*` tag
  still resolves to the Simplified catalog. Before this change they all fell
  back to English.
- `settings.appearance.language.traditionalChinese` added to en/zh/ja/ko/es so
  the option is labelled in every locale, not only in zh-TW itself. en.json is
  the source of truth for `verify-localization-catalog`, so a zh-TW-only key
  fails the lint gate.

## Translation quality

The catalog started as a script conversion of zh.json, so it carried the usual
OpenCC phrase-table damage and a lot of Mainland vocabulary. Both are fixed:

- Over-converted words (Traditional glyphs, wrong term): 許可權→權限,
  全域性→全域, 型別→類型, 控制元件→控制項, 高階→進階, 引數→參數, 釋出→發布,
  進位制→進位, 賬→帳, 臺→台, 例項, 對映, 映象, 擴充套件, 首選項, 稽核, 只讀→唯讀.
- Taiwan usage: 本地→本機, 評審→審查, 倉庫→存放庫, 配置→設定, 選項卡/標籤頁→分頁,
  訪問→存取, 當前→目前, 計算機→電腦, 程序→行程, 匹配→符合, 後台→背景, 更改→變更,
  自定義→自訂, 地址→位址, 身份→身分, 重置→重設, 禁用→停用, 構建→建置, 埠→連接埠.
  存放庫 and 連接埠 follow the VS Code / GitHub zh-TW UI.
- Terms Taiwan developers keep in English are no longer translated: Token,
  fast-forward, Agent, Session, Clone.
- Outright mistranslations: "Mermaid Diagram" rendered as "M z圖", five
  "on SSH host" labels had dropped SSH, both "Grab" and "Hold" became 抓住, and
  Git URL / Git Username lost the brand casing.
- Running the repo's own repair policy over the catalog restored 39 code
  literals that machine translation had localized (MD→醫學博士, PLAN.md→計劃.md,
  /pricing→/定價, throw src/auth→丟擲 src/auth) and re-spaced 97 CJK/Latin runs.

## Toolchain

zh-TW is registered with the localization policy so `sync:localization-catalog`
maintains it rather than reverting it: generic-term renderings, brand
mistranslations, `NATIVE_PICKER_LABELS`, and the CJK/Latin spacing locale list.
zh-TW has zero drift against `repairTranslatedValue` (zh currently has 648).

`NATIVE_PICKER_LABELS` is now a single shared object, since the language
endonyms are identical in every catalog and must never be script-converted —
that is what kept 中文(简体) Simplified inside the Traditional catalog.

A zh-TW key override was added for the two bare "Cursor" labels that name the
on-screen cursor: `NEVER_TRANSLATE_VALUES` pins the value to English before
`isScreenCursorContext` can exempt it.

## Tests

- `zh-tw-traditional-usage.test.ts` gates the script (no Simplified-only
  characters outside the Simplified endonym) and the glossary, so neither
  pasted Simplified text nor a reverted term can land unnoticed.
- The renderer and main lazy-loader specs assert zh-TW serves 檔案 rather than
  falling back to the zh catalog's 文件 — zh-TW is the only region-tagged
  loader key, so an i18next code-formatting or fallback-hierarchy regression
  would otherwise be silent.
- zh-TW added to the locale lists in the link-routing localization spec, the
  repair-catalog missing-leaves spec, and the macOS TCC repair-idempotence spec.

Co-Authored-By: Claude Opus 5 <[email protected]>
Copilot AI lite review requested due to automatic review settings August 13, 2026 06:13
@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 925f2ca0-55f4-4f25-8f04-19f9fd065b76

📥 Commits

Reviewing files that changed from the base of the PR and between cee02b5 and 4f556e5.

📒 Files selected for processing (2)
  • config/scripts/locale-phrase-fixes.mjs
  • config/scripts/locale-translation-policy.zh-tw-repository.test.mjs
🚧 Files skipped from review as they are similar to previous changes (2)
  • config/scripts/locale-translation-policy.zh-tw-repository.test.mjs
  • config/scripts/locale-phrase-fixes.mjs

📝 Walkthrough

Walkthrough

Adds Traditional Chinese as a built-in UI language with zh-TW locale normalization and resolution. Adds lazy loading in the main process and renderer. Adds language-picker labels and Traditional Chinese catalog validation. Extends translation-repair policies with Traditional Chinese brand, product, UI-term, cursor-label, phrase-fix, and spacing rules. Updates localization tests for locale resolution, catalog loading, repair coverage, and Traditional Chinese usage.

Mergeability Score: 🔵 Low · up to 4f556

The PR adds Traditional Chinese support and is otherwise mergeable, but the localization repair rules may misclassify unrelated words such as “report” as repository terms during future catalog maintenance, potentially producing incorrect translations; this should remain an explicit follow-up for the owner.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: adding the zh-TW Traditional Chinese locale.
Description check ✅ Passed The description is detailed and covers the required sections, testing, review considerations, and limitations; the linked issue field remains unresolved.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/renderer/src/i18n/zh-tw-traditional-usage.test.ts (1)

1-10: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Reduce the introductory comment.

Keep one brief comment for the non-obvious policy rationale. Remove the test-mechanics explanation.

As per coding guidelines: “Comments must be concise, non-obvious, and brief—prefer one line; do not explain obvious behavior or walk through code.”

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 65fa2cd3-25c2-4c29-b5ae-23e1247b0d90

📥 Commits

Reviewing files that changed from the base of the PR and between 602f0cb and bc61a0d.

📒 Files selected for processing (23)
  • config/scripts/locale-brand-mistranslations.mjs
  • config/scripts/locale-generic-ui-terms.mjs
  • config/scripts/locale-key-overrides.mjs
  • config/scripts/locale-repair-catalog-missing-leaves.test.mjs
  • config/scripts/locale-translation-policy.mjs
  • config/scripts/macos-tcc-prompt-localization.test.mjs
  • src/main/i18n/main-i18n-lazy-locale.test.ts
  • src/main/i18n/main-i18n.ts
  • src/renderer/src/components/settings/browser-link-routing-localization.test.ts
  • src/renderer/src/i18n/i18n.ts
  • src/renderer/src/i18n/lazy-locale.test.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh-TW.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/supported-languages.ts
  • src/renderer/src/i18n/zh-tw-traditional-usage.test.ts
  • src/shared/ui-language.test.ts
  • src/shared/ui-language.ts
  • src/shared/ui-locale.test.ts
  • src/shared/ui-locale.ts

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Traditional Chinese (zh-TW) UI locale and wires it through shared locale resolution, renderer/main lazy-loading, localization repair policy, and regression tests so Traditional-script system locales map to zh-TW instead of falling back to English.

Changes:

  • Register zh-TW across shared locale normalization/resolution and renderer/main i18n lazy loaders.
  • Add the new zh-TW catalog and extend existing catalogs with a traditionalChinese language-picker label key.
  • Extend localization toolchain policies + add regression tests (including a zh-TW terminology/script gate) to prevent catalog drift.

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/shared/ui-locale.ts Add zh-TW to supported locales; map Traditional-script locale tags to zh-TW.
src/shared/ui-locale.test.ts Add coverage for Traditional Chinese mapping and explicit language resolution.
src/shared/ui-language.ts Introduce UI_LANGUAGE_TRADITIONAL_CHINESE and include in built-in language set.
src/shared/ui-language.test.ts Add normalization test for Traditional Chinese language value.
src/renderer/src/i18n/locales/zh-TW.json New Traditional Chinese translation catalog (lazy-loaded).
src/renderer/src/i18n/zh-tw-traditional-usage.test.ts Add zh-TW script/terminology gate to prevent Simplified glyphs and forbidden terms.
src/renderer/src/i18n/supported-languages.ts Add Traditional Chinese to language picker choices and fallback labels.
src/renderer/src/i18n/locales/en.json Add traditionalChinese label key for language picker.
src/renderer/src/i18n/locales/zh.json Add traditionalChinese label key for language picker.
src/renderer/src/i18n/locales/ko.json Add traditionalChinese label key for language picker.
src/renderer/src/i18n/locales/ja.json Add traditionalChinese label key for language picker.
src/renderer/src/i18n/locales/es.json Add traditionalChinese label key for language picker.
src/renderer/src/i18n/i18n.ts Add zh-TW lazy loader in renderer i18n backend.
src/renderer/src/i18n/lazy-locale.test.ts Add renderer test ensuring zh-TW doesn’t fall back to zh.
src/renderer/src/components/settings/browser-link-routing-localization.test.ts Include zh-TW in non-English locale coverage set.
src/main/i18n/main-i18n.ts Add zh-TW lazy loader in main-process i18n backend.
src/main/i18n/main-i18n-lazy-locale.test.ts Add main-process test ensuring zh-TW doesn’t fall back to zh.
config/scripts/locale-translation-policy.mjs Register zh-TW in picker label pinning and CJK/Latin spacing pass.
config/scripts/locale-repair-catalog-missing-leaves.test.mjs Include zh-TW in repair-catalog missing-leaves test coverage.
config/scripts/macos-tcc-prompt-localization.test.mjs Include zh-TW in macOS TCC prompt localization policy test coverage.
config/scripts/locale-key-overrides.mjs Add zh-TW key overrides for “Cursor” (screen cursor context).
config/scripts/locale-generic-ui-terms.mjs Add/extend canonical generic-term renderings for zh-TW.
config/scripts/locale-brand-mistranslations.mjs Add zh-TW brand mistranslation mapping list for repair policy.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot review: the Repo generic renderings listed 倉庫 as an acceptable zh-TW
form while zh-tw-traditional-usage.test.ts rejects it, so repairTranslatedValue
would preserve Mainland wording that the gate then fails on.

Added zh-TW phrase fixes that rewrite 倉庫/儲存庫 to 存放庫 when the English
mentions a repo. The generic renderings intentionally keep both forms so the
brand revert leaves them translated rather than rewriting them to Latin — the
phrase fix, which runs after it, is what normalizes them. repair now returns
存放庫 for both, so the policy and the gate agree on the output.

Cross-checked all 47 gated terms against the generic-term, brand, value,
key-override and phrase-fix tables: 倉庫 was the only contradiction. 智慧體 is
consistent, since the brand table reverts it to Agent, which is what the gate
wants. Also gated 儲存庫, which the test had missed.

CodeRabbit review: trimmed the test's file header to one comment per the
repo comment guidance.

Tests: pnpm lint passes; i18n/shared/config suites pass; zh-TW policy drift
stays at 0.

Co-Authored-By: Claude Opus 5 <[email protected]>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 97df8726-0e55-4328-a767-8ede71b2b6f0

📥 Commits

Reviewing files that changed from the base of the PR and between bc61a0d and cbe16ba.

📒 Files selected for processing (2)
  • config/scripts/locale-phrase-fixes.mjs
  • src/renderer/src/i18n/zh-tw-traditional-usage.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/renderer/src/i18n/zh-tw-traditional-usage.test.ts

Comment thread config/scripts/locale-phrase-fixes.mjs Resolved
@chilung-cgu
chilung-cgu requested a balanced review from Copilot August 13, 2026 07:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chilung-cgu
chilung-cgu marked this pull request as draft August 13, 2026 08:27
OrcaWin added a commit that referenced this pull request Oct 28, 2026
* feat(i18n): add Traditional Chinese (zh-Hant) UI locale

Adds 繁體中文 as a selectable UI language and derives its catalog from
zh.json rather than translating English afresh, so the reviewed Simplified
terminology and Orca glossary decisions carry over.

The conversion needed three corrections beyond OpenCC's `cn -> twp`:

- One pass only. `twp`'s phrase dictionary is not idempotent (it maps
  進程->程序 and 程序->程式), and iterating to a fixed point makes output
  worse: it rewrites the correct Taiwan 游標 to 遊標, and 程序 to 程式 where
  the source meant an OS process.
- 16 terms where `twp` emits a form Taiwan does not use, each confirmed
  against Microsoft's VS Code zh-Hant language pack (許可權 0 vs 權限 84,
  賬戶 0 vs 帳戶 111, and so on).
- 進程 vs 程序 collapse in `twp` output. Taiwan calls an OS process 行程, so
  the generator consults the Simplified source to disambiguate; daemon copy
  reads 守護行程, not 守護程式.

Also pins `load: 'currentOnly'` on both i18next instances. i18next's default
expands `zh-Hant` into ['zh-Hant', 'zh', 'en'], so a key missing from the
Traditional catalog would silently render Simplified.

zh-Hant.json is generated and compared byte-for-byte, so the new check is
wired into verify:localization-catalogs to fail when a Simplified edit skips
regeneration.

Refs #10592

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(i18n): fail the zh-Hant check on an unreadable zh.json

The generator caught every error from reading and parsing zh.json, so a
malformed or unreadable Simplified catalog logged "absent here" and exited
0 without ever comparing the generated Traditional catalog. Only ENOENT
means there is nothing to derive, so every other failure now propagates.

Tests cover the three paths the catch was conflating: an absent zh.json
still passes for the combined verifier's synthetic fixtures, malformed
JSON throws, and a directory where the catalog belongs throws EISDIR
rather than reporting the file as missing.

Co-Authored-By: Claude Code <[email protected]>

* feat(i18n): ship Traditional Chinese (Taiwan) as a maintained built-in catalog

Keeps the zh-Hant locale from this PR and makes it a hand-maintained
catalog like the other built-ins, without the OpenCC generator:

- Catalog reconciled with current en.json. Per key it prefers the
  Taiwan-reviewed copy from #22402 (which carries #14223), falls back to
  the zh-derived copy here, and drops entries whose English changed.
  A review pass then applied Taiwan terms (代理程式, 工作階段, 存放庫,
  分頁, 列/欄) and 「」 quotes. Glossary: config/i18n-traditional-chinese.md.
- Label 繁體中文(台灣)in every catalog, the picker, onboarding and search.
- Detection maps zh-TW/zh-HK/zh-MO/zh-Hant* to zh-Hant; zh-CN/zh-SG/zh-Hans
  stay on zh. Both i18next instances use load: 'currentOnly' so missing
  keys fall back to English, not Simplified.
- Drops opencc-js, the generator scripts and their verify hook.

Co-authored-by: hungchihsueh <[email protected]>
Co-authored-by: chilung-cgu <[email protected]>

* feat(i18n): translate remaining Traditional Chinese (Taiwan) catalog keys

Fill the 2,043 keys added to en since the source PRs branched, following
the Taiwan glossary, and extend the glossary with skill, automation,
usage, review, token and related terms.

* fix(i18n): review Traditional Chinese (Taiwan) catalog wording

Apply 629 reviewed corrections across the full catalog: 30 meaning or
untranslated-text fixes and 599 glossary and phrasing fixes (終端機, 用量,
API 金鑰, clearer counts and actions). Each edit was cross-checked by an
independent review pass.

* fix(i18n): polish sampled zh-Hant strings and drop redundant locale test

Co-authored-by: Claude <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: OrcaWin <[email protected]>
Co-authored-by: hungchihsueh <[email protected]>
Co-authored-by: chilung-cgu <[email protected]>
@OrcaWin

OrcaWin commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Thank you for this! Traditional Chinese (Taiwan) is now a built-in UI language as of #29795: 繁體中文(台灣) in Settings → Appearance → Language. It's picked automatically for zh-TW, zh-HK, zh-MO and zh-Hant system locales, while zh-CN, zh-SG and zh-Hans stay on Simplified. Your work here fed into the terminology choices, including Taiwan wording like 電腦 and 分頁. Closing this one in favor of that PR. If you spot wording that reads wrong to a Taiwanese user, a follow-up PR against src/renderer/src/i18n/locales/zh-Hant.json (glossary in config/i18n-traditional-chinese.md) would be very welcome.

@OrcaWin OrcaWin closed this Oct 28, 2026
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.

3 participants