[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: printing plural values outside unsigned long int range
From: |
Bruno Haible |
Subject: |
Re: printing plural values outside unsigned long int range |
Date: |
Thu, 17 Aug 2006 20:01:54 +0200 |
User-agent: |
KMail/1.9.1 |
Paul Eggert wrote:
> If the intent is that such usages are OK, how
> about if we reduce the confusion by documenting the intent?
Yes, I added the same example, at a different place and without
talking too much about "compatible" format strings and "conversion
specifications". These technical terms are correct, but the doc is probably
easier to read and digest without them:
*** gettext.texi 17 Aug 2006 17:34:42 -0000 1.103
--- gettext.texi 17 Aug 2006 17:58:44 -0000
***************
*** 5199,5204 ****
--- 5199,5215 ----
@code{printf} function as well. It is not sufficient to pass it only to
@code{ngettext}.
+ In the English singular case, the number -- always 1 -- can be replaced with
+ "one":
+
+ @smallexample
+ printf (ngettext ("One file removed", "%d files removed", n), n);
+ @end smallexample
+
+ @noindent
+ This works because the @samp{printf} function discards excess arguments that
+ are not consumed by the format string.
+
It is also possible to use this function when the strings don't contain a
cardinal number: