Re: [vdr] Minor *.po patch

2010-12-12 Thread Ville Skyttä
On Sunday 12 December 2010, Klaus Schmidinger wrote:
> On 04.12.2010 13:09, 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.
> 
> According to a patch I recevied from Ville Skyttä a while ago
> the "Language..." entries currently look like this in my source
> (which will become VDR version 1.7.17):
[...]
> Please advise whether this is correct.

I believe it is, see rest of the messages in this thread.

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


Re: [vdr] Minor *.po patch

2010-12-12 Thread Klaus Schmidinger
On 04.12.2010 13:09, 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.

According to a patch I recevied from Ville Skyttä a while ago
the "Language..." entries currently look like this in my source
(which will become VDR version 1.7.17):

po/ar.po:"Language-Team: Arabic \n"
po/ar.po:"Language: ar\n"
po/ca_ES.po:"Language-Team: Catalan \n"
po/ca_ES.po:"Language: ca\n"
po/cs_CZ.po:"Language-Team: Czech \n"
po/cs_CZ.po:"Language: cs\n"
po/da_DK.po:"Language-Team: Danish \n"
po/da_DK.po:"Language: da\n"
po/de_DE.po:"Language-Team: German \n"
po/de_DE.po:"Language: de\n"
po/el_GR.po:"Language-Team: Greek \n"
po/el_GR.po:"Language: el\n"
po/es_ES.po:"Language-Team: Spanish \n"
po/es_ES.po:"Language: es\n"
po/et_EE.po:"Language-Team: Estonian \n"
po/et_EE.po:"Language: et\n"
po/fi_FI.po:"Language-Team: Finnish \n"
po/fi_FI.po:"Language: fi\n"
po/fr_FR.po:"Language-Team: French \n"
po/fr_FR.po:"Language: fr\n"
po/hr_HR.po:"Language-Team: Croatian \n"
po/hr_HR.po:"Language: hr\n"
po/hu_HU.po:"Language-Team: Hungarian \n"
po/hu_HU.po:"Language: hu\n"
po/it_IT.po:"Language-Team: Italian \n"
po/it_IT.po:"Language: it\n"
po/lt_LT.po:"Language-Team: Lithuanian \n"
po/lt_LT.po:"Language: lt\n"
po/mk_MK.po:"Language-Team: Macedonian \n"
po/mk_MK.po:"Language: mk\n"
po/nl_NL.po:"Language-Team: Dutch \n"
po/nl_NL.po:"Language: nl\n"
po/nn_NO.po:"Language-Team: Norwegian Nynorsk \n"
po/nn_NO.po:"Language: nn\n"
po/pl_PL.po:"Language-Team: Polish \n"
po/pl_PL.po:"Language: pl\n"
po/pt_PT.po:"Language-Team: Portuguese \n"
po/pt_PT.po:"Language: pt\n"
po/ro_RO.po:"Language-Team: Romanian \n"
po/ro_RO.po:"Language: ro\n"
po/ru_RU.po:"Language-Team: Russian \n"
po/ru_RU.po:"Language: ru\n"
po/sk_SK.po:"Language-Team: Slovak \n"
po/sk_SK.po:"Language: sk\n"
po/sl_SI.po:"Language-Team: Slovenian \n"
po/sl_SI.po:"Language: sl\n"
po/sv_SE.po:"Language-Team: Swedish \n"
po/sv_SE.po:"Language: sv\n"
po/tr_TR.po:"Language-Team: Turkish \n"
po/tr_TR.po:"Language: tr\n"
po/uk_UA.po:"Language-Team: Ukrainian \n"
po/uk_UA.po:"Language: uk\n"
po/zh_CN.po:"Language-Team: Chinese (simplified) \n"
po/zh_CN.po:"Language: zh_CN\n"

Please advise whether this is correct.

Klaus

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


Re: [vdr] Minor *.po patch

2010-12-09 Thread Tobi
Ville Skyttä wrote:

> The Language fields for the main dialect of a language should not have 
> _COUNTRY (i.e. Language: de, not Language: de_DE etc).

Right, I didn't read that far. Main dialects are abbreviated to a two
letter language code in the  Language field.

Tobias

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


Re: [vdr] Minor *.po patch

2010-12-07 Thread Ville Skyttä
On Tuesday 07 December 2010, Rolf Ahrenberg wrote:

> So, "de" is a synonym for "de_DE" and both definitions are as correct as
> they can be according to my interpretation.

Well, I interpret it differently (that "de" is what one should use in this 
field for German as spoken in Germany) so I guess that just demonstrates that 
the documentation could be improved.  But... meh.

> And you could use here the plain "zh" as it defaults to "zh_CH" -

Swiss-Chinese, interesting ;)

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


Re: [vdr] Minor *.po patch

2010-12-06 Thread Rolf Ahrenberg

On Tue, 7 Dec 2010, Ville Skyttä wrote:


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:


I didn't! :)


* 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’."


So, "de" is a synonym for "de_DE" and both definitions are as correct as 
they can be according to my interpretation.



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.


And you could use here the plain "zh" as it defaults to "zh_CH" - 
according to my quick Google searchs.



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.
I think following what gettext's docs say/recommend and what it actually does
itself is the best approach.


In that case those plain language codes are enough. I was just thinking 
about new translation that might come in future using subdialects. 
Translators usually uses the existing ones as a starting point and might 
not remember to update these fields correctly.


BR,
--
rofa

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


Re: [vdr] Minor *.po patch

2010-12-06 Thread Ville Skyttä
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...@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@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] Minor *.po patch

2010-12-06 Thread Rolf Ahrenberg

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...@variant’"


Where is the country code forbidden exactly? 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. 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.


BR,
--
rofa

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


Re: [vdr] Minor *.po patch

2010-12-06 Thread Ville Skyttä
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

Attached is a patch I've sent to Klaus quite a while back, I believe this one 
does it correctly (and also fixes Language-Team values).
From dba5695d5efd9cd2b6663eeea404f0460d98dbca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= 
Date: Mon, 30 Aug 2010 00:07:05 +0300
Subject: [PATCH 5/5] Add Language and fix Language-Team header of *.po.

http://www.gnu.org/software/gettext/manual/gettext.html#Header-Entry
---
 PLUGINS/src/hello/po/ca_ES.po  |3 ++-
 PLUGINS/src/hello/po/cs_CZ.po  |3 ++-
 PLUGINS/src/hello/po/da_DK.po  |3 ++-
 PLUGINS/src/hello/po/de_DE.po  |3 ++-
 PLUGINS/src/hello/po/el_GR.po  |3 ++-
 PLUGINS/src/hello/po/es_ES.po  |3 ++-
 PLUGINS/src/hello/po/et_EE.po  |3 ++-
 PLUGINS/src/hello/po/fi_FI.po  |3 ++-
 PLUGINS/src/hello/po/fr_FR.po  |3 ++-
 PLUGINS/src/hello/po/hr_HR.po  |3 ++-
 PLUGINS/src/hello/po/hu_HU.po  |3 ++-
 PLUGINS/src/hello/po/it_IT.po  |3 ++-
 PLUGINS/src/hello/po/lt_LT.po  |3 ++-
 PLUGINS/src/hello/po/nl_NL.po  |3 ++-
 PLUGINS/src/hello/po/nn_NO.po  |3 ++-
 PLUGINS/src/hello/po/pl_PL.po  |3 ++-
 PLUGINS/src/hello/po/pt_PT.po  |3 ++-
 PLUGINS/src/hello/po/ro_RO.po  |3 ++-
 PLUGINS/src/hello/po/ru_RU.po  |3 ++-
 PLUGINS/src/hello/po/sk_SK.po  |4 ++--
 PLUGINS/src/hello/po/sl_SI.po  |3 ++-
 PLUGINS/src/hello/po/sv_SE.po  |3 ++-
 PLUGINS/src/hello/po/tr_TR.po  |3 ++-
 PLUGINS/src/hello/po/zh_CN.po  |4 ++--
 PLUGINS/src/pictures/po/de_DE.po   |3 ++-
 PLUGINS/src/pictures/po/fi_FI.po   |3 ++-
 PLUGINS/src/pictures/po/fr_FR.po   |3 ++-
 PLUGINS/src/pictures/po/it_IT.po   |3 ++-
 PLUGINS/src/pictures/po/lt_LT.po   |3 ++-
 PLUGINS/src/pictures/po/ru_RU.po   |3 ++-
 PLUGINS/src/pictures/po/sk_SK.po   |4 ++--
 PLUGINS/src/skincurses/po/de_DE.po |3 ++-
 PLUGINS/src/skincurses/po/fi_FI.po |3 ++-
 PLUGINS/src/skincurses/po/it_IT.po |3 ++-
 PLUGINS/src/skincurses/po/lt_LT.po |3 ++-
 PLUGINS/src/skincurses/po/ru_RU.po |3 ++-
 PLUGINS/src/skincurses/po/sk_SK.po |4 ++--
 po/ca_ES.po|3 ++-
 po/cs_CZ.po|3 ++-
 po/da_DK.po|3 ++-
 po/de_DE.po|3 ++-
 po/el_GR.po|3 ++-
 po/es_ES.po|3 ++-
 po/et_EE.po|3 ++-
 po/fi_FI.po|3 ++-
 po/fr_FR.po|3 ++-
 po/hr_HR.po|3 ++-
 po/hu_HU.po|3 ++-
 po/it_IT.po|3 ++-
 po/lt_LT.po|3 ++-
 po/mk_MK.po|1 +
 po/nl_NL.po|3 ++-
 po/nn_NO.po|3 ++-
 po/pl_PL.po|3 ++-
 po/pt_PT.po|3 ++-
 po/ro_RO.po|3 ++-
 po/ru_RU.po|3 ++-
 po/sk_SK.po|3 ++-
 po/sl_SI.po|3 ++-
 po/sv_SE.po|3 ++-
 po/tr_TR.po|3 ++-
 po/uk_UA.po|3 ++-
 po/zh_CN.po|3 ++-
 63 files changed, 125 insertions(+), 66 deletions(-)

diff --git a/PLUGINS/src/hello/po/ca_ES.po b/PLUGINS/src/hello/po/ca_ES.po
index 008b97e..1c2d2dd 100644
--- a/PLUGINS/src/hello/po/ca_ES.po
+++ b/PLUGINS/src/hello/po/ca_ES.po
@@ -12,7 +12,8 @@ msgstr ""
 "POT-Creation-Date: 2007-10-13 11:52+0200\n"
 "PO-Revision-Date: 2007-08-11 12:34+0200\n"
 "Last-Translator: Jordi Vilà \n"
-"Language-Team: Catalanian\n"
+"Language-Team: Catalan \n"
+"Language: ca\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
diff --git a/PLUGINS/src/hello/po/cs_CZ.po b/PLUGINS/src/hello/po/cs_CZ.po
index c4fa571..bbf110c 100644
--- a/PLUGINS/src/hello/po/cs_CZ.po
+++ b/PLUGINS/src/hello/po/cs_CZ.po
@@ -10,7 +10,8 @@ msgstr ""
 "POT-Creation-Date: 2007-10-13 11:52+0200\n"
 "PO-Revision-Date: 2007-08-11 12:34+0200\n"
 "Last-Translator: Vladimír Bárta \n"
-"Language-Team: Czech\n"
+"Language-Team: Czech \n"
+"Language: cs\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-2\n"
 "Content-Transfer-Encoding: 8bit\n"
diff --git a/PLUGINS/src/hello/po/da_DK.po b/PLUGINS/src/

[vdr] Minor *.po patch

2010-12-04 Thread Tobias Grimm
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.

Tobias




99_add-language-to-po.dpatch
Description: application/shellscript
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr