Skip to content

feat(i18n): add Simplified Chinese locale - #949

Open
AlanSyue wants to merge 1 commit into
ChatbotXIO:mainfrom
AlanSyue:codex/upstream-add-zh-cn
Open

feat(i18n): add Simplified Chinese locale#949
AlanSyue wants to merge 1 commit into
ChatbotXIO:mainfrom
AlanSyue:codex/upstream-add-zh-cn

Conversation

@AlanSyue

Copy link
Copy Markdown
Contributor

Summary

  • Add a complete Simplified Chinese (zh-CN) catalog with exact parity against all 2,998 English message leaves.
  • Register Simplified Chinese in locale metadata and message loading.
  • Resolve zh-CN, zh-Hans, and bare zh to Simplified Chinese while keeping Traditional Chinese variants on zh-TW.
  • Add explicit zh-CN exact-parity and shared catalog-integrity regression coverage.
  • Wait for the locale cookie server action and refresh the active route so language changes apply immediately without a manual reload.

This PR is independent from the Traditional Chinese catalog-completion PR and can be merged in either order.

Verification

  • pnpm --filter builder exec vitest run __tests__/i18n-zh-cn-parity.test.ts __tests__/i18n-messages.test.ts __tests__/lang-selector.test.tsx — 96/96 passed
  • pnpm --filter builder check-types — passed
  • focused Biome check for the locale selector and test — passed
  • pnpm --filter builder build — passed
  • Local production-build browser E2E with an isolated temporary database:
    • started from Traditional Chinese
    • selected 简体中文 from the user menu
    • verified the active page changed immediately without a manual reload
    • verified <html lang="zh-CN">
    • verified the Ads analytics page renders Simplified Chinese labels such as 广告花费 and 合格潜在客户
    • verified no raw ads.* translation keys are visible

E2E screenshot

Simplified Chinese Ads analytics E2E

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant