[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] perform sanity check in po.m4

From: Bruno Haible
Subject: Re: [PATCH] perform sanity check in po.m4
Date: Tue, 10 Oct 2006 14:09:08 +0200
User-agent: KMail/1.9.1

Robert Millan wrote:
> Please consider this sanity check for po.m4.  This should help to prevent
> developers from mistakenly adding broken locales (e.g. "klingon" instead of
> "tlh").

It is an interesting idea, to try to avoid misnamed PO files. But it is
  1) PO files are named after the glibc locale. But the only formal naming
     rule for glibc locales is this:
     without further restrictions on the four components.
  2) The RFC 4646, which specifies a different syntax
     explicitly allows 7-letter language names (see RFC 4646, section
Thus there are no rules which would one hand be able to recognise "klingon"
as being invalid, and on the other hand be open to future developments.

Similarly for the territory name. Some locale names in use in glibc, such as
sr_CS, are actually invalid, but you cannot tell from a purely syntactic point
of view.

Btw, there is probably a flaw in your patch: range expressions [a-Z] will do the
wrong thing in many locales. Also, the codeset often contains digits.

So, what can we do to avoid misnamed PO files? I think it's a documentation
issue. The gettext doc lists all language 2-letter language codes in an
appendix. Do you think it would be useful to list also the 3-letter codes
for small languages?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]