SVGHMI: Fixed/extended error message when failing to launch POEdit. svghmi
authorEdouard Tisserant
Fri, 19 Feb 2021 12:03:42 +0100
branchsvghmi
changeset 3158 4171f7dd109a
parent 3157 279e08f238ca
child 3159 1d7c3d13a4df
SVGHMI: Fixed/extended error message when failing to launch POEdit.
svghmi/svghmi.py
--- a/svghmi/svghmi.py	Fri Feb 19 12:02:49 2021 +0100
+++ b/svghmi/svghmi.py	Fri Feb 19 12:03:42 2021 +0100
@@ -705,13 +705,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()