bug-gnu-utils
[Top][All Lists]
Advanced

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

msgfmt checking


From: Djihed Afifi
Subject: msgfmt checking
Date: Fri, 23 May 2008 00:27:25 +0100

Hi,



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". 

which, to my knowledge, is valid C. 

But msgfmt checking complains with:

'msgstr[2]' is not a valid C format string, unlike 'msgid'. Reason: The
string refers to argument number 2 but ignores argument number 1.

I don't see why this is checked for and refused. It is not fatal.

This means that the .po file is refused for repositories that have
commit hooks that check committed po files. This forces us to use silly
workarounds such as placing the unused variable in brackets:

"two items (%d), with size %s".


Djihed





reply via email to

[Prev in Thread] Current Thread [Next in Thread]