diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2015-02-02 11:53:03 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2015-02-02 11:53:03 +0100 |
| commit | f106ad1a8efc3e39c1e818873e53c53aac963faa (patch) | |
| tree | 25a9f0ae4080705c71bd30ce8753782086d40e08 /jasper.py | |
| parent | 7786b9e586f504f20ec28be9213aff18abcc81a2 (diff) | |
| download | jasper-client-f106ad1a8efc3e39c1e818873e53c53aac963faa.tar.gz jasper-client-f106ad1a8efc3e39c1e818873e53c53aac963faa.zip | |
first i18n (WIP)
Diffstat (limited to 'jasper.py')
| -rwxr-xr-x | jasper.py | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -9,6 +9,12 @@ import logging import yaml import argparse +import locale +import gettext +locale.setlocale(locale.LC_ALL, '') +langs = gettext.translation('messages', localedir='./languages', languages=[]) +langs.install() + from client import tts, stt, jasperpath, diagnose # Add jasperpath.LIB_PATH to sys.path @@ -103,10 +109,10 @@ class Jasper(object): def run(self): if 'first_name' in self.config: - salutation = ("How can I be of service, %s?" + salutation = (_("How can I be of service, %s?") % self.config["first_name"]) else: - salutation = "How can I be of service?" + salutation = _("How can I be of service?") self.mic.say(salutation) conversation = Conversation("JASPER", self.mic, self.config) |
