type = str(attrs.get('type'))
self.wizard[self.lastStep]["config"]["type"] = type
if type == "ConfigList" or type == "standalone":
- exec "from Screens." + str(attrs.get('module')) + " import *"
+ try:
+ exec "from Screens." + str(attrs.get('module')) + " import *"
+ except:
+ exec "from " + str(attrs.get('module')) + " import *"
self.wizard[self.lastStep]["config"]["screen"] = eval(str(attrs.get('screen')))
if (attrs.has_key('args')):
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)
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)
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"]
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