diff --git a/qubesmanager/backup.py b/qubesmanager/backup.py index 5d149e8..0db4045 100644 --- a/qubesmanager/backup.py +++ b/qubesmanager/backup.py @@ -289,8 +289,8 @@ class BackupVMsWindow(Ui_Backup, QWizard): if self.appvm_combobox.currentIndex() == 0 and \ not os.path.isdir(backup_location): QMessageBox.information(None, self.tr("Wait!"), - self.tr("Selected directory do not exists or " - "not a directory (%s).") % backup_location) + unicode(self.tr("Selected directory do not exists or " + "not a directory (%s).")) % backup_location) return False if not len(self.passphrase_line_edit.text()): QMessageBox.information(None, self.tr("Wait!"), @@ -384,8 +384,8 @@ class BackupVMsWindow(Ui_Backup, QWizard): self.progress_status.setText(self.tr("Backup aborted.")) if self.tmpdir_to_remove: if QMessageBox.warning(None, self.tr("Backup aborted"), - self.tr("Do you want to remove temporary files from " - "%s?") % self.tmpdir_to_remove, + unicode(self.tr("Do you want to remove temporary files from " + "%s?")) % self.tmpdir_to_remove, QMessageBox.Yes, QMessageBox.No) == QMessageBox.Yes: shutil.rmtree(self.tmpdir_to_remove) else: diff --git a/qubesmanager/log_dialog.py b/qubesmanager/log_dialog.py index 61ef469..97fd71c 100644 --- a/qubesmanager/log_dialog.py +++ b/qubesmanager/log_dialog.py @@ -56,7 +56,7 @@ class LogDialog(Ui_LogDialog, QDialog): log = open(self.log_path) log.seek(0, os.SEEK_END) if log.tell() > LOG_DISPLAY_SIZE: - self.displayed_text = self.tr("(Showing only last %d bytes of file)\n") % LOG_DISPLAY_SIZE + self.displayed_text = unicode(self.tr("(Showing only last %d bytes of file)\n")) % LOG_DISPLAY_SIZE log.seek(-LOG_DISPLAY_SIZE, os.SEEK_END) else: log.seek(0, os.SEEK_SET) diff --git a/qubesmanager/main.py b/qubesmanager/main.py index 79f51ef..b611dc6 100755 --- a/qubesmanager/main.py +++ b/qubesmanager/main.py @@ -1217,7 +1217,7 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow): vm.name, thread_monitor.error_msg), msecs=3000) self.set_error(vm.qid, - self.tr("Error starting VM: %s") % thread_monitor.error_msg) + unicode(self.tr("Error starting VM: %s")) % thread_monitor.error_msg) @staticmethod def do_start_vm(vm, thread_monitor): @@ -1267,7 +1267,7 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow): .format(vm.name, thread_monitor.error_msg), msecs=3000) self.set_error(vm.qid, - self.tr("Error starting VM: %s") % thread_monitor.error_msg) + unicode(self.tr("Error starting VM: %s")) % thread_monitor.error_msg) # noinspection PyMethodMayBeStatic def do_start_vm_tools_install(self, vm, thread_monitor): diff --git a/qubesmanager/restore.py b/qubesmanager/restore.py index 7d99c66..76a3ce2 100644 --- a/qubesmanager/restore.py +++ b/qubesmanager/restore.py @@ -265,8 +265,8 @@ class RestoreVMsWindow(Ui_Restore, QWizard): if self.canceled: if self.tmpdir_to_remove and \ QMessageBox.warning(None, self.tr("Restore aborted"), - self.tr("Do you want to remove temporary files " - "from %s?") % self.tmpdir_to_remove, + unicode(self.tr("Do you want to remove temporary files " + "from %s?")) % self.tmpdir_to_remove, QMessageBox.Yes, QMessageBox.No) == \ QMessageBox.Yes: shutil.rmtree(self.tmpdir_to_remove)