Re: Minor *.po patch

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

 



On Tuesday 07 December 2010, Rolf Ahrenberg wrote:
> On Mon, 6 Dec 2010, Ville Skyttä wrote:
> > On Saturday 04 December 2010, Tobias Grimm wrote:
> >> The gettext version I use automatically adds a Language field to the
> >> headers of the po-Files. It would be nice to have this field there in
> >> the first place, so here's a small patch that adds it.
> > 
> > The Language fields for the main dialect of a language should not have
> > _COUNTRY (i.e. Language: de, not Language: de_DE etc).  More info:
> > http://www.gnu.org/software/gettext/manual/gettext.html#Header-Entry
> 
> "Fill in the language code of the language. This can be in ONE of three
> forms: ‘ll’, ‘ll_CC’, ‘ll_CC@variant’"
> 
> Where is the country code forbidden exactly?

Don't stop reading there.  I don't know about forbidden, but they do write 
that the value "is" something else, a bit below the above quoted part:

"The naming convention ‘ll_CC’ is also the way locales are named on systems 
based on GNU libc. But there are three important differences:

* In this PO file field, but not in locale names, ‘ll_CC’ combinations 
denoting a language's main dialect are abbreviated as ‘ll’. For example, ‘de’ 
is equivalent to ‘de_DE’ (German as spoken in Germany), and ‘pt’ to ‘pt_PT’ 
(Portuguese as spoken in Portugal) in this context.
* In this PO file field, suffixes like ‘.encoding’ are not used.
* In this PO file field, variant designators that are not relevant to message 
translation, such as ‘@euro’, are not used.

So, if your locale name is ‘de_DE.UTF-8’, the language specification in PO 
files is just ‘de’."

> The core VDR doesn't have
> same language for different areas, but i.e. the femon does: "zh_CN" and
> "zh_TW". If I would use the plain "zh" for both of these, the "zh_TW.po"
> file would be interpreted as "zh_CN" and that really doesn't sound
> rigth.

But leaving out the country only applies to _the_ (there can be only one I 
gather) primary dialect of a language.  So both zh_CN and zh_TW cannot be the 
primary dialect; dunno if there's such a thing for Chinese in the first place.  
If you look at my patch carefully, you'll see that for zh_CN.po the value of 
the Language field is zh_CN.

I did not invent any of these values myself - I just first fixed the Language-
Team fields so that gettext itself understands them, and then ran the files 
through gettext, and copied/included in my patch what gettext itself had 
added.

> With VDR's current language files this doesn't make any
> difference, but I prefer Tobias' patch with your language team
> modifications a bit more future proof.

I think following what gettext's docs say/recommend and what it actually does 
itself is the best approach.

_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr



[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux