diff -r d0f4aa941afe -r fee59283137b ProjectPyramid/Project.py --- a/ProjectPyramid/Project.py Sat Dec 23 15:48:53 2023 +0100 +++ b/ProjectPyramid/Project.py Sat Dec 23 17:16:21 2023 +0100 @@ -760,7 +760,7 @@ res = EricMessageBox.yesNo( self.__ui, self.tr("New Form"), - self.tr("""The file already exists! Overwrite""" """ it?"""), + self.tr("""The file already exists! Overwrite it?"""), icon=EricMessageBox.Warning, ) if not res: @@ -1514,7 +1514,7 @@ self.__ui, self.tr("Run Web-Browser"), self.tr( - "Could not start the web-browser for the URL" ' "{0}".' + 'Could not start the web-browser for the URL "{0}".' ).format(url.toString()), ) else: @@ -1558,7 +1558,7 @@ EricMessageBox.critical( self.__ui, self.tr("Process Generation Error"), - self.tr("The Pyramid Shell process could not be" " started."), + self.tr("The Pyramid Shell process could not be started."), ) ################################################################## @@ -1570,6 +1570,8 @@ Private slot to build a distribution file for the current Pyramid project. """ + from .DistributionTypeSelectionDialog import DistributionTypeSelectionDialog + title = self.tr("Build Distribution File") try: projectPath = self.projectPath() @@ -1584,8 +1586,6 @@ ) return - from .DistributionTypeSelectionDialog import DistributionTypeSelectionDialog - dlg = DistributionTypeSelectionDialog(self, projectPath, self.__ui) if dlg.exec() == QDialog.DialogCode.Accepted: formats = dlg.getFormats() @@ -1600,7 +1600,7 @@ dia = PyramidDialog( title, - msgSuccess=self.tr("Python distribution file built" " successfully."), + msgSuccess=self.tr("Python distribution file built successfully."), ) res = dia.startProcess(cmd, args, projectPath) if res: @@ -1654,6 +1654,8 @@ """ Private slot showing all URL dispatch routes. """ + from .PyramidRoutesDialog import PyramidRoutesDialog + title = self.tr("Show Routes") try: projectPath = self.projectPath() @@ -1668,8 +1670,6 @@ ) return - from .PyramidRoutesDialog import PyramidRoutesDialog - dia = PyramidRoutesDialog(self) res = dia.start(projectPath) if res: @@ -1861,7 +1861,7 @@ args.append(code) dia = PyramidDialog( - title, msgSuccess=self.tr("\nMessage catalog initialized" " successfully.") + title, msgSuccess=self.tr("\nMessage catalog initialized successfully.") ) res = dia.startProcess(cmd, args, projectPath) if res: @@ -1872,7 +1872,7 @@ ) self.__ericProject.appendFile(langFile) - def compileCatalogs(self, filenames): + def compileCatalogs(self, filenames): # noqa: U100 """ Public method to compile the message catalogs. @@ -1899,7 +1899,7 @@ args.append("compile_catalog") dia = PyramidDialog( - title, msgSuccess=self.tr("\nMessage catalogs compiled" " successfully.") + title, msgSuccess=self.tr("\nMessage catalogs compiled successfully.") ) res = dia.startProcess(cmd, args, projectPath) if res: @@ -1952,7 +1952,7 @@ return dia = PyramidDialog( - title, msgSuccess=self.tr("\nMessage catalogs compiled" " successfully.") + title, msgSuccess=self.tr("\nMessage catalogs compiled successfully.") ) res = dia.startBatchProcesses(argsLists, projectPath) if res: @@ -1964,7 +1964,7 @@ if fullName.endswith(".mo"): self.__ericProject.appendFile(fullName) - def updateCatalogs(self, filenames): + def updateCatalogs(self, filenames): # noqa: U100 """ Public method to update the message catalogs. @@ -2063,7 +2063,7 @@ None, self.tr("Process Generation Error"), self.tr( - "The translations editor process ({0}) could" " not be started." + "The translations editor process ({0}) could not be started." ).format(os.path.basename(editor)), )