From: Bruno Haible Date: Thu, 15 Mar 2001 14:27:19 +0000 (+0000) Subject: Clarifications about plural forms. X-Git-Tag: v0.10.36~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39e286a076ef21f3af4d169148334e1092aab4c0;p=thirdparty%2Fgettext.git Clarifications about plural forms. --- diff --git a/doc/ChangeLog b/doc/ChangeLog index b0a84a4d7..0264c9b8a 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2001-03-15 Bruno Haible + + * gettext.texi (Plural forms): Clarify the syntax of the plural form + information in the header entry. Always terminate it with a semicolon. + 2001-03-09 Bruno Haible * Makefile.am (MAKEINFO): Add 'env', to avoid shell syntax error in diff --git a/doc/gettext.texi b/doc/gettext.texi index 2b000e783..d2d01ffe4 100644 --- a/doc/gettext.texi +++ b/doc/gettext.texi @@ -3537,11 +3537,11 @@ details are explained in the GNU @code{gettext} manual. Here only a a bit of information is provided. The information about the plural form selection has to be stored in the -header entry (the one with the empty @code{msgid} string). There should -be something like: +header entry of the PO file (the one with the empty @code{msgid} string). +The plural form information looks like this: @smallexample - nplurals=2; plural=n == 1 ? 0 : 1 + Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1; @end smallexample The @code{nplurals} value must be a decimal number which specifies how @@ -3570,7 +3570,7 @@ between the singular and plural form. An appropriate header entry would look like this: @smallexample -nplurals=1; plural=0 +Plural-Forms: nplurals=1; plural=0; @end smallexample @noindent @@ -3590,7 +3590,7 @@ This is the form used in most existing programs since it is what English is using. A header entry would look like this: @smallexample -nplurals=2; plural=n != 1 +Plural-Forms: nplurals=2; plural=n != 1; @end smallexample (Note: this uses the feature of C expressions that boolean expressions @@ -3618,7 +3618,7 @@ Esperanto Exceptional case in the language family. The header entry would be: @smallexample -nplurals=2; plural=n>1 +Plural-Forms: nplurals=2; plural=n>1; @end smallexample @noindent @@ -3633,7 +3633,7 @@ French The header entry would be: @smallexample -nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2 +Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2; @end smallexample @noindent @@ -3648,7 +3648,8 @@ Gaeilge The header entry would look like this: @smallexample -nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 ? 1 : 2 +Plural-Forms: nplurals=3; \ + plural=n==1 ? 0 : n%10>=2 && n%10<=4 ? 1 : 2; @end smallexample @noindent @@ -3663,8 +3664,9 @@ Russian The header entry would look like this: @smallexample -nplurals=3; plural=n==1 ? 0 : \ - n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2 +Plural-Forms: nplurals=3; \ + plural=n==1 ? 0 : \ + n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2; @end smallexample (Continuation in the next line is possible.) @@ -3681,7 +3683,9 @@ Polish The header entry would look like this: @smallexample -nplurals=4; plural=n==1 ? 0 : n%10==2 ? 1 : n%10==3 || n%10==4 ? 2 : 3 +Plural-Forms: nplurals=4; \ + plural=n==1 ? 0 : \ + n%10==2 ? 1 : n%10==3 || n%10==4 ? 2 : 3; @end smallexample @noindent