Skip to content

Need tests for gettext support in argparse #124432

Closed

Description

@serhiy-storchaka

argparse supports localization of error messages and helps with gettext. But currently there is no any test for gettext support in argparse. There were several bugs related to improper use of gettext and we cannot be sure that all bugs are fixed or that old bugs will not reappear. We need to add tests for every translated string in argparse.

Activity

  1. added
    testsTests in the Lib/test dir
    3.12only security fixes
    3.13only security fixes
    3.14bugs and security fixes
    on Sep 24, 2024
  2. tomasr8 commented on Sep 24, 2024

    @tomasr8
    Member

    This issue seems related: #124295
    Anyway, what's best way to test this? Run pygettext and compare the PO file?

  3. serhiy-storchaka commented on Sep 24, 2024

    @serhiy-storchaka
    MemberAuthor

    Then closing this issue.

    I thought that we should run the parser with different options to produce different error messages with installed special translator that transforms the original text in simply recognizable way. But there may be better ways.

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.12only security fixes3.13only security fixes3.14bugs and security fixestestsTests in the Lib/test dir

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions