[orca] Change the remaining instances of "blank" so that they are handled during profile-based language swi



commit 519102683acd0033b2fcffb377215eb08fa5e846
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sun Feb 24 21:34:33 2013 -0500

    Change the remaining instances of "blank" so that they are handled during profile-based language switching

 src/orca/scripts/apps/evolution/script.py         |    6 ++----
 src/orca/scripts/apps/soffice/speech_generator.py |   11 +++--------
 src/orca/scripts/toolkits/Gecko/script.py         |    6 ++----
 src/orca/speech_generator.py                      |   11 +++--------
 src/orca/structural_navigation.py                 |    5 +----
 5 files changed, 11 insertions(+), 28 deletions(-)
---
diff --git a/src/orca/scripts/apps/evolution/script.py b/src/orca/scripts/apps/evolution/script.py
index 8476bc6..5987d4b 100644
--- a/src/orca/scripts/apps/evolution/script.py
+++ b/src/orca/scripts/apps/evolution/script.py
@@ -34,6 +34,7 @@ import orca.scripts.default as default
 import orca.keybindings as keybindings
 import orca.input_event as input_event
 import orca.braille as braille
+import orca.messages as messages
 import orca.orca as orca
 import orca.orca_state as orca_state
 import orca.speech as speech
@@ -325,10 +326,7 @@ class Script(default.Script):
         line = self.utilities.adjustForRepeats(string)
 
         if self.utilities.speakBlankLine(obj):
-            # Translators: "blank" is a short word to mean the
-            # user has navigated to an empty line.
-            #
-            speech.speak(_("blank"), None, False)
+            speech.speak(messages.BLANK, None, False)
         else:
             speech.speak(line, None, False)
 
diff --git a/src/orca/scripts/apps/soffice/speech_generator.py 
b/src/orca/scripts/apps/soffice/speech_generator.py
index 128c11b..e5c6174 100644
--- a/src/orca/scripts/apps/soffice/speech_generator.py
+++ b/src/orca/scripts/apps/soffice/speech_generator.py
@@ -27,6 +27,7 @@ __license__   = "LGPL"
 
 import pyatspi
 
+import orca.messages as messages
 import orca.settings_manager as settings_manager
 import orca.speech_generator as speech_generator
 from orca.orca_i18n import ngettext
@@ -421,10 +422,7 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
                 if (not script_settings.speakSpreadsheetCoordinates \
                     or args.get('formatType', 'unfocused') == 'basicWhereAmI') \
                    and len(objectText) == 0:
-                    # Translators: this indicates an empty (blank) spread
-                    # sheet cell.
-                    #
-                    objectText = _("blank")
+                    objectText = messages.BLANK
                 result.append(objectText)
                 result.extend(acss)
         except NotImplementedError:
@@ -535,10 +533,7 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
                     self, obj, **args))
             if not len(result) \
                and _settingsManager.getSetting('speakBlankLines'):
-                # Translators: "blank" is a short word to mean the
-                # user has navigated to an empty line.
-                #
-                result.append(_("blank"))
+                result.append(messages.BLANK)
         return result
 
     def _generateEndOfTableIndicator(self, obj, **args):
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index b934afa..2c2c6d9 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -53,6 +53,7 @@ import orca.eventsynthesizer as eventsynthesizer
 import orca.input_event as input_event
 import orca.keybindings as keybindings
 import orca.liveregions as liveregions
+import orca.messages as messages
 import orca.orca as orca
 import orca.orca_state as orca_state
 import orca.settings as settings
@@ -4391,10 +4392,7 @@ class Script(default.Script):
 
         if (len(clumped) == 1) and (clumped[0][0] == "\n"):
             if _settingsManager.getSetting('speakBlankLines'):
-                # Translators: "blank" is a short word to mean the
-                # user has navigated to an empty line.
-                #
-                return [[_("blank"), self.voices[settings.SYSTEM_VOICE]]]
+                return [[messages.BLANK, self.voices[settings.SYSTEM_VOICE]]]
 
         if len(clumped) and isinstance(clumped[-1][0], str):
             clumped[-1][0] = clumped[-1][0].rstrip(" ")
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index 31498cb..d271eb3 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -31,6 +31,7 @@ from gi.repository import Atspi, Atk
 
 from . import debug
 from . import generator
+from . import messages
 from . import settings
 from . import settings_manager
 from . import sound
@@ -732,10 +733,7 @@ class SpeechGenerator(generator.Generator):
         self._restoreRole(oldRole, args)
         if not result and _settingsManager.getSetting('speakBlankLines') \
            and not args.get('readingRow', False):
-            # Translators: "blank" is a short word to mean the
-            # user has navigated to an empty line.
-            #
-            result.append(_("blank"))
+            result.append(messages.BLANK)
             if result:
                 result.extend(acss)
 
@@ -1084,10 +1082,7 @@ class SpeechGenerator(generator.Generator):
                     pyatspi.TEXT_BOUNDARY_CHAR)
                 if char[0] == "\n" and startOffset == caretOffset \
                        and _settingsManager.getSetting('speakBlankLines'):
-                    # Translators: "blank" is a short word to mean the
-                    # user has navigated to an empty line.
-                    #
-                    textContents = (_("blank"))
+                    textContents = (messages.BLANK)
 
         self._script.generatorCache['textInformation'] = \
             [textContents, startOffset, endOffset, selected]
diff --git a/src/orca/structural_navigation.py b/src/orca/structural_navigation.py
index 078c4bd..d1d2dfa 100644
--- a/src/orca/structural_navigation.py
+++ b/src/orca/structural_navigation.py
@@ -3743,10 +3743,7 @@ class StructuralNavigation:
         if not blank:
             self._presentObject(cell, 0)
         else:
-            # Translators: "blank" is a short word to mean the
-            # user has navigated to an empty line.
-            #
-            speech.speak(_("blank"))
+            speech.speak(messages.BLANK)
 
         if settings.speakCellCoordinates:
             [row, col] = self.getCellCoordinates(cell)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]