[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem in documentation: number of plurals
From: |
Bruno Haible |
Subject: |
Re: Problem in documentation: number of plurals |
Date: |
Thu, 17 Aug 2006 14:10:09 +0200 |
User-agent: |
KMail/1.9.1 |
Arpad Biro wrote:
> A quick example:
>
> "1 apple " is "1 alma" in Hungarian, and
> "123 apples" is "123 alma"
>
> So far so good, but when there's no numeral:
>
> "the apple " is "az alma " in Hungarian, but
> "the apples" is "az alm�"
>
> In the latter case we have 2 plural forms.
Thanks for the clear explanation.
Gabor Kelemen wrote:
> I second that all.
Thanks for confirming. Not knowing more than two words of Hungarian,
I have to rely on a sort of "majority opinion" of yours.
> Furthermore, the gettext-tools/src/plural-table.c file, which also
> contains this information, needs to be patched (see attachment), so that
> msginit will return correct information.
Yes. I'm applying the attached patch.
Bruno
diff -r -c3 --exclude='*.po*' --exclude='*.info*' --exclude='*_*.html'
--exclude='*.*.html' --exclude='*.[13]' --exclude='*.1.in'
--exclude=Makefile.in --exclude=aclocal.m4 --exclude=configure
--exclude=version.texi --exclude=stamp-vti --exclude='po-*-gen*.[ch]'
--exclude='*.o' --exclude='*.lo' --exclude='*.gmo' --exclude=ABOUT-NLS
--exclude=gnulib-lib --exclude=gnulib-m4 --exclude='javadoc[12]' --exclude=CVS
gettext-cvs/gettext-tools/doc/gettext.texi
gettext-6/gettext-tools/doc/gettext.texi
*** gettext-cvs/gettext-tools/doc/gettext.texi Thu Aug 17 03:21:29 2006
--- gettext-6/gettext-tools/doc/gettext.texi Thu Aug 17 03:35:02 2006
***************
*** 5284,5291 ****
Languages with this property include:
@table @asis
- @item Finno-Ugric family
- Hungarian
@item Asian family
Japanese, Korean, Vietnamese
@item Turkic/Altaic family
--- 5284,5289 ----
***************
*** 5321,5326 ****
--- 5319,5339 ----
Esperanto
@end table
+ @noindent
+ Another language using the same header entry is:
+
+ @table @asis
+ @item Finno-Ugric family
+ Hungarian
+ @end table
+
+ Hungarian does not appear to have a plural if you look at sentences involving
+ ordinal numbers. For example, ``1 apple'' is ``1 alma'', and ``123 apples''
is
+ ``123 apples''. But when the number is not explicit, the distinction between
+ singular and plural exists: ``the apple'' is ``az alma'', and ``the apples''
is
+ ``az alm@'{a}k''. Since @code{ngettext} has to support both types of
sentences,
+ it is classified here, under ``two forms''.
+
@item Two forms, singular used for zero and one
Exceptional case in the language family. The header entry would be:
diff -r -c3 --exclude='*.po*' --exclude='*.info*' --exclude='*_*.html'
--exclude='*.*.html' --exclude='*.[13]' --exclude='*.1.in'
--exclude=Makefile.in --exclude=aclocal.m4 --exclude=configure
--exclude=version.texi --exclude=stamp-vti --exclude='po-*-gen*.[ch]'
--exclude='*.o' --exclude='*.lo' --exclude='*.gmo' --exclude=ABOUT-NLS
--exclude=gnulib-lib --exclude=gnulib-m4 --exclude='javadoc[12]' --exclude=CVS
gettext-cvs/gettext-tools/src/plural-table.c
gettext-6/gettext-tools/src/plural-table.c
*** gettext-cvs/gettext-tools/src/plural-table.c Fri Aug 26 22:32:38 2005
--- gettext-6/gettext-tools/src/plural-table.c Thu Aug 17 03:36:27 2006
***************
*** 1,5 ****
/* Table of known plural form expressions.
! Copyright (C) 2001-2005 Free Software Foundation, Inc.
Written by Bruno Haible <address@hidden>, 2002.
This program is free software; you can redistribute it and/or modify
--- 1,5 ----
/* Table of known plural form expressions.
! Copyright (C) 2001-2006 Free Software Foundation, Inc.
Written by Bruno Haible <address@hidden>, 2002.
This program is free software; you can redistribute it and/or modify
***************
*** 26,32 ****
/* Formulas taken from the documentation, node "Plural forms". */
struct plural_table_entry plural_table[] =
{
- { "hu", "Hungarian", "nplurals=1; plural=0;" },
{ "ja", "Japanese", "nplurals=1; plural=0;" },
{ "ko", "Korean", "nplurals=1; plural=0;" },
{ "vi", "Vietnamese", "nplurals=1; plural=0;" },
--- 26,31 ----
***************
*** 48,53 ****
--- 47,53 ----
{ "pt", "Portuguese", "nplurals=2; plural=(n != 1);" },
{ "es", "Spanish", "nplurals=2; plural=(n != 1);" },
{ "eo", "Esperanto", "nplurals=2; plural=(n != 1);" },
+ { "hu", "Hungarian", "nplurals=2; plural=(n != 1);" },
{ "fr", "French", "nplurals=2; plural=(n > 1);" },
{ "pt_BR", "Brazilian", "nplurals=2; plural=(n > 1);" },
{ "lv", "Latvian", "nplurals=3; plural=(n%10==1 && n%100!=11 ?
0 : n != 0 ? 1 : 2);" },
diff -r -c3 --exclude='*.po*' --exclude='*.info*' --exclude='*_*.html'
--exclude='*.*.html' --exclude='*.[13]' --exclude='*.1.in'
--exclude=Makefile.in --exclude=aclocal.m4 --exclude=configure
--exclude=version.texi --exclude=stamp-vti --exclude='po-*-gen*.[ch]'
--exclude='*.o' --exclude='*.lo' --exclude='*.gmo' --exclude=ABOUT-NLS
--exclude=gnulib-lib --exclude=gnulib-m4 --exclude='javadoc[12]' --exclude=CVS
gettext-cvs/gettext-tools/tests/plural-2 gettext-6/gettext-tools/tests/plural-2
*** gettext-cvs/gettext-tools/tests/plural-2 Fri Aug 26 22:43:16 2005
--- gettext-6/gettext-tools/tests/plural-2 Thu Aug 17 03:37:20 2006
***************
*** 10,16 ****
tmpfiles="$tmpfiles plural-2.data"
cat <<EOF > plural-2.data
! hu
0
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
de
--- 10,16 ----
tmpfiles="$tmpfiles plural-2.data"
cat <<EOF > plural-2.data
! ja
0
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
de