po files header, Plural-Forms

2008-05-06 Thread Anna Jonna Armannsdottir
The files I am sending to gnome-i18n have 
the following in the header: 
Plural-Forms: nplurals=2; plural=1; 

This means that the number of plural forms 
is two in the corresponding language, and 
that plural forms are used in the file. 

The files I am sending to Ubuntu Launchpad 
contain the following:
Plural-Forms: nplurals=2; plural=n != 1;\n

Does anybody have a clue about: =n != 1

Which one is the right one for gnome-i18n? 

-- 
Kindest Regards, Anna Jonna Ármannsdóttir,   %   A: Because people read 
from top to bottom.
Unix System Aministration, Computing Services,   %   Q: Why is top posting bad?
University of Iceland.

___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: po files header, Plural-Forms

2008-05-06 Thread Tomas Kuliavas
 The files I am sending to gnome-i18n have
 the following in the header:
 Plural-Forms: nplurals=2; plural=1;

 This means that the number of plural forms
 is two in the corresponding language, and
 that plural forms are used in the file.

 The files I am sending to Ubuntu Launchpad
 contain the following:
 Plural-Forms: nplurals=2; plural=n != 1;\n

 Does anybody have a clue about: =n != 1

 Which one is the right one for gnome-i18n?

http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms

Germanic languages use Plural-Forms: nplurals=2; plural=n != 1;

-- 
Tomas

___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: po files header, Plural-Forms

2008-05-06 Thread Kenneth Nielsen
2008/5/6, Anna Jonna Armannsdottir [EMAIL PROTECTED]:

 The files I am sending to gnome-i18n have
 the following in the header:
 Plural-Forms: nplurals=2; plural=1;

 This means that the number of plural forms
 is two in the corresponding language, and
 that plural forms are used in the file.

 The files I am sending to Ubuntu Launchpad
 contain the following:
 Plural-Forms: nplurals=2; plural=n != 1;\n

 Does anybody have a clue about: =n != 1


I'm pretty sure that plural=n != 1 means that it should use the plural
string for any numbers different from 1, and I think it should be that in
GNOME as well. It makes a little more sence if you put a parantheses around
it plural=(n!=1). The != is a programming way of wiriting not equals.
Regards Kenneth
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: po files header, Plural-Forms

2008-05-06 Thread Anna Jonna Armannsdottir
On mið, 2008-05-07 at 00:04 +0200, Kenneth Nielsen wrote:
 I'm pretty sure that plural=n != 1 means that it should use the
 plural string for any numbers different from 1, and I think it should
 be that in GNOME as well. It makes a little more sence if you put a
 parantheses around it plural=(n!=1). The != is a programming way of
 wiriting not equals.
 Regards Kenneth 

Hi Kenneth, 
that makes sense. It took a bit of reading to understand that 
'plural' is really a C function. I thougnt it was just a constant 
like anything else in that file. 

At the same time we have translations like this (en_GB): 
msgid %d × %d pixel
msgid_plural %d × %d pixels
msgstr[0] %d × %d pixel
msgstr[1] %d × %d pixels

And the function f = plural(n) = (n!=1) has the two values: 
n=0= f(n) = 1 # 0 pixels
n=1= f(n) = 0 # 1 pixel
n=2...inf  = f(n) = 1 # 2 pixels  

Ahh, so the f(n) is the index to msgstr. Ok, now i understand it. 
I suppose there are some other translators that do not understand this. 
I think the key to understanding this, is to realize that plural 
is really a C function of n which is the numerical argument that
controls the textual context. 
Also I had to know that the function plural is really the index 
to the msgstr[0], msgstr[1] array. 
Hope this helps understanding the plural function. 
Thanks for your explanations. 

-- 
Kindest Regards, Anna Jonna Ármannsdóttir,   %   A: Because people read 
from top to bottom.
Unix System Aministration, Computing Services,   %   Q: Why is top posting bad?
University of Iceland.

___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n