--- a/svghmi/svghmi.py Mon Feb 22 10:08:36 2021 +0100
+++ b/svghmi/svghmi.py Mon Feb 22 10:09:57 2021 +0100
@@ -726,13 +726,16 @@
else:
self.GetCTRoot().logger.write_error(_("PO file misplaced: %s is not in %s\n") % (POFile,project_path))
else:
- self.GetCTRoot().logger.write_error(_("PO file do not exist: %s\n") % POFile)
+ self.GetCTRoot().logger.write_error(_("PO file does not exist: %s\n") % POFile)
dialog.Destroy()
def _OpenPOT(self):
""" Start POEdit with untouched empty catalog """
POFile = self._getPOTpath()
- self._StartPOEdit(POFile)
+ if os.path.isfile(POFile):
+ self._StartPOEdit(POFile)
+ else:
+ self.GetCTRoot().logger.write_error(_("POT file does not exist, add translatable text (label starting with '_') in Inkscape first\n"))
def CTNGlobalInstances(self):
# view_name = self.BaseParams.getName()
@@ -740,3 +743,5 @@
# TODO : move to library level for multiple hmi
return [(name, iec_type, "") for name, iec_type in SPECIAL_NODES]
+ def GetIconName(self):
+ return "SVGHMI"