[issue8841] GetoptError strings should be localized

Filip Gruszczyński report at bugs.python.org
Tue Mar 1 23:27:57 CET 2011


Filip Gruszczyński <gruszczy at gmail.com> added the comment:

I understand I should do something similar to what is done in argparse:

from gettext import gettext as _, ngettext

...

message = ngettext('conflicting option string: %s',
                   'conflicting option strings: %s',
                   len(conflicting_actions))

and then let user define those messages somewhere in his own po files?

----------

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


More information about the Python-bugs-list mailing list