[orca/570658-whereami] Use speech generator for progress bar updates
- From: William Walker <wwalker src gnome org>
- To: svn-commits-list gnome org
- Subject: [orca/570658-whereami] Use speech generator for progress bar updates
- Date: Tue, 9 Jun 2009 12:58:58 -0400 (EDT)
commit 94727378bebef804714dd9be866f58a319f231d1
Author: Willie Walker <william walker sun com>
Date: Tue Jun 9 12:50:42 2009 -0400
Use speech generator for progress bar updates
---
src/orca/default.py | 7 ++-----
test/keystrokes/firefox/moz_progressbar.py | 20 ++++++++++----------
test/keystrokes/progressbar/progress_updates.py | 20 ++++++++++----------
3 files changed, 22 insertions(+), 25 deletions(-)
diff --git a/src/orca/default.py b/src/orca/default.py
index 69557ad..c341ead 100644
--- a/src/orca/default.py
+++ b/src/orca/default.py
@@ -2805,12 +2805,9 @@ class Script(script.Script):
else:
index += 1
- # Translators: this is the percentage value of a
- # progress bar.
- #
- percentage = _("%d percent.") % percentValue + " "
+ utterances.extend(self.speechGenerator.generateSpeech(
+ obj, alreadyFocused=True))
- utterances.append(percentage)
speech.speak(utterances)
self.lastProgressBarTime[obj] = currentTime
diff --git a/test/keystrokes/firefox/moz_progressbar.py b/test/keystrokes/firefox/moz_progressbar.py
index 5f15894..746b27a 100644
--- a/test/keystrokes/firefox/moz_progressbar.py
+++ b/test/keystrokes/firefox/moz_progressbar.py
@@ -141,16 +141,16 @@ sequence.append(WaitAction("object:property-change:accessible-value",
sequence.append(utils.AssertPresentationAction(
"progress output",
- ["SPEECH OUTPUT: '10 percent. '",
- "SPEECH OUTPUT: '20 percent. '",
- "SPEECH OUTPUT: '30 percent. '",
- "SPEECH OUTPUT: '40 percent. '",
- "SPEECH OUTPUT: '50 percent. '",
- "SPEECH OUTPUT: '60 percent. '",
- "SPEECH OUTPUT: '70 percent. '",
- "SPEECH OUTPUT: '80 percent. '",
- "SPEECH OUTPUT: '90 percent. '",
- "SPEECH OUTPUT: '100 percent. '"]))
+ ["SPEECH OUTPUT: '10 percent'",
+ "SPEECH OUTPUT: '20 percent'",
+ "SPEECH OUTPUT: '30 percent'",
+ "SPEECH OUTPUT: '40 percent'",
+ "SPEECH OUTPUT: '50 percent'",
+ "SPEECH OUTPUT: '60 percent'",
+ "SPEECH OUTPUT: '70 percent'",
+ "SPEECH OUTPUT: '80 percent'",
+ "SPEECH OUTPUT: '90 percent'",
+ "SPEECH OUTPUT: '100 percent'"]))
########################################################################
# Close the demo
diff --git a/test/keystrokes/progressbar/progress_updates.py b/test/keystrokes/progressbar/progress_updates.py
index ee50275..8e9d304 100644
--- a/test/keystrokes/progressbar/progress_updates.py
+++ b/test/keystrokes/progressbar/progress_updates.py
@@ -143,16 +143,16 @@ sequence.append(utils.AssertPresentationAction(
" VISIBLE: 'Progress 90% $l', cursor=1",
"BRAILLE LINE: 'Progress 100% $l'",
" VISIBLE: 'Progress 100% $l', cursor=1",
- "SPEECH OUTPUT: '10 percent. '",
- "SPEECH OUTPUT: '20 percent. '",
- "SPEECH OUTPUT: '30 percent. '",
- "SPEECH OUTPUT: '40 percent. '",
- "SPEECH OUTPUT: '50 percent. '",
- "SPEECH OUTPUT: '60 percent. '",
- "SPEECH OUTPUT: '70 percent. '",
- "SPEECH OUTPUT: '80 percent. '",
- "SPEECH OUTPUT: '90 percent. '",
- "SPEECH OUTPUT: '100 percent. '"]))
+ "SPEECH OUTPUT: '10 percent'",
+ "SPEECH OUTPUT: '20 percent'",
+ "SPEECH OUTPUT: '30 percent'",
+ "SPEECH OUTPUT: '40 percent'",
+ "SPEECH OUTPUT: '50 percent'",
+ "SPEECH OUTPUT: '60 percent'",
+ "SPEECH OUTPUT: '70 percent'",
+ "SPEECH OUTPUT: '80 percent'",
+ "SPEECH OUTPUT: '90 percent'",
+ "SPEECH OUTPUT: '100 percent'"]))
# Just a little extra wait to let some events get through.
#
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]