# HG changeset patch # User laurent # Date 1336079957 -7200 # Node ID 8f1f6022b3d363e56a0da38a9d8f7cd5b4f35dc4 # Parent 0f10f5091245734306a264aaf25fcf2efba6b4e5 Fix bug in create POU dialog diff -r 0f10f5091245 -r 8f1f6022b3d3 PLCOpenEditor.py --- a/PLCOpenEditor.py Thu May 03 19:02:17 2012 +0200 +++ b/PLCOpenEditor.py Thu May 03 23:19:17 2012 +0200 @@ -3624,11 +3624,6 @@ ID_POUDIALOGSTATICTEXT2, ID_POUDIALOGSTATICTEXT3, ] = [wx.NewId() for _init_ctrls in range(7)] -def GetTransitionLanguages(): - _ = lambda x : x - return [_("IL"), _("ST"), _("LD"), _("FBD")] -TRANSITION_LANGUAGES_DICT = dict([(_(language), language) for language in GetTransitionLanguages()]) - def GetPouTypes(): _ = lambda x : x return [_("function"), _("functionBlock"), _("program")] @@ -3773,7 +3768,7 @@ self.Language.Clear() for language in GetPouLanguages(): if language != "SFC" or POU_TYPES_DICT[self.PouType.GetStringSelection()] != "function": - self.Language.Append(language) + self.Language.Append(_(language)) if self.Language.FindString(_(selection)) != wx.NOT_FOUND: self.Language.SetStringSelection(_(selection)) @@ -3794,7 +3789,7 @@ elif item == "pouType": self.PouType.SetStringSelection(_(value)) elif item == "language": - self.Language.SetStringSelection(_(POU_LANGUAGES_DICT)) + self.Language.SetStringSelection(_(value)) def GetValues(self): values = {}