Skip to content
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] Missing translations #89028

Closed
jdetrey mannequin opened this issue Aug 8, 2021 · 3 comments
Closed

[argparse] Missing translations #89028

jdetrey mannequin opened this issue Aug 8, 2021 · 3 comments
Labels
3.11 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@jdetrey
Copy link
Mannequin

jdetrey mannequin commented Aug 8, 2021

BPO 44865
Nosy @rhettinger, @terryjreedy, @jdetrey
PRs
  • bpo-44865: Missing translations in argparse #27668
  • 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

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2021-08-08.14:12:29.260>
    labels = ['type-bug', 'library', '3.11']
    title = '[argparse] Missing translations'
    updated_at = <Date 2021-08-24.19:08:57.995>
    user = 'https://github.com/jdetrey'

    bugs.python.org fields:

    activity = <Date 2021-08-24.19:08:57.995>
    actor = 'jdetrey'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2021-08-08.14:12:29.260>
    creator = 'jdetrey'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 44865
    keywords = ['patch']
    message_count = 3.0
    messages = ['399216', '399569', '400227']
    nosy_count = 4.0
    nosy_names = ['rhettinger', 'terry.reedy', 'paul.j3', 'jdetrey']
    pr_nums = ['27668']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue44865'
    versions = ['Python 3.11']

    @jdetrey
    Copy link
    Mannequin Author

    jdetrey mannequin commented Aug 8, 2021

    Dear all,

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

    Some have already been reported:

    However, some others remain:

    • the "default" help text for BooleanOptionalAction at 3.9/Lib/argparse.py:878 (which, incidentally, will be duplicated when used with ArgumentDefaultsHelpFormatter);
    • the "argument %(argument_name)s: %(message)s" error message at 3.9/Lib/argparse.py:751;
    • the formatted section heading at 3.9/Lib/argparse.py:225: 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,
    Jérémie.

    @jdetrey jdetrey mannequin added 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Aug 8, 2021
    @terryjreedy
    Copy link
    Member

    Same comment as for bpo-44964, plus note that 3.8 and before only get security patches. Also, 3.9,3.10 only get bug fixes and I don't know if this qualifies.

    @terryjreedy terryjreedy removed 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes labels Aug 13, 2021
    @jdetrey
    Copy link
    Mannequin Author

    jdetrey mannequin commented Aug 24, 2021

    Hi again!

    As for bpo-44864, I've just added a short blurb to the PR.

    The fact that a few strings are missing calls to the localization function (whereas most of the other strings in argparse are already localized) might push this issue toward the bug-fix side, but, as for bpo-44864, this is very minor and I really don't mind if it only gets merged into future releases.

    Thanks!

    Kind regards,
    Jérémie.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.11 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    Status: Doc issues
    Status: Done
    Development

    No branches or pull requests

    2 participants