[orca] String-o-rama! * Fix for bug 671755 - Orca doesn't announce the AltGr key * Fix for bug 701166 - "Sc
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] String-o-rama! * Fix for bug 671755 - Orca doesn't announce the AltGr key * Fix for bug 701166 - "Sc
- Date: Sun, 16 Jun 2013 22:40:37 +0000 (UTC)
commit 3975e67ff4feb9a3a0329bf84468283906933a88
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Sun Jun 16 18:23:50 2013 -0400
String-o-rama!
* Fix for bug 671755 - Orca doesn't announce the AltGr key
* Fix for bug 701166 - "Screen reader preferences"; not "Orca preferences"
* Fix for bug 701187 - "Screen reader settings"; not "Orca settings"
* And a number of similar changes (e.g. the name of the Orca modifier,
along with various other places where "Orca" was being used instead of
"screen reader")
* Also more refactoring, removal of duplicate strings, removal of no
longer needed messages, etc., etc., etc.
orca.desktop.in | 2 +-
po/POTFILES.in | 9 +-
src/orca/app_gui_prefs.py | 20 +--
src/orca/cmdnames.py | 6 +-
src/orca/guilabels.py | 269 ++++++++++++++++++++++++-
src/orca/input_event.py | 3 +-
src/orca/keybindings.py | 9 +-
src/orca/keynames.py | 2 +-
src/orca/messages.py | 295 +++++++++++++++++++++++++--
src/orca/orca-find.ui | 2 +-
src/orca/orca-setup.ui | 4 +-
src/orca/orca_bin.py.in | 126 ++----------
src/orca/orca_console_prefs.py | 222 +++++----------------
src/orca/orca_gui_find.py | 5 +-
src/orca/orca_gui_navlist.py | 12 +-
src/orca/orca_gui_prefs.py | 440 ++++++----------------------------------
src/orca/orca_gui_profile.py | 24 +--
src/orca/orca_i18n.py.in | 4 +-
18 files changed, 704 insertions(+), 750 deletions(-)
---
diff --git a/orca.desktop.in b/orca.desktop.in
index 28b7a71..c7fa534 100644
--- a/orca.desktop.in
+++ b/orca.desktop.in
@@ -1,5 +1,5 @@
[Desktop Entry]
-_Name=Orca
+_Name=Screen Reader
_GenericName=Screen Reader
_X-GNOME-FullName=Orca Screen Reader
_Comment=Provide access to graphical desktop environments via synthesized speech and/or refreshable braille
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 720f161..c767a49 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -3,7 +3,6 @@
[encoding: UTF-8]
orca.desktop.in
orca-autostart.desktop.in
-src/orca/app_gui_prefs.py
src/orca/braille_rolenames.py
src/orca/brltablenames.py
src/orca/chnames.py
@@ -11,18 +10,12 @@ src/orca/cmdnames.py
src/orca/flat_review.py
src/orca/generator.py
src/orca/guilabels.py
-src/orca/keybindings.py
src/orca/keynames.py
+src/orca/keybindings.py
src/orca/messages.py
src/orca/notification_messages.py
src/orca/object_properties.py
-src/orca/orca_bin.py.in
-src/orca/orca_console_prefs.py
[type: gettext/glade]src/orca/orca-find.ui
-src/orca/orca_gui_find.py
-src/orca/orca_gui_navlist.py
-src/orca/orca_gui_prefs.py
-src/orca/orca_gui_profile.py
[type: gettext/glade]src/orca/orca-setup.ui
src/orca/phonnames.py
src/orca/scripts/apps/evolution/speech_generator.py
diff --git a/src/orca/app_gui_prefs.py b/src/orca/app_gui_prefs.py
index f0d065a..74b85cd 100644
--- a/src/orca/app_gui_prefs.py
+++ b/src/orca/app_gui_prefs.py
@@ -33,6 +33,7 @@ import sys
from . import app_prefs
from . import braille
from . import debug
+from . import guilabels
from . import input_event
from . import keybindings
from . import messages
@@ -43,7 +44,6 @@ from . import script_manager
from . import settings_manager
from . import settings
from . import speech
-from .orca_i18n import _
_scriptManager = script_manager.getManager()
_settingsManager = settings_manager.getManager()
@@ -128,12 +128,9 @@ class OrcaSetupGUI(orca_gui_prefs.OrcaSetupGUI):
assumes that the GUI has already been created.
"""
- # Adjust the title of the app-specific Orca Preferences dialog to
- # include the name of the application.
- #
self.app = orca_state.activeScript.app
self.applicationName = self.app.name
- title = _("Orca Preferences for %s") % self.applicationName
+ title = guilabels.PREFERENCES_APPLICATION_TITLE % self.applicationName
self.get_widget("orcaSetupWindow").set_title(title)
orca_gui_prefs.OrcaSetupGUI.showGUI(self)
@@ -213,12 +210,8 @@ class OrcaSetupGUI(orca_gui_prefs.OrcaSetupGUI):
self.defKeyBindings = defScript.getKeyBindings()
iterApp = self._createNode(applicationName)
- iterOrca = self._createNode(_("Orca"))
-
- # Translators: this refers to commands that do not currently have
- # an associated key binding.
- #
- iterUnbound = self._createNode(_("Unbound"))
+ iterOrca = self._createNode(guilabels.KB_GROUP_DEFAULT)
+ iterUnbound = self._createNode(guilabels.KB_GROUP_UNBOUND)
# Find the key bindings that are in the application script but
# not in the default script.
@@ -284,13 +277,8 @@ def showPreferencesUI():
appScript = orca_state.activeScript
- # The name of the application that currently has focus.
- #
applicationName = orca_state.activeScript.app.name
if not orca_state.appOS and not orca_state.orcaOS:
- line = messages.STARTING_ORCA_APP_PREFS % applicationName
- appScript.presentMessage(line)
-
prefsDict = {}
for key in settings.userCustomizableSettings:
prefsDict[key] = _settingsManager.getSetting(key)
diff --git a/src/orca/cmdnames.py b/src/orca/cmdnames.py
index edd47b6..0903241 100644
--- a/src/orca/cmdnames.py
+++ b/src/orca/cmdnames.py
@@ -80,7 +80,7 @@ PRESENT_TITLE = _("Speaks the title bar.")
# Translators: the Orca "Find" dialog allows a user to search for text in a
# window and then move focus to that text. For example, they may want to find
# the "OK" button.
-SHOW_FIND_GUI = _("Opens the Orca Find dialog.")
+SHOW_FIND_GUI = _("Opens the Find dialog.")
# Translators: the Orca "Find" dialog allows a user to search for text in a
# window and then move focus to that text. For example, they may want to find
@@ -394,7 +394,7 @@ TOGGLE_SPEECH = _("Toggles the silencing of speech.")
# Translators: this string is associated with the keyboard shortcut to quit
# Orca.
-QUIT_ORCA = _("Quits Orca")
+QUIT_ORCA = _("Quits the screen reader")
# Translators: the preferences configuration dialog is the dialog that allows
# users to set their preferences for Orca.
@@ -658,7 +658,7 @@ CARET_NAVIGATION_EXPAND_COMBO_BOX = \
# often broken, so Orca needs to provide its own support. As such, Orca offers
# the user the ability to toggle which application is controlling the caret.
CARET_NAVIGATION_TOGGLE = \
- _("Switches between Gecko native and Orca caret navigation.")
+ _("Switches between native and screen-reader caret navigation.")
# Translators: A live region is an area of a web page that is periodically
# updated, e.g. stock ticker. http://www.w3.org/TR/wai-aria/terms#def_liveregion
diff --git a/src/orca/guilabels.py b/src/orca/guilabels.py
index 1376519..c0af0a5 100644
--- a/src/orca/guilabels.py
+++ b/src/orca/guilabels.py
@@ -31,6 +31,32 @@ __license__ = "LGPL"
from .orca_i18n import _, C_
+# Translators: This string appears on a button in a dialog. "Activating" the
+# selected item will perform the action that one would expect to occur if the
+# object were clicked on with the mouse. If the object is a link, activating
+# it will bring you to a new page. If the object is a button, activating it
+# will press the button. If the object is a combobox, activating it will expand
+# it to show all of its contents. And so on.
+ACTIVATE = _("_Activate")
+
+# Translators: A single braille cell on a refreshable braille display consists
+# of 8 dots. Dot 7 is the dot in the bottom left corner. If the user selects
+# this option, Dot 7 will be used to 'underline' text of interest, e.g. when
+# "marking"/indicating that a given word is bold.
+BRAILLE_DOT_7 = _("Dot _7")
+
+# Translators: A single braille cell on a refreshable braille display consists
+# of 8 dots. Dot 8 is the dot in the bottom right corner. If the user selects
+# this option, Dot 8 will be used to 'underline' text of interest, e.g. when
+# "marking"/indicating that a given word is bold.
+BRAILLE_DOT_8 = _("Dot _8")
+
+# Translators: A single braille cell on a refreshable braille display consists
+# of 8 dots. Dots 7-8 are the dots at the bottom. If the user selects this
+# option, Dots 7-8 will be used to 'underline' text of interest, e.g. when
+# "marking"/indicating that a given word is bold.
+BRAILLE_DOT_7_8 = _("Dots 7 an_d 8")
+
# Translators: Orca has had to implement its own caret navigation model to work
# around issues in Gecko/Firefox. In some versions of Firefox, we must perform
# a focus grab on each object being navigated in order for things to work as
@@ -83,12 +109,56 @@ CHAT_SPEAK_MESSAGES_ACTIVE = _("A channel only if its _window is active")
# chat room prior to presenting an incoming message.
CHAT_SPEAK_ROOM_NAME = _("_Speak Chat Room name")
+# Translators: Orca's keybindings support double and triple "clicks" or key
+# presses, similar to using a mouse. This string appears in Orca's preferences
+# dialog after a keybinding which requires a double click.
+CLICK_COUNT_DOUBLE = _("double click")
+
+# Translators: Orca's keybindings support double and triple "clicks" or key
+# presses, similar to using a mouse. This string appears in Orca's preferences
+# dialog after a keybinding which requires a triple click.
+CLICK_COUNT_TRIPLE = _("triple click")
+
# Translators: This is a label which will appear in the list of available speech
# engines as a special item. It refers to the default engine configured within
# the speech subsystem. Apart from this item, the user will have a chance to
# select a particular speech engine by its real name (Festival, IBMTTS, etc.)
DEFAULT_SYNTHESIZER = _("Default Synthesizer")
+# Translators: This is a label for a column header in Orca's pronunciation
+# dictionary. The pronunciation dictionary allows the user to correct words
+# which the speech synthesizer mispronounces (e.g. a person's name, a technical
+# word) or doesn't pronounce as the user desires (e.g. an acronym) by providing
+# an alternative string. The "Actual String" here refers to the word to be
+# corrected as it would actually appear in text being read. Example: "LOL".
+DICTIONARY_ACTUAL_STRING = _("Actual String")
+
+# Translators: This is a label for a column header in Orca's pronunciation
+# dictionary. The pronunciation dictionary allows the user to correct words
+# which the speech synthesizer mispronounces (e.g. a person's name, a technical
+# word) or doesn't pronounce as the user desires (e.g. an acronym) by providing
+# an alternative string. The "Replacement String" here refers to how the user
+# would like the "Actual String" to be pronounced by the speech synthesizer.
+# Example: "L O L" or "Laughing Out Loud" (for Actual String "LOL").
+DICTIONARY_REPLACEMENT_STRING = _("Replacement String")
+
+# Translators: Orca has an "echo" feature to present text as it is being written
+# by the user. While Orca's "key echo" options present the actual keyboard keys
+# being pressed, "character echo" presents the character/string of length 1 that
+# is inserted as a result of the keypress.
+ECHO_CHARACTER = _("Enable echo by cha_racter")
+
+# Translators: Orca has an "echo" feature to present text as it is being written
+# by the user. This string refers to a "key echo" option. When this option is
+# enabled, dead keys will be announced when pressed.
+ECHO_DIACRITICAL = _("Enable non-spacing _diacritical keys")
+
+# Translators: Orca has a "find" feature which allows the user to search the
+# active application for on screen text and widgets. This label is associated
+# with the setting to begin the search from the current location rather than
+# from the top of the screen.
+FIND_START_AT_CURRENT_LOCATION = _("C_urrent location")
+
# Translators: This is the label for a spinbutton. This option allows the user
# to specify the number of matched characters that must be present before Orca
# speaks the line that contains the results from an application's Find toolbar.
@@ -120,6 +190,160 @@ KB_HEADER_FUNCTION = _("Function")
# commands.
KB_HEADER_KEY_BINDING = _("Key Binding")
+# Translators: This string is a label for the group of Orca commands which
+# can be used in any setting, task, or application. They are not specific
+# to, for instance, web browsing.
+KB_GROUP_DEFAULT = C_("keybindings", "Default")
+
+# Translators: An external braille device has buttons on it that permit the
+# user to create input gestures from the braille device. The braille bindings
+# are what determine the actions Orca will take when the user presses these
+# buttons.
+KB_GROUP_BRAILLE = _("Braille Bindings")
+
+# Translators: This string is a label for the group of Orca commands which
+# do not currently have an associated key binding.
+KB_GROUP_UNBOUND = _("Unbound")
+
+# Translators: Modified is a table column header in Orca's preferences dialog.
+# This column contains a checkbox which indicates whether a key binding
+# for an Orca command has been changed by the user to something other than its
+# default value.
+KB_MODIFIED = C_("keybindings", "Modified")
+
+# Translators: This label refers to the keyboard layout (desktop or laptop).
+KEYBOARD_LAYOUT_DESKTOP = _("_Desktop")
+
+# Translators: Orca's preferences can be configured on a per-application basis,
+# allowing users to customize Orca's behavior, keybindings, etc. to work one
+# way in LibreOffice and another way in a chat application. This string is the
+# title of Orca's application-specific preferences dialog for an application.
+# The string substituted in is the accessible name of the application (e.g.
+# "Gedit", "Firefox", etc.
+PREFERENCES_APPLICATION_TITLE = _("Screen Reader Preferences for %s")
+
+# Translators: This is a table column header. This column consists of a single
+# checkbox. If the checkbox is checked, Orca will indicate the associated item
+# or attribute by "marking" it in braille. "Marking" is not the same as writing
+# out the word; instead marking refers to adding some other indicator, e.g.
+# "underlining" with braille dots 7-8 a word that is bold.
+PRESENTATION_MARK_IN_BRAILLE = _("Mark in braille")
+
+# Translators: "Present Unless" is a column header of the text attributes panel
+# of the Orca preferences dialog. On this panel, the user can select a set of
+# text attributes that they would like spoken and/or indicated in braille.
+# Because the list of attributes could get quite lengthy, we provide the option
+# to always speak/braille a text attribute *unless* its value is equal to the
+# value given by the user in this column of the list. For example, given the
+# text attribute "underline" and a present unless value of "none", the user is
+# stating that he/she would like to have underlined text announced for all cases
+# (single, double, low, etc.) except when the value of underline is none (i.e.
+# when it's not underlined). "Present" here is being used as a verb.
+PRESENTATION_PRESENT_UNLESS = _("Present Unless")
+
+# Translators: This is a table column header. The "Speak" column consists of a
+# single checkbox. If the checkbox is checked, Orca will speak the associated
+# item or attribute (e.g. saying "Bold" as part of the information presented
+# when the user gives the Orca command to obtain the format and font details of
+# the current text).
+PRESENTATION_SPEAK = _("Speak")
+
+# Translators: This is the title of a message dialog informing the user that
+# he/she attempted to save a new user profile under a name which already exists.
+# A "user profile" is a collection of settings which apply to a given task, such
+# as a "Spanish" profile which would use Spanish text-to-speech and Spanish
+# braille and selected when reading Spanish content.
+PROFILE_CONFLICT_TITLE = _("Save Profile As Conflict")
+
+# Translators: This is the label of a message dialog informing the user that
+# he/she attempted to save a new user profile under a name which already exists.
+# A "user profile" is a collection of settings which apply to a given task, such
+# as a "Spanish" profile which would use Spanish text-to-speech and Spanish
+# braille and selected when reading Spanish content.
+PROFILE_CONFLICT_LABEL = _("User Profile Conflict!")
+
+# Translators: This is the message in a dialog informing the user that he/she
+# attempted to save a new user profile under a name which already exists.
+# A "user profile" is a collection of settings which apply to a given task, such
+# as a "Spanish" profile which would use Spanish text-to-speech and Spanish
+# braille and selected when reading Spanish content.
+PROFILE_CONFLICT_MESSAGE = _("Profile %s already exists.\n" \
+ "Continue updating the existing profile with " \
+ "these new changes?")
+
+# Translators: This text is displayed in a message dialog when a user indicates
+# he/she wants to switch to a new user profile which will cause him/her to lose
+# settings which have been altered but not yet saved. A "user profile" is a
+# collection of settings which apply to a given task such as a "Spanish" profile
+# which would use Spanish text-to-speech and Spanish braille and selected when
+# reading Spanish content.
+PROFILE_LOAD_LABEL = _("Load user profile")
+
+# Translators: This text is displayed in a message dialog when a user indicates
+# he/she wants to switch to a new user profile which will cause him/her to lose
+# settings which have been altered but not yet saved. A "user profile" is a
+# collection of settings which apply to a given task such as a "Spanish" profile
+# which would use Spanish text-to-speech and Spanish braille and selected when
+# reading Spanish content.
+PROFILE_LOAD_MESSAGE = \
+ _("You are about to change the active profile. If you\n" \
+ "have just made changes in your preferences, they will\n" \
+ "be dropped at profile load.\n\n" \
+ "Continue loading profile discarding previous changes?")
+
+# Translators: Profiles in Orca make it possible for users to quickly switch
+# amongst a group of pre-defined settings (e.g. an 'English' profile for reading
+# text written in English using an English-language speech synthesizer and
+# braille rules, and a similar 'Spanish' profile for reading Spanish text. The
+# following string is the title of a dialog in which users can save a newly-
+# defined profile.
+PROFILE_SAVE_AS_TITLE = _("Save Profile As")
+
+# Translators: Profiles in Orca make it possible for users to quickly switch
+# amongst a group of pre-defined settings (e.g. an 'English' profile for reading
+# text written in English using an English-language speech synthesizer and
+# braille rules, and a similar 'Spanish' profile for reading Spanish text. The
+# following string is the label for a text entry in which the user enters the
+# name of a new settings profile being saved via the 'Save Profile As' dialog.
+PROFILE_NAME_LABEL = _("_Profile Name:")
+
+# Translators: Orca has a setting which determines which progress bar updates
+# should be announced. Choosing "All" means that Orca will present progress bar
+# updates regardless of what application and window they happen to be in.
+PROGRESS_BAR_ALL = C_("ProgressBar", "All")
+
+# Translators: Orca has a setting which determines which progress bar updates
+# should be announced. Choosing "Application" means that Orca will present
+# progress bar updates as long as the progress bar is in the active application
+# (but not necessarily in the current window).
+PROGRESS_BAR_APPLICATION = C_("ProgressBar", "Application")
+
+# Translators: Orca has a setting which determines which progress bar updates
+# should be announced. Choosing "Window" means that Orca will present progress
+# bar updates as long as the progress bar is in the active window.
+PROGRESS_BAR_WINDOW = C_("ProgressBar", "Window")
+
+# Translators: If this setting is chosen, no punctuation symbols will be spoken
+# as a user reads a document.
+PUNCTUATION_STYLE_NONE = C_("punctuation level", "_None")
+
+# Translators: If this setting is chosen, common punctuation symbols (like
+# comma, period, question mark) will not be spoken as a user reads a document,
+# but less common symbols (such as #, @, $) will.
+PUNCTUATION_STYLE_SOME = _("So_me")
+
+# Translators: If this setting is chosen, the majority of punctuation symbols
+# will be spoken as a user reads a document.
+PUNCTUATION_STYLE_MOST = _("M_ost")
+
+# Translators: If this setting is chosen and the user is reading over an entire
+# document, Orca will pause at the end of each line.
+SAY_ALL_STYLE_LINE = _("Line")
+
+# Translators: If this setting is chosen and the user is reading over an entire
+# document, Orca will pause at the end of each sentence.
+SAY_ALL_STYLE_SENTENCE = _("Sentence")
+
# Translators: Orca has a command that presents a list of structural navigation
# objects in a dialog box so that users can navigate more quickly than they
# could with native keyboard navigation. This is the title for a column which
@@ -348,6 +572,14 @@ PAGE_NAVIGATION = _("Page Navigation")
READ_PAGE_UPON_LOAD = \
_("Automatically start speaking a page when it is first _loaded")
+# Translators: Different speech systems and speech engines work differently when
+# it comes to handling pauses (e.g. sentence boundaries). This property allows
+# the user to specify whether speech should be sent to the speech synthesis
+# system immediately when a pause directive is enountered or if it should be
+# queued up and sent to the speech synthesis system once the entire set of
+# utterances has been calculated.
+SPEECH_BREAK_INTO_CHUNKS = _("Break speech into ch_unks between pauses")
+
# Translators: This string will appear in the list of available voices for the
# current speech engine. "%s" will be replaced by the name of the current speech
# engine, such as "Festival default voice" or "IBMTTS default voice". It refers
@@ -356,6 +588,26 @@ READ_PAGE_UPON_LOAD = \
# available "real" voices provided by the speech engine.
SPEECH_DEFAULT_VOICE = _("%s default voice")
+# Translators: This refers to the voice used by Orca when presenting the content
+# of the screen and other messages.
+SPEECH_VOICE_TYPE_DEFAULT = C_("VoiceType", "Default")
+
+# Translators: This refers to the voice used by Orca when presenting one or more
+# characters which is part of a hyperlink.
+SPEECH_VOICE_TYPE_HYPERLINK = C_("VoiceType", "Hyperlink")
+
+# Translators: This refers to the voice used by Orca when presenting information
+# which is not displayed on the screen as text, but is still being communicated
+# by the system in some visual fashion. For instance, Orca says "misspelled" to
+# indicate the presence of the red squiggly line found under a spelling error;
+# Orca might say "3 of 6" when a user Tabs into a list of six items and the
+# third item is selected. And so on.
+SPEECH_VOICE_TYPE_SYSTEM = C_("VoiceType", "System")
+
+# Translators: This refers to the voice used by Orca when presenting one or more
+# characters which is written in uppercase.
+SPEECH_VOICE_TYPE_UPPERCASE = C_("VoiceType", "Uppercase")
+
# Translators this label refers to the name of particular speech synthesis
# system. (http://devel.freebsoft.org/speechd)
SPEECH_DISPATCHER = _("Speech Dispatcher")
@@ -377,6 +629,11 @@ TABLE_NAVIGATION = _("Table Navigation")
# blank cells when navigating tables in document content.
TABLE_SKIP_BLANK_CELLS = _("Skip _blank cells")
+# Translators: When users are navigating a table, they sometimes want the entire
+# row of a table read; other times they want just the current cell presented to
+# them. This label is associated with the default presentation to be used.
+TABLE_SPEAK_CELL = _("Speak _cell")
+
# Translators: This is a label for an option to tell Orca whether or not it
# should speak table cell coordinates in document content.
TABLE_SPEAK_CELL_COORDINATES = _("Speak _cell coordinates")
@@ -386,14 +643,22 @@ TABLE_SPEAK_CELL_COORDINATES = _("Speak _cell coordinates")
# a particular table cell spans in a table).
TABLE_SPEAK_CELL_SPANS = _("Speak _multiple cell spans")
+# Translators: This is a table column header. "Attribute" here refers to text
+# attributes such as bold, underline, family-name, etc.
+TEXT_ATTRIBUTE_NAME = _("Attribute Name")
+
# Translators: Gecko native caret navigation is where Firefox itself controls
# how the arrow keys move the caret around HTML content. It's often broken, so
# Orca needs to provide its own support. As such, Orca offers the user the
# ability to switch between the Firefox mode and the Orca mode. This is the
# label of a checkbox in which users can indicate their default preference.
-USE_CARET_NAVIGATION = _("Use _Orca Caret Navigation")
+USE_CARET_NAVIGATION = _("Control caret navigation")
# Translators: Orca provides keystrokes to navigate HTML content in a structural
# manner: go to previous/next header, list item, table, etc. This is the label
# of a checkbox in which users can indicate their default preference.
-USE_STRUCTURAL_NAVIGATION = _("Use Orca _Structural Navigation")
+USE_STRUCTURAL_NAVIGATION = _("Enable _structural navigation")
+
+# Translators: This refers to the amount of information Orca provides about a
+# particular object that receives focus.
+VERBOSITY_LEVEL_BRIEF = _("Brie_f")
diff --git a/src/orca/input_event.py b/src/orca/input_event.py
index c3ad695..52c7938 100644
--- a/src/orca/input_event.py
+++ b/src/orca/input_event.py
@@ -259,7 +259,8 @@ class KeyboardEvent(InputEvent):
return self.event_string in \
['Alt_L', 'Alt_R', 'Control_L', 'Control_R',
- 'Shift_L', 'Shift_R', 'Meta_L', 'Meta_R']
+ 'Shift_L', 'Shift_R', 'Meta_L', 'Meta_R',
+ 'ISO_Level3_Shift']
def isOrcaModifier(self):
"""Return True if this is the Orca modifier key."""
diff --git a/src/orca/keybindings.py b/src/orca/keybindings.py
index b15b0c4..5ac6bab 100644
--- a/src/orca/keybindings.py
+++ b/src/orca/keybindings.py
@@ -103,7 +103,14 @@ def getModifierNames(mods):
text = ""
if mods & settings.ORCA_MODIFIER_MASK:
- text += _("Orca") + "+"
+ if settings.keyboardLayout == settings.GENERAL_KEYBOARD_LAYOUT_DESKTOP:
+ # Translators: this is presented in a GUI to represent the
+ # "insert" key when used as the Orca modifier.
+ text += _("Insert") + "+"
+ else:
+ # Translators: this is presented in a GUI to represent the
+ # "caps lock" modifier.
+ text += _("Caps_Lock") + "+"
elif mods & (1 << pyatspi.MODIFIER_SHIFTLOCK):
# Translators: this is presented in a GUI to represent the
# "caps lock" modifier.
diff --git a/src/orca/keynames.py b/src/orca/keynames.py
index c639334..d72c774 100644
--- a/src/orca/keynames.py
+++ b/src/orca/keynames.py
@@ -195,7 +195,7 @@ __keynames["Menu"] = _("menu")
# Translators: this is how someone would speak the name of the ISO shift key
#
-__keynames["ISO_Level3_Shift"] = _("ISO level 3 shift")
+__keynames["ISO_Level3_Shift"] = _("Alt Gr")
# Translators: this is how someone would speak the name of the help key
#
diff --git a/src/orca/messages.py b/src/orca/messages.py
index ceef5aa..c08cae3 100644
--- a/src/orca/messages.py
+++ b/src/orca/messages.py
@@ -174,11 +174,108 @@ CARET_CONTROL_GECKO = _("Gecko is controlling the caret.")
# itself controls how the arrow keys move the caret around HTML content. It's
# often broken, so Orca needs to provide its own support. As such, Orca offers
# the user the ability to toggle which application is controlling the caret.
-CARET_CONTROL_ORCA = _("Orca is controlling the caret.")
+CARET_CONTROL_ORCA = _("The screen reader is controlling the caret.")
# Translators: this is the name of a cell in a spreadsheet.
CELL = _("Cell %s")
+# Translators: This is the description of command line option '-d, --disable'
+# which allows the user to specify an option to disable as Orca is started.
+CLI_DISABLE_OPTION = _("Prevent use of option")
+
+# Translators: this is the description of command line option '-e, --enable'
+# which allows the user to specify an option to enable as Orca is started.
+CLI_ENABLE_OPTION = _("Force use of option")
+
+# Translators: This string indicates to the user what should be provided when
+# using the '-e, --enable' or '-d, --disable' command line options.
+CLI_OPTION = _("OPTION")
+
+# Translators: This message is displayed when the user starts Orca from the
+# command line and includes an invalid option or argument. After the message,
+# the list of invalid items, as typed by the user, is displayed.
+CLI_INVALID_OPTIONS = _("The following are not valid: ")
+
+# Translators: This is the description of command line option '-l, --list-apps'
+# which prints the names of running applications which can be seen by assistive
+# technologies such as Orca and Accerciser.
+CLI_LIST_APPS = _("Print the known running applications")
+
+# Translators: This is the description of command line option '-p, --profile'
+# which allows you to specify a profile to be loaded. A profile stores a group
+# of Orca settings configured by the user for a particular purpose, such as a
+# 'Spanish' profile which would include Spanish braille and text-to-speech.
+# An Orca settings file contains one or more profiles.
+CLI_LOAD_PROFILE = _("Load profile")
+
+# Translators: This message is presented to the user when the specified profile
+# could not be loaded. A profile stores a group of Orca settings configured for
+# a particular purpose, such as a Spanish profile which would include Spanish
+# braille and Spanish text-to-speech. The string substituted in is the user-
+# provided profile name.
+CLI_LOAD_PROFILE_ERROR = _("Profile could not be loaded: %s")
+
+# Translators: This message is presented to the user who attempts to launch Orca
+# from some other environment than the graphical desktop.
+CLI_NO_DESKTOP_ERROR = \
+ _("Cannot start the screen reader because it cannot connect to the Desktop.")
+
+# Translators: This message is presented to the user who attempts to launch Orca
+# but the launch fails due to an error related to the settings manager.
+CLI_SETTINGS_MANAGER_ERROR = \
+ _("Could not activate the settings manager. Exiting.")
+
+# Translators: This message is presented to the user when he/she tries to launch
+# Orca, but Orca is already running.
+CLI_OTHER_ORCAS_ERROR = \
+ _('Another screen reader process is already running for this ' \
+ 'session.\nRun "orca --replace" to replace that ' \
+ 'process with a new one.')
+
+# Translators: This string indicates to the user what should be provided when
+# using the '-p, --profile' command line option.
+CLI_PROFILE_NAME = _("NAME")
+
+# Translators: This is the description of command line option '-u, --user-prefs'
+# that allows you to specify an alternate location from which to load the user
+# preferences.
+CLI_LOAD_PREFS = _("Use alternate directory for user preferences")
+
+# Translators: This string indicates to the user what should be provided when
+# using the '-u, --user-prefs' command line option.
+CLI_PREFS_DIR = _("DIR")
+
+# Translators: This is the description of command line option '-r, --replace'
+# which tells Orca to replace any existing Orca process that might be running.
+CLI_REPLACE = _("Replace a currently running instance of this screen reader")
+
+# Translators: This is the description of command line option '--debug' which
+# causes debugging output for Orca to be sent to a file. The YYYY-MM-DD-HH:MM:SS
+# portion of the string indicates the file name will be formed from the current
+# date and time with 'debug' in front and '.out' at the end. The 'debug' and
+# '.out' portions of this string should not be translated (i.e. it should always
+# start with 'debug' and end with '.out', regardless of the locale.).
+CLI_ENABLE_DEBUG = _("Send debug output to debug-YYYY-MM-DD-HH:MM:SS.out")
+
+# Translators: This is the description of command line option '--debug-file'
+# which allows the user to override the default date-based name of the debugging
+# output file.
+CLI_DEBUG_FILE = _("Send debug output to the specified file")
+
+# Translators: This string indicates to the user what should be provided when
+# using the '--debug-file' command line option.
+CLI_DEBUG_FILE_NAME = _("FILE")
+
+# Translators: This is the description of command line option '-t, --text-setup'
+# that will initially display a list of questions in text form, that the user
+# will need to answer, before Orca will startup. For this to happen properly,
+# Orca will need to be run from a terminal window.
+CLI_SETUP = _("Set up user preferences (text version)")
+
+# Translators: This text is the description displayed when Orca is launched
+# from the command line and the help text is displayed.
+CLI_EPILOG = _("Report bugs to orca-list gnome org ")
+
# Translators: In chat applications, it is often possible to see that a "buddy"
# is typing currently (e.g. via a keyboard icon or status text). Some users like
# to have this typing status announced by Orca; others find that announcment
@@ -242,6 +339,141 @@ CHAT_SEPARATE_HISTORIES_OFF = \
# translated is presented when the value of the setting is toggled.
CHAT_SEPARATE_HISTORIES_ON = _("Provide chat room specific message histories.")
+# Translators: this is a regular expression that is intended to match
+# a positive 'yes' response from a user at the command line. The expression
+# as given means - does it begin with (that's the '^' character) any of
+# the characters in the '[' ']'? In this case, we've chosen 'Y', 'y', and
+# '1' to mean positive answers, so any string beginning with 'Y', 'y', or
+# '1' will match. For an example of translation, assume your language has
+# the words 'posolutely' and 'absitively' as common words that mean the
+# equivalent of 'yes'. You might make the expression match the upper and
+# lower case forms: "^[aApP1]". If the 'yes' and 'no' words for your
+# locale begin with the same character, the regular expression should be
+# modified to use words. For example: "^(yes|Yes)" (note the change from
+# using '[' and ']' to '(' and ')').
+#
+# Finally, this expression should match what you've chosen for the
+# translation of the "Enter y or n:" strings for this file.
+CONSOLE_SETUP_YESEXPR = _("^[Yy1]")
+
+# Translators: this is a regular expression that is intended to match
+# a positive 'yes' response from a user at the command line. The expression
+# as given means - does it begin with (that's the '^' character) any of
+# the characters in the '[' ']'? In this case, we've chosen 'Y', 'y', and
+# '1' to mean positive answers, so any string beginning with 'Y', 'y', or
+# '1' will match. For an example of translation, assume your language has
+# the words 'posolutely' and 'absitively' as common words that mean the
+# equivalent of 'yes'. You might make the expression match the upper and
+# lower case forms: "^[aApP1]". If the 'yes' and 'no' words for your
+# locale begin with the same character, the regular expression should be
+# modified to use words. For example: "^(yes|Yes)" (note the change from
+# using '[' and ']' to '(' and ')').
+#
+# Finally, this expression should match what you've chosen for the
+# translation of the "Enter y or n:" strings for this file.
+CONSOLE_SETUP_NOEXPR = _("^[Nn0]")
+
+# Translators: This is prompting for whether the user wants to use a refreshable
+# braille display (an external hardware device) or not. It is part of Orca's
+# console-based setup.
+CONSOLE_SETUP_ENABLE_BRAILLE = _("Enable Braille? Enter y or n: ")
+
+# Translators: If key echo is enabled, Orca will speak the name of a key as the
+# user types on the keyboard. This message is presented during Orca's console-
+# based setup. If the user wants key echo, they will then be prompted for which
+# classes of keys they want echoed.
+CONSOLE_SETUP_ENABLE_ECHO_KEY = _("Enable key echo? Enter y or n: ")
+
+# Translators: This is in reference to key echo for normal text entry keys and
+# is part of Orca's console-based setup.
+CONSOLE_SETUP_ENABLE_ECHO_PRINTABLE_KEYS = \
+ _("Enable alphanumeric and punctuation keys? Enter y or n: ")
+
+# Translators: This is in reference to key echo for keys such as CTRL, ALT,
+# Shift, Insert, etc. It is part of Orca's console-based setup.
+CONSOLE_SETUP_ENABLE_ECHO_MODIFIER_KEYS = \
+ _("Enable modifier keys? Enter y or n: ")
+
+# Translators: This is in reference to key echo for function keys (F1-F12).
+# It is part of Orca's console-based setup.
+CONSOLE_SETUP_ENABLE_ECHO_FUNCTION_KEYS = \
+ _("Enable function keys? Enter y or n: ")
+
+# Translators: This is in reference to key echo for keys that perform actions
+# such as enter, escape, tab, backspace, delete, arrow keys, page up/down, etc.
+# It is part of Orca's console-based setup.
+CONSOLE_SETUP_ENABLE_ECHO_ACTION_KEYS = _("Enable action keys? Enter y or n: ")
+
+# Translators: The word echo feature of Orca will speak the word prior to the
+# caret when the user types a word delimiter. This message is presented during
+# Orca's console-based setup.
+CONSOLE_SETUP_ENABLE_ECHO_WORD = _("Enable echo by word? Enter y or n: ")
+
+# Translators: This is prompting for a numerical choice to be typed at Orca's
+# console-based setup.
+CONSOLE_SETUP_ENTER_CHOICE = _("Enter choice: ")
+
+# Translators: This is letting the user they input an invalid integer value on
+# the command line and is also requesting they enter a valid integer value.
+# This message is part of Orca's console-based setup.
+CONSOLE_SETUP_ENTER_VALID_NUMBER = _("Please enter a valid number.")
+
+# Translators: This is letting the user they input an invalid yes/no value on
+# the command line and is also requesting they enter a valid one. This message
+# is part of Orca's console-based setup.
+CONSOLE_SETUP_ENTER_Y_OR_N = _("Please enter y or n.")
+
+# Translators: Orca has two keyboard layouts which impact what keybindings are
+# used to perform Orca commands. The two layouts are "Laptop" and "Desktop".
+# This message is part of Orca's console-based setup.
+CONSOLE_SETUP_SELECT_KEYBOARD_LAYOUT = _("Select desired keyboard layout.")
+
+# Translators: Orca has two keyboard layouts which impact what keybindings are
+# used to perform Orca commands. The two layouts are "Laptop" and "Desktop".
+# This message is part of Orca's console-based setup.
+CONSOLE_SETUP_KEYBOARD_LAYOUT_DESKTOP = _("1. Desktop")
+
+# Translators: Orca has two keyboard layouts which impact what keybindings are
+# used to perform Orca commands. The two layouts are "Laptop" and "Desktop".
+# This message is part of Orca's console-based setup.
+CONSOLE_SETUP_KEYBOARD_LAYOUT_LAPTOP = _("2. Laptop")
+
+# Translators: This is prompting the user for a numerical choice from a list of
+# available speech synthesis engines. It is part of Orca's console-based setup.
+CONSOLE_SETUP_SELECT_SPEECH_SERVER = _("Select desired speech server.")
+
+# Translators: The speech system represents what general speech wrapper is going
+# to be used. Speech-dispatcher is an example of a speech system. It provides
+# wrappers around specific speech servers (engines). This message is part of
+# Orca's console-based setup.
+CONSOLE_SETUP_SELECT_SPEECH_SYSTEM = _("Select desired speech system:")
+
+# Translators: This is prompting for a numerical value from a list of choices of
+# speech synthesis voices (e.g., male, female, child). This message is part of
+# Orca's console-based setup.
+CONSOLE_SETUP_SELECT_VOICE = _("Select desired voice:")
+
+# Translators: This message indicates that no working speech servers (speech
+# synthesis engines) can be found. It is part of Orca's console-based setup.
+CONSOLE_SETUP_SERVERS_NOT_AVAILABLE = _("No servers available.\n")
+
+# Translators: This message indicates that the speech server (speech synthesis
+# engine) is not working properly and no voices (e.g., male, female, child) are
+# available. This message is part of Orca's console-based setup.
+CONSOLE_SETUP_VOICES_NOT_AVAILABLE = _("No voices available.\n")
+
+# Translators: This message indicates that speech synthesis will not be used.
+# It is part of Orca's console-based setup.
+CONSOLE_SETUP_SPEECH_NOT_USED = _("Speech will not be used.\n")
+
+# Translators: This message is presented at the beginning of Orca's console-
+# based setup.
+CONSOLE_SETUP_START = _("Screen reader setup.")
+
+# Translators: This message is presented at the completion of Orca's console-
+# based setup.
+CONSOLE_SETUP_COMPLETE = _("Setup complete. Press Return to continue.")
+
# Translators: The "default" button in a dialog box is the button that gets
# activated when Enter is pressed anywhere within that dialog box.
DEFAULT_BUTTON_IS = _("Default button is %s")
@@ -374,6 +606,37 @@ HAS_FORMULA = _("has formula")
# and examples.
IMAGE_MAP_LINK = _("image map link")
+# Translators: This is a spoken and/or brailled message letting the user know
+# that the key combination (e.g., Ctrl+Alt+f) they just entered has already been
+# bound to another command and is thus unavailable. The string substituted in is
+# the name of the command which already has the binding.
+KB_ALREADY_BOUND = _("The key entered is already bound to %s")
+
+# Translators: This is a spoken and/or brailled message letting the user know
+# that Orca has recorded a new key combination (e.g. Alt+Ctrl+g) as a result of
+# their input. The string substituted in is the new key combination.
+KB_CAPTURED = _("Key captured: %s. Press enter to confirm.")
+
+# Translators: This is a spoken and/or brailled message letting the user know
+# that Orca has assigned a new key combination (e.g. Alt+Ctrl+g) as a result of
+# their input. The string substituted in is the new key combination.
+KB_CAPTURED_CONFIRMATION = _("The new key is: %s")
+
+# Translators: This is a spoken and/or brailled message letting the user know
+# Orca is about to delete an existing key combination (e.g. Alt+Ctrl+g) as a
+# result of their input.
+KB_DELETED = _("Key binding deleted. Press enter to confirm.")
+
+# Translators: This is a spoken and/or brailled message letting the user know
+# Orca has deleted an existing key combination (e.g. Alt+Ctrl+g) as a result of
+# their input.
+KB_DELETED_CONFIRMATION = _("The keybinding has been removed.")
+
+# Translators: This is a spoken and/or brailled message asking the user to press
+# a new key combination (e.g., Alt+Ctrl+g) to create a new key binding for an
+# Orca command.
+KB_ENTER_NEW_KEY = _("enter new key")
+
# Translators: Orca has an "echo" setting which allows the user to configure
# what is spoken in response to a key press. Given a user who typed "Hello
# world.":
@@ -571,9 +834,9 @@ LEARN_MODE_START_BRAILLE = _("Learn mode. Press escape to exit.")
# Mode.
LEARN_MODE_START_SPEECH = \
_("Entering learn mode. Press any key to hear its function. " \
- "To get a list of Orca's default shortcuts, press 1. " \
- "To get a list of Orca's shortcuts for the current application, " \
- "press 2. To view Orca's documentation, press F1. " \
+ "To get a list of the screen reader's default shortcuts, press 1. " \
+ "To get a list of the screen reader's shortcuts for the current application, " \
+ "press 2. To view the screen reader's documentation, press F1. " \
"To exit learn mode, press the escape key.")
# Translators: when the user selects (highlights) or unselects text in a
@@ -1120,7 +1383,7 @@ SEARCH_COMPLETE = _("Search complete.")
# Translators: This message is presented to the user when Orca's preferences
# have been reloaded.
-SETTINGS_RELOADED = _("Orca user settings reloaded.")
+SETTINGS_RELOADED = _("Screen reader settings reloaded.")
# Translators: This message is presented to the user when speech synthesis
# has been temporarily turned off.
@@ -1151,18 +1414,12 @@ SPOKEN_ELLIPSIS = _(" dot dot dot")
# Translators: This message is presented to the user when Orca is launched.
START_ORCA = _("Screen reader on.")
-# Translators: Orca Preferences is the configuration GUI for Orca. This message
-# is presented immediately before the GUI is shown.
-STARTING_ORCA_PREFS = _("Starting Orca Preferences.")
-
-# Translators: Orca Preferences in this case, is a configuration GUI for
-# allowing users to set application specific settings from within Orca for
-# the application that currently has focus.
-STARTING_ORCA_APP_PREFS = _("Starting Orca Preferences for %s.")
-
# Translators: This message is presented to the user when Orca is quit.
STOP_ORCA = _("Screen reader off.")
+# Translators: This message means speech synthesis is not installed or working.
+SPEECH_UNAVAILABLE = _("Speech is unavailable.")
+
# Translators: the Orca "Find" dialog allows a user to search for text in a
# window and then move focus to that text. For example, they may want to find
# the "OK" button. This message lets them know a string they were searching
@@ -1298,7 +1555,7 @@ TEXT_UNSELECTED = C_("text", "unselected")
UNICODE = _("Unicode %s")
# Translators: This message presents the Orca version number.
-VERSION = _("Orca version %s.") % version
+VERSION = _("Screen reader version %s.") % version
# Translators: This is presented when the user has navigated to a line with only
# whitespace characters (space, tab, etc.) on it.
@@ -1442,16 +1699,16 @@ def shortcutsFoundOrca(count):
# shortcuts associated with Orca commands which are not specific to the
# current application. It appears as the title of the dialog containing
# the list.
- return ngettext("%d Orca default shortcut found.",
- "%d Orca default shortcuts found.",
+ return ngettext("%d Screen reader default shortcut found.",
+ "%d Screen reader default shortcuts found.",
count) % count
def shortcutsFoundApp(count, appName):
# Translators: This message is presented when the user is in a list of
# shortcuts associated with Orca commands specific to the current
# application. It appears as the title of the dialog containing the list.
- return ngettext("%(count)d Orca shortcut for %(application)s found.",
- "%(count)d Orca shortcuts for %(application)s found.",
+ return ngettext("%(count)d Screen reader shortcut for %(application)s found.",
+ "%(count)d Screen reader shortcuts for %(application)s found.",
count) % {"count" : count, "application" : appName}
def spacesCount(count):
diff --git a/src/orca/orca-find.ui b/src/orca/orca-find.ui
index 6c679bf..2fba961 100644
--- a/src/orca/orca-find.ui
+++ b/src/orca/orca-find.ui
@@ -10,7 +10,7 @@
<property name="type_hint">dialog</property>
<child internal-child="accessible">
<object class="AtkObject" id="findDialog-atkobject">
- <property name="AtkObject::accessible-name" translatable="yes">Orca Find Dialog</property>
+ <property name="AtkObject::accessible-name" translatable="yes">Screen Reader Find Dialog</property>
</object>
</child>
<signal name="destroy" handler="findDialogDestroyed" swapped="no"/>
diff --git a/src/orca/orca-setup.ui b/src/orca/orca-setup.ui
index 81097b3..b85c7d0 100644
--- a/src/orca/orca-setup.ui
+++ b/src/orca/orca-setup.ui
@@ -190,7 +190,7 @@
</object>
<object class="GtkDialog" id="orcaSetupWindow">
<property name="can_focus">False</property>
- <property name="title" translatable="yes">Orca Preferences</property>
+ <property name="title" translatable="yes">Screen Reader Preferences</property>
<property name="type_hint">normal</property>
<signal name="destroy" handler="windowDestroyed" swapped="no"/>
<signal name="close" handler="windowClosed" swapped="no"/>
@@ -2657,7 +2657,7 @@
<object class="GtkLabel" id="orcaModifierKeyLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Orca _Modifier Key(s):</property>
+ <property name="label" translatable="yes">Screen Reader _Modifier Key(s):</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">orcaModifierComboBox</property>
<accessibility>
diff --git a/src/orca/orca_bin.py.in b/src/orca/orca_bin.py.in
index f0e4620..a9a5626 100644
--- a/src/orca/orca_bin.py.in
+++ b/src/orca/orca_bin.py.in
@@ -39,10 +39,10 @@ pyexecdir = '@pyexecdir@'.replace('${exec_prefix}', '@prefix@')
sys.path.insert(1, pyexecdir)
from orca import debug
+from orca import messages
from orca import orca
from orca import orca_console_prefs
from orca import settings
-from orca.orca_i18n import _
from orca.orca_platform import version
class ListApps(argparse.Action):
@@ -85,110 +85,34 @@ class HelpFormatter(argparse.HelpFormatter):
class Parser(argparse.ArgumentParser):
def __init__(self, *args, **kwargs):
- # Translators: this text is the description displayed when Orca is
- # launched from the command line and the help text is displayed.
- description = _("orca - scriptable screen reader")
- # Translators: this text is the description displayed when Orca is
- # launched from the command line and the help text is displayed.
- epilog = _("Report bugs to orca-list gnome org ")
super(Parser, self).__init__(
- description=description,
- epilog=epilog,
- formatter_class=HelpFormatter)
-
+ epilog=messages.CLI_EPILOG, formatter_class=HelpFormatter)
self.add_argument(
"-v", "--version", action="version", version=version, help=version)
-
self.add_argument(
- "-r", "--replace", action="store_true",
- # Translators: this is the description of the command line option
- # '-r, --replace' which tells Orca to replace any existing Orca
- # process(es) that might be running.
- help=_("Replace a currently running Orca"))
-
+ "-r", "--replace", action="store_true", help=messages.CLI_REPLACE)
self.add_argument(
- "-t", "--text-setup", action="store_true",
- # Translators: this is the description of the command line option
- # '-t, --text-setup' that will initially display a list of questions
- # in text form, that the user will need to answer, before Orca will
- # startup. For this to happen properly, Orca will need to be run
- # from a terminal window.
- help=_("Set up user preferences (text version)"))
-
+ "-t", "--text-setup", action="store_true", help=messages.CLI_SETUP)
self.add_argument(
"-l", "--list-apps", action=ListApps, nargs=0,
- # Translators: this is the description of the command line option
- # '-l, --list-apps' which prints the names of running applications
- # which can be seen by assistive technologies such as Orca and
- # Accercser.
- help=_("Print the known running applications"))
-
+ help=messages.CLI_LIST_APPS)
self.add_argument(
"-e", "--enable", action=Settings, const=True,
- # Translators: this is the description of the command line option
- # '-e, --enable' which allows the user to specify an option to
- # enable as Orca is started.
- help=_("Force use of option"),
- # Translators: this string indicates to the user what should be
- # provided when using the '-e, --enable' or '-d, --disable' command
- # line option.
- metavar=_("OPTION"))
-
+ help=messages.CLI_ENABLE_OPTION, metavar=messages.CLI_OPTION)
self.add_argument(
"-d", "--disable", action=Settings, const=False,
- # Translators: this is the description of the command line option
- # '-d, --disable' which allows the user to specify an option to
- # enable as Orca is started.
- help=_("Prevent use of option"),
- # Translators: this string indicates to the user what should be
- # provided when using the '-e, --enable' or '-d, --disable' command
- # line option.
- metavar=_("OPTION"))
-
+ help=messages.CLI_DISABLE_OPTION, metavar=messages.CLI_OPTION)
self.add_argument(
"-p", "--profile", action="store",
- # Translators: this is the description of the command line option
- # '-p, --profile' which allows you to specify a profile to be
- # loaded. A profile stores a group of Orca settings configured by
- # the user for a particular purpose, such as a 'Spanish' profile
- # which would include Spanish braille and Spanish text-to-speech.
- # An Orca settings file contains one or more profiles.
- help=_("Load profile"),
- # Translators: this string indicates to the user what should be
- # provided when using the '-p, --profile' command line option.
- metavar=_("NAME"))
-
+ help=messages.CLI_LOAD_PROFILE, metavar=messages.CLI_PROFILE_NAME)
self.add_argument(
"-u", "--user-prefs", action="store",
- # Translators: this is the description of the command line option
- # '-u, --user-prefs' that allows you to specify an alternate
- # location from which to loadr the user preferences.
- help=_("Use alternate directory for user preferences"),
- # Translators: this string indicates to the user what should be
- # provided when using the '-u, --user-prefs' command line option.
- metavar=_("DIR"))
-
+ help=messages.CLI_LOAD_PREFS, metavar=messages.CLI_PREFS_DIR)
self.add_argument(
"--debug-file", action="store",
- # Translators: this is the description of the command line option
- # '--debug-file' which allows the user to override the default,
- # date-based name of the debugging output file.
- help=_("Send debug output to the specified file"),
- # Translators: this string indicates to the user what should be
- # provided when using the '--debug-file' command line option.
- metavar=_("FILE"))
-
+ help=messages.CLI_DEBUG_FILE, metavar=messages.CLI_DEBUG_FILE_NAME)
self.add_argument(
- "--debug", action="store_true",
- # Translators: this is the description of the command line option
- # '--debug' which enables debugging output for Orca to be sent to
- # a file. The YYYY-MM-DD-HH:MM:SS portion of the string indicates
- # the file name will be formed from the current date and time with
- # 'debug' in front and '.out' at the end. The 'debug' and '.out'
- # portions of this string should not be translated (i.e., it will
- # always start with 'debug' and end with '.out', regardless of the
- # locale.).
- help=_("Send debug output to debug-YYYY-MM-DD-HH:MM:SS.out"))
+ "--debug", action="store_true", help=messages.CLI_ENABLE_DEBUG)
def parse_known_args(self, *args, **kwargs):
opts, invalid = super(Parser, self).parse_known_args(*args, **kwargs)
@@ -197,12 +121,7 @@ class Parser(argparse.ArgumentParser):
except:
pass
if invalid:
- # Translators: This message is displayed when the user starts Orca
- # from the command line and includes an invalid option or argument.
- # After the message, the list of invalid items, as typed by the
- # user, is displayed.
- msg = _("The following are not valid: ")
- print((msg + " ".join(invalid)))
+ print((messages.CLI_INVALID_OPTIONS + " ".join(invalid)))
if opts.debug_file:
opts.debug = True
@@ -303,16 +222,12 @@ def main():
orca_console_prefs.showPreferencesUI(settingsDict)
if not inGraphicalDesktop():
- # Translators: This message is presented to the user who attempts
- # to launch Orca from some other environment than the graphical
- # desktop.
- msg = _('Cannot start Orca because it cannot connect to the Desktop.')
- print (msg)
+ print(messages.CLI_NO_DESKTOP_ERROR)
return 1
manager = orca.getSettingsManager()
if not manager:
- print("Could not activate the settings manager. Exiting.")
+ print(messages.CLI_SETTINGS_MANAGER_ERROR)
return 1
manager.activate(args.user_prefs, settingsDict)
@@ -322,20 +237,11 @@ def main():
try:
manager.setProfile(args.profile)
except:
- # Translators: This message is presented to the user when
- # the specified profile could not be loaded. A profile stores
- # a group of Orca settings configured for a particular purpose,
- # such as a Spanish profile which would include Spanish braille
- # and Spanish text-to-speech.
- print(_("Profile could not be loaded: %s") % args.profile)
+ print(messages.CLI_LOAD_PROFILE_ERROR % args.profile)
manager.setProfile()
if otherOrcas():
- # Translators: This message is presented to the user when
- # he/she tries to launch Orca, but Orca is already running.
- print(_('Another Orca process is already running for this ' \
- 'session.\nRun "orca --replace" to replace that ' \
- 'process with a new one.'))
+ print(messages.CLI_OTHER_ORCAS_ERROR)
return 1
return orca.main()
diff --git a/src/orca/orca_console_prefs.py b/src/orca/orca_console_prefs.py
index be3f038..dea4bcb 100644
--- a/src/orca/orca_console_prefs.py
+++ b/src/orca/orca_console_prefs.py
@@ -30,34 +30,16 @@ import re
import sys
from . import acss
+from . import messages
from . import settings
from . import speech
from . import speechserver
-from .orca_i18n import _
-
workingFactories = []
speechServerChoice = None
speechVoiceChoice = None
-
-# Translators: this is a regular expression that is intended to match
-# a positive 'yes' response from a user at the command line. The expression
-# as given means - does it begin with (that's the '^' character) any of
-# the characters in the '[' ']'? In this case, we've chosen 'Y', 'y', and
-# '1' to mean positive answers, so any string beginning with 'Y', 'y', or
-# '1' will match. For an example of translation, assume your language has
-# the words 'posolutely' and 'absitively' as common words that mean the
-# equivalent of 'yes'. You might make the expression match the upper and
-# lower case forms: "^[aApP1]". If the 'yes' and 'no' words for your
-# locale begin with the same character, the regular expression should be
-# modified to use words. For example: "^(yes|Yes)" (note the change from
-# using '[' and ']' to '(' and ')').
-#
-# Finally, this expression should match what you've chosen for the
-# translation of the "Enter y or n:" strings for this file.
-#
-YESEXPR = re.compile(_("^[Yy1]"))
-NOEXPR = re.compile(_("^[Nn0]"))
+YESEXPR = re.compile(messages.CONSOLE_SETUP_YESEXPR)
+NOEXPR = re.compile(messages.CONSOLE_SETUP_NOEXPR)
def checkYes(value) :
"""Checks if a string represents a yes, no.
@@ -125,22 +107,16 @@ def setupSpeech(prefsDict):
factories = speech.getSpeechServerFactories()
if len(factories) == 0:
- # Translators: this means speech synthesis (i.e., the machine
- # speaks to you from its speakers) is not installed or working.
- #
- print(_("Speech is unavailable."))
+ print(messages.SPEECH_UNAVAILABLE)
return False
try:
speech.init()
except:
- # Translators: this means speech synthesis (i.e., the machine
- # speaks to you from its speakers) is not installed or working.
- #
- print(_("Speech is unavailable."))
+ print(messages.SPEECH_UNAVAILABLE)
return False
- sayAndPrint(_("Welcome to Orca setup."))
+ sayAndPrint(messages.CONSOLE_SETUP_START)
workingFactories = []
for factory in factories:
@@ -152,18 +128,10 @@ def setupSpeech(prefsDict):
pass
if len(workingFactories) == 0:
- # Translators: this means speech synthesis (i.e., the machine
- # speaks to you from its speakers) is not installed or working.
- #
- print(_("Speech is unavailable."))
+ print(messages.SPEECH_UNAVAILABLE)
return False
elif len(workingFactories) > 1:
- # Translators: the speech system represents what general
- # speech wrapper is going to be used. Speech-dispatcher
- # is an example of a speech system. It provides wrappers
- # around specific speech servers (engines).
- #
- sayAndPrint(_("Select desired speech system:"))
+ sayAndPrint(messages.CONSOLE_SETUP_SELECT_SPEECH_SYSTEM)
choices = {}
i = 1
for workingFactory in workingFactories:
@@ -171,40 +139,26 @@ def setupSpeech(prefsDict):
sayAndPrint("%d. %s" \
% (i, workingFactory[0].SpeechServer.getFactoryName()))
i += 1
-
- # Translators: this is prompting for a numerical choice.
- #
while True:
try:
- choice = int(sayAndPrint(_("Enter choice: "), False, True))
+ choice = int(sayAndPrint(messages.CONSOLE_SETUP_ENTER_CHOICE,
+ False, True))
break
except:
- # Translators: this is letting the user they input an
- # invalid integer value on the command line and is
- # also requesting they enter a valid integer value.
- #
- sayAndPrint(_("Please enter a valid number."))
+ sayAndPrint(messages.CONSOLE_SETUP_ENTER_VALID_NUMBER)
if (choice <= 0) or (choice >= i):
- # Translators: this means speech synthesis will not be used.
- #
- sayAndPrint(_("Speech will not be used.\n"))
+ sayAndPrint(messages.CONSOLE_SETUP_SPEECH_NOT_USED)
return False
[factory, servers] = choices[choice]
else:
[factory, servers] = workingFactories[0]
if len(servers) == 0:
- # Translators: this means no working speech servers (speech
- # synthesis engines) can be found.
- #
- sayAndPrint(_("No servers available.\n"))
- sayAndPrint(_("Speech will not be used.\n"))
+ sayAndPrint(messages.CONSOLE_SETUP_SERVERS_NOT_AVAILABLE)
+ sayAndPrint(messages.CONSOLE_SETUP_SPEECH_NOT_USED)
return False
if len(servers) > 1:
- # Translators: this is prompting for a numerical choice from a list
- # of available speech synthesis engines.
- #
- sayAndPrint(_("Select desired speech server."),
+ sayAndPrint(messages.CONSOLE_SETUP_SELECT_SPEECH_SERVER,
len(workingFactories) > 1)
i = 1
choices = {}
@@ -212,19 +166,15 @@ def setupSpeech(prefsDict):
sayAndPrint("%d. %s" % (i, server.getInfo()[0]))
choices[i] = server
i += 1
-
- # Translators: this is prompting for a numerical choice.
- #
while True:
try:
- choice = int(sayAndPrint(_("Enter choice: "), False, True))
+ choice = int(sayAndPrint(messages.CONSOLE_SETUP_ENTER_CHOICE,
+ False, True))
break
except:
- sayAndPrint(_("Please enter a valid number."))
+ sayAndPrint(messages.CONSOLE_SETUP_ENTER_VALID_NUMBER)
if (choice <= 0) or (choice >= i):
- # Translators: this means speech synthesis will not be used.
- #
- sayAndPrint(_("Speech will not be used.\n"))
+ sayAndPrint(messages.CONSOLE_SETUP_SPEECH_NOT_USED)
return False
speechServerChoice = choices[choice]
else:
@@ -232,22 +182,12 @@ def setupSpeech(prefsDict):
families = speechServerChoice.getVoiceFamilies()
if len(families) == 0:
- # Translators: this means the speech server (speech synthesis
- # engine) is not working properly and no voices (e.g., male,
- # female, child) are available.
- #
- sayAndPrint(_("No voices available.\n"))
-
- # Translators: this means speech synthesis will not be used.
- #
- sayAndPrint(_("Speech will not be used.\n"))
+ sayAndPrint(messages.CONSOLE_SETUP_VOICES_NOT_AVAILABLE)
+ sayAndPrint(messages.CONSOLE_SETUP_SPEECH_NOT_USED)
return False
if len(families) > 1:
- # Translators: this is prompting for a numerical value from a
- # list of choices of speech synthesis voices (e.g., male,
- # female, child).
- #
- sayAndPrint(_("Select desired voice:"),
+
+ sayAndPrint(messages.CONSOLE_SETUP_SELECT_VOICE,
True, # stop
False, # getInput
speechServerChoice) # server
@@ -267,19 +207,15 @@ def setupSpeech(prefsDict):
while True:
try:
- # Translators: this is prompting for a numerical choice.
- #
- choice = int(sayAndPrint(_("Enter choice: "),
+ choice = int(sayAndPrint(messages.CONSOLE_SETUP_ENTER_CHOICE,
False, # stop
True, # getInput
speechServerChoice)) # speech server
break
except:
- sayAndPrint(_("Please enter a valid number."))
+ sayAndPrint(messages.CONSOLE_SETUP_ENTER_VALID_NUMBER)
if (choice <= 0) or (choice >= i):
- # Translators: this means speech synthesis will not be used.
- #
- sayAndPrint(_("Speech will not be used.\n"))
+ sayAndPrint(messages.CONSOLE_SETUP_SPEECH_NOT_USED)
return False
defaultACSS = choices[choice]
else:
@@ -314,11 +250,7 @@ def setupSpeech(prefsDict):
stop = True
while True:
- # Translators: the word echo feature of Orca will speak the
- # word prior to the caret when the user types a word
- # delimiter.
- #
- answer = sayAndPrint(_("Enable echo by word? Enter y or n: "),
+ answer = sayAndPrint(messages.CONSOLE_SETUP_ENABLE_ECHO_WORD,
stop,
True,
speechServerChoice,
@@ -328,16 +260,11 @@ def setupSpeech(prefsDict):
break
except:
stop = False
- sayAndPrint(_("Please enter y or n."))
+ sayAndPrint(messages.CONSOLE_SETUP_ENTER_Y_OR_N)
stop = True
while True:
- # Translators: if key echo is enabled, Orca will speak the
- # name of a key as the user types on the keyboard. If the
- # user wants key echo, they will then be prompted for which
- # classes of keys they want echoed.
- #
- answer = sayAndPrint(_("Enable key echo? Enter y or n: "),
+ answer = sayAndPrint(messages.CONSOLE_SETUP_ENABLE_ECHO_KEY,
stop,
True,
speechServerChoice,
@@ -347,7 +274,7 @@ def setupSpeech(prefsDict):
break
except:
stop = False
- sayAndPrint(_("Please enter y or n."))
+ sayAndPrint(messages.CONSOLE_SETUP_ENTER_Y_OR_N)
keyEcho = prefsDict["enableKeyEcho"]
if not keyEcho:
@@ -359,11 +286,8 @@ def setupSpeech(prefsDict):
stop = True
while keyEcho and True:
- # Translators: this is in reference to key echo for
- # normal text entry keys.
- #
- answer = sayAndPrint( \
- _("Enable alphanumeric and punctuation keys? Enter y or n: "),
+ answer = sayAndPrint(
+ messages.CONSOLE_SETUP_ENABLE_ECHO_PRINTABLE_KEYS,
stop,
True,
speechServerChoice,
@@ -373,14 +297,11 @@ def setupSpeech(prefsDict):
break
except:
stop = False
- sayAndPrint(_("Please enter y or n."))
+ sayAndPrint(messages.CONSOLE_SETUP_ENTER_Y_OR_N)
stop = True
while keyEcho and True:
- # Translators: this is in reference to key echo for
- # CTRL, ALT, Shift, Insert, and "Fn" on laptops.
- #
- answer = sayAndPrint(_("Enable modifier keys? Enter y or n: "),
+ answer = sayAndPrint(messages.CONSOLE_SETUP_ENABLE_ECHO_MODIFIER_KEYS,
stop,
True,
speechServerChoice,
@@ -390,14 +311,11 @@ def setupSpeech(prefsDict):
break
except:
stop = False
- sayAndPrint(_("Please enter y or n."))
+ sayAndPrint(messages.CONSOLE_SETUP_ENTER_Y_OR_N)
stop = True
while keyEcho and True:
- # Translators: this is in reference to key echo for
- # the keys at the top of the keyboard.
- #
- answer = sayAndPrint(_("Enable function keys? Enter y or n: "),
+ answer = sayAndPrint(messages.CONSOLE_SETUP_ENABLE_ECHO_FUNCTION_KEYS,
stop,
True,
speechServerChoice,
@@ -407,15 +325,11 @@ def setupSpeech(prefsDict):
break
except:
stop = False
- sayAndPrint(_("Please enter y or n."))
+ sayAndPrint(messages.CONSOLE_SETUP_ENTER_Y_OR_N)
stop = True
while keyEcho and True:
- # Translators: this is in reference to key echo for
- # space, enter, escape, tab, backspace, delete, arrow
- # keys, page up, page down, etc.
- #
- answer = sayAndPrint(_("Enable action keys? Enter y or n: "),
+ answer = sayAndPrint(messages.CONSOLE_SETUP_ENABLE_ECHO_ACTION_KEYS,
stop,
True,
speechServerChoice,
@@ -425,39 +339,23 @@ def setupSpeech(prefsDict):
break
except:
stop = False
- sayAndPrint(_("Please enter y or n."))
+ sayAndPrint(messages.CONSOLE_SETUP_ENTER_Y_OR_N)
- # Translators: we allow the user to choose between the desktop (i.e.,
- # has a numeric keypad) and laptop (i.e., small and compact) keyboard
- # layouts for how they might control Orca.
- #
- sayAndPrint(_("Select desired keyboard layout."),
+ sayAndPrint(messages.CONSOLE_SETUP_SELECT_KEYBOARD_LAYOUT,
True,
False,
speechServerChoice,
speechVoiceChoice)
i = 1
choices = {}
-
- # Translators: we allow the user to choose between the desktop (i.e.,
- # has a numeric keypad) and laptop (i.e., small and compact) keyboard
- # layouts for how they might control Orca.
- #
- sayAndPrint(_("1. Desktop"),
+ sayAndPrint(messages.CONSOLE_SETUP_KEYBOARD_LAYOUT_DESKTOP,
False, False, speechServerChoice, speechVoiceChoice)
-
- # Translators: we allow the user to choose between the desktop (i.e.,
- # has a numeric keypad) and laptop (i.e., small and compact) keyboard
- # layouts for how they might control Orca.
- #
- sayAndPrint(_("2. Laptop"),
+ sayAndPrint(messages.CONSOLE_SETUP_KEYBOARD_LAYOUT_LAPTOP,
False, False, speechServerChoice, speechVoiceChoice)
while True:
try:
- # Translators: this is prompting for a numerical choice.
- #
- choice = int(sayAndPrint(_("Enter choice: "),
+ choice = int(sayAndPrint(messages.CONSOLE_SETUP_ENTER_CHOICE,
False, True, speechServerChoice, speechVoiceChoice))
if choice == 2:
prefsDict["keyboardLayout"] = \
@@ -472,9 +370,9 @@ def setupSpeech(prefsDict):
settings.DESKTOP_MODIFIER_KEYS
break
else:
- sayAndPrint(_("Please enter a valid number."))
+ sayAndPrint(messages.CONSOLE_SETUP_ENTER_VALID_NUMBER)
except:
- sayAndPrint(_("Please enter a valid number."))
+ sayAndPrint(messages.CONSOLE_SETUP_ENTER_VALID_NUMBER)
return True
@@ -492,11 +390,7 @@ def showPreferencesUI(commandLineSettings):
stop = True
while True:
- # Translators: this is prompting for whether the user wants to
- # use a refreshable braille display (an external hardware
- # device) or not.
- #
- answer = sayAndPrint(_("Enable Braille? Enter y or n: "),
+ answer = sayAndPrint(messages.CONSOLE_SETUP_ENABLE_BRAILLE,
stop,
True,
speechServerChoice,
@@ -506,26 +400,7 @@ def showPreferencesUI(commandLineSettings):
break
except:
stop = False
- sayAndPrint(_("Please enter y or n."))
-
- stop = True
- while True:
- # Translators: the braille monitor is a graphical display on
- # the screen that is used for debugging and demoing purposes.
- # It presents what would be (or is being) shown on the
- # external refreshable braille display.
- #
- answer = sayAndPrint(_("Enable Braille Monitor? Enter y or n: "),
- stop,
- True,
- speechServerChoice,
- speechVoiceChoice)
- try:
- prefsDict["enableBrailleMonitor"] = checkYes(answer)
- break
- except:
- stop = False
- sayAndPrint(_("Please enter y or n."))
+ sayAndPrint(messages.CONSOLE_SETUP_ENTER_Y_OR_N)
stop = True
@@ -533,8 +408,7 @@ def showPreferencesUI(commandLineSettings):
#
if 'profile' not in prefsDict:
prefsDict['profile'] = settings.profile
-
- answer = sayAndPrint(_("Setup complete. Press Return to continue."),
+ answer = sayAndPrint(messages.CONSOLE_SETUP_COMPLETE,
True,
True,
speechServerChoice,
diff --git a/src/orca/orca_gui_find.py b/src/orca/orca_gui_find.py
index 3744e84..03c9603 100644
--- a/src/orca/orca_gui_find.py
+++ b/src/orca/orca_gui_find.py
@@ -31,12 +31,11 @@ from gi.repository import Gtk
import locale
from . import find
+from . import guilabels
from . import orca_gtkbuilder
from . import orca_state
from . import orca_platform
-from .orca_i18n import _
-
OS = None
class OrcaFindGUI(orca_gtkbuilder.GtkBuilderWrapper):
@@ -131,7 +130,7 @@ class OrcaFindGUI(orca_gtkbuilder.GtkBuilderWrapper):
"""
if widget.get_active():
- if widget.get_label() == _("C_urrent location"):
+ if widget.get_label() == guilabels.FIND_START_AT_CURRENT_LOCATION:
self.startAtTop = False
else:
self.startAtTop = True
diff --git a/src/orca/orca_gui_navlist.py b/src/orca/orca_gui_navlist.py
index 940b0bd..5899687 100644
--- a/src/orca/orca_gui_navlist.py
+++ b/src/orca/orca_gui_navlist.py
@@ -30,8 +30,8 @@ __license__ = "LGPL"
from gi.repository import GObject, Gdk, Gtk
from . import debug
+from . import guilabels
from . import orca_state
-from .orca_i18n import _
class OrcaNavListGUI:
@@ -90,13 +90,9 @@ class OrcaNavListGUI:
btn.grab_default()
btn.connect('clicked', self._onJumpToClicked)
- # Translators: This string appears on a button in a dialog. "Activating"
- # the selected item will perform the action that one would expect to
- # occur if the object were clicked on with the mouse. Thus if the object
- # is a link, activating it will bring you to a new page. If the object
- # is a button, activating it will press the button. If the object is a
- # combobox, activating it will expand it to show all of its contents.
- self._activateButton = dialog.add_button(_('_Activate'), Gtk.ResponseType.OK)
+
+ self._activateButton = dialog.add_button(
+ guilabels.ACTIVATE, Gtk.ResponseType.OK)
self._activateButton.connect('clicked', self._onActivateClicked)
self._tree.connect('key-release-event', self._onKeyRelease)
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index a6f5fd3..778e2f5 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -38,6 +38,7 @@ import time
from . import acss
from . import debug
+from . import guilabels
from . import messages
from . import orca
from . import orca_gtkbuilder
@@ -66,9 +67,6 @@ from .orca_platform import tablesdir
if louis and not tablesdir:
louis = None
-from .orca_i18n import _
-from .orca_i18n import C_
-
(HANDLER, DESCRIP, MOD_MASK1, MOD_USED1, KEY1, CLICK_COUNT1, OLDTEXT1, \
TEXT1, MODIF, EDITABLE) = list(range(10))
@@ -226,13 +224,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
# DESCRIP
#
-
- # Translators: Function is a table column header where the
- # cells in the column are a sentence that briefly describes
- # what action Orca will take when the user invokes an Orca-specific
- # keyboard command.
- #
- column = Gtk.TreeViewColumn(_("Function"),
+ column = Gtk.TreeViewColumn(guilabels.KB_HEADER_FUNCTION,
self.cellRendererText,
text=DESCRIP)
column.set_resizable(True)
@@ -306,11 +298,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
self.keyBindingsModel,
MOD_MASK1, MOD_USED1, KEY1, CLICK_COUNT1, TEXT1)
- # Translators: Key Binding is a table column header where
- # the cells in the column represent keyboard combinations
- # the user can press to invoke Orca commands.
- #
- column = Gtk.TreeViewColumn(_("Key Binding"),
+ column = Gtk.TreeViewColumn(guilabels.KB_HEADER_KEY_BINDING,
rendererText,
text=TEXT1,
editable=EDITABLE)
@@ -326,12 +314,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
self.keyModifiedToggle,
self.keyBindingsModel,
MODIF)
-
- # Translators: Modified is a table column header where the
- # cells represent whether a key binding has been modified
- # from the default key binding.
- #
- column = Gtk.TreeViewColumn(_("Modified"),
+ column = Gtk.TreeViewColumn(guilabels.KB_MODIFIED,
rendererToggle,
active=MODIF,
activatable=EDITABLE)
@@ -401,14 +384,9 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
"""
pronunciationDict = self.getModelDict(self.pronunciationModel)
keyBindingsDict = self.getKeyBindingsModelDict(self.keyBindingsModel)
- if _settingsManager.saveSettings(self.prefsDict,
- pronunciationDict,
- keyBindingsDict):
- self._presentMessage(
- _("Accessibility support for GNOME has just been enabled."))
- self._presentMessage(
- _("You need to log out and log back in for the change to " \
- "take effect."))
+ _settingsManager.saveSettings(self.prefsDict,
+ pronunciationDict,
+ keyBindingsDict)
def _getKeyValueForVoiceType(self, voiceType, key, useDefault=True):
"""Look for the value of the given key in the voice dictionary
@@ -672,31 +650,10 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
# voice type selection to the first one ("Default").
#
comboBox = self.get_widget("voiceTypesCombo")
- types = []
- # Translators: This refers to the default/typical voice used
- # by Orca when presenting the content of the screen and other
- # messages.
- #
- types.append(C_("VoiceType", "Default"))
- # Translators: This refers to the voice used by Orca when
- # presenting one or more characters which is in uppercase.
- #
- types.append(C_("VoiceType", "Uppercase"))
- # Translators: This refers to the voice used by Orca when
- # presenting one or more characters which is part of a
- # hyperlink.
- #
- types.append(C_("VoiceType", "Hyperlink"))
- # Translators: This refers to the voice used by Orca when
- # presenting information which is not displayed on the screen
- # as text, but is still being communicated by the system in
- # some visual fashion. For instance, Orca says "misspelled"
- # to indicate the presence of the red squiggly line found
- # under a spelling error; Orca might say "3 of 6" when a
- # user Tabs into a list of six items and the third item is
- # selected. And so on.
- #
- types.append(C_("VoiceType", "System"))
+ types = [guilabels.SPEECH_VOICE_TYPE_DEFAULT,
+ guilabels.SPEECH_VOICE_TYPE_UPPERCASE,
+ guilabels.SPEECH_VOICE_TYPE_HYPERLINK,
+ guilabels.SPEECH_VOICE_TYPE_SYSTEM]
self.populateComboBox(comboBox, types)
comboBox.set_active(DEFAULT)
voiceType = comboBox.get_active()
@@ -1130,11 +1087,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
self.getTextAttributesView.set_model(model)
# Attribute Name column (NAME).
- #
- # Translators: Attribute here refers to text attributes such
- # as bold, underline, family-name, etc.
- #
- column = Gtk.TreeViewColumn(_("Attribute Name"))
+ column = Gtk.TreeViewColumn(guilabels.TEXT_ATTRIBUTE_NAME)
column.set_min_width(250)
column.set_resizable(True)
renderer = Gtk.CellRendererText()
@@ -1143,13 +1096,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
self.getTextAttributesView.insert_column(column, 0)
# Attribute Speak column (IS_SPOKEN).
- #
- # Translators: the "Speak" column consists of a single checkbox
- # for each text attribute. If the checkbox is checked, Orca
- # will speak that attribute, if it is present, when the user
- # presses Orca_Modifier+F.
- #
- speakAttrColumnLabel = _("Speak")
+ speakAttrColumnLabel = guilabels.PRESENTATION_SPEAK
column = Gtk.TreeViewColumn(speakAttrColumnLabel)
renderer = Gtk.CellRendererToggle()
column.pack_start(renderer, False)
@@ -1161,13 +1108,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
column.clicked()
# Attribute Mark in Braille column (IS_BRAILLED).
- #
- # Translators: The "Mark in braille" column consists of a single
- # checkbox for each text attribute. If the checkbox is checked,
- # Orca will "underline" that attribute, if it is present, on
- # the refreshable braille display.
- #
- markAttrColumnLabel = _("Mark in braille")
+ markAttrColumnLabel = guilabels.PRESENTATION_MARK_IN_BRAILLE
column = Gtk.TreeViewColumn(markAttrColumnLabel)
renderer = Gtk.CellRendererToggle()
column.pack_start(renderer, False)
@@ -1179,21 +1120,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
column.clicked()
# Attribute Value column (VALUE)
- #
- # Translators: "Present Unless" is a column header of the text
- # attributes pane of the Orca preferences dialog. On this pane,
- # the user can select a set of text attributes that they would like
- # spoken and/or indicated in braille. Because the list of attributes
- # could get quite lengthy, we provide the option to always speak/
- # braille a text attribute *unless* its value is equal to the value
- # given by the user in this column of the list. For example, given
- # the text attribute "underline" and a present unless value of "none",
- # the user is stating that he/she would like to have underlined text
- # announced for all cases (single, double, low, etc.) except when the
- # value of underline is none (i.e. when it's not underlined).
- # "Present" here is being used as a verb.
- #
- column = Gtk.TreeViewColumn(_("Present Unless"))
+ column = Gtk.TreeViewColumn(guilabels.PRESENTATION_PRESENT_UNLESS)
renderer = Gtk.CellRendererText()
renderer.set_property('editable', True)
column.pack_end(renderer, True)
@@ -1310,13 +1237,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
self.pronunciationView.set_model(model)
# Pronunciation Dictionary actual string (word) column (ACTUAL).
- #
- # Translators: "Actual String" here refers to a text string as it
- # actually appears in a text document. This might be an abbreviation
- # or a particular word that is pronounced differently then the way
- # that it looks.
- #
- column = Gtk.TreeViewColumn(_("Actual String"))
+ column = Gtk.TreeViewColumn(guilabels.DICTIONARY_ACTUAL_STRING)
column.set_min_width(250)
column.set_resizable(True)
renderer = Gtk.CellRendererText()
@@ -1327,13 +1248,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
self.pronunciationView.insert_column(column, 0)
# Pronunciation Dictionary replacement string column (REPLACEMENT)
- #
- # Translators: "Replacement String" here refers to the text string
- # that will actually be used to speak it's matching "actual string".
- # For example: if the actual string was "MHz", then the replacement
- # (spoken) string would be "megahertz".
- #
- column = Gtk.TreeViewColumn(_("Replacement String"))
+ column = Gtk.TreeViewColumn(guilabels.DICTIONARY_REPLACEMENT_STRING)
renderer = Gtk.CellRendererText()
renderer.set_property('editable', True)
column.pack_end(renderer, True)
@@ -1400,31 +1315,16 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
prefs["speakMultiCaseStringsAsWords"])
self.get_widget("enableTutorialMessagesCheckButton").set_active(\
prefs["enableTutorialMessages"])
-
self.get_widget("enablePauseBreaksCheckButton").set_active(\
prefs["enablePauseBreaks"])
-
- # Translators: different speech systems and speech engines work
- # differently when it comes to handling pauses (e.g., sentence
- # boundaries). This property allows the user to specify whether
- # speech should be sent to the speech synthesis system immediately
- # when a pause directive is enountered or if it should be queued
- # up and sent to the speech synthesis system once the entire set
- # of utterances has been calculated.
- #
- label = _("Break speech into ch_unks between pauses")
- # TODO - JD: I did the above because GtkBuilder translator notes
- # (which we have for the above string) are not getting sucked in
- # to orca.pot. :-(
-
self.get_widget("enablePositionSpeakingCheckButton").set_active(\
prefs["enablePositionSpeaking"])
-
self.get_widget("enableMnemonicSpeakingCheckButton").set_active(\
prefs["enableMnemonicSpeaking"])
combobox = self.get_widget("sayAllStyle")
- self.populateComboBox(combobox, [_("Line"), _("Sentence")])
+ self.populateComboBox(combobox, [guilabels.SAY_ALL_STYLE_LINE,
+ guilabels.SAY_ALL_STYLE_SENTENCE])
combobox.set_active(prefs["sayAllStyle"])
combobox2 = self.get_widget("dateFormatCombo")
@@ -1517,26 +1417,9 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
self.get_widget("speakProgressBarSpinButton").set_value(interval)
comboBox = self.get_widget("progressBarVerbosity")
- levels = []
- # Translators: Orca has a setting which determines which progress
- # bar updates should be announced. Choosing "All" means that Orca
- # will present progress bar updates regardless of what application
- # and window they happen to be in.
- #
- levels.append(C_("ProgressBar", "All"))
- # Translators: Orca has a setting which determines which progress
- # bar updates should be announced. Choosing "Application" means
- # that Orca will present progress bar updates as long as the
- # progress bar is in the active application (but not necessarily
- # in the current window).
- #
- levels.append(C_("ProgressBar", "Application"))
- # Translators: Orca has a setting which determines which progress
- # bar updates should be announced. Choosing "Window" means that
- # Orca will present progress bar updates as long as the progress
- # bar is in the active window.
- #
- levels.append(C_("ProgressBar", "Window"))
+ levels = [guilabels.PROGRESS_BAR_ALL,
+ guilabels.PROGRESS_BAR_APPLICATION,
+ guilabels.PROGRESS_BAR_WINDOW]
self.populateComboBox(comboBox, levels)
comboBox.set_active(prefs["progressBarVerbosity"])
@@ -1637,19 +1520,6 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
prefs["enableEchoByWord"])
self.get_widget("enableEchoBySentenceCheckButton").set_active( \
prefs["enableEchoBySentence"])
-
- # Translators: When this option is enabled, dead keys will be
- # announced when pressed.
- #
- label = _("Enable non-spacing _diacritical keys")
- # TODO - JD: I did the above because GtkBuilder translator notes
- # (which we have for the above string) are not getting sucked in
- # to orca.pot. :-(
-
- # Translators: When this option is enabled, inserted text of length
- # 1 is spoken.
- #
- label = _("Enable echo by cha_racter")
# Text attributes pane.
#
@@ -1928,17 +1798,9 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
clickCountString = ""
if clickCount == 2:
- # Translators: Orca keybindings support double
- # and triple "clicks" or key presses, similar to
- # using a mouse.
- #
- clickCountString = " " + _("(double click)")
+ clickCountString = " (%s)" % guilabels.CLICK_COUNT_DOUBLE
elif clickCount == 3:
- # Translators: Orca keybindings support double
- # and triple "clicks" or key presses, similar to
- # using a mouse.
- #
- clickCountString = " " + _("(triple click)")
+ clickCountString = " (%s)" % guilabels.CLICK_COUNT_TRIPLE
return clickCountString
@@ -1957,7 +1819,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
model = self.keyBindingsModel
if parent == None:
- parent = self._getIterOf(_("Orca"))
+ parent = self._getIterOf(guilabels.KB_GROUP_DEFAULT)
if parent != None:
myiter = model.append(parent)
@@ -2004,12 +1866,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
model = self.keyBindingsModel
if parent == None:
- # Translators: an external braille device has buttons on it that
- # permit the user to create input gestures from the braille device.
- # The braille bindings are what determine the actions Orca will
- # take when the user presses these buttons.
- #
- parent = self._getIterOf(_("Braille Bindings"))
+ parent = self._getIterOf(guilabels.KB_GROUP_BRAILLE)
if parent != None:
myiter = model.append(parent)
@@ -2064,13 +1921,10 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
self.keyBindingsModel.clear()
self.kbindings = None
- iterOrca = self._getIterOf("Orca") or self._createNode(_("Orca"))
-
- # Translators: this refers to commands that do not currently have
- # an associated key binding.
- #
- iterUnbound = self._getIterOf("Unbound") \
- or self._createNode(_("Unbound"))
+ iterOrca = self._getIterOf(guilabels.KB_GROUP_DEFAULT) \
+ or self._createNode(guilabels.KB_GROUP_DEFAULT)
+ iterUnbound = self._getIterOf(guilabels.KB_GROUP_UNBOUND) \
+ or self._createNode(guilabels.KB_GROUP_UNBOUND)
defScript = _scriptManager.getDefaultScript()
@@ -2096,13 +1950,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
self._updateOrcaModifier()
self._markModified()
-
- # Translators: an external braille device has buttons on it that
- # permit the user to create input gestures from the braille device.
- # The braille bindings are what determine the actions Orca will
- # take when the user presses these buttons.
- #
- iterBB = self._createNode(_("Braille Bindings"))
+ iterBB = self._createNode(guilabels.KB_GROUP_BRAILLE)
self.bbindings = defScript.getBrailleBindings()
for com, inputEvHand in list(self.bbindings.items()):
handl = defScript.getInputEventHandlerKey(inputEvHand)
@@ -2353,26 +2201,13 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
"""
if widget.get_active():
- # Translators: A single braille cell on a refreshable
- # braille display consists of 8 dots. If the user
- # chooses this setting, the dot in the bottom left
- # corner will be used to 'underline' text of interest.
- #
- if widget.get_label() == _("Dot _7"):
+ if widget.get_label() == guilabels.BRAILLE_DOT_7:
self.prefsDict["brailleSelectorIndicator"] = \
settings.BRAILLE_SEL_7
- # Translators: If the user chooses this setting, the
- # dot in the bottom right corner of the braille cell
- # will be used to 'underline' text of interest.
- #
- elif widget.get_label() == _("Dot _8"):
+ elif widget.get_label() == guilabels.BRAILLE_DOT_8:
self.prefsDict["brailleSelectorIndicator"] = \
settings.BRAILLE_SEL_8
- # Translators: If the user chooses this setting, the
- # two dots at the bottom of the braille cell will be
- # used to 'underline' text of interest.
- #
- elif widget.get_label() == _("Dots 7 an_d 8"):
+ elif widget.get_label() == guilabels.BRAILLE_DOT_7_8:
self.prefsDict["brailleSelectorIndicator"] = \
settings.BRAILLE_SEL_BOTH
else:
@@ -2394,26 +2229,13 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
"""
if widget.get_active():
- # Translators: A single braille cell on a refreshable
- # braille display consists of 8 dots. If the user
- # chooses this setting, the dot in the bottom left
- # corner will be used to 'underline' text of interest.
- #
- if widget.get_label() == _("Dot _7"):
+ if widget.get_label() == guilabels.BRAILLE_DOT_7:
self.prefsDict["brailleLinkIndicator"] = \
settings.BRAILLE_LINK_7
- # Translators: If the user chooses this setting, the
- # dot in the bottom right corner of the braille cell
- # will be used to 'underline' text of interest.
- #
- elif widget.get_label() == _("Dot _8"):
+ elif widget.get_label() == guilabels.BRAILLE_DOT_8:
self.prefsDict["brailleLinkIndicator"] = \
settings.BRAILLE_LINK_8
- # Translators: If the user chooses this setting, the
- # two dots at the bottom of the braille cell will be
- # used to 'underline' text of interest.
- #
- elif widget.get_label() == _("Dots 7 an_d 8"):
+ elif widget.get_label() == guilabels.BRAILLE_DOT_7_8:
self.prefsDict["brailleLinkIndicator"] = \
settings.BRAILLE_LINK_BOTH
else:
@@ -2434,26 +2256,13 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
"""
if widget.get_active():
- # Translators: A single braille cell on a refreshable
- # braille display consists of 8 dots. If the user
- # chooses this setting, the dot in the bottom left
- # corner will be used to 'underline' text of interest.
- #
- if widget.get_label() == _("Dot _7"):
+ if widget.get_label() == guilabels.BRAILLE_DOT_7:
self.prefsDict["textAttributesBrailleIndicator"] = \
settings.TEXT_ATTR_BRAILLE_7
- # Translators: If the user chooses this setting, the
- # dot in the bottom right corner of the braille cell
- # will be used to 'underline' text of interest.
- #
- elif widget.get_label() == _("Dot _8"):
+ elif widget.get_label() == guilabels.BRAILLE_DOT_8:
self.prefsDict["textAttributesBrailleIndicator"] = \
settings.TEXT_ATTR_BRAILLE_8
- # Translators: If the user chooses this setting, the
- # two dots at the bottom of the braille cell will be
- # used to 'underline' text of interest.
- #
- elif widget.get_label() == _("Dots 7 an_d 8"):
+ elif widget.get_label() == guilabels.BRAILLE_DOT_7_8:
self.prefsDict["textAttributesBrailleIndicator"] = \
settings.TEXT_ATTR_BRAILLE_BOTH
else:
@@ -2473,25 +2282,13 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
"""
if widget.get_active():
- # Translators: If this setting is chosen, no punctuation
- # symbols will be spoken as a user reads a document.
- #
- if widget.get_label() == C_("punctuation level", "_None"):
+ if widget.get_label() == guilabels.PUNCTUATION_STYLE_NONE:
self.prefsDict["verbalizePunctuationStyle"] = \
settings.PUNCTUATION_STYLE_NONE
- # Translators: If this setting is chosen, common punctuation
- # symbols (like comma, period, question mark) will not be
- # spoken as a user reads a document, but less common symbols
- # (such as #, @, $) will.
- #
- elif widget.get_label() == _("So_me"):
+ elif widget.get_label() == guilabels.PUNCTUATION_STYLE_SOME:
self.prefsDict["verbalizePunctuationStyle"] = \
settings.PUNCTUATION_STYLE_SOME
- # Translators: If this setting is chosen, the majority of
- # punctuation symbols will be spoken as a user reads a
- # document.
- #
- elif widget.get_label() == _("M_ost"):
+ elif widget.get_label() == guilabels.PUNCTUATION_STYLE_MOST:
self.prefsDict["verbalizePunctuationStyle"] = \
settings.PUNCTUATION_STYLE_MOST
else:
@@ -2523,29 +2320,12 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
model = widget.get_model()
myIter = widget.get_active_iter()
progressBarVerbosity = model[myIter][0]
-
- # Translators: Orca has a setting which determines which progress
- # bar updates should be announced. Choosing "All" means that Orca
- # will present progress bar updates regardless of what application
- # and window they happen to be in.
- #
- if progressBarVerbosity == C_("ProgressBar", "All"):
+ if progressBarVerbosity == guilabels.PROGRESS_BAR_ALL:
self.prefsDict["progressBarVerbosity"] = \
settings.PROGRESS_BAR_ALL
- # Translators: Orca has a setting which determines which progress
- # bar updates should be announced. Choosing "Window" means that
- # Orca will present progress bar updates as long as the progress
- # bar is in the active window.
- #
- elif progressBarVerbosity == C_("ProgressBar", "Window"):
+ elif progressBarVerbosity == guilabels.PROGRESS_BAR_WINDOW:
self.prefsDict["progressBarVerbosity"] = \
settings.PROGRESS_BAR_WINDOW
- # Translators: Orca has a setting which determines which progress
- # bar updates should be announced. Choosing "Application" means
- # that Orca will present progress bar updates as long as the
- # progress bar is in the active application (but not necessarily
- # in the current window).
- #
else:
self.prefsDict["progressBarVerbosity"] = \
settings.PROGRESS_BAR_APPLICATION
@@ -2562,18 +2342,9 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
model = widget.get_model()
myIter = widget.get_active_iter()
sayAllStyle = model[myIter][0]
-
- # Translators: If this setting is chosen and the user is reading
- # over an entire document, Orca will pause at the end of each
- # line.
- #
- if sayAllStyle == _("Line"):
+ if sayAllStyle == guilabels.SAY_ALL_STYLE_LINE:
self.prefsDict["sayAllStyle"] = settings.SAYALL_STYLE_LINE
- # Translators: If this setting is chosen and the user is reading
- # over an entire document, Orca will pause at the end of each
- # sentence.
- #
- elif sayAllStyle == _("Sentence"):
+ elif sayAllStyle == guilabels.SAY_ALL_STYLE_SENTENCE:
self.prefsDict["sayAllStyle"] = settings.SAYALL_STYLE_SENTENCE
def dateFormatChanged(self, widget):
@@ -2655,11 +2426,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
"""
if widget.get_active():
- # Translators: This refers to the amount of information
- # Orca provides about a particular object that receives
- # focus.
- #
- if widget.get_label() == _("Brie_f"):
+ if widget.get_label() == guilabels.VERBOSITY_LEVEL_BRIEF:
self.prefsDict["speechVerbosityLevel"] = \
settings.VERBOSITY_LEVEL_BRIEF
else:
@@ -2679,11 +2446,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
"""
if widget.get_active():
- # Translators: when users are navigating a table, they
- # sometimes want the entire row of a table read, or
- # they just want the current cell to be presented to them.
- #
- if widget.get_label() == _("Speak _cell"):
+ if widget.get_label() == guilabels.TABLE_SPEAK_CELL:
self.prefsDict["readTableCellRow"] = False
else:
self.prefsDict["readTableCellRow"] = True
@@ -2747,7 +2510,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
"""
if widget.get_active():
- if widget.get_label() == _("Brie_f"):
+ if widget.get_label() == guilabels.VERBOSITY_LEVEL_BRIEF:
self.prefsDict["brailleVerbosityLevel"] = \
settings.VERBOSITY_LEVEL_BRIEF
else:
@@ -2763,11 +2526,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
def editingKey(self, cell, editable, path, treeModel):
"""Starts user input of a Key for a selected key binding"""
- # Translators: this is a spoken prompt asking the user to press
- # a new key combination (e.g., Alt+Ctrl+g) to create a new
- # key bindings.
- #
- self._presentMessage(_("enter new key"))
+ self._presentMessage(messages.KB_ENTER_NEW_KEY)
orca_state.capturingKeys = True
editable.connect('key-press-event', self.kbKeyPressed)
return
@@ -2839,12 +2598,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
isOrcaModifier = modifiers & settings.ORCA_MODIFIER_MASK
if keyName in ["Delete", "BackSpace"] and not isOrcaModifier:
editable.set_text("")
- # Translators: this is a spoken prompt letting the user know
- # Orca has deleted an existing key combination based upon
- # their input.
- #
- self._presentMessage(
- _("Key binding deleted. Press enter to confirm."))
+ self._presentMessage(messages.KB_DELETED)
self._capturedKey = []
self.newBinding = None
return True
@@ -2869,19 +2623,11 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
description = matches[0].handler.description
if description:
- # Translators: this is a spoken prompt letting the user know
- # that the key combination (e.g., Ctrl+Alt+f) they just
- # entered has already been bound to another command.
- #
- msg = _("The key entered is already bound to %s") % description
+ msg = messages.KB_ALREADY_BOUND % description
delay = int(1000 * settings.doubleClickTimeout)
GLib.timeout_add(delay, self._presentMessage, msg)
else:
- # Translators: this is a spoken prompt letting the user know Orca
- # know Orca has recorded a new key combination (e.g., Alt+Ctrl+g)
- # based upon their input.
- #
- msg = _("Key captured: %s. Press enter to confirm.") % newString
+ msg = messages.KB_CAPTURED % newString
editable.set_text(newString)
self._presentMessage(msg)
@@ -2925,19 +2671,11 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
MODIF, modified)
speech.stop()
if new_text:
- # Translators: this is a spoken prompt confirming the key
- # combination (e.g., Ctrl+Alt+f) the user just typed when
- # creating a new key binding.
- #
- message = _("The new key is: %s") % new_text
+ message = messages.KB_CAPTURED_CONFIRMATION % new_text
description = treeModel.get_value(myiter, DESCRIP)
self.pendingKeyBindings[new_text] = description
else:
- # Translators: this is a spoken prompt confirming that an
- # existing key combination (e.g., Ctrl+Alt+f) that was
- # associated with a command has been deleted.
- #
- message = _("The keybinding has been removed.")
+ message = messages.KB_DELETED_CONFIRMATION
if modified:
self._presentMessage(message)
@@ -2972,10 +2710,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
"""
if widget.get_active():
- # Translators: this refers to the keyboard layout (desktop
- # or laptop).
- #
- if widget.get_label() == _("_Desktop"):
+ if widget.get_label() == guilabels.KEYBOARD_LAYOUT_DESKTOP:
self.prefsDict["keyboardLayout"] = \
settings.GENERAL_KEYBOARD_LAYOUT_DESKTOP
self.prefsDict["orcaModifierKeys"] = \
@@ -3337,39 +3072,16 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
saveActiveProfile()
else:
if profileToSave != None:
- # Translators: This text is shown in a message dialog informing
- # the user that he/she attempted to save a new user profile
- # under a name which already exists. A "user profile" is a
- # collection of settings which apply to a given task, such as
- # a "Spanish" profile which would use Spanish text-to-speech
- # and Spanish braille and selected when reading Spanish content.
- message = _("Profile %s already exists.\n" \
- "Continue updating the existing profile with " \
- "these new changes?") % \
- ("<b>%s</b>" % profileToSaveLabel)
-
+ message = guilabels.PROFILE_CONFLICT_MESSAGE % \
+ ("<b>%s</b>" % profileToSaveLabel)
dialog = Gtk.MessageDialog(None,
Gtk.DialogFlags.MODAL,
type=Gtk.MessageType.INFO,
buttons=Gtk.ButtonsType.YES_NO)
-
- # Translators: This is a label in a message dialog informing
- # the user that he/she attempted to save a new user profile
- # under a name which already exists. A "user profile" is a
- # collection of settings which apply to a given task, such as
- # a "Spanish" profile which would use Spanish text-to-speech
- # and Spanish braille and selected when reading Spanish content.
- dialog.set_markup("<b>%s</b>" % _("User Profile Conflict!"))
+ dialog.set_markup("<b>%s</b>" % guilabels.PROFILE_CONFLICT_LABEL)
dialog.format_secondary_markup(message)
- # Translators: This is the title of a message dialog informing
- # the user that he/she attempted to save a new user profile
- # under a name which already exists. A "user profile" is a
- # collection of settings which apply to a given task, such as
- # a "Spanish" profile which would use Spanish text-to-speech
- # and Spanish braille and selected when reading Spanish content.
- dialog.set_title(_("Save Profile As Conflict"))
+ dialog.set_title(guilabels.PROFILE_CONFLICT_TITLE)
response = dialog.run()
-
if response == Gtk.ResponseType.YES:
dialog.destroy()
saveActiveProfile(False)
@@ -3383,32 +3095,14 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
if self._isInitialSetup:
return
- # Translators: This text is displayed in a message dialog when a user
- # indicates he/she wants to switch to a new user profile and, in the
- # process, lose settings which have been altered but not yet saved. A
- # "user profile" is a collection of settings which apply to a given task
- # such as a "Spanish" profile which would use Spanish text-to-speech and
- # Spanish braille and selected when reading Spanish content.
- message = _("You are about to change the active profile. If you\n" \
- "have just made changes in your preferences, they will\n" \
- "be dropped at profile load.\n\n" \
- "Continue loading profile discarding previous changes?")
-
dialog = Gtk.MessageDialog(None,
Gtk.DialogFlags.MODAL,
type=Gtk.MessageType.INFO,
buttons=Gtk.ButtonsType.YES_NO)
- # Translators: This text is displayed in a message dialog when a user
- # indicates he/she wants to switch to a new user profile and, in the
- # process, lose settings which have been altered but not yet saved. A
- # "user profile" is a collection of settings which apply to a given task
- # such as a "Spanish" profile which would use Spanish text-to-speech and
- # Spanish braille and selected when reading Spanish content.
- dialog.set_markup("<b>%s</b>" % _("Load user profile"))
- dialog.format_secondary_markup(message)
+ dialog.set_markup("<b>%s</b>" % guilabels.PROFILE_LOAD_LABEL)
+ dialog.format_secondary_markup(guilabels.PROFILE_LOAD_MESSAGE)
response = dialog.run()
-
if response == Gtk.ResponseType.YES:
dialog.destroy()
self.loadSelectedProfile()
@@ -3472,14 +3166,6 @@ class WarningDialogGUI(Gtk.MessageDialog):
def showPreferencesUI():
if not orca_state.appOS and not orca_state.orcaOS:
- line = messages.STARTING_ORCA_PREFS
- defScript = _scriptManager.getDefaultScript()
- defScript.speakMessage(line)
- try:
- defScript.displayBrailleMessage(line, flashTime=-1)
- except:
- pass
-
startingProfile = _settingsManager.profile
prefsDict = _settingsManager.getGeneralSettings(startingProfile)
diff --git a/src/orca/orca_gui_profile.py b/src/orca/orca_gui_profile.py
index 210aa66..e22ce09 100644
--- a/src/orca/orca_gui_profile.py
+++ b/src/orca/orca_gui_profile.py
@@ -31,8 +31,8 @@ import locale
import sys
from gi.repository import Gtk
+from . import guilabels
from . import orca_state
-from .orca_i18n import _
OS = None
newProfile = None
@@ -43,16 +43,7 @@ class OrcaProfileGUI(Gtk.Dialog):
"""Initialize the Orca profile configuration GUI."""
Gtk.Dialog.__init__(self)
-
- # Translators: Profiles in Orca make it possible for users to
- # quickly switch amongst a group of pre-defined settings (e.g.
- # an 'English' profile for reading text written in English using
- # an English-language speech synthesizer and braille rules, and
- # a similar 'Spanish' profile for reading Spanish text. The
- # following string is the title of a dialog in which users can
- # save a newly-defined profile.
- #
- self.set_title(_('Save Profile As'))
+ self.set_title(guilabels.PROFILE_SAVE_AS_TITLE)
self.set_has_resize_grip(False)
self.add_button('gtk-cancel', Gtk.ResponseType.CANCEL)
@@ -73,16 +64,7 @@ class OrcaProfileGUI(Gtk.Dialog):
self.profileEntry.set_activates_default(True)
grid.attach(self.profileEntry, 1, 0, 1, 1)
- # Translators: Profiles in Orca make it possible for users to
- # quickly switch amongst a group of pre-defined settings (e.g.
- # an 'English' profile for reading text written in English using
- # an English-language speech synthesizer and braille rules, and
- # a similar 'Spanish' profile for reading Spanish text. The
- # following string is the label for a text entry in which the user
- # enters the name of a new settings profile being saved via the
- # 'Save Profile As' dialog.
- #
- label = Gtk.Label(_('_Profile Name:'))
+ label = Gtk.Label(guilabels.PROFILE_NAME_LABEL)
label.set_use_underline(True)
label.set_mnemonic_widget(self.profileEntry)
grid.attach(label, 0, 0, 1, 1)
diff --git a/src/orca/orca_i18n.py.in b/src/orca/orca_i18n.py.in
index cd7b53e..04e3613 100644
--- a/src/orca/orca_i18n.py.in
+++ b/src/orca/orca_i18n.py.in
@@ -84,8 +84,8 @@ def setLocaleForNames(newLocale=None):
setModuleLocale(module, newLocale)
def setLocaleForGUI(newLocale=None):
- modules = ['orca.orca_gtkbuilder', 'orca.orca_gui_prefs',
- 'orca.app_gui_prefs', 'orca.guilabels',
+ modules = ['orca.orca_gtkbuilder',
+ 'orca.guilabels',
'orca.brltablenames']
for module in modules:
setModuleLocale(module, newLocale)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]