diff -r 8cb0dabf852f -r ee1aadab1215 src/eric7/Tools/TRSingleApplication.py --- a/src/eric7/Tools/TRSingleApplication.py Sat Nov 11 10:13:29 2023 +0100 +++ b/src/eric7/Tools/TRSingleApplication.py Sat Nov 11 12:44:51 2023 +0100 @@ -96,28 +96,29 @@ """ Constructor """ - super.__init__(SAFile) + super().__init__(SAFile) def processArgs(self, args): """ Public method to process the command line args passed to the UI. - @param args list of files to open + @param args namespace object containing the parsed command line parameters + @type argparse.Namespace """ - # no args, return - if args is None: - return - uiFiles = [] qmFiles = [] - for arg in args: - ext = os.path.splitext(arg)[1].lower() + for filename in args.file: + ext = os.path.splitext(filename)[1].lower() if ext == ".ui": - uiFiles.append(arg) + uiFiles.append(filename) elif ext == ".qm": - qmFiles.append(arg) + qmFiles.append(filename) + elif ext == ".ts": + qmFile = os.path.splitext(filename)[0] + ".qm" + if os.path.exists(qmFile): + qmFiles.append(qmFile) self.sendCommand(SALoadForm, uiFiles) self.sendCommand(SALoadTranslation, qmFiles)