Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Speak.activity/brain.py
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2009-04-29 17:37:45 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-04-29 17:37:45 (GMT)
commit5c85d05a3add414b224e7880aae82736c098e80b (patch)
treef4432338274ee7c3112f51a0494361b742bf167c /Speak.activity/brain.py
parentb419cad17826b53940deb8c95935035b99e0e836 (diff)
Pronounce gettext strings in native language
Diffstat (limited to 'Speak.activity/brain.py')
-rw-r--r--Speak.activity/brain.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Speak.activity/brain.py b/Speak.activity/brain.py
index 16ac74b..20000a9 100644
--- a/Speak.activity/brain.py
+++ b/Speak.activity/brain.py
@@ -39,9 +39,9 @@ BOTS = {
'predicates': { 'name': 'Alice',
'master': 'the Sugar Community' } } }
-DEFAULT = voice.defaultVoice()
+DEFAULT = voice.DEFAULT
if not BOTS.has_key(DEFAULT):
- DEFAULT = _('English')
+ DEFAULT = voice.allVoices()[_('English')]
class Toolbar(gtk.Toolbar):
def __init__(self, activity):
@@ -80,9 +80,9 @@ class Toolbar(gtk.Toolbar):
hello = _("Hello, I'am a robot \"%s\". Ask me any question.") \
% BOTS[voice]['name']
hello += ' ' + sorry
- self.activity.face.say(hello)
+ self.activity.face.say_notification(hello)
elif sorry:
- self.activity.face.say(sorry)
+ self.activity.face.say_notification(sorry)
old_cursor = self.activity.get_cursor()
self.activity.set_cursor(gtk.gdk.WATCH)
@@ -96,7 +96,7 @@ class Toolbar(gtk.Toolbar):
def update_voice(self):
voice = self.activity.voice_combo.props.value.friendlyname
- new_voice = BOTS.has_key(voice) and voice or DEFAULT
+ new_voice = BOTS.has_key(voice) and voice or DEFAULT.friendlyname
if voice != new_voice:
self.activity.change_voice(new_voice, True)
@@ -108,7 +108,7 @@ class Toolbar(gtk.Toolbar):
if not self._kernels.has_key(new_voice):
self._load_brain(new_voice, (voice != new_voice) and sorry or '')
elif voice != new_voice:
- self.activity.face.say(sorry)
+ self.activity.face.say_notification(sorry)
def respond(self, text):
voice = self.voices.combo.props.value