703 if os.path.relpath(POFile, project_path) == os.path.basename(POFile): |
703 if os.path.relpath(POFile, project_path) == os.path.basename(POFile): |
704 self._StartPOEdit(POFile) |
704 self._StartPOEdit(POFile) |
705 else: |
705 else: |
706 self.GetCTRoot().logger.write_error(_("PO file misplaced: %s is not in %s\n") % (POFile,project_path)) |
706 self.GetCTRoot().logger.write_error(_("PO file misplaced: %s is not in %s\n") % (POFile,project_path)) |
707 else: |
707 else: |
708 self.GetCTRoot().logger.write_error(_("PO file do not exist: %s\n") % POFile) |
708 self.GetCTRoot().logger.write_error(_("PO file does not exist: %s\n") % POFile) |
709 dialog.Destroy() |
709 dialog.Destroy() |
710 |
710 |
711 def _OpenPOT(self): |
711 def _OpenPOT(self): |
712 """ Start POEdit with untouched empty catalog """ |
712 """ Start POEdit with untouched empty catalog """ |
713 POFile = self._getPOTpath() |
713 POFile = self._getPOTpath() |
714 self._StartPOEdit(POFile) |
714 if os.path.isfile(POFile): |
|
715 self._StartPOEdit(POFile) |
|
716 else: |
|
717 self.GetCTRoot().logger.write_error(_("POT file does not exist, add translatable text (label starting with '_') in Inkscape first\n")) |
715 |
718 |
716 def CTNGlobalInstances(self): |
719 def CTNGlobalInstances(self): |
717 # view_name = self.BaseParams.getName() |
720 # view_name = self.BaseParams.getName() |
718 # return [ (view_name + "_" + name, iec_type, "") for name, iec_type in SPECIAL_NODES] |
721 # return [ (view_name + "_" + name, iec_type, "") for name, iec_type in SPECIAL_NODES] |
719 # TODO : move to library level for multiple hmi |
722 # TODO : move to library level for multiple hmi |