Support older dreamboxes (e.g. 7025+) that don't have a recent elementtree library.
[enigma2-curlytx.git] / src / __init__.py
index 61a1219d7abd7cb01f028115a419ca0866bc86a3..858e52e29216949460f272ba7cf6072e4dd35a66 100644 (file)
@@ -1,16 +1,21 @@
 # -*- coding: utf-8 -*-
+# CurlyTx translation initialization
+# Copyright (C) 2011 Christian Weiske <cweiske@cweiske.de>
+# License: GPLv3 or later
+
 from Components.Language import language
 from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_LANGUAGE
 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!
-    print resolveFilename(SCOPE_PLUGINS, "Extensions/CurlyTx/locale")
     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