This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Language code changes over time: zh_CN -> zh_Hans


Jean-Baptiste <jean-baptiste@holcroft.fr> さんはかきました:

> 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
> default
>
> 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
ANSI_X3.4-1968

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/
/usr/share/locale/zh_Hans_CN/    /usr/share/locale/zh_HK/

zh_CN.GB2312 and zh_TW.Big5 make no sense.

Or for Serbian:
$ ls /usr/share/locale/sr* -d 
 /usr/share/locale/sr/                  '/usr/share/locale/sr@Latn'/
 /usr/share/locale/sr_Cyrl/              /usr/share/locale/sr_ME/
 /usr/share/locale/srd/                  /usr/share/locale/srn/
'/usr/share/locale/sr@ije'/              /usr/share/locale/srr/
'/usr/share/locale/sr@ijekavian'/        /usr/share/locale/sr_RS/
'/usr/share/locale/sr@ijekavianlatin'/  '/usr/share/locale/sr_RS@latin'/
'/usr/share/locale/sr@latin'/

Why do we have sr@Latn and sr_RS@latin??

-- 
Mike FABIAN <mfabian@redhat.com>
睡眠不足はいい仕事の敵だ。


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]