Fix locale mapping (#4969)
* Fix locale mapping
Now, Angular>=9.0.5 supports `zh-Hant-HK` and `zh-Hans-SG`, so we can build for them.
Also, `Match` of `golang.org/x/text/language` returns `zh-u-rg-cnzzzz` for `zh-CN` and
`zh-u-rg-txzzzz` for `zh-TW`, so we need to handle them properly before.
Since `Match` returns tag as `zh-Hant-HK` for `zh-HK`, and `zh-Hans-SG` for `zh-SG`,
so dashboard just use them.
However due to following reason, remove `zh-Hant-SG` and `zh` support for now.
* Chinese is not official in Singapore
* `zh` is not used often
* Translation files for `zh` and `zh-Hans-SG` is same as `zh-Hant` for now.
In conclusion, dashboard supports strictly matched locale IDs as followings:
* en (default)
* de
* fr
* ja
* ko
* zh-CN (zh-Hans)
* zh-TW (zh-Hant)
* zh-HK (zh-Hant-HK)
Also, support locales in lowercase and clean up `state="new"` in some translation files.
* Simplify locale matching logic
Co-authored-by: NSebastian Florek <sebastian.florek@loodse.com>
Showing
i18n/zh-Hans-SG/OWNERS
已删除
100644 → 0
此差异已折叠。
i18n/zh/OWNERS
已删除
100644 → 0
i18n/zh/messages.zh.xlf
已删除
100644 → 0
此差异已折叠。
想要评论请 注册 或 登录