From: Bruno Haible Date: Tue, 27 May 2003 21:55:15 +0000 (+0000) Subject: Fix the Slovak plural formula. X-Git-Tag: v0.13~465 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5eaf1810f56d9cfee9c75995a3add09d75846936;p=thirdparty%2Fgettext.git Fix the Slovak plural formula. --- diff --git a/gettext-tools/doc/ChangeLog b/gettext-tools/doc/ChangeLog index d38b7a133..2dd0d5610 100644 --- a/gettext-tools/doc/ChangeLog +++ b/gettext-tools/doc/ChangeLog @@ -1,3 +1,8 @@ +2003-05-27 Bruno Haible + + * gettext.texi (Plural forms): Correct formula for Slovak. + Reported by Marcel Telka . + 2003-05-24 Bruno Haible * gettext.texi (Glade): Mention support og Glade 2. diff --git a/gettext-tools/doc/gettext.texi b/gettext-tools/doc/gettext.texi index 68ca8888c..fc6b4554f 100644 --- a/gettext-tools/doc/gettext.texi +++ b/gettext-tools/doc/gettext.texi @@ -4924,7 +4924,23 @@ Languages with this property include: @table @asis @item Slavic family -Croatian, Czech, Russian, Slovak, Ukrainian +Croatian, Czech, Russian, Ukrainian +@end table + +@item Three forms, special cases for 1 and 2, 3, 4 +The header entry would look like this: + +@smallexample +Plural-Forms: nplurals=3; \ + plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2; +@end smallexample + +@noindent +Languages with this property include: + +@table @asis +@item Slavic family +Slovak @end table @item Three forms, special case for one and some numbers ending in 2, 3, or 4 diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index e4e9ec64f..05353b161 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,8 @@ +2003-05-27 Bruno Haible + + * plural-table.c (plural_table): Correct entry for Slovak. + Reported by Marcel Telka . + 2003-05-24 Bruno Haible * x-glade.h (EXTENSIONS_GLADE): Also recognize the .glade2 extension. diff --git a/gettext-tools/src/plural-table.c b/gettext-tools/src/plural-table.c index 0bf3b1016..ea0137715 100644 --- a/gettext-tools/src/plural-table.c +++ b/gettext-tools/src/plural-table.c @@ -55,8 +55,8 @@ struct plural_table_entry plural_table[] = { "hr", "Croatian", "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" }, { "cs", "Czech", "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" }, { "ru", "Russian", "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" }, - { "sk", "Slovak", "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" }, { "uk", "Ukrainian", "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" }, + { "sk", "Slovak", "nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;" }, { "pl", "Polish", "nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" }, { "sl", "Slovenian", "nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);" } }; diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index 77aaed607..f44adac1d 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,7 @@ +2003-05-27 Bruno Haible + + * plural-2: Add test for Slovak plural formula. + 2003-05-24 Bruno Haible * xgettext-25: New file. diff --git a/gettext-tools/tests/plural-2 b/gettext-tools/tests/plural-2 index 7f8f4fdf1..c36265be4 100755 --- a/gettext-tools/tests/plural-2 +++ b/gettext-tools/tests/plural-2 @@ -31,6 +31,9 @@ n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2 ru-glibc n%100/10==1 ? 2 : n%10==1 ? 0 : (n+9)%10>3 ? 2 : 1 20111222222222222222201112222220111222222011122222201112222220111222222011122222201112222220111222222011122222222222222220111222222011122222201112222220111222222011122222201112222220111222222011122222 +sk +(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2 +20111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 pl n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2 20111222222222222222221112222222111222222211122222221112222222111222222211122222221112222222111222222211122222222222222222111222222211122222221112222222111222222211122222221112222222111222222211122222