summaryrefslogtreecommitdiff
path: root/src/click/termui.py
diff options
context:
space:
mode:
authorDavid Lord <davidism@gmail.com>2021-04-03 12:34:17 -0700
committerDavid Lord <davidism@gmail.com>2021-04-03 15:06:27 -0700
commit8d49e146ab8c2312e7917bb7c3f8abf01b8b55bf (patch)
tree145b7c3b9bb236b5969688ed2e5c8b67a3bd2e0b /src/click/termui.py
parent03e2fee8a99f08976aef0d38cb3fa372a94c928a (diff)
downloadclick-8d49e146ab8c2312e7917bb7c3f8abf01b8b55bf.tar.gz
mark more messages for translation
Diffstat (limited to 'src/click/termui.py')
-rw-r--r--src/click/termui.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/click/termui.py b/src/click/termui.py
index 72b03f8..3a7e085 100644
--- a/src/click/termui.py
+++ b/src/click/termui.py
@@ -162,7 +162,7 @@ def prompt(
result = value_proc(value)
except UsageError as e:
if hide_input:
- echo(_("Error: the value you entered was invalid"), err=err)
+ echo(_("Error: The value you entered was invalid."), err=err)
else:
echo(_("Error: {e.message}").format(e=e), err=err) # noqa: B306
continue
@@ -174,7 +174,7 @@ def prompt(
break
if value == value2:
return result
- echo(_("Error: the two entered values do not match"), err=err)
+ echo(_("Error: The two entered values do not match."), err=err)
def confirm(
@@ -732,7 +732,7 @@ def raw_terminal():
return f()
-def pause(info="Press any key to continue ...", err=False):
+def pause(info=None, err=False):
"""This command stops execution and waits for the user to press any
key to continue. This is similar to the Windows batch "pause"
command. If the program is not run through a terminal, this command
@@ -743,12 +743,17 @@ def pause(info="Press any key to continue ...", err=False):
.. versionadded:: 4.0
Added the `err` parameter.
- :param info: the info string to print before pausing.
+ :param info: The message to print before pausing. Defaults to
+ ``"Press any key to continue..."``.
:param err: if set to message goes to ``stderr`` instead of
``stdout``, the same as with echo.
"""
if not isatty(sys.stdin) or not isatty(sys.stdout):
return
+
+ if info is None:
+ info = _("Press any key to continue...")
+
try:
if info:
echo(info, nl=False, err=err)