[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: msgfmt checking
From: |
Bruno Haible |
Subject: |
Re: msgfmt checking |
Date: |
Fri, 23 May 2008 02:00:29 +0200 |
User-agent: |
KMail/1.5.4 |
Hi,
Djihed Afifi wrote:
>
> With c-format strings, it is valid to shuffle around variables in a
> string to make the translated strings grammatically correct in the host
> language. For example, in :
>
>
> "%d item, with size %s" (a string from nautilus),
>
> we would use %2$s to place the string first in the translated string.
>
> In Arabic, for some plural forms, it is more appropriate to remove the
> number all together and express it with words. Something like:
>
> "two items, with size %2$s".
Thank you for reporting this. Incidentally, the same issue was already
reported two weeks ago in the gettext bug tracker:
http://savannah.gnu.org/bugs/index.php?23183
The gettext manual was changed to recommend that the programmer use
"%2$d item, with size %1$s"
in this case.
> "two items, with size %2$s".
> which, to my knowledge, is valid C.
Unfortunately, no, this is not a valid C format string. All printf
implementations must fail when they receive such a format string.
You find a description of what a valid C format string looks like at
http://www.opengroup.org/susv3/functions/fprintf.html
Bruno
- msgfmt checking, Djihed Afifi, 2008/05/22
- Re: msgfmt checking,
Bruno Haible <=