Skip to content

feat(desktop): add Traditional Chinese locale - #3853

Draft
AcerYue0 wants to merge 6 commits into
apache:mainfrom
AcerYue0:feat/zh-tw-locale
Draft

feat(desktop): add Traditional Chinese locale#3853
AcerYue0 wants to merge 6 commits into
apache:mainfrom
AcerYue0:feat/zh-tw-locale

Conversation

@AcerYue0

@AcerYue0 AcerYue0 commented Aug 26, 2026

Copy link
Copy Markdown

Summary

Add separate zh-CN and zh-TW resolved locales, including Taiwan-localized UI catalogs and system-locale aliases, while preserving the former persisted zh preference as zh-CN.

Replace the Desktop Settings language segmented control with the existing @maka/ui Selector, offering Follow system, Simplified Chinese, Traditional Chinese, and English.

Verification

  • npm run build — passed
  • npm run lint — passed
  • npm run format:check — passed
  • npm run typecheck — passed
  • npx knip --workspace apps/desktop — passed
  • npx knip --workspace packages/ui — passed
  • npm --workspace @maka/core test — 685 passed
  • npm --workspace @maka/ui test — 231 passed
  • macOS screenshot workflow (Traditional Chinese locale screenshots) — added; runs on macos-15 and uploads real Settings screenshots as an artifact
  • Desktop locale-focused regression suites — passed
  • CLI locale-focused suites — passed

Review follow-up

  • Preserve canonical zh-CN / zh-TW E2E fixture flags.
  • Carry the resolved locale through startup dialogs and persisted Desktop locale preferences.
  • Keep raw Simplified backend text out of zh-TW surfaces, including Health Center and GitHub Copilot failures.
  • Add explicit Taiwan copy for non-catalog fallbacks such as Agent Graph, WorkHub, MCP, readiness, notifications, and native dialogs.

Screenshots

  • Add before/after screenshots from a real macOS Desktop Settings UI (the workflow in this PR produces the artifact)

This PR remains a draft until the required real UI screenshots are attached.

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: ChatGPT implemented the locale contract, Traditional Chinese catalogs, Settings selector change, review fixes, and related tests.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@AcerYue0
AcerYue0 marked this pull request as ready for review August 26, 2026 03:52

@Astro-Han Astro-Han 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.

I reviewed this head and found blocking i18n issues.

[P2] zh-TW locale mishandled — three places

  • e2e-fixture.ts:119-123 lowercases locale then compares to zh-CN/zh-TW → both become null.
  • runtime-host-boot.ts:1629-1648 passes zh-CN for zh-TW systems.
  • Multiple UI fallbacks use locale!=='en' to pick zh-CN strings, sending Simplified to Traditional users.

Fix: preserve zh-TW throughout and fix comparisons/fallbacks.

简体中文繁中语言支持被错误归入简中。

Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.

@M4n5ter
M4n5ter force-pushed the feat/zh-tw-locale branch from bf8fe16 to 4b56a8c Compare August 26, 2026 08:51
@M4n5ter
M4n5ter force-pushed the feat/zh-tw-locale branch from 4b2ce5e to 5b8f9db Compare August 26, 2026 09:57
@AcerYue0
AcerYue0 marked this pull request as draft August 26, 2026 10:07
@AcerYue0
AcerYue0 marked this pull request as ready for review August 26, 2026 10:08
@AcerYue0

AcerYue0 commented Aug 27, 2026

Copy link
Copy Markdown
Author

Addressed the blocking i18n findings in 5b8f9dbc6, with additional latest-main follow-ups in 01d9dec5c, 206e60cbd, and fa3b71f5a.

  • Canonicalized the E2E fixture values after lowercasing, preserving both zh-CN and zh-TW.
  • Carried the resolved locale through startup recovery dialogs; post-settings prompts now use the persisted Desktop locale.
  • Replaced Simplified-only fallbacks with explicit zh-TW copy or locale-aware sanitization across error classification, Agent Graph, WorkHub, MCP, readiness, notifications, native dialogs, Health Center, and GitHub Copilot failures.
  • Added regression coverage for the reviewed paths and additional raw-backend-message boundaries.
  • Synced with the latest apache/main locale surfaces, including MCP TUI status, new app icons, Runtime Host directory controls, WorkHub failures, and usage labels.
  • Replaced remaining Mainland-only provider/bot terminology and sanitized raw Work Board, Runtime Host profile, updater, onboarding, and memory-open errors.
  • Completed a catalog-wide Taiwan terminology pass, including 取得, 存取, 權杖, 串接, 管道, 符合, and 記錄.

Local verification now passes: build, lint, format, full typecheck, Core (685), UI (231), Desktop locale-focused suites, and CLI locale suites.

Real macOS before/after screenshots are still pending as noted in the PR body.

@github-actions github-actions Bot added the effort/XL Over 1000 readable lines label Aug 27, 2026
@AcerYue0
AcerYue0 marked this pull request as draft August 27, 2026 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XL Over 1000 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants