|Subject:||[bug-gettext] French plural form is wrong in gettext documentation|
|Date:||Wed, 29 Aug 2018 20:41:13 +0200|
|User-agent:||Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1|
Le 28/08/2018 à 03:40, Bruno Haible a écrit :
Hi,Any decimal value greater than 1 and less than 2 is also singular.Any value > 1 and < 2 is not an integer. However, the ngettext function takes an integer as argument.
True, but it works with an (unsigned) float thanks to the implicit cast. Anyway, for an integer n > 1 or n >= 2 are equivalent.
Unfortunatly, it doesn’t work with a negative signed float. Because the complete French rule is plural for n<=-2 or n>=2.
A new function, call it fgexttext(), with a float as its last argument would make sense…
That’s what I found:There’s a bad information concerning French plural rule in the gettext documentation https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.htmlWhen you search for the word "floating-point" in this documentation page, you will find that the question is already answered there. Bruno
“Negative and floating-point values usually represent physical entities for which singular and plural don’t clearly apply. In such cases, there is no need to use ngettext; a simple gettext call with a form suitable for all values will do.”Probably an American “alternative fact”. ;-) It can be true for English, but not for every languages and not for French in particular.
It’s really a pity that ngettext doesn’t have a variant with a signed (double) float as its last argument.
Description: OpenPGP digital signature
|[Prev in Thread]||Current Thread||[Next in Thread]|