argparse uses %s in gettext calls causing xgettext warnings #81966
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee = None closed_at = <Date 2019-09-13.10:33:59.348> created_at = <Date 2019-08-07.12:49:16.176> labels = ['3.7', '3.8', 'type-bug', 'library', '3.9'] title = 'argparse uses %s in gettext calls causing xgettext warnings' updated_at = <Date 2019-09-13.10:33:59.348> user = 'https://github.com/kulikjak'
activity = <Date 2019-09-13.10:33:59.348> actor = 'mdk' assignee = 'none' closed = True closed_date = <Date 2019-09-13.10:33:59.348> closer = 'mdk' components = ['Library (Lib)'] creation = <Date 2019-08-07.12:49:16.176> creator = 'kulikjak' dependencies =  files =  hgrepos =  issue_num = 37785 keywords = ['patch'] message_count = 12.0 messages = ['349166', '349305', '349445', '349449', '352251', '352256', '352263', '352267', '352272', '352274', '352275', '352279'] nosy_count = 8.0 nosy_names = ['bethard', 'eric.araujo', 'paul.j3', 'serhiy.storchaka', 'mdk', 'CuriousLearner', 'miss-islington', 'kulikjak'] pr_nums = ['15161', '16080', '16081', '16082'] priority = 'normal' resolution = 'fixed' stage = 'resolved' status = 'closed' superseder = None type = 'behavior' url = 'https://bugs.python.org/issue37785' versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']
The text was updated successfully, but these errors were encountered:
Running xgettext on argparse.py (of any currently supported Python 3.x) return following warning:
./Lib/argparse.py: warning: 'msgid' format string with unnamed arguments cannot be properly localized: The translator cannot reorder the arguments. Please consider using a format string with named arguments, and a mapping instead of a tuple for the arguments.
Same problem was already partially fixed here: https://bugs.python.org/issue10528. I guess that this occurrence was either missed or is new since.
It would be nice to have this backported to all supported releases but considering incompatibility worries in issue linked above, it may be fixed only in 3.8+ (which is still nice).