From 521784bc58e5f130e86c129a0578b441d827add7 Mon Sep 17 00:00:00 2001 From: Rafael Ortiz Date: Thu, 24 May 2012 15:08:10 +0000 Subject: matching mainline --- diff --git a/clock.py b/clock.py index fdc1b50..d368196 100755 --- a/clock.py +++ b/clock.py @@ -70,6 +70,7 @@ import pygtk import gtk from gtk import gdk import pango +import gst OLD_TOOLBAR = False try: @@ -442,9 +443,22 @@ class ClockActivity(activity.Activity): def _do_speak_time(self): """Speak aloud the current time. """ - if self._time_speaker is None: - self._time_speaker = Speaker() - self._time_speaker.speak(self._untag(self._time_in_letters)) + + def gstmessage_cb(bus, message, pipe): + if message.type in (gst.MESSAGE_EOS, gst.MESSAGE_ERROR): + pipe.set_state(gst.STATE_NULL) + + pipeline = 'espeak text="%s" ! autoaudiosink' % self._untag(self._time_in_letters) + try: + pipe = gst.parse_launch(pipeline) + bus = pipe.get_bus() + bus.add_signal_watch() + bus.connect('message', gstmessage_cb, pipe) + pipe.set_state(gst.STATE_PLAYING) + except: + if self._time_speaker is None: + self._time_speaker = Speaker() + self._time_speaker.speak(self._untag(self._time_in_letters)) def _untag(self, text): """Remove all the tags (pango markup) from a text. diff --git a/po/es.po b/po/es.po index e680df9..05c53b7 100644 --- a/po/es.po +++ b/po/es.po @@ -452,6 +452,77 @@ msgstr "0" #. Look at http://espeak.sourceforge.net/commands.html for details, and #. http://espeak.sourceforge.net/languages.html to see if your language is supported. #: speaker.py:51 +msgid "espeak-voice" +msgstr "es-la" + +msgctxt "Activity" +msgid "What Time Is It?" +msgstr "¿Qué hora es?" + +#, python-format +msgctxt "Write Time" +msgid "%s" +msgstr "%s" + +#, no-python-format +msgctxt "Write Date" +msgid "" +"" +"%A, %m/%d/%Y" +msgstr "" +"%" +"A, %d/%" +"m/%Y" + +msgctxt "Toolbar" +msgid "Simple Clock" +msgstr "El reloj" + +msgctxt "Toolbar" +msgid "Nice Clock" +msgstr "El bonito reloj" + +msgctxt "Toolbar" +msgid "Display time in full letters" +msgstr "Visualizar la hora" + +msgctxt "Toolbar" +msgid "Display weekday and date" +msgstr "Visualizar el día y la fecha" + +msgctxt "Toolbar" +msgid "Talking clock" +msgstr "El reloj parlante" + +#, no-python-format +msgctxt "Digital Clock" +msgid "" +"%I:%M:" +"%S%p" +msgstr "" +"%H:%M:%S%p" + +#, python-format +msgctxt "Hour Number" +msgid "%d" +msgstr "%d" + +msgctxt "espeak-pitch" +msgid "50" +msgstr "50" + +msgctxt "espeak-speed" +msgid "170" +msgstr "170" + +msgctxt "espeak-wgap" +msgid "0" +msgstr "0" + msgctxt "espeak-voice" msgid "en" msgstr "es" -- cgit v0.9.1