-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-44865: Missing translations in argparse
#27668
Conversation
A couple of other missing translations are addressed by python#12711. Incidentally, this also fixes a bug with the "(default: …)" help string of the `BooleanOptionalAction` class: when used with the `ArgumentDefaultsHelpFormatter`, a second "(default: …)" string would be added to the help text. This was due to the fact that the `default` value was immediately expanded in the help string, and thus wasn't detected as a "(default: …)" string by the `ArgumentDefaultsHelpFormatter._get_help_string()` method (which relies on finding a named format argument `%(default)` inside the help string).
This PR is stale because it has been open for 30 days with no activity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All argparse tests ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks reasonable. Please resolve conflicts with the main branch.
If this fixes a bug, there should be tests.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Hello and thanks for the feedback! I have made the requested changes; please review again. Some of the changes from the original PR were not necessary anymore:
All in all, a single change remains from the original PR :) Kind regards, |
Thank you for your contribution. For this PR and #12711. I apologize that it took a long time to review it. |
No worries at all, @serhiy-storchaka! Thanks a lot for reviewing it and for the merge! :) |
Thanks @jdetrey for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
(cherry picked from commit 6087315) Co-authored-by: Jérémie Detrey <[email protected]>
GH-115974 is a backport of this pull request to the 3.12 branch. |
(cherry picked from commit 6087315) Co-authored-by: Jérémie Detrey <[email protected]>
GH-115975 is a backport of this pull request to the 3.11 branch. |
) (GH-115974) (cherry picked from commit 6087315) Co-authored-by: Jérémie Detrey <[email protected]>
) (GH-115975) (cherry picked from commit 6087315) Co-authored-by: Jérémie Detrey <[email protected]>
A couple of other missing translations are addressed by #12711.
Incidentally, this also fixes a bug with the "(default: …)" help string of the
BooleanOptionalAction
class: when used with theArgumentDefaultsHelpFormatter
, a second "(default: …)" string would be added to the help text. This was due to the fact that thedefault
value was immediately expanded in the help string, and thus wasn't detected as a "(default: …)" string by theArgumentDefaultsHelpFormatter._get_help_string()
method (which relies on finding a named format argument%(default)
inside the help string).https://bugs.python.org/issue44865