GNOME Bugzilla – Bug 582028
Character pronunciations are not used when navigating by line
Last modified: 2009-05-25 11:12:54 UTC
Go to http://bugzilla.gnome.org/show_bug.cgi?id=575614#c3 after applying the patch for the bug. Arrow up and down. The characters are not spoken.
Created attachment 134340 [details] [review] Patch This patch makes the following adjustments to the code (not sure they are actually the right thing to do, but they seem to fix some issues I found while testing the patch for bug #575614): 1) Modifies pronunciation_dict.py to try chnames.py:getCharacterName if it cannot find a pronunciation for the word passed in. The use case for this is when reading a line where the character is surrounded by whitespace. Without this, character pronunciations are not used when reading a line. 2) Modifies default.py:adjustForPronunciation to include the single and double quote characters as word delimiters. Doing this for double quotes seems safe enough, but I'm not sure single quotes is really safe because the single quote is used for contractions such as "I'm" and "ain't" and "isn't", etc. However, the use case is when a character appears in single or double quotes and you are arrowing up and down by line.
(In reply to comment #1) > 1) Modifies pronunciation_dict.py to try chnames.py:getCharacterName if it > cannot find a pronunciation for the word passed in. The use case for this is > when reading a line where the character is surrounded by whitespace. Without > this, character pronunciations are not used when reading a line. Anyone know any reason why we didn't do this before? I wonder if it was on purpose or if it is a bug. > 2) Modifies default.py:adjustForPronunciation to include the single and double > quote characters as word delimiters. Doing this for double quotes seems safe > enough, but I'm not sure single quotes is really safe because the single quote > is used for contractions such as "I'm" and "ain't" and "isn't", etc. However, > the use case is when a character appears in single or double quotes and you are > arrowing up and down by line. I'm wondering if we should look for a pattern of "x" or 'x' instead of looking at things a character at a time. This would probably be safer.
Created attachment 135308 [details] [review] Patch committed to master and gnome-2-26 I committed the pronunciation dictionary portion of the patch, but not the portion that adds ' and " as delimiters when looking for words. I thought that was too risky because of contracted words and such. We can always open a new bug for those if people raise that as an issue.