aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/Wizard.py
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2008-07-08 10:58:42 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2008-07-08 10:58:42 +0000
commite3626cbb8e9d0649f9180899947cd928a070a55d (patch)
treed192216e38eeba329bedc36e8d0fca03d3325cfd /lib/python/Screens/Wizard.py
parentd6114b958a407cf3e7eedae85197521406a58ba2 (diff)
downloadenigma2-e3626cbb8e9d0649f9180899947cd928a070a55d.tar.gz
enigma2-e3626cbb8e9d0649f9180899947cd928a070a55d.zip
add getTranslation method to wizard baseclass to allow overwriting this method for plugin translations
Diffstat (limited to 'lib/python/Screens/Wizard.py')
-rw-r--r--lib/python/Screens/Wizard.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/python/Screens/Wizard.py b/lib/python/Screens/Wizard.py
index 9c9cbd30..855df6ad 100644
--- a/lib/python/Screens/Wizard.py
+++ b/lib/python/Screens/Wizard.py
@@ -396,8 +396,11 @@ class Wizard(Screen, HelpableScreen):
print "code", code
exec(code)
+ def getTranslation(self, text):
+ return _(text)
+
def updateText(self, firstset = False):
- text = _(self.wizard[self.currStep]["text"])
+ text = self.getTranslation(self.wizard[self.currStep]["text"])
if text.find("[timeout]") != -1:
text = text.replace("[timeout]", str(self.timeoutCounter))
self["text"].setText(text)
@@ -429,7 +432,7 @@ class Wizard(Screen, HelpableScreen):
print "wizard step:", self.wizard[self.currStep]
if self.showSteps:
- self["step"].setText(_("Step ") + str(self.currStep) + "/" + str(self.numSteps))
+ self["step"].setText(self.getTranslation("Step ") + str(self.currStep) + "/" + str(self.numSteps))
if self.showStepSlider:
self["stepslider"].setValue(self.currStep)
@@ -437,7 +440,7 @@ class Wizard(Screen, HelpableScreen):
self.resetCounter()
self.timeoutTimer.start(1000)
- print "wizard text", _(self.wizard[self.currStep]["text"])
+ print "wizard text", self.getTranslation(self.wizard[self.currStep]["text"])
self.updateText(firstset = True)
if self.wizard[self.currStep].has_key("displaytext"):
displaytext = self.wizard[self.currStep]["displaytext"]
@@ -471,7 +474,7 @@ class Wizard(Screen, HelpableScreen):
if (len(self.wizard[self.currStep]["list"]) > 0):
#self["list"].instance.setZPosition(2)
for x in self.wizard[self.currStep]["list"]:
- self.list.append((_(x[0]), x[1]))
+ self.list.append((self.getTranslation(x[0]), x[1]))
self.wizard[self.currStep]["evaluatedlist"] = self.list
self["list"].list = self.list
self["list"].index = 0