]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Clarifications about plural forms.
authorBruno Haible <bruno@clisp.org>
Thu, 15 Mar 2001 14:27:19 +0000 (14:27 +0000)
committerBruno Haible <bruno@clisp.org>
Thu, 15 Mar 2001 14:27:19 +0000 (14:27 +0000)
doc/ChangeLog
doc/gettext.texi

index b0a84a4d7fad9d1a6fd971f39a88d931fd4883f3..0264c9b8ac5285da3e7cb37114c55756e997e1b2 100644 (file)
@@ -1,3 +1,8 @@
+2001-03-15  Bruno Haible  <haible@clisp.cons.org>
+
+       * 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  <haible@clisp.cons.org>
 
        * Makefile.am (MAKEINFO): Add 'env', to avoid shell syntax error in
index 2b000e783be306bd5a0c02e80738f4c2af6be687..d2d01ffe4855814ede3b428aedfe7e7122dad949 100644 (file)
@@ -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