773 if langs: |
773 if langs: |
774 langs = [self.project.getRelativePath(lang.fileName()) |
774 langs = [self.project.getRelativePath(lang.fileName()) |
775 for lang in langs if lang.fileName().endswith('.ts')] |
775 for lang in langs if lang.fileName().endswith('.ts')] |
776 else: |
776 else: |
777 try: |
777 try: |
778 pattern = self.project.pdata["TRANSLATIONPATTERN"][0]\ |
778 pattern = self.project.pdata["TRANSLATIONPATTERN"]\ |
779 .replace("%language%", "*") |
779 .replace("%language%", "*") |
780 langs = [lang for lang in self.project.pdata["TRANSLATIONS"] |
780 langs = [lang for lang in self.project.pdata["TRANSLATIONS"] |
781 if fnmatch.fnmatch(lang, pattern)] |
781 if fnmatch.fnmatch(lang, pattern)] |
782 except IndexError: |
782 except IndexError: |
783 langs = [] |
783 langs = [] |
1147 E5MessageBox.information( |
1147 E5MessageBox.information( |
1148 self, |
1148 self, |
1149 self.tr("Translation file release"), |
1149 self.tr("Translation file release"), |
1150 self.tr("The release of the translation files (*.qm)" |
1150 self.tr("The release of the translation files (*.qm)" |
1151 " was successful.")) |
1151 " was successful.")) |
1152 if self.project.pdata["TRANSLATIONSBINPATH"] and \ |
1152 if self.project.pdata["TRANSLATIONSBINPATH"]: |
1153 self.project.pdata["TRANSLATIONSBINPATH"][0]: |
|
1154 target = os.path.join( |
1153 target = os.path.join( |
1155 self.project.ppath, |
1154 self.project.ppath, |
1156 self.project.pdata["TRANSLATIONSBINPATH"][0]) |
1155 self.project.pdata["TRANSLATIONSBINPATH"]) |
1157 for langFile in self.project.pdata["TRANSLATIONS"][:]: |
1156 for langFile in self.project.pdata["TRANSLATIONS"][:]: |
1158 if langFile.endswith('.ts'): |
1157 if langFile.endswith('.ts'): |
1159 qmFile = os.path.join(self.project.ppath, |
1158 qmFile = os.path.join(self.project.ppath, |
1160 langFile.replace('.ts', '.qm')) |
1159 langFile.replace('.ts', '.qm')) |
1161 if os.path.exists(qmFile): |
1160 if os.path.exists(qmFile): |