Launchpad check of %s, %d... strings
Danilo Šegan
danilo at canonical.com
Mon Jul 13 09:07:59 UTC 2009
Hi Milo,
У нед, 12. 07 2009. у 16:48 +0200, Milo Casagrande пише:
> I would like to point you to this string:
>
> https://translations.launchpad.net/ufw/trunk/+pots/ufw/it/47/+translate
>
> The format specifier of that string, is wrong. We are not able to
> understand how that could have been done: if the PO file was
> downloaded and then uploaded again or what else.
It's simple:
Initial POT:
msgid "blah %d"
msgstr ""
Initial it.po:
msgid "blah %d"
msgstr "blah %s"
Updated POT:
#, python-format
msgid "blah %d"
msgstr ""
and you've got yourself a problem.
> We have also no idea if it's a bug or what. The string is a
> python-format string and we know that Launchpad throws an error if you
> translate a %s in a wrong way...
True, but what Launchpad lacks is doing a re-check when python-format or
c-format flag is introduced later.
See https://bugs.launchpad.net/rosetta/+bug/317578 for details.
Basically, what Launchpad would have to do is when a POT file is being
imported, it should validate all existing translations again. We don't
do that for performance reasons, so perhaps we'd need to track mutating
*-format flags.
Cheers,
Danilo
More information about the ubuntu-translators
mailing list