[master 1/2] Use "Enter" instead of "Return" for the keyboard key. (#1264235)
dashea
installerbot-noreply at redhat.com
Wed Oct 7 14:29:54 UTC 2015
From: David Shea <dshea at redhat.com>
"Enter" is preferrred by Red Hat documentation and is consistent with
what is already being used by translators. Also make sure "Enter" is
capitalized so that it is more obviously referring to a keyboard key.
---
anaconda | 2 +-
pyanaconda/rescue.py | 2 +-
pyanaconda/ui/tui/spokes/__init__.py | 2 +-
pyanaconda/ui/tui/spokes/progress.py | 2 +-
pyanaconda/ui/tui/tuiobject.py | 2 +-
tests/gettext_tests/style_guide.py | 9 ++++++++-
6 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/anaconda b/anaconda
index 939de1e..3cf8161 100755
--- a/anaconda
+++ b/anaconda
@@ -464,7 +464,7 @@ def check_memory(anaconda, options, display_mode=None):
"MB of memory, but you only have %(total_ram)s MB\n.")
reboot_extra = _('\n'
- 'Press <return> to reboot your system.\n')
+ 'Press <Enter> to reboot your system.\n')
livecd_title = _("Not enough RAM")
livecd_extra = _(" Try the text mode installer by running:\n\n"
"'/usr/bin/liveinst -T'\n\n from a root "
diff --git a/pyanaconda/rescue.py b/pyanaconda/rescue.py
index 74b9d06..722b1f6 100644
--- a/pyanaconda/rescue.py
+++ b/pyanaconda/rescue.py
@@ -435,7 +435,7 @@ def apply(self):
def prompt(self, args=None):
""" Override the default TUI prompt."""
- return _("Please press <return> to get a shell. ")
+ return _("Please press <Enter> to get a shell. ")
def input(self, args, key):
"""Move along home."""
diff --git a/pyanaconda/ui/tui/spokes/__init__.py b/pyanaconda/ui/tui/spokes/__init__.py
index f6692bf..cf952b3 100644
--- a/pyanaconda/ui/tui/spokes/__init__.py
+++ b/pyanaconda/ui/tui/spokes/__init__.py
@@ -190,7 +190,7 @@ def prompt(self, entry=None):
self.value = cryptPassword(pw)
return None
else:
- return _("Enter new value for '%s' and press enter\n") % entry.title
+ return _("Enter a new value for '%s' and press <Enter>\n") % entry.title
def input(self, entry, key):
if entry.aux.match(key):
diff --git a/pyanaconda/ui/tui/spokes/progress.py b/pyanaconda/ui/tui/spokes/progress.py
index a81b93e..a6e62da 100644
--- a/pyanaconda/ui/tui/spokes/progress.py
+++ b/pyanaconda/ui/tui/spokes/progress.py
@@ -140,7 +140,7 @@ def refresh(self, args=None):
return True
def prompt(self, args=None):
- return(_("\tInstallation complete. Press return to quit"))
+ return(_("\tInstallation complete. Press Enter to quit"))
def input(self, args, key):
# There is nothing to do here, just raise to exit the spoke
diff --git a/pyanaconda/ui/tui/tuiobject.py b/pyanaconda/ui/tui/tuiobject.py
index 5b13f3b..2b39aae 100644
--- a/pyanaconda/ui/tui/tuiobject.py
+++ b/pyanaconda/ui/tui/tuiobject.py
@@ -48,7 +48,7 @@ def refresh(self, args=None):
return True
def prompt(self, args=None):
- return _("Press enter to exit.")
+ return _("Press Enter to exit.")
def input(self, args, key):
"""This dialog is closed by any input."""
diff --git a/tests/gettext_tests/style_guide.py b/tests/gettext_tests/style_guide.py
index b326f38..c71fc45 100755
--- a/tests/gettext_tests/style_guide.py
+++ b/tests/gettext_tests/style_guide.py
@@ -32,7 +32,14 @@
'btrfs': 'Btrfs',
'[Cc]an not': 'cannot',
'(?i)mountpoint': 'mount point',
- 'Ok': 'OK'}
+ 'Ok': 'OK',
+ # Find instances of "return" that are referring to a keyboard key
+ '(?i)<return>': '<Enter>',
+ '(?i)press return': 'press Enter',
+ # Make sure "Enter" is capitalized
+ '<enter>': '<Enter>',
+ '[Pp]ress enter': 'press Enter'
+ }
# Sometimes we need to use a bad string, or it's just too much of a pain to
# write a more specific regex. List occurrences here.
--
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/ddf8342422d22f0309b69ec8078c22b7a976a415
More information about the anaconda-patches
mailing list