orca r4542 - in branches/gnome-2-24: . src/orca
- From: wwalker svn gnome org
- To: svn-commits-list gnome org
- Subject: orca r4542 - in branches/gnome-2-24: . src/orca
- Date: Fri, 13 Feb 2009 22:07:53 +0000 (UTC)
Author: wwalker
Date: Fri Feb 13 22:07:53 2009
New Revision: 4542
URL: http://svn.gnome.org/viewvc/orca?rev=4542&view=rev
Log:
Fix for bug #569343 - Speaking of indentation is misleading
Modified:
branches/gnome-2-24/ChangeLog
branches/gnome-2-24/src/orca/default.py
Modified: branches/gnome-2-24/src/orca/default.py
==============================================================================
--- branches/gnome-2-24/src/orca/default.py (original)
+++ branches/gnome-2-24/src/orca/default.py Fri Feb 13 22:07:53 2009
@@ -2201,29 +2201,35 @@
spaceCount = 0
tabCount = 0
- for offset in range(0, len(line)):
- if line[offset] == ' ':
+ utterance = ""
+ offset = 0
+ while True:
+ while line[offset] == ' ':
spaceCount += 1
- elif line[offset] == '\t':
+ offset += 1
+ if spaceCount:
+ # Translators: this is the number of space characters on a line
+ # of text.
+ #
+ utterance += ngettext("%d space",
+ "%d spaces",
+ spaceCount) % spaceCount + " "
+
+ while line[offset] == '\t':
tabCount += 1
- else:
+ offset += 1
+
+ if tabCount:
+ # Translators: this is the number of tab characters on a line
+ # of text.
+ #
+ utterance += ngettext("%d tab",
+ "%d tabs",
+ tabCount) % tabCount + " "
+ if not (spaceCount or tabCount):
break
+ spaceCount = tabCount = 0
- utterance = ""
- if spaceCount:
- # Translators: this is the number of space characters on a line
- # of text.
- #
- utterance += ngettext("%d space",
- "%d spaces",
- spaceCount) % spaceCount + " "
- if tabCount:
- # Translators: this is the number of tab characters on a line
- # of text.
- #
- utterance += ngettext("%d tab",
- "%d tabs",
- tabCount) % tabCount + " "
if len(utterance):
speech.speak(utterance)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]