Skip to content

[argparse] Missing translations #89028

Closed
Closed

Description

@jdetrey
mannequin
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']

    Activity

    1. jdetrey commented on Aug 8, 2021

      jdetreymannequin
      MannequinAuthor

      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.

    2. added
      3.11only security fixes
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Aug 8, 2021
    3. 2 remaining items

    4. jdetrey commented on Aug 24, 2021

      jdetreymannequin
      MannequinAuthor

      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.

    5. transferred this issue fromon Apr 10, 2022
    6. moved this from Bugs to Doc issues in Argparse issueson Feb 27, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.11only security fixesstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions