Add Traditional Chinese language family#5577
Open
BearNetwork-BRNKC wants to merge 1 commit into
Open
Conversation
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! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:zh-CN) — retains all existing translations, previously labelled as中文, now clearly labelled as簡體中文(Simplified 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.
HelpModalis 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
zhlocale rename/split.Type of Change
AI Usage
Files changed summary:
frontend/src/locale/src/lang-list.jsonzh-CNlabel, addzh-TWentryfrontend/src/locale/src/zh.json→zh_cn.jsonfrontend/src/locale/src/zh_tw.jsonfrontend/src/locale/IntlProvider.tsxzh-TW → TWflag mappingfrontend/src/locale/src/HelpDoc/zh/→zh-cn/frontend/src/locale/src/HelpDoc/zh-tw/frontend/src/locale/src/HelpDoc/index.tsgetHelpFile()frontend/src/modals/HelpModal.tsxfrontend/src/locale/Utils.test.tsxzh-TWflag code test casefrontend/check-locales.cjszh-CNandzh-TWin locale validator