703 if l: |
703 if l: |
704 sections.append(("TRANSLATIONS", l)) |
704 sections.append(("TRANSLATIONS", l)) |
705 else: |
705 else: |
706 QMessageBox.warning(None, |
706 QMessageBox.warning(None, |
707 self.trUtf8("Write temporary project file"), |
707 self.trUtf8("Write temporary project file"), |
708 self.trUtf8("""No translation files (*.ts) selected."""), |
708 self.trUtf8("""No translation files (*.ts) selected.""")) |
709 QMessageBox.StandardButtons(\ |
|
710 QMessageBox.Abort)) |
|
711 return False |
709 return False |
712 |
710 |
713 try: |
711 try: |
714 pf = open(pfile, "w", encoding = "utf-8") |
712 pf = open(pfile, "w", encoding = "utf-8") |
715 for key, list in sections: |
713 for key, list in sections: |
733 return True |
731 return True |
734 except IOError: |
732 except IOError: |
735 QMessageBox.critical(None, |
733 QMessageBox.critical(None, |
736 self.trUtf8("Write temporary project file"), |
734 self.trUtf8("Write temporary project file"), |
737 self.trUtf8("<p>The temporary project file <b>{0}</b> could not" |
735 self.trUtf8("<p>The temporary project file <b>{0}</b> could not" |
738 " be written.</p>").format(pfile), |
736 " be written.</p>").format(pfile)) |
739 QMessageBox.StandardButtons(\ |
|
740 QMessageBox.Abort)) |
|
741 self.tmpProject = None |
737 self.tmpProject = None |
742 return False |
738 return False |
743 |
739 |
744 def __readStdoutLupdate(self): |
740 def __readStdoutLupdate(self): |
745 """ |
741 """ |