PLCOpenEditor.py
changeset 1312 250c3ae0787c
parent 1295 2ad168756c5e
child 1330 96b242e4c59d
equal deleted inserted replaced
1311:85ca4fa0720b 1312:250c3ae0787c
   330             filepath = dialog.GetPath()
   330             filepath = dialog.GetPath()
   331             message_text = ""
   331             message_text = ""
   332             header, icon = _("Done"), wx.ICON_INFORMATION
   332             header, icon = _("Done"), wx.ICON_INFORMATION
   333             if os.path.isdir(os.path.dirname(filepath)):
   333             if os.path.isdir(os.path.dirname(filepath)):
   334                 program, errors, warnings = self.Controler.GenerateProgram(filepath)
   334                 program, errors, warnings = self.Controler.GenerateProgram(filepath)
   335                 message_text += "".join([_("warning: %s\n") for warning in warnings])
   335                 message_text += "".join([_("warning: %s\n") % warning for warning in warnings])
   336                 if len(errors) > 0:
   336                 if len(errors) > 0:
   337                     message_text += "".join([_("error: %s\n") for error in errors])
   337                     message_text += "".join([_("error: %s\n") % error for error in errors])
   338                     message_text += _("Can't generate program to file %s!")%filepath
   338                     message_text += _("Can't generate program to file %s!")%filepath
   339                     header, icon = _("Error"), wx.ICON_ERROR
   339                     header, icon = _("Error"), wx.ICON_ERROR
   340                 else:
   340                 else:
   341                     message_text += _("Program was successfully generated!")
   341                     message_text += _("Program was successfully generated!")
   342             else:
   342             else: