There are redandant large translation files in zh* locales.
i.e. i18n/zh/messages.zh.xlf, i18n/zh-Hans/messages.zh-Hans.xlf and i18n/zh-Hans-SG/messages.zh-Hans-SG.xlf are same.
We can specify translation file for each locale easily, so we should remove redandant files and specify it for locales.
e.g.
i18n/zh-Hansi18n/zh-Hans/messages.zh-Hans.xlf for zh and zh-Hans-SG in angular.json to build.Sorry but I am not sure why design such hierarchies like zh-Hans and zh-Hant. In my opinion, I think the zh directory and other language directories(e.g fr) should keep the same level. Such like:
- > de
- > fr
- > ko
- > zh
| -> zh-sg
| -> zh-hk
| -> zh
| -> zh-tw
And I know Angular>=9.0.5 supports zh-Hant-HK and zh-Hans-SG, but it maybe confusing for users or other translator.
@shu-mutou
@floreks and I have discussed about it as https://github.com/kubernetes/dashboard/pull/4969#discussion_r387524476 .
And I still think it's better to keep i18n/zh rather than i18n/zh-Hans.
However, the most important thing is to remove redandant translation files. So I abandaned discussion which locale should be kept.
In my opinion, i18n/zh-Hans-SG/messages.zh-Hans-SG.xlf should be keeped, beacase it maybe different from i18n/zh/messages.zh.xlf or i18n/zh-Hans/messages.zh-Hans.xlf. Then I am not sure the different between i18n/zh/messages.zh.xlf and i18n/zh-Hans/messages.zh-Hans.xlf, maybe one of them should be removed.
Thanks @zehuaiWANG . Agree about zh and zh-Hans. But zh-Hans-SG is same as zh-Hans for now. If someone is really willing to localize it to SG, of course zh-Hans-SG should be kept. 😉
I agree with @zehuaiWANG.
zh-Hans-SG should be keeped.
zh and zh-hans can stay one.
zh-hant should be keeped, zh-hant-hk and zh-hant-tw can stay one.
But I don't think it's a good idea to introduce zh-hant and zh-hans.
We can not use it at all
The best way is keep zh-CN,zh-SG,zh-HK,zh-TW.This is more logical and clear.
We should avoid using zh-hant or zh-hans.No version of Chinese can be called hans or hant.
These two names are meaningless.
If we want to keep zh-hans and zh-hant.
Then we can keep zh-hans-CN,zh-hans-SG,zh-hant-HK,zh-hant-TW.
Few people use zh in Accept-language.
We just need to keep zh-CN,zh-SG,zh-HK,zh-TW files there. And link zh to zh-CN.I think that's fine.
Removing new locale codes such as zh-Hans and using old ones is out of the question. This is the new standard and we should follow it as suggested by the angular documentation.

We still want to support old codes until new ones will be used by most browsers.
As for copying localization files and using the same localization for multiple regional locale codes, either we remove the ones that we do not really support (saying that one regional code is the same as the other is not correct) or we keep them all separate.
Using indirect mapping is too confusing. If I am using zh-XXX and I find translation issue I want to be able to tell right away that I have to fix that in zh-XXX not zh-YYY file. I don't want to "debug" the application to find out which directory was actually used.
@floreks
How about keeping only zh-Hans, zh-Hant,zh-Hant-HK.Just like in the table
We can not keep SG for the time being, because Chinese is not the official language of Singapore.Most people use English.
I'd be okay with that. What about zh? There is no official info about how to handle that and what region it belongs to. I guess it can differ depending on the region as it is just a base, but it definitely will be used by some browsers and we should somehow handle that. My idea was to use the most common regional locale for it (zh-Hans?).
@floreks
zh is not used often. We can also delete it.
I agree with you about zh-Hans.If we make Simplified Chinese work , then 90% of Chinese needs will be solved.
keeping only
zh-Hans,zh-Hantandzh-Hant-HK
@hwdef @floreks @zehuaiWANG Thank you for your discussions. We seemed to be able to assume conclusion as above. I'll reflect to #4969.
Most helpful comment
Thanks @zehuaiWANG . Agree about
zhandzh-Hans. Butzh-Hans-SGis same aszh-Hansfor now. If someone is really willing to localize it to SG, of coursezh-Hans-SGshould be kept. 😉