svghmi/svghmi.py
branchsvghmi
changeset 3160 cecfd6bb4593
parent 3156 76c0c0a524c9
parent 3159 1d7c3d13a4df
child 3165 2db69e2c5673
equal deleted inserted replaced
3156:76c0c0a524c9 3160:cecfd6bb4593
   724                 if os.path.relpath(POFile, project_path) == os.path.basename(POFile):
   724                 if os.path.relpath(POFile, project_path) == os.path.basename(POFile):
   725                     self._StartPOEdit(POFile)
   725                     self._StartPOEdit(POFile)
   726                 else:
   726                 else:
   727                     self.GetCTRoot().logger.write_error(_("PO file misplaced: %s is not in %s\n") % (POFile,project_path))
   727                     self.GetCTRoot().logger.write_error(_("PO file misplaced: %s is not in %s\n") % (POFile,project_path))
   728             else:
   728             else:
   729                 self.GetCTRoot().logger.write_error(_("PO file do not exist: %s\n") % POFile)
   729                 self.GetCTRoot().logger.write_error(_("PO file does not exist: %s\n") % POFile)
   730         dialog.Destroy()
   730         dialog.Destroy()
   731 
   731 
   732     def _OpenPOT(self):
   732     def _OpenPOT(self):
   733         """ Start POEdit with untouched empty catalog """
   733         """ Start POEdit with untouched empty catalog """
   734         POFile = self._getPOTpath()
   734         POFile = self._getPOTpath()
   735         self._StartPOEdit(POFile)
   735         if os.path.isfile(POFile):
       
   736             self._StartPOEdit(POFile)
       
   737         else:
       
   738             self.GetCTRoot().logger.write_error(_("POT file does not exist, add translatable text (label starting with '_') in Inkscape first\n"))
   736 
   739 
   737     def CTNGlobalInstances(self):
   740     def CTNGlobalInstances(self):
   738         # view_name = self.BaseParams.getName()
   741         # view_name = self.BaseParams.getName()
   739         # return [ (view_name + "_" + name, iec_type, "") for name, iec_type in SPECIAL_NODES]
   742         # return [ (view_name + "_" + name, iec_type, "") for name, iec_type in SPECIAL_NODES]
   740         # TODO : move to library level for multiple hmi
   743         # TODO : move to library level for multiple hmi
   741         return [(name, iec_type, "") for name, iec_type in SPECIAL_NODES]
   744         return [(name, iec_type, "") for name, iec_type in SPECIAL_NODES]
   742 
   745 
       
   746     def GetIconName(self):
       
   747         return "SVGHMI"