New config (Ignore download times: yes/no)
[enigma2-plugins.git] / rsdownloader / src / RSTranslation.py
1 ##\r
2 ## RS Downloader\r
3 ## by AliAbdul\r
4 ##\r
5 from Components.Language import language
6 from os import environ
7 from Screens.Screen import Screen
8 from Tools.Directories import resolveFilename, SCOPE_LANGUAGE, SCOPE_PLUGINS
9 import gettext
10 \r
11 ##############################################################################\r
12
13 lang = language.getLanguage()
14 environ["LANGUAGE"] = lang[:2]\r
15 gettext.bindtextdomain("enigma2", resolveFilename(SCOPE_LANGUAGE))\r
16 gettext.textdomain("enigma2")
17 gettext.bindtextdomain("RSDownloader", "%s%s" % (resolveFilename(SCOPE_PLUGINS), "Extensions/RSDownloader/locale/"))
18
19 def _(txt):\r
20         t = gettext.dgettext("RSDownloader", txt)\r
21         if t == txt:\r
22                 t = gettext.gettext(txt)\r
23         return t
24
25 ##############################################################################
26
27 class TitleScreen(Screen):
28         def __init__(self, session, parent=None):\r
29                 Screen.__init__(self, session, parent)\r
30                 self.onLayoutFinish.append(self.setScreenTitle)\r
31 \r
32         def setScreenTitle(self):\r
33                 self.setTitle(_("RS Downloader"))
34