Skip to content

Add Traditional Chinese language family#5577

Open
BearNetwork-BRNKC wants to merge 1 commit into
NginxProxyManager:developfrom
BearNetwork-BRNKC:develop
Open

Add Traditional Chinese language family#5577
BearNetwork-BRNKC wants to merge 1 commit into
NginxProxyManager:developfrom
BearNetwork-BRNKC:develop

Conversation

@BearNetwork-BRNKC
Copy link
Copy Markdown

Here is the PR description in full English:


Why

The existing Chinese locale (zh) only supported Simplified Chinese, with no option for Traditional Chinese users. This PR splits the single Chinese locale into two distinct options:

  • Simplified Chinese (zh-CN) — retains all existing translations, previously labelled as 中文, now clearly labelled as 簡體中文 (Simplified Chinese)
  • Traditional Chinese (zh-TW) — new locale with full Taiwan-localized translations (e.g. using 預設 instead of 默认, 網路 instead of 网络, 通訊埠 instead of 端口, 儲存 instead of 保存, etc.)

Each locale displays its own country flag (🇨🇳 for Simplified Chinese, 🇹🇼 for Traditional Chinese) in the locale picker.

Help documentation has been separated and fully translated for each variant. HelpModal is updated to use the full locale code (e.g. zh-TW) instead of the short code (e.g. zh), so Traditional Chinese users correctly see Traditional Chinese help docs rather than falling back to Simplified Chinese or English.

A prefix-based fallback is also added to getHelpFile() so that any locale using a short code (e.g. zh) continues to resolve gracefully to the most relevant available help document.

All changes are non-breaking. No existing locale or functionality is removed or altered beyond the zh locale rename/split.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • API changes
  • Performance improvement
  • Test addition or update

AI Usage

  • [] AI was used to write this
  • [] AI was used to review this

Files changed summary:

File Change
frontend/src/locale/src/lang-list.json Split zh-CN label, add zh-TW entry
frontend/src/locale/src/zh.jsonzh_cn.json Renamed, content unchanged
frontend/src/locale/src/zh_tw.json New — full Taiwan-localized Traditional Chinese translations
frontend/src/locale/IntlProvider.tsx Register both locales, add zh-TW → TW flag mapping
frontend/src/locale/src/HelpDoc/zh/zh-cn/ Renamed directory
frontend/src/locale/src/HelpDoc/zh-tw/ New — Traditional Chinese help documents
frontend/src/locale/src/HelpDoc/index.ts Import both variants, add prefix fallback in getHelpFile()
frontend/src/modals/HelpModal.tsx Use full locale code for help doc lookup
frontend/src/locale/Utils.test.tsx Add zh-TW flag code test case
frontend/check-locales.cjs Register zh-CN and zh-TW in locale validator

@BearNetwork-BRNKC
Copy link
Copy Markdown
Author

These 5 failing tests are unrelated to the changes in this PR, which only modifies frontend locale files (translations, language picker logic, and help documentation).

The failing tests cover backend certificate management, Powerdns DNS provisioning, and TCP stream proxying — none of which are touched by this PR. Could a maintainer please verify whether these tests are also failing on the main branch, and re-run or manually approve the CI if so? Thank you!

@BearNetwork-BRNKC BearNetwork-BRNKC marked this pull request as draft May 23, 2026 14:53
@BearNetwork-BRNKC BearNetwork-BRNKC marked this pull request as ready for review May 23, 2026 14:53
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.

1 participant