Comment 2 for bug 945245

Revision history for this message
David Planella (dpm) wrote : Re: [Ubuntu-translations-coordinators] [Bug 945245] Re: add-apt-repository i18n problems

Al 03/03/12 01:54, En/na Gabor Kelemen ha escrit:
> The branch fixes mentioned problems except the last, but there is a
> small problem I don't like:
>
> The --help output has this line:
>
> help=_("URL of keyserver. Default: %default").decode(enc))
>
> Now because this is in an extensionless file, xgettext thinks this is a
> C file and above is a C format string, which makes it possible for
> translators to break the %default variable into %d + some text. This
> needs some more work. Also for the same reason translator comments are
> not extracted, which I don't like either.
>
> For the big usage text, I have not found an elegant way to mark it for
> translation, so that needs the help of someone more experienced with
> Python.
>

That's due to bug 377872 in intltool. I guess a workaround would be to
make it look like a valid c-format string, e.g.:

help=_("URL of keyserver. Default: %s" % default).decode(enc))

--
David Planella
Ubuntu Translations Coordinator
www.ubuntu.com / www.davidplanella.wordpress.com
www.identi.ca/dplanella / www.twitter.com/dplanella