diff -r 020420ad8914 -r 07447ee3538e LDViewer.py --- a/LDViewer.py Fri Jul 24 12:49:57 2009 +0200 +++ b/LDViewer.py Fri Jul 24 17:12:59 2009 +0200 @@ -210,7 +210,7 @@ if rung not in rungs: rungs.append(rung) if len(rungs) > 1: - raise "ValueError", "Ladder element with id %d is on more than one rung."%instance["id"] + raise ValueError, _("Ladder element with id %d is on more than one rung.")%instance["id"] element = self.FindElementById(instance["id"]) self.Rungs[rungs[0]].SelectElement(element) for connector in element.GetConnectors(): @@ -225,7 +225,7 @@ if rung not in rungs: rungs.append(rung) if len(rungs) > 1: - raise "ValueError", "Ladder element with id %d is on more than one rung."%instance["id"] + raise ValueError, _("Ladder element with id %d is on more than one rung.")%instance["id"] element = self.FindElementById(instance["id"]) self.Rungs[rungs[0]].SelectElement(element) for wire, num in element.GetConnectors()["input"].GetWires(): @@ -475,7 +475,7 @@ rung = Graphic_Group(self) # Create comment id = self.GetNewId() - comment = Comment(self, "Commentaire", id) + comment = Comment(self, _("Comment"), id) comment.SetPosition(startx, starty) comment.SetSize(LD_COMMENT_DEFAULTSIZE[0], LD_COMMENT_DEFAULTSIZE[1]) self.AddComment(comment) @@ -625,7 +625,7 @@ self.RefreshScrollBars() self.Refresh(False) else: - message = wx.MessageDialog(self, "You must select the wire where a contact should be added!", "Error", wx.OK|wx.ICON_ERROR) + message = wx.MessageDialog(self, _("You must select the wire where a contact should be added!"), _("Error"), wx.OK|wx.ICON_ERROR) message.ShowModal() message.Destroy() @@ -847,16 +847,16 @@ self.RefreshScrollBars() self.Refresh(False) else: - message = wx.MessageDialog(self, "The group of block must be coherent!", "Error", wx.OK|wx.ICON_ERROR) + message = wx.MessageDialog(self, _("The group of block must be coherent!"), _("Error"), wx.OK|wx.ICON_ERROR) message.ShowModal() message.Destroy() else: - message = wx.MessageDialog(self, "You must select the block or group of blocks around which a branch should be added!", "Error", wx.OK|wx.ICON_ERROR) + message = wx.MessageDialog(self, _("You must select the block or group of blocks around which a branch should be added!"), _("Error"), wx.OK|wx.ICON_ERROR) message.ShowModal() message.Destroy() def AddLadderBlock(self): - message = wx.MessageDialog(self, "This option isn't available yet!", "Warning", wx.OK|wx.ICON_EXCLAMATION) + message = wx.MessageDialog(self, _("This option isn't available yet!"), _("Warning"), wx.OK|wx.ICON_EXCLAMATION) message.ShowModal() message.Destroy()