This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: argparse does not ship with translations
Type: enhancement Stage: resolved
Components: Versions:
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: carmenbianca, terry.reedy
Priority: normal Keywords:

Created on 2019-05-10 12:34 by carmenbianca, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (3)
msg342073 - (view) Author: Carmen Bianca Bakker (carmenbianca) * Date: 2019-05-10 12:34
Although argparse contains translatable strings, translations for those strings do not ship with Python. This means that any program that uses argparse must separately translate argparse, which is a lot of duplicated work.

Moreover, if argparse is translated downstream, it is only translated against a single version of Python. If a user uses a different version of Python, there is no guarantee that the strings (and thus the translations) will be the same.

Shipping translations for argparse together with Python would solve this issue.

As a caveat, the translations cannot be in `/usr/share/locale` or equivalent. Users may have multiple versions of Python installed, so there would be a namespace conflict.
msg342074 - (view) Author: Carmen Bianca Bakker (carmenbianca) * Date: 2019-05-10 12:49
I have created a prototype for the proposed fix here:

https://github.com/carmenbianca/argparse

I'm not a regular Python contributor, so I simply copied argparse.py out of Lib and started working on my own copy.

The changes are, all things considered, not very big. But it would add a `locale` directory in Lib, which I'm not sure is okay or not.

There would also need to be a mechanism in the build process that puts the compiled MO files in Lib/locale/*language*/LC_MESSAGES/argparse.mo.
msg342151 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-05-11 02:28
Many modules contain translatable strings.  CPython does not ship with translations of any of them and I believe it is against policy to do so.

1. Core developers, though an international group, are not competent to create or approve translations.
2. Core developers feel that professional Python users must gain basic English proficiency.

If you want to discuss this further, please discuss on python-ideas list, possibly after trying to find previous discussions, not here. We only allowed 'official' translations of the docs about a year ago and those are done by a group separate from the core developers.
History
Date User Action Args
2022-04-11 14:59:15adminsetgithub: 81056
2019-05-11 02:28:46terry.reedysetstatus: open -> closed

nosy: + terry.reedy
messages: + msg342151

resolution: rejected
stage: resolved
2019-05-10 12:49:47carmenbiancasetmessages: + msg342074
2019-05-10 12:34:34carmenbiancacreate