[orca] Fix for bug #637422 - bookmarkCurrentWhereAmI() is not presenting roles correctly



commit e4cdc03367f0107652cf90178c1c147f26eb43d8
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Thu Dec 16 18:42:54 2010 -0500

    Fix for bug #637422 - bookmarkCurrentWhereAmI() is not presenting roles correctly

 src/orca/bookmarks.py                        |    4 +++-
 src/orca/scripts/toolkits/Gecko/bookmarks.py |    5 +++--
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/bookmarks.py b/src/orca/bookmarks.py
index bd10ad7..3bdb437 100644
--- a/src/orca/bookmarks.py
+++ b/src/orca/bookmarks.py
@@ -22,6 +22,7 @@
 import pickle
 import os
 
+import rolenames
 import speech
 import settings
 import orca_state
@@ -122,10 +123,11 @@ class Bookmarks:
         p = cur_obj.parent
         while p:
             if bookmark_ancestors.count(p) > 0:
+                rolename = rolenames.getSpeechForRoleName(p)
                 # Translators: this announces that the bookmark and the current
                 # object share a common ancestor
                 #
-                self._script.presentMessage(_('shared ancestor %s') % p.role)
+                self._script.presentMessage(_('shared ancestor %s') % rolename)
                 return
             p = p.parent
 
diff --git a/src/orca/scripts/toolkits/Gecko/bookmarks.py b/src/orca/scripts/toolkits/Gecko/bookmarks.py
index 8d5ef49..40eb8f8 100644
--- a/src/orca/scripts/toolkits/Gecko/bookmarks.py
+++ b/src/orca/scripts/toolkits/Gecko/bookmarks.py
@@ -34,6 +34,7 @@ import urlparse
 
 import orca.speech as speech
 import orca.bookmarks as bookmarks
+import orca.rolenames as rolenames
 
 from orca.orca_i18n import _
 
@@ -126,11 +127,11 @@ class GeckoBookmarks(bookmarks.Bookmarks):
         p = cur_obj.parent
         while p:
             if bookmark_ancestors.count(p) > 0:
+                rolename = rolenames.getSpeechForRoleName(p)
                 # Translators: this announces that the bookmark and the current
                 # object share a common ancestor
                 #
-                self._script.presentMessage(
-                    _('shared ancestor %s') % p.getRole())
+                self._script.presentMessage(_('shared ancestor %s') % rolename)
                 return
             p = p.parent
         



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