public inbox for libc-locales@sourceware.org
 help / color / mirror / Atom feed
From: Mike FABIAN <mfabian@redhat.com>
To: Jean-Baptiste <jean-baptiste@holcroft.fr>
Cc: libc-locales@sourceware.org,  libc-alpha@sourceware.org
Subject: Re: Language code changes over time: zh_CN -> zh_Hans
Date: Sat, 12 Oct 2019 13:52:00 -0000	[thread overview]
Message-ID: <s9dblumvzp3.fsf@taka.site> (raw)
In-Reply-To: <C4053FFD-0643-49EB-BEC9-890DEC39E019@holcroft.fr> (jean-baptiste@holcroft.fr's message of "Sat, 12 Oct 2019 08:55:34 +0200")

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>
睡眠不足はいい仕事の敵だ。

      reply	other threads:[~2019-10-12 13:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 15:22 Jean-Baptiste Holcroft
2019-10-10 16:25 ` Florian Weimer
2019-10-11 20:27   ` Mike FABIAN
2019-10-10 20:53 ` Carlos O'Donell
2019-10-11 20:41 ` Mike FABIAN
2019-10-12  9:35   ` Jean-Baptiste
2019-10-12 13:52     ` Mike FABIAN [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s9dblumvzp3.fsf@taka.site \
    --to=mfabian@redhat.com \
    --cc=jean-baptiste@holcroft.fr \
    --cc=libc-alpha@sourceware.org \
    --cc=libc-locales@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).