Update Chinese & Cantonese localization #7235
Open
+329
−364
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.
This PR includes the latest translations from Crowdin, and cleans up outdated strings.
Update: We are attempting to convert the language codes for Chinese and Cantonese from RFC-1766 to RFC-4646, to resolve language-related compatibility issues.
The following are the changes:
zh-CN
->zh-Hans-CN
zh-TW
->zh-Hant-TW
zh-HK
->zh-Hant-HK
The compatibility issue on Android stems from the differences in Hermes implementation of
Intl
. On Android, it is based on the ICU4j project, which does not include RFC 1766 Chinese language codes likezh-CN
. This will be an attempt to fix #6728 without introducing polyfills.Similar to #6774, tests have shown that
zh-Hans-CN
,zh-Hant-TW
andzh-Hant-HK
can also be correctly used by app language.Since these code changes are all related to Chinese adjustments (including modifications to
deviceLocales.ts
), I’ve included them in the regular Chinese localization update PR instead of opening a new one. This also helps our translators test the impact of the changes earlier.The related changes to
deviceLocales.ts
can refer to #6621, except this time the conversion is reversed: from RFC 1766 to RFC 4646, as browsers still widely use RFC 1766.Note the impact of changing the language code is limited to the app display language, Cantonese still cannot be used as post language.
Co-maintained by @cirx1e @hakadao @VentusUta