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.

Title: Argparse missing translates
Type: behavior Stage:
Components: Versions: Python 3.11, Python 3.10, Python 3.9
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: santhu_reddy12
Priority: normal Keywords:

Created on 2021-08-25 10:14 by santhu_reddy12, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg400251 - (view) Author: santhosh (santhu_reddy12) Date: 2021-08-25 10:14
Dear all,

There are a few strings in the `argparse` module which are not translatable through the `gettext` API.

Some have already been reported:
- the "--version" help text at Lib/ (reported in issue 16786, fixed by PR 12711);
- the "default" help text at Lib/ (reported in 33775, fixed by PR 12711).

However, some others remain:
- the "default" help text for `BooleanOptionalAction` at Lib/ (which, incidentally, will be duplicated when used with `ArgumentDefaultsHelpFormatter`);
- the "argument %(argument_name)s: %(message)s" error message at Lib/;
- the formatted section heading at Lib/ if the heading itself is translatable, the string "%(heading)s:" is not. More precisely, the colon right after the heading might also require localization, as some languages (e.g., French) typeset colons with a preceding non-breaking space (i.e., "%(heading)s :"). (Okay, I'll admit that this is nitpicking!)

I'll submit a pull request with proposed fixes for these strings.

Kind regards,
Date User Action Args
2022-04-11 14:59:49adminsetgithub: 89162
2021-12-15 19:50:28iritkatrielsetnosy: - lys.nikolaou

type: performance -> behavior
versions: + Python 3.10, Python 3.11
2021-08-25 10:45:57pablogsalsetnosy: - pablogsal
2021-08-25 10:45:54pablogsalsetcomponents: - Parser
2021-08-25 10:14:59santhu_reddy12create