Éric Araujo <mer...@netwok.org> added the comment:

A bit of rationale behind the patch.  You probably know that the gettext/_ 
functions serves two roles: Identifying the strings to translate, and 
retrieving the translation from a catalog.

At strings extraction time, the string in the line
            msg = _('unknown parser %r (choices: %s)' % tup)
will be found by xgettext (just checked), so the .pot and .po files will 
include it.  So far, so good.

At runtime however, the gettext function will get "unknown parser 'parserr' 
(choices: ('some', 'tuple'))" as argument, which isn’t in the translation 
catalogs.  Doing the string interpolation after the gettext call (my patch) 
avoids this problem.

I will write a test for those two strings.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10497>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to