Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/speaker.py
diff options
context:
space:
mode:
authorGary C Martin <gary@garycmartin.com>2012-06-12 02:45:58 (GMT)
committer Gary C Martin <gary@garycmartin.com>2012-06-12 02:45:58 (GMT)
commit8b9af018bde0b2910c731401cc0ba26283ba6adc (patch)
tree6c2620bc202a4810bc9984aa2dd4248714c888d9 /speaker.py
parent33f96cce9e10524fd816d4cea06336be13dcd12b (diff)
Replace pgettext with gettext to work around broken genpot string generation SL#3668
Diffstat (limited to 'speaker.py')
-rwxr-xr-xspeaker.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/speaker.py b/speaker.py
index 238cea6..f33dbad 100755
--- a/speaker.py
+++ b/speaker.py
@@ -15,7 +15,7 @@ Controls the espeak program available on the OLPC XO laptop.
import sys
import os
-from pgettext import pgettext as _
+from gettext import gettext as _
class Speaker:
@@ -26,21 +26,22 @@ class Speaker:
"""
# TRANS: The language pitch (range [0 - 99], default 50 for English)
# Look at http://espeak.sourceforge.net/commands.html for details
- PITCH = _("espeak-pitch", "50")
+ PITCH = _("50")
"""espeak parameter: diction speed (average words per minute).
"""
- # TRANS: The diction speed, in average words per minute (range [80 - 390], default 170 for English).
+ # TRANS: The diction speed, in average words per minute (range [80 - 390],
+ # default 170 for English).
# Look at http://espeak.sourceforge.net/commands.html for details
- SPEED = _("espeak-speed", "170")
+ SPEED = _("170")
"""espeak parameter: word gap in units of 10 ms.
"""
# TRANS: The pause duration between words, in units of 10 ms.
# Look at http://espeak.sourceforge.net/commands.html for details
- WORD_GAP = _("espeak-wgap", "0")
+ WORD_GAP = _("0")
"""espeak parameter: the language and voice variant.
@@ -48,7 +49,7 @@ 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")
+ VOICE = _("en")
def speak(self, text):