[issue10528] argparse uses %s in gettext calls

Steven Bethard report at bugs.python.org
Fri Dec 3 10:22:38 CET 2010


Steven Bethard <steven.bethard at gmail.com> added the comment:

If I understand it right, before this patch, people couldn't really supply internationalizations for these calls - they would have had to have a translation for each possible value of, e.g. action.choices or parser.prefix_chars. So I think there's pretty minimal danger of breaking that code.

Specific comments on names in the patch:

* rename %(character) to %(prefix_chars)
* rename %(name) to %(type) and %(arg_string) to %(value)
* rename %(program_name) to %(prog)

Basically, we should use the name of an Action or ArgumentParser attribute whenever it makes sense. Hopefully that will make it more intuitive what these mean when people are translating them.

And yes, with the above changes, +1.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10528>
_______________________________________


More information about the Python-bugs-list mailing list