[orca] Fix for bgo#582028 - Character pronunciations are not used when navigating by line



commit 9825b17083d6ae30cc2212e47ead0ad205d6654a
Author: Willie Walker <william walker sun com>
Date:   Mon May 25 07:03:18 2009 -0400

    Fix for bgo#582028 - Character pronunciations are not used when navigating by line
    
    This provides a fallback to the chnames dictionary
---
 src/orca/pronunciation_dict.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/orca/pronunciation_dict.py b/src/orca/pronunciation_dict.py
index 805b2d9..f27bc5b 100644
--- a/src/orca/pronunciation_dict.py
+++ b/src/orca/pronunciation_dict.py
@@ -26,6 +26,8 @@ __date__      = "$Date$"
 __copyright__ = "Copyright (c) 2006-2008 Sun Microsystems Inc."
 __license__   = "LGPL"
 
+import chnames
+
 def getPronunciation(word, pronunciations=None):
     """Given a word, return a string that represents what this word
     sounds like.
@@ -49,7 +51,7 @@ def getPronunciation(word, pronunciations=None):
         else:
             return pronunciation_dict[lowerWord][1]
     except:
-        return word
+        return chnames.getCharacterName(word)
 
 def setPronunciation(word, replacementString, pronunciations=None):
     """Given an actual word, and a replacement string, set a key/value



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