Incomplete Internationalization in Argparse Module

Hello, all. I was wondering if the following string was left untouched by gettext for a purpose (from line 720 of argparse.py, in class ArgumentError): 'argument %(argument_name)s: %(message)s' There may be other untranslatable strings in the argparse module, but I have yet to encounter them in the wild. Thank you.

On Fri, 8 Apr 2016 at 14:05 Grady Martin <sunnycemetery@gmail.com> wrote:
Hello, all. I was wondering if the following string was left untouched by gettext for a purpose (from line 720 of argparse.py, in class ArgumentError):
'argument %(argument_name)s: %(message)s'
There may be other untranslatable strings in the argparse module, but I have yet to encounter them in the wild.
Probably so that anyone introspecting on the error message can count on somewhat of a consistent format (comes into play with doctest typically).

That string looks like it is aimed at the developer, not the user of the program, so it makes sense not to translate it. On Fri, Apr 8, 2016 at 2:07 PM, Brett Cannon <brett@python.org> wrote:
On Fri, 8 Apr 2016 at 14:05 Grady Martin <sunnycemetery@gmail.com> wrote:
Hello, all. I was wondering if the following string was left untouched by gettext for a purpose (from line 720 of argparse.py, in class ArgumentError):
'argument %(argument_name)s: %(message)s'
There may be other untranslatable strings in the argparse module, but I have yet to encounter them in the wild.
Probably so that anyone introspecting on the error message can count on somewhat of a consistent format (comes into play with doctest typically).
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/guido%40python.org
-- --Guido van Rossum (python.org/~guido)

I agree. However, an incorrect choice for an argument with a choices parameter results in this string. On 2016年04月08日 18時12分, Guido van Rossum wrote:
That string looks like it is aimed at the developer, not the user of the program, so it makes sense not to translate it.
On Fri, Apr 8, 2016 at 2:07 PM, Brett Cannon <brett@python.org> wrote:
On Fri, 8 Apr 2016 at 14:05 Grady Martin <sunnycemetery@gmail.com> wrote:
Hello, all. I was wondering if the following string was left untouched by gettext for a purpose (from line 720 of argparse.py, in class ArgumentError):
'argument %(argument_name)s: %(message)s'
There may be other untranslatable strings in the argparse module, but I have yet to encounter them in the wild.
Probably so that anyone introspecting on the error message can count on somewhat of a consistent format (comes into play with doctest typically).
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/guido%40python.org
-- --Guido van Rossum (python.org/~guido)

OK, so this should be taken to the bug tracker. On Saturday, April 9, 2016, Grady Martin <sunnycemetery@gmail.com> wrote:
I agree. However, an incorrect choice for an argument with a choices parameter results in this string.
On 2016年04月08日 18時12分, Guido van Rossum wrote:
That string looks like it is aimed at the developer, not the user of the program, so it makes sense not to translate it.
On Fri, Apr 8, 2016 at 2:07 PM, Brett Cannon <brett@python.org> wrote:
On Fri, 8 Apr 2016 at 14:05 Grady Martin <sunnycemetery@gmail.com> wrote:
Hello, all. I was wondering if the following string was left untouched by gettext for a purpose (from line 720 of argparse.py, in class ArgumentError):
'argument %(argument_name)s: %(message)s'
There may be other untranslatable strings in the argparse module, but I have yet to encounter them in the wild.
Probably so that anyone introspecting on the error message can count on somewhat of a consistent format (comes into play with doctest typically).
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/guido%40python.org
-- --Guido van Rossum (python.org/~guido)
-- --Guido (mobile)

Excellent. Issue/patch here: http://bugs.python.org/issue26726 On 2016年04月09日 08時16分, Guido van Rossum wrote:
OK, so this should be taken to the bug tracker.
On Saturday, April 9, 2016, Grady Martin <sunnycemetery@gmail.com> wrote:
I agree. However, an incorrect choice for an argument with a choices parameter results in this string.
On 2016年04月08日 18時12分, Guido van Rossum wrote:
That string looks like it is aimed at the developer, not the user of the program, so it makes sense not to translate it.
On Fri, Apr 8, 2016 at 2:07 PM, Brett Cannon <brett@python.org> wrote:
On Fri, 8 Apr 2016 at 14:05 Grady Martin <sunnycemetery@gmail.com> wrote:
Hello, all. I was wondering if the following string was left untouched by gettext for a purpose (from line 720 of argparse.py, in class ArgumentError):
'argument %(argument_name)s: %(message)s'
There may be other untranslatable strings in the argparse module, but I have yet to encounter them in the wild.
Probably so that anyone introspecting on the error message can count on somewhat of a consistent format (comes into play with doctest typically).
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/guido%40python.org
-- --Guido van Rossum (python.org/~guido)
-- --Guido (mobile)
participants (3)
-
Brett Cannon
-
Grady Martin
-
Guido van Rossum