From 8d8587bc8cd3a8639de5887760db2aef7ca917ce Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Mon, 28 Nov 2011 18:25:51 +0100 Subject: method docblocks --- src/__init__.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/__init__.py') 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 -- cgit v1.2.3