• S
    Fix locale mapping (#4969) · 6ab57edc
    Shu Muto 提交于
    * 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>
    6ab57edc
locale_conf.json 87 字节