Skip to content

feat(i18n): add Traditional Chinese (zh-TW) locale (rebased #3995)#4199

Merged
esengine merged 1 commit into
main-v2from
pr/3995-zh-tw-rebased
Jun 12, 2026
Merged

feat(i18n): add Traditional Chinese (zh-TW) locale (rebased #3995)#4199
esengine merged 1 commit into
main-v2from
pr/3995-zh-tw-rebased

Conversation

@esengine

Copy link
Copy Markdown
Owner

Lands #3995 (Traditional Chinese / zh-TW locale) on current main-v2. All credit to @NkAntony777 — the original translation is genuinely good Taiwan Traditional, not a Simplified copy.

The PR had drifted: main-v2 added ~560 i18n keys after it was opened (bots gateway, hooks, memory panel, palette, projectTree, status bar, generative music, custom font, /rename, /diff-fold, self-update, …), and both the frontend Record<DictKey,string> type and the backend TestCatalogsComplete require every key present, so it no longer built. This carries it forward.

What I did on top of #3995

  • Rebased onto current main-v2; resolved the bridge.ts conflict (kept the new SetTrayLocale("en"|"zh"|"zh-TW") signature alongside main's SetAutoApproveTools / SetBypass comment).
  • Backfilled the keys added since the PR opened: 513 frontend (zh-TW.ts) + 46 backend (messages_zh_tw.go), translated from the Simplified catalogues with OpenCC s2twp (the phrase-level Taiwan profile the issue itself recommends), then aligned to the contributor's existing terminology (權限/存取/參數/介面/頻道, kept their 當前) and ran an OpenCC s2tw residual sweep so no Simplified character survives.
  • Removed 13 stale keys that en.ts has since renamed away (status.ctx*, context.filterChanges, …) — they'd otherwise trip the excess-property check.
  • The normalize fix @NkAntony777 already pushed (POSIX zh_TW.UTF-8 underscore form) is included.

Verification (local)

  • pnpm --dir desktop/frontend typecheck — clean apart from the usual ungenerated-wailsjs errors; zh-TW.ts reports nothing, i.e. its key set matches DictKey exactly (no missing, no extra).
  • go test ./... — green, including TestCatalogsComplete, TestCatalogsAgreeOnPlaceholders, and TestNormalize.
  • Frontend tsx unit tests pass when run directly.

Closes #3995

@esengine esengine requested a review from SivanCola as a code owner June 12, 2026 14:22
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) labels Jun 12, 2026
Adds the zh-TW desktop locale and the ChineseTraditional CLI catalogue,
wired into the locale type, DICTS map, detectLocale/normalize (zh-TW /
zh-Hant / zh-HK / zh-MO, plus POSIX zh_TW.UTF-8) and the tray/migration
bridges. Taiwan terminology throughout (設定 / 檔案 / 外掛 / 網路 / 登入).
@esengine esengine force-pushed the pr/3995-zh-tw-rebased branch from 263abbf to 0239915 Compare June 12, 2026 14:28
@esengine esengine merged commit f7a61cf into main-v2 Jun 12, 2026
13 checks passed
@esengine esengine deleted the pr/3995-zh-tw-rebased branch June 12, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants