ecasa: add search functionality
[enigma2-plugins.git] / ncidclient / src / __init__.py
1 # -*- coding: utf-8 -*-
2 from Components.Language import language
3 from Tools.Directories import resolveFilename, SCOPE_LANGUAGE, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE #@UnresolvedImport
4 import gettext, os, re
5 from enigma import eBackgroundFileEraser
6
7 lang = language.getLanguage()
8 os.environ["LANGUAGE"] = lang[:2]
9 gettext.bindtextdomain("enigma2", resolveFilename(SCOPE_LANGUAGE))
10 gettext.textdomain("enigma2")
11 gettext.bindtextdomain("NcidClient", "%s%s" % (resolveFilename(SCOPE_PLUGINS), "Extensions/NcidClient/locale/"))
12
13 def _(txt): # pylint: disable-msg=C0103
14         td = gettext.dgettext("NcidClient", txt)
15         if td == txt:
16                 print "[NcidClient] fallback to default translation for", txt 
17                 td = gettext.gettext(txt)
18                 
19         return td
20
21 def debug(message):
22         print message