On 07/19/2013 06:14 AM, Bernhard Voelker wrote:
>> +++ b/src/rm.c
>> @@ -339,9 +339,13 @@ main (int argc, char **argv)
>> {
>> fprintf (stderr,
>> (x.recursive
>> - ? _("%s: remove all arguments recursively? ")
>> - : _("%s: remove all arguments? ")),
>> - program_name);
>> + ? ngettext ("%s: remove %zu argument recursively? ",
>> + "%s: remove %zu arguments recursively? ",
>> + select_plural (n_files))
>> + : ngettext ("%s: remove %zu argument? ",
>> + "%s: remove %zu arguments? ",
>> + select_plural (n_files))),
>
> The select_plural() call is not needed in the latter case
> because we are in this if-clause:
>
> if (prompt_once && (x.recursive || 3 < n_files))
>
> i.e. it can not happen with 1 single file.
> Actually, it is still needed. Just because the singular English form will never be reached because n_files != 1, does not mean that there will never be a translation to another language where select_plural will still want to to choose an alternate form (for example, I seem to recall the gettext manual talking about languages where 100 is treated differently than 111). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
