This is the mail archive of the
mailing list for the glibc project.
Re: Language code changes over time: zh_CN -> zh_Hans
Jean-Baptiste <email@example.com> さんはかきました:
> Thank for your answers, I don't debate Weblate can use the old code.
> I see two issues:
> 1. depending on the target platform, upstream project have to manually
> convert language code used by the system
> 2. The default setting in a translation platform is for every project,
> it force every user project we host to remain on the old code by
> Short term solution is use old codes and I could have done it without telling anyone.
> But I feel like we need to have upstream support for new languages
> code so we follow the standards evolution over time. Android did the
> change years ago, Django also, Microsoft. Net also, and I'm sure we
> can find other example.
> I'm confused on the reason why we have zh_Hans_CN in Locales folder,
> does it means we can use it already?
No, because gettext would find translations in that folder only
if you set LC_MESSAGES=zh_Hans_CN.UTF-8, which you cannot:
$ LC_ALL=zh_Hans_CN.UTF-8 locale charmap
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Maybe you can set LANGUAGE=zh_Hans_CN to make gettext find translations
in that folder.
We have several folders in /usr/share/locale/, some of them probably
only because somebody made a mistake. For example:
$ ls /usr/share/locale/zh_* -d
/usr/share/locale/zh_CN/ /usr/share/locale/zh_Hant/ /usr/share/locale/zh_TW/
/usr/share/locale/zh_CN.GB2312/ /usr/share/locale/zh_Hant_TW/ /usr/share/locale/zh_TW.Big5/
zh_CN.GB2312 and zh_TW.Big5 make no sense.
Or for Serbian:
$ ls /usr/share/locale/sr* -d
Why do we have sr@Latn and sr_RS@latin??
Mike FABIAN <firstname.lastname@example.org>