MessageBox: make title string translatable
authorMirakels <mirakels@openpli.org>
Sun, 23 Aug 2015 08:06:07 +0000 (10:06 +0200)
committerMirakels <mirakels@openpli.org>
Sun, 23 Aug 2015 08:14:58 +0000 (10:14 +0200)
lib/python/Screens/MessageBox.py

index 278f6a8..e028728 100644 (file)
@@ -43,7 +43,7 @@ class MessageBox(Screen):
                        self["QuestionPixmap"].hide()
                if picon != self.TYPE_INFO:
                        self["InfoPixmap"].hide()
-               self.title = self.type < self.TYPE_MESSAGE and ["Question", "Information", "Warning", "Error"][self.type] or "Message"
+               self.title = self.type < self.TYPE_MESSAGE and [_("Question"), _("Information"), _("Warning"), _("Error")][self.type] or _("Message")
                if type == self.TYPE_YESNO:
                        if list:
                                self.list = list
@@ -79,7 +79,7 @@ class MessageBox(Screen):
                self.onLayoutFinish.append(self.layoutFinished)
 
        def layoutFinished(self):
-               self.setTitle(_(self.title))
+               self.setTitle(self.title)
 
        def initTimeout(self, timeout):
                self.timeout = timeout