[orca] Get the keybinding in the right locale for profile-based language switching



commit 816e622d62f14a820aa8825fe8432d87eb3d291b
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Mar 4 20:01:07 2013 -0500

    Get the keybinding in the right locale for profile-based language switching

 src/orca/keybindings.py     |    4 +---
 src/orca/orca_i18n.py.in    |    2 +-
 src/orca/scripts/default.py |    2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/orca/keybindings.py b/src/orca/keybindings.py
index 4d0bb1f..b15b0c4 100644
--- a/src/orca/keybindings.py
+++ b/src/orca/keybindings.py
@@ -217,14 +217,12 @@ class KeyBinding:
         except:
             return ''
 
-    def asString(self, convertKeysym=False):
+    def asString(self):
         """Returns a more human-consumable string representing this binding."""
 
         mods = getModifierNames(self.modifiers)
         clickCount = getClickCountString(self.click_count)
         keysym = self.keysymstring
-        if convertKeysym:
-            keysym = keysym.replace('KP_', _('keypad ')).title()
         string = '%s%s %s' % (mods, keysym, clickCount)
 
         return string.strip()
diff --git a/src/orca/orca_i18n.py.in b/src/orca/orca_i18n.py.in
index 6778f89..cd7b53e 100644
--- a/src/orca/orca_i18n.py.in
+++ b/src/orca/orca_i18n.py.in
@@ -79,7 +79,7 @@ def setLocaleForMessages(newLocale=None):
 def setLocaleForNames(newLocale=None):
     modules = ['orca.chnames', 'orca.keynames', 'orca.phonnames',
                'orca.text_attribute_names', 'orca.object_properties',
-               'orca.cmdnames']
+               'orca.cmdnames', 'orca.keybindings']
     for module in modules:
         setModuleLocale(module, newLocale)
 
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index c410240..27ff538 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -1053,7 +1053,7 @@ class Script(script.Script):
 
         rows = [(kb.handler.function,
                  kb.handler.description,
-                 kb.asString(True)) for kb in bound]
+                 kb.asString()) for kb in bound]
         sorted(rows, key=lambda cmd: cmd[2])
 
         header1 = guilabels.KB_HEADER_FUNCTION


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