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

Need tests for gettext support in argparse #124432

Closed
serhiy-storchaka opened this issue Sep 24, 2024 · 2 comments
Closed

Need tests for gettext support in argparse #124432

serhiy-storchaka opened this issue Sep 24, 2024 · 2 comments
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes tests Tests in the Lib/test dir

Comments

@serhiy-storchaka
Copy link
Member

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.

@serhiy-storchaka serhiy-storchaka added tests Tests in the Lib/test dir 3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes labels Sep 24, 2024
@tomasr8
Copy link
Member

tomasr8 commented Sep 24, 2024

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

@serhiy-storchaka
Copy link
Member Author

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
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes tests Tests in the Lib/test dir
Projects
Status: Doc issues
Development

No branches or pull requests

2 participants