You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Argument error messages display the untranslatable text 'argument ', which should be translatable to other languages, just like it's possible to do with the rest of the constructed error message.
This message isn't used (only?) in exceptions... it's a message that is given to the console, to notify the user when she didn't provide correct parameters. For example:
These are console messages localized into Spanish. The "error:" part is translatable, but it's the same word in Spanish than in English. The "argument" part is what isn't translatable, and it's taken from this "exception".
I confirmed that my proposed patch, translating that particular string, allows giving a fully localized console output to the user in Spanish, such as:
./drt.py: error: parámetro -l/--min-length: se esperaba un parámetro
Activity
DjMorgul commentedon Jan 27, 2020
Argument error messages display the untranslatable text 'argument ', which should be translatable to other languages, just like it's possible to do with the rest of the constructed error message.
[-]Allow translating argument error messages[/-][+]Allow translating argparse error messages[/+][-]Allow translating argument error messages[/-][+]Allow translating argparse error messages[/+]shihai1991 commentedon Feb 1, 2020
Paste José's comment from PR17169:
This message isn't used (only?) in exceptions... it's a message that is given to the console, to notify the user when she didn't provide correct parameters. For example:
These are console messages localized into Spanish. The "error:" part is translatable, but it's the same word in Spanish than in English. The "argument" part is what isn't translatable, and it's taken from this "exception".
I confirmed that my proposed patch, translating that particular string, allows giving a fully localized console output to the user in Spanish, such as:
./drt.py: error: parámetro -l/--min-length: se esperaba un parámetroshihai1991 commentedon Feb 1, 2020
Users interact with console's output, so translated the output info is fine to me.
Hi,raymond、paul. What's your opinion?
iritkatriel commentedon Dec 14, 2021
Closed bpo-26726 as duplicate of this.
savannahostrowski commentedon Sep 23, 2024
This was addressed via #27668 and #17169