1064 self, |
1064 self, |
1065 self.tr("Translation file generation"), |
1065 self.tr("Translation file generation"), |
1066 self.tr("""No translation files (*.ts) selected.""")) |
1066 self.tr("""No translation files (*.ts) selected.""")) |
1067 return |
1067 return |
1068 |
1068 |
|
1069 excludePatterns = [ |
|
1070 pat for pat in self.project.getIgnorePatterns() |
|
1071 if pat.endswith((".py", ".ui")) |
|
1072 ] |
|
1073 |
1069 QGuiApplication.setOverrideCursor( |
1074 QGuiApplication.setOverrideCursor( |
1070 QCursor(Qt.CursorShape.WaitCursor)) |
1075 QCursor(Qt.CursorShape.WaitCursor)) |
1071 QGuiApplication.processEvents( |
1076 QGuiApplication.processEvents( |
1072 QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents) |
1077 QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents) |
1073 |
1078 |
1074 for lang in langs: |
1079 for lang in langs: |
1075 proc = QProcess() |
1080 proc = QProcess() |
1076 args = [] |
1081 args = [] |
1077 |
1082 |
|
1083 for pattern in excludePatterns: |
|
1084 args += ["--exclude", pattern] |
|
1085 |
1078 if noobsolete: |
1086 if noobsolete: |
1079 args.append('--no-obsolete') |
1087 args.append('--no-obsolete') |
1080 |
1088 |
1081 args += ["--ts", lang] |
1089 args += ["--ts", lang] |
1082 args.append(".") |
1090 args.append(".") |