diff options
author | Bruno Haible <bruno@clisp.org> | 2001-03-15 14:27:19 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2001-03-15 14:27:19 +0000 |
commit | 39e286a076ef21f3af4d169148334e1092aab4c0 (patch) | |
tree | 92d8bd55cb214922a7fd201b5bb20d9fd93ea2bc | |
parent | ef56f35dc0450a81ab34c1d142884c46a3bacc9b (diff) | |
download | external_gettext-39e286a076ef21f3af4d169148334e1092aab4c0.zip external_gettext-39e286a076ef21f3af4d169148334e1092aab4c0.tar.gz external_gettext-39e286a076ef21f3af4d169148334e1092aab4c0.tar.bz2 |
Clarifications about plural forms.
-rw-r--r-- | doc/ChangeLog | 5 | ||||
-rw-r--r-- | doc/gettext.texi | 26 |
2 files changed, 20 insertions, 11 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index b0a84a4..0264c9b 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -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 diff --git a/doc/gettext.texi b/doc/gettext.texi index 2b000e7..d2d01ff 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 |