add gettext title
authorDima73 <Dima-73@inbox.lv>
Tue, 9 Jun 2015 20:30:21 +0000 (23:30 +0300)
committerlittlesat <littlesat99@yahoo.com>
Sat, 13 Jun 2015 08:11:23 +0000 (10:11 +0200)
Signed-off-by: littlesat <littlesat99@yahoo.com>

lib/python/Screens/InputBox.py
lib/python/Screens/LocationBox.py

index e36b3e7..12cc96b 100644 (file)
@@ -9,12 +9,12 @@ from Tools.Notifications import AddPopup
 from time import time
 
 class InputBox(Screen):
-       def __init__(self, session, title = "", windowTitle = _("Input"), useableChars = None, **kwargs):
+       def __init__(self, session, title = "", windowTitle = "Input", useableChars = None, **kwargs):
                Screen.__init__(self, session)
 
                self["text"] = Label(title)
                self["input"] = Input(**kwargs)
-               self.onShown.append(boundFunction(self.setTitle, windowTitle))
+               self.onShown.append(boundFunction(self.setTitle, _(windowTitle)))
                if useableChars is not None:
                        self["input"].setUseableChars(useableChars)
 
index 051a4f5..0a464aa 100644 (file)
@@ -50,7 +50,7 @@ class LocationBox(Screen, NumericalTextInput, HelpableScreen):
                        <widget name="key_blue" position="405,415" zPosition="2" size="135,40" halign="center" valign="center" font="Regular;22" transparent="1" shadowColor="black" shadowOffset="-1,-1" />
                </screen>"""
 
-       def __init__(self, session, text = "", filename = "", currDir = None, bookmarks = None, userMode = False, windowTitle = _("Select location"), minFree = None, autoAdd = False, editDir = False, inhibitDirs = [], inhibitMounts = []):
+       def __init__(self, session, text = "", filename = "", currDir = None, bookmarks = None, userMode = False, windowTitle = "Select location", minFree = None, autoAdd = False, editDir = False, inhibitDirs = [], inhibitMounts = []):
                # Init parents
                Screen.__init__(self, session)
                NumericalTextInput.__init__(self, handleTimeout = False)
@@ -166,7 +166,7 @@ class LocationBox(Screen, NumericalTextInput, HelpableScreen):
 
                # Run some functions when shown
                self.onShown.extend((
-                       boundFunction(self.setTitle, windowTitle),
+                       boundFunction(self.setTitle, _(windowTitle)),
                        self.updateTarget,
                        self.showHideRename,
                ))