Bruno Haible <[EMAIL PROTECTED]> writes: >> +/* Avoid usages like this one. */ >> +printf (ngettext ("one file removed", "%d files removed", n), n); >> [EMAIL PROTECTED] smallexample > > I don't see a reason to avoid such usages. It is perfectly valid, and > even good style, to omit the number "1" if you can write it out as "one".
That's what I thought too, but Egmont Koblinger wrote in <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00082.html> that this confused him. If the intent is that such usages are OK, how about if we reduce the confusion by documenting the intent? We could add an example like the following: --- gettext.texi~ 2006-06-30 07:25:39.000000000 -0700 +++ gettext.texi 2006-08-17 09:58:04.000000000 -0700 @@ -5198,6 +5198,15 @@ printf (ngettext ("%d file removed", "%d Please note that the numeric value @var{n} has to be passed to the @code{printf} function as well. It is not sufficient to pass it only to @code{ngettext}. + +When translating format strings, @var{msgid1} and @var{msgid2} must +both be compatible with the arguments given to the formatting +function, but they need not use the same conversion specifications. +For example, @var{msgid1} can ignore an argument: + [EMAIL PROTECTED] +printf (ngettext ("one file removed", "%d files removed", n), n); [EMAIL PROTECTED] smallexample @end deftypefun @deftypefun {char *} dngettext (const char [EMAIL PROTECTED], const char [EMAIL PROTECTED], const char [EMAIL PROTECTED], unsigned long int @var{n}) _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils