diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2011-11-28 18:25:51 +0100 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2011-11-28 18:25:51 +0100 |
| commit | 8d8587bc8cd3a8639de5887760db2aef7ca917ce (patch) | |
| tree | 97ac3d8d52159de90a6b5e00006310ec2b66f00c /src/__init__.py | |
| parent | ea9c06ee0676f33f0d1fd370281328fa7219e22b (diff) | |
| download | enigma2-curlytx-8d8587bc8cd3a8639de5887760db2aef7ca917ce.tar.gz enigma2-curlytx-8d8587bc8cd3a8639de5887760db2aef7ca917ce.zip | |
method docblocks
Diffstat (limited to 'src/__init__.py')
| -rw-r--r-- | src/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/__init__.py b/src/__init__.py index 3540b5a..ee83253 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -8,11 +8,13 @@ from os import environ as os_environ import gettext def localeInit(): + """ Prepare settings for gettext usage """ lang = language.getLanguage()[:2] # getLanguage returns e.g. "fi_FI" for "language_country" os_environ["LANGUAGE"] = lang # Enigma doesn't set this (or LC_ALL, LC_MESSAGES, LANG). gettext needs it! gettext.bindtextdomain("CurlyTx", resolveFilename(SCOPE_PLUGINS, "Extensions/CurlyTx/locale")) def _(txt): + """ Custom gettext translation function that uses the CurlyTx domain """ t = gettext.dgettext("CurlyTx", txt) if t == txt: #print "[CurlyTx] fallback to default translation for", txt |
