-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
[argparse] Do not translate user-provided strings in ArgumentParser.add_subparsers()
#89027
Comments
Dear all, In the def add_subparsers(self, **kwargs):
# [...]
if 'title' in kwargs or 'description' in kwargs:
title = _(kwargs.pop('title', 'subcommands'))
description = _(kwargs.pop('description', None)) When elements However, the default title string title = kwargs.pop('title', _('subcommands'))
description = kwargs.pop('description', None) I'll submit a pull request with this change. Kind regards, |
Jérémie, what does the doc say about translation? This will likely determine whether the is a bug report or a future-version-only enhancement request. The PR changes the two lines as indicated above and the CLA is signed. A blurb will be needed if this is to me merged. (Not my decision.) |
Hi Terry, Thanks for the feedback! I've just added a blurb to the PR. Regarding the issue type, even though this is indeed translation-related, I'd lean toward a bug report rather than an enhancement request: the fact that user-provided strings get fed to the localization function by the However, since this is very minor, I'm totally fine with this being applied only to future versions! Thanks again! Kind regards, |
'bug', for the tracker, mean a divergence between implementation and doc. Hence my question about the current doc. We could decide that either is wrong and should be changed. A change to meet 'expectations' and fix a 'design bug' is an enhancement. |
Hi, Thank you for the clarification! In fact, I'm afraid the localization feature of But the fact remains that the This behavior discrepancy is what prompted me to report this as a bug in the first place, but since this is an undocumented feature anyway, I'm perfectly fine with this being categorized as an enhancement instead. Kind regards, |
This is a bug ( |
ArgumentParser.add_subparsers()
#27667Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: