diff options
author | Rafael Ortiz <rafael@activitycentral.com> | 2012-04-04 02:11:20 (GMT) |
---|---|---|
committer | Rafael Ortiz <rafael@activitycentral.com> | 2012-04-04 02:11:20 (GMT) |
commit | a2b2441f3cb699155a17c5ba1391c3d47b582fc4 (patch) | |
tree | 9ca5d8d219a038eac4295c1cc50cc169b0c3ac00 | |
parent | b6c1534e962ff7fc9ee7b49fe56521b26a04e847 (diff) |
if en_AU locale is there make it default for speaking
-rw-r--r-- | activity/activity.info | 2 | ||||
-rwxr-xr-x | speaker.py | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/activity/activity.info b/activity/activity.info index 6c1a79a..1f4fb6f 100644 --- a/activity/activity.info +++ b/activity/activity.info @@ -3,7 +3,7 @@ name = Clock bundle_id = tv.alterna.Clock exec = sugar-activity clock.ClockActivity icon = activity-clock -activity_version = 603 +activity_version = 7.1 host_version = 1 show_launcher = yes license=Public Domain @@ -14,6 +14,7 @@ Controls the espeak program available on the OLPC XO laptop. import sys import os +import locale from pgettext import pgettext as _ @@ -48,8 +49,11 @@ class Speaker: # TRANS: The language and voice variant # Look at http://espeak.sourceforge.net/commands.html for details, and # http://espeak.sourceforge.net/languages.html to see if your language is supported. - VOICE = _("espeak-voice", "en-rp") - + loc = locale.getdefaultlocale()[0] or 'en_AU' + if loc == 'en_AU': + VOICE = _("espeak-voice", "en-rp") + else: + VOICE = _("espeak-voice", "en") def speak(self, text): """Speaks aloud the given text. |