Re: [PATCH/RFC] l10n: de.po: translate 39 new messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christian Stimming <stimming@xxxxxxx> writes:

> Thanks for the regular update! This is great work.
>
> One issue with the plural form messages, though:
>
> Am Montag, 15. April 2013, 18:27:40 schrieb Ralf Thielow:
>>  #: bundle.c:186
>> -#, fuzzy, c-format
>> +#, c-format
>>  msgid "The bundle contains this ref:"
>>  msgid_plural "The bundle contains these %d refs:"
>> -msgstr[0] "Das Paket enthält %d Referenz"
>> -msgstr[1] "Das Paket enthält %d Referenzen"
>> +msgstr[0] "Das Paket enthält diese Referenz:"
>> +msgstr[1] "Das Paket enthält diese %d Referenzen:"
>
> The msgstr[0] must still contain a %d conversion specifier (which will be 
> filled with the number 1) even though the translated sentence wouldn't need 
> the 1 anymore. The previous msgstr[0] was correct; the English singular msgid 
> is not.
>
> Technical background: The ngettext function chooses only the string itself, 
> which will then be fed to printf() as a second step. If the printf sees more 
> variadic arguments than conversion specifiers in the string, it will be 
> unhappy. At least that's what I remembered about the ngettext things...
>
> http://www.gnu.org/software/libc/manual/html_node/Advanced-gettext-
> functions.html

This vaguely sounds familiar:

  http://thread.gmane.org/gmane.comp.version-control.git/218173
  http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms

In the English singular case, the number – always 1 – can be
replaced with "one":

          printf (ngettext ("One file removed", "%d files removed", n), n);

This works because the ‘printf’ function discards excess arguments
that are not consumed by the format string.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]