Add more missing unicode()s around .tr()s
Fixes https://github.com/QubesOS/qubes-issues/issues/2637
This commit is contained in:
parent
ed8f889c92
commit
2f72aaf05f
@ -289,8 +289,8 @@ class BackupVMsWindow(Ui_Backup, QWizard):
|
|||||||
if self.appvm_combobox.currentIndex() == 0 and \
|
if self.appvm_combobox.currentIndex() == 0 and \
|
||||||
not os.path.isdir(backup_location):
|
not os.path.isdir(backup_location):
|
||||||
QMessageBox.information(None, self.tr("Wait!"),
|
QMessageBox.information(None, self.tr("Wait!"),
|
||||||
self.tr("Selected directory do not exists or "
|
unicode(self.tr("Selected directory do not exists or "
|
||||||
"not a directory (%s).") % backup_location)
|
"not a directory (%s).")) % backup_location)
|
||||||
return False
|
return False
|
||||||
if not len(self.passphrase_line_edit.text()):
|
if not len(self.passphrase_line_edit.text()):
|
||||||
QMessageBox.information(None, self.tr("Wait!"),
|
QMessageBox.information(None, self.tr("Wait!"),
|
||||||
@ -384,8 +384,8 @@ class BackupVMsWindow(Ui_Backup, QWizard):
|
|||||||
self.progress_status.setText(self.tr("Backup aborted."))
|
self.progress_status.setText(self.tr("Backup aborted."))
|
||||||
if self.tmpdir_to_remove:
|
if self.tmpdir_to_remove:
|
||||||
if QMessageBox.warning(None, self.tr("Backup aborted"),
|
if QMessageBox.warning(None, self.tr("Backup aborted"),
|
||||||
self.tr("Do you want to remove temporary files from "
|
unicode(self.tr("Do you want to remove temporary files from "
|
||||||
"%s?") % self.tmpdir_to_remove,
|
"%s?")) % self.tmpdir_to_remove,
|
||||||
QMessageBox.Yes, QMessageBox.No) == QMessageBox.Yes:
|
QMessageBox.Yes, QMessageBox.No) == QMessageBox.Yes:
|
||||||
shutil.rmtree(self.tmpdir_to_remove)
|
shutil.rmtree(self.tmpdir_to_remove)
|
||||||
else:
|
else:
|
||||||
|
@ -56,7 +56,7 @@ class LogDialog(Ui_LogDialog, QDialog):
|
|||||||
log = open(self.log_path)
|
log = open(self.log_path)
|
||||||
log.seek(0, os.SEEK_END)
|
log.seek(0, os.SEEK_END)
|
||||||
if log.tell() > LOG_DISPLAY_SIZE:
|
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)
|
log.seek(-LOG_DISPLAY_SIZE, os.SEEK_END)
|
||||||
else:
|
else:
|
||||||
log.seek(0, os.SEEK_SET)
|
log.seek(0, os.SEEK_SET)
|
||||||
|
@ -1217,7 +1217,7 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
|||||||
vm.name, thread_monitor.error_msg),
|
vm.name, thread_monitor.error_msg),
|
||||||
msecs=3000)
|
msecs=3000)
|
||||||
self.set_error(vm.qid,
|
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
|
@staticmethod
|
||||||
def do_start_vm(vm, thread_monitor):
|
def do_start_vm(vm, thread_monitor):
|
||||||
@ -1267,7 +1267,7 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
|||||||
.format(vm.name, thread_monitor.error_msg),
|
.format(vm.name, thread_monitor.error_msg),
|
||||||
msecs=3000)
|
msecs=3000)
|
||||||
self.set_error(vm.qid,
|
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
|
# noinspection PyMethodMayBeStatic
|
||||||
def do_start_vm_tools_install(self, vm, thread_monitor):
|
def do_start_vm_tools_install(self, vm, thread_monitor):
|
||||||
|
@ -265,8 +265,8 @@ class RestoreVMsWindow(Ui_Restore, QWizard):
|
|||||||
if self.canceled:
|
if self.canceled:
|
||||||
if self.tmpdir_to_remove and \
|
if self.tmpdir_to_remove and \
|
||||||
QMessageBox.warning(None, self.tr("Restore aborted"),
|
QMessageBox.warning(None, self.tr("Restore aborted"),
|
||||||
self.tr("Do you want to remove temporary files "
|
unicode(self.tr("Do you want to remove temporary files "
|
||||||
"from %s?") % self.tmpdir_to_remove,
|
"from %s?")) % self.tmpdir_to_remove,
|
||||||
QMessageBox.Yes, QMessageBox.No) == \
|
QMessageBox.Yes, QMessageBox.No) == \
|
||||||
QMessageBox.Yes:
|
QMessageBox.Yes:
|
||||||
shutil.rmtree(self.tmpdir_to_remove)
|
shutil.rmtree(self.tmpdir_to_remove)
|
||||||
|
Loading…
Reference in New Issue
Block a user