From b4cb9303bc47f37d2b3733e6659bfb9ab692d390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20Marczykowska-G=C3=B3recka?= Date: Fri, 8 Nov 2019 23:35:26 +0100 Subject: [PATCH] Fixed translation for application names --- qubesmanager/appmenu_select.py | 3 +- qubesmanager/backup.py | 11 +- qubesmanager/bootfromdevice.py | 10 +- qubesmanager/create_new_vm.py | 1 + qubesmanager/global_settings.py | 10 +- qubesmanager/i18n/qubesmanager_en.ts | 531 +++++++++++++-------------- qubesmanager/i18n/qubesmanager_es.ts | 519 +++++++++++++------------- qubesmanager/qube_manager.py | 10 +- qubesmanager/restore.py | 10 +- qubesmanager/settings.py | 8 +- qubesmanager/template_manager.py | 12 +- qubesmanager/utils.py | 16 +- 12 files changed, 583 insertions(+), 558 deletions(-) diff --git a/qubesmanager/appmenu_select.py b/qubesmanager/appmenu_select.py index 86c9549..d2b1420 100755 --- a/qubesmanager/appmenu_select.py +++ b/qubesmanager/appmenu_select.py @@ -85,7 +85,8 @@ class AppmenuSelectManager: p.communicate('\n'.join(new_whitelisted).encode()) if p.returncode != 0: exception_text = QtCore.QCoreApplication.translate( - "exception", 'qvm-appmenus --set-whitelist failed') + "Command {command} failed", "exception").format( + command='qvm-appmenus --set-whitelist') raise RuntimeError(exception_text) return True diff --git a/qubesmanager/backup.py b/qubesmanager/backup.py index 39935ce..d7c75d9 100644 --- a/qubesmanager/backup.py +++ b/qubesmanager/backup.py @@ -24,7 +24,7 @@ import signal from qubesadmin import exc from qubesadmin import utils as admin_utils -from PyQt5 import QtCore, QtWidgets # pylint: disable=import-error +from PyQt5 import QtCore, QtWidgets, QtGui # pylint: disable=import-error from . import ui_backupdlg # pylint: disable=no-name-in-module from . import multiselectwidget @@ -121,6 +121,10 @@ class BackupVMsWindow(ui_backupdlg.Ui_Backup, QtWidgets.QWizard): self.dispatcher = dispatcher dispatcher.add_handler('backup-progress', self.on_backup_progress) + def setup_application(self): + self.qt_app.setApplicationName(self.tr("Qubes Backup VMs")) + self.qt_app.setWindowIcon(QtGui.QIcon.fromTheme("qubes-manager")) + def on_backup_progress(self, __submitter, _event, **kwargs): self.progress_bar.setValue(int(float(kwargs['progress']))) @@ -391,10 +395,7 @@ class BackupVMsWindow(ui_backupdlg.Ui_Backup, QtWidgets.QWizard): def main(): - utils.run_asynchronous( - QtCore.QCoreApplication.translate("appname", "Qubes Backup VMs"), - "qubes-manager", - BackupVMsWindow) + utils.run_asynchronous(BackupVMsWindow) if __name__ == "__main__": diff --git a/qubesmanager/bootfromdevice.py b/qubesmanager/bootfromdevice.py index 66be230..5a9add1 100644 --- a/qubesmanager/bootfromdevice.py +++ b/qubesmanager/bootfromdevice.py @@ -21,7 +21,7 @@ import functools import subprocess from . import utils from . import ui_bootfromdevice # pylint: disable=no-name-in-module -from PyQt5 import QtWidgets, QtCore # pylint: disable=import-error +from PyQt5 import QtWidgets, QtGui # pylint: disable=import-error from qubesadmin import tools from qubesadmin.tools import qvm_start @@ -47,6 +47,10 @@ class VMBootFromDeviceWindow(ui_bootfromdevice.Ui_BootDialog, # warn user if the VM is currently running self.__warn_if_running__() + def setup_application(self): + self.qapp.setApplicationName(self.tr("Boot Qube From Device")) + self.qapp.setWindowIcon(QtGui.QIcon.fromTheme("qubes-manager")) + def reject(self): self.done(0) @@ -148,9 +152,7 @@ def main(args=None): args = parser.parse_args(args) vm = args.domains.pop() - utils.run_synchronous( - QtCore.QCoreApplication.translate("appname", "Boot Qube From Device"), - functools.partial(VMBootFromDeviceWindow, vm)) + utils.run_synchronous(functools.partial(VMBootFromDeviceWindow, vm)) if __name__ == "__main__": diff --git a/qubesmanager/create_new_vm.py b/qubesmanager/create_new_vm.py index dde5eb0..2523b1f 100644 --- a/qubesmanager/create_new_vm.py +++ b/qubesmanager/create_new_vm.py @@ -275,6 +275,7 @@ def main(args=None): 'i18n') translator.load("qubesmanager_{!s}.qm".format(locale), i18n_dir) qtapp.installTranslator(translator) + QtCore.QCoreApplication.installTranslator(translator) qtapp.setOrganizationName('Invisible Things Lab') qtapp.setOrganizationDomain('https://www.qubes-os.org/') diff --git a/qubesmanager/global_settings.py b/qubesmanager/global_settings.py index 4b37b4a..eca9250 100644 --- a/qubesmanager/global_settings.py +++ b/qubesmanager/global_settings.py @@ -21,7 +21,7 @@ # import subprocess -from PyQt5 import QtWidgets, QtCore # pylint: disable=import-error +from PyQt5 import QtWidgets, QtCore, QtGui # pylint: disable=import-error from qubesadmin.utils import parse_size @@ -75,6 +75,10 @@ class GlobalSettingsWindow(ui_globalsettingsdlg.Ui_GlobalSettings, self.__init_mem_defaults__() self.__init_updates__() + def setup_application(self): + self.qt_app.setApplicationName(self.tr("Qubes Global Settings")) + self.qt_app.setWindowIcon(QtGui.QIcon.fromTheme("qubes-manager")) + def __init_system_defaults__(self): # set up updatevm choice self.update_vm_vmlist, self.update_vm_idx = utils.prepare_vm_choice( @@ -408,9 +412,7 @@ class GlobalSettingsWindow(ui_globalsettingsdlg.Ui_GlobalSettings, def main(): - utils.run_synchronous( - QtCore.QCoreApplication.translate("appname", "Qubes Global Settings"), - GlobalSettingsWindow) + utils.run_synchronous(GlobalSettingsWindow) if __name__ == "__main__": diff --git a/qubesmanager/i18n/qubesmanager_en.ts b/qubesmanager/i18n/qubesmanager_en.ts index 547fb24..64569a6 100644 --- a/qubesmanager/i18n/qubesmanager_en.ts +++ b/qubesmanager/i18n/qubesmanager_en.ts @@ -168,15 +168,20 @@ p, li { white-space: pre-wrap; } - + Error loading backup profile - + Unable to load saved backup profile. + + + Qubes Backup VMs + + BootDialog @@ -259,25 +264,33 @@ p, li { white-space: pre-wrap; } + + Command {command} failed + + + exception + + + DevListWidgetItem - + Service already on the list! - + Error re-assigning device - + Refresh in progress... - + Refresh Applications @@ -448,12 +461,12 @@ p, li { white-space: pre-wrap; } - + qrexec call stderr was not empty - + qrexec call exited with non-zero return code @@ -461,45 +474,50 @@ p, li { white-space: pre-wrap; } GlobalSettingsWindow - + Change state of all qubes - + Are you sure you want to set all qubes to check for updates? - + Are you sure you want to set all qubes to not check for updates? - + ERROR! - + Error managing {repo} repository settings: {msg} - + Cannot detect enabled dom0 update repositories - + Cannot detect enabled ITL template update repositories - + qrexec call stdout did not contain "ok" as expected + + + Qubes Global Settings + + InformationNotesDialog @@ -713,82 +731,82 @@ p, li { white-space: pre-wrap; } NewVMDlg - + Name and label: - + Create new qube - + Networking: - + Template: - + my-new-qube - + Type: - + launch settings after creation - + Basic - + install system from device (also available from settings) - + provides network to other qubes - + Initial RAM (also available from settings) - + <html><head/><body><p><span style=" font-weight:600;">Caution</span>: changing these settings can compromise your system or make the qube unable to boot. Use only if you know what you are doing.</p></body></html> - + Storage pool - + Advanced - + (default) - + MB @@ -1089,17 +1107,17 @@ p, li { white-space: pre-wrap; } RestoreThread - + Partially restored files left in /var/tmp/restore_*, investigate them and/or clean them up - + Finished with errors! - + Finished successfully! @@ -1107,25 +1125,30 @@ p, li { white-space: pre-wrap; } RestoreVMsWindow - + Restore error! - + Please unmount your backup volume and cancel the file selection dialog. - + Aborting the operation... - + Restore qubes + + + Qubes Restore VMs + + RunCommandThread @@ -1138,420 +1161,420 @@ p, li { white-space: pre-wrap; } SettingsDialog - + Settings - + <html><head/><body><p>Name &amp;&amp; label<span style=" color:#ff0000;">*</span>:</p></body></html> - + ---- - + <html><head/><body><p>Template<span style=" color:#ff0000;">*</span>:</p></body></html> - + Include in backups by default - + Run in debug mode - + General - + Type: - + --- - + Installed by RPM: - + Disk storage - + Private storage max. size: - + System storage max. size: - + Networking - + IP: - + Netmask: - + Gateway: - + Basic - + Memory/CPU - + Initial memory: - + Max memory: - + VCPUs no.: - + Include in memory balancing - + Dynamic memory balancing can result in some devices not working! - + Other - + Kernel - + Kernel: - + Kernel opts: - + [] - + Advanced - + Allow full access for - + min - + Firewall rules - + You've enabled dynamic memory balancing, some devices might not work! - + Devices - + Applications - + Checked services will be turned on. - + Unchecked services will be turned off. - + Unlisted services will follow default settings. - + Services - + MiB - + Virtual DNS: - + <html><head/><body><p><span style=" color:#ff0000;">* </span><span style=" color:#000000;">Cannot be changed while the qube is running</span></p></body></html> - + Networking: - + Rename - + <html><head/><body><p>&quot;default ([name])&quot; denotes system-wide default - if the default is changed in Global Settings, the networking qube will change. <br/>If you want to keep using a given networking qube regardless of system settings, select &quot;[name]&quot;.</p></body></html> - + Start qube automatically on boot - - <html><head/><body><p>Caution: default DispVM template has a different Networking setting than this qube. Unexpected network access may occur!</p></body></html> - - - - + Delete qube - + Clone qube - + WARNING: PVH mode requires Linux 4.11 or newer. - + Virtualization - + Mode: - + Using PV mode exposes more hypervisor attack surface! - + PVH mode is hidden since it doesn't support PCI passthrough. - + PVH mode is recommended if possible (Linux kernel 4.11 or newer, no PCI passthrough). For Windows qubes always use HVM. - + MB - + Provides network - + <html><head/><body><p>Allows using this qube as a template for DisposableVMs. The DisposableVMs will inherit the VM's state (configuration, installed programs etc.), but their state will not persist between restarts. </p><p>Setting this option will cause this qube to be listed as an option in the &quot;Default DisposableVM Template&quot; dropdown for all other qubes. </p></body></html> - + Disposable VM Template - + Boot qube from CDROM - + Windows (with Qubes Windows Tools installed) only. The qube must be running to enable seamless mode; this setting is not persistent. - + Enable seamless mode - + Windows (with Qubes Windows Tools installed) only. The qube must be running to disable seamless mode; this setting is not persistent. - + Disable seamless mode - + <html><head/><body><p>Which qube should be used by default as a template for DisposableVMs started from this one? DisposableVMs will inherit their template's configuration and installed programs.<br/>For a qube to to appear in this list, it must have the &quot;DisposableVM Template&quot; checkbox enabled. </p></body></html> - + Default DisposableVM Template - + This qube has no networking - it will not have any network access anyway. - + Networking qube does not support 'qubes-firewall' - firewall restrictions will not be applied. - + Firewall has been modified manually - please use qvm-firewall for any further configuration. - + Allow all outgoing Internet connections - + Changing firewall settings does NOT affect existing connections. - + Limit outgoing Internet connections to ... - + List of allowed (whitelisted) addresses: - + NOTE: To block all network access, set Networking to (none) on the Basic settings tab. This tab provides a very simplified firewall configuration. All DNS requests and ICMP (pings) will be allowed. For more granular control, use the command line tool qvm-firewall. - + To modify PCI devices you have to turn off the qube. - + Currently PVH qubes don't support PCI passthrough. Select another virtualization mode if you want to add PCI devices - + Configure strict reset for PCI devices - + Refresh Applications - + Services listed here are only base Qubes services - other services may be installed and implemented. + + + <html><head/><body><p><span style=" font-weight:600;">Caution:</span> The Default DisposableVM Template (see the Advanced tab) has a different Networking setting than this qube. This configuration may result in unexpected network access. For example, you may have set this qube's Networking to &quot;none&quot; in order to prevent any data from being transmitted out. However, if the Default DisposableVM Template's Networking is set to &quot;sys-firewall,&quot; then a DisposableVM started from this qube may be able to transmit data out, contrary to your intention. You may wish to set the Default DisposableVM Template for this qube to one with equally restrictive Networking settings.</p></body></html> + + + + + This qube has direct network access - to configure its firewall, use a dedicated firewall qube. + + StatusItem - - - Cannot change template on a running VM. - - TemplateManager - + qube is running @@ -1559,35 +1582,40 @@ The qube must be running to disable seamless mode; this setting is not persisten TemplateManagerWindow - + Errors encountered! - + Errors encountered on template change in the following qubes: <br> {}. - + (select template) - + Qube - + Current - + New + + + Template Manager + + UpdateVMThread @@ -1615,35 +1643,40 @@ The qube must be running to disable seamless mode; this setting is not persisten - + ERROR! - + No file or block device selected; please select one. - + Warning! - + Qube must be turned off before booting it from device. Please turn off the qube. - + Failed to display file selection dialog - + Check if the qube {0} can be started and has a file manager installed. + + + Boot Qube From Device + + VMSettingsWindow @@ -1653,229 +1686,224 @@ The qube must be running to disable seamless mode; this setting is not persisten - + Error while changing settings for {0}! - + ERROR: {0} - + Error while saving changes: - + Firewall tab: - + Applications tab: - + Warning! - + Max memory can not be less than initial memory.<br>Setting max memory to equal initial memory. - + Initial memory can not be less than one tenth Max memory.<br>Setting initial memory to the minimum allowed value. - - Qube configuration problem! - - - - - This qube has networking disabled (Basic -> Networking) - network will be disabled. If you want to use firewall, please enable networking. - - - - - The '{vm}' qube is network connected to '{netvm}', which does not support firewall!<br/>You may edit the '{vm}' qube firewall rules, but these will not take any effect until you connect it to a working Firewall qube. - - - - + Delete qube (cannot delete a running qube) - + To change system storage size, change properties of the underlying template. - + Qube cannot be renamed! - + The following qubes using this qube as a template are running: <br> {}. <br> In order to rename this qube, you must first shut them down. - + Rename qube - + New name: (WARNING: all other changes will be discarded) - + Renaming Qube... - + Qube cannot be removed! - + This qube cannot be removed. It is used as: <br> {} <small>If you want to remove this qube, you should remove or change settings of each qube or setting that uses it.</small> - + Delete qube - + Are you absolutely sure you want to delete this qube? <br/> All qube settings and data will be irrevocably deleted. <br/> If you are sure, please enter this qube's name below. - + Removal cancelled - + The qube will not be removed. - + Clone qube - + Name for the cloned qube: - + Cloning Qube... - + No finished thread found - + Basic tab: - + Advanced tab: - + Devices tab: - + Sevices tab: - + Cannot change this setting while this qube is used as a NetVM by the following qubes: + + + Qube Settings + + VmListItem - + Wait! - + Enter backup target location first. - + Selected directory do not exists or not a directory (%s). - + Enter passphrase for backup encryption/verification first. - + Enter the same passphrase in both fields. - + ERROR: {} - + Backup finished. - + Please unmount your backup volume and cancel the file selection dialog. - + Backup aborted! - + Backup error - + ERROR: Aborted + + + Error cancelling backup! + + VmManagerWindow @@ -1891,7 +1919,7 @@ Error: {} - + Loading Qube Manager... @@ -1901,142 +1929,142 @@ Error: {} - + Warning! - + This qube cannot be removed. It is used as: <br> {} <small>If you want to remove this qube, you should remove or change settings of each qube or setting that uses it.</small> - + Qube Removal Confirmation - + Are you sure you want to remove the Qube <b>'{0}'</b>?<br> All data on this Qube's private storage will be lost!<br><br>Type the name of the Qube (<b>{1}</b>) below to confirm: - + Qube removal confirmation failed - + Entered name did not match! Not removing {0}. - + Qubes clone Qube - + Enter name for Qube <b>{}</b> clone: - + Name already in use! - + There already exists a qube called '{}'. Cloning aborted. - + Cloning Qube... - + Error unpausing Qube! - + ERROR: {0} - + Error pausing Qube! - + Qube Shutdown Confirmation - + Are you sure you want to power down the Qube <b>'{0}'</b>?<br><small>This will shutdown all the running applications within this Qube.</small> - + Error shutting down Qube! - + Qube Restart Confirmation - + Are you sure you want to restart the Qube <b>'{0}'</b>?<br><small>This will shutdown all the running applications within this Qube.</small> - + Qube <b>'{0}'</b> is not running. Are you absolutely sure you want to try to kill it?<br><small>This will end <b>(not shutdown!)</b> all the running applications within this Qube.</small> - + Are you sure you want to kill the Qube <b>'{0}'</b>?<br><small>This will end <b>(not shutdown!)</b> all the running applications within this Qube.</small> - + Qube Kill Confirmation - + Error while killing Qube! - + <b>An exception ocurred while killing {0}.</b><br>ERROR: {1} - + Qube Update Confirmation - + <b>{0}</b><br>The Qube has to be running to be updated.<br>Do you want to start it?<br> - + Qubes command entry - + Run command in <b>{}</b>: @@ -2490,12 +2518,12 @@ Template - + No finished thread found - + Cloning qube... @@ -2523,51 +2551,13 @@ Template - - VmUpdateInfoItem - appname - - Qubes Backup VMs - - - - - Boot Qube From Device - - - - + Create qube - - - Qubes Global Settings - - - - - Qube Manager - - - - - Qubes Restore VMs - - - - - Qube Settings - - - - - Template Manager - - dialog @@ -2589,9 +2579,12 @@ Template exception + + + template-manager - - qvm-appmenus --set-whitelist failed + + Cannot change template on a running VM. diff --git a/qubesmanager/i18n/qubesmanager_es.ts b/qubesmanager/i18n/qubesmanager_es.ts index 629a846..6afa02b 100644 --- a/qubesmanager/i18n/qubesmanager_es.ts +++ b/qubesmanager/i18n/qubesmanager_es.ts @@ -209,15 +209,20 @@ p, li { white-space: pre-wrap; } Respaldo en proceso... - + Error loading backup profile - + Unable to load saved backup profile. + + + Qubes Backup VMs + Qubes: Respaldo de VMs + BootDialog @@ -301,10 +306,18 @@ p, li { white-space: pre-wrap; } + + Command {command} failed + + + exception + + + DevListWidgetItem - + Service already on the list! ¡El servicio ya está en la lista! @@ -339,17 +352,17 @@ p, li { white-space: pre-wrap; } El servicio '{0}' es desconocido. - + Error re-assigning device - + Refresh in progress... - + Refresh Applications @@ -545,12 +558,12 @@ p, li { white-space: pre-wrap; } - + qrexec call stderr was not empty - + qrexec call exited with non-zero return code @@ -563,45 +576,50 @@ p, li { white-space: pre-wrap; } (actual) - + Change state of all qubes - + Are you sure you want to set all qubes to check for updates? - + Are you sure you want to set all qubes to not check for updates? - + ERROR! - + Error managing {repo} repository settings: {msg} - + Cannot detect enabled dom0 update repositories - + Cannot detect enabled ITL template update repositories - + qrexec call stdout did not contain "ok" as expected + + + Qubes Global Settings + Opciones de configuración global de Qubes OS + InformationNotesDialog @@ -831,7 +849,7 @@ p, li { white-space: pre-wrap; } <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Asegúrese de que la licencia del sistema operativo instalado en una plantilla de VM tenga permiso para ejecutar varias instancias de un sistema instalado.</span></p></body></html> - + Name and label: Nombre y etiqueta: @@ -881,77 +899,77 @@ p, li { white-space: pre-wrap; } Permitir conexión a la red: - + Create new qube - + Networking: - + Template: - + my-new-qube - + Type: Tipo: - + launch settings after creation - + Basic Básico - + install system from device (also available from settings) - + provides network to other qubes - + Initial RAM (also available from settings) - + <html><head/><body><p><span style=" font-weight:600;">Caution</span>: changing these settings can compromise your system or make the qube unable to boot. Use only if you know what you are doing.</p></body></html> - + Storage pool - + Advanced Avanzado - + (default) - + MB @@ -1397,17 +1415,17 @@ p, li { white-space: pre-wrap; } RestoreThread - + Partially restored files left in /var/tmp/restore_*, investigate them and/or clean them up Los archivos parcialmente restaurados fueron dejados en /var/tmp/restore_*, revisalos y/o limpialos. - + Finished with errors! Finalizado con errores - + Finished successfully! Finalizado existosamente @@ -1415,7 +1433,7 @@ p, li { white-space: pre-wrap; } RestoreVMsWindow - + Restore error! Ocurrió un error al restaurar @@ -1460,7 +1478,7 @@ p, li { white-space: pre-wrap; } ERROR: {0} - + Please unmount your backup volume and cancel the file selection dialog. Desmonte el volumen de la copia de seguridad y cancele el cuadro de diálogo de selección de archivos. @@ -1470,15 +1488,20 @@ p, li { white-space: pre-wrap; } Desconecte el dispositivo de respaldo - + Aborting the operation... Abortando la operación... - + Restore qubes + + + Qubes Restore VMs + Qubes: Recuperar VM desde copia de respaldo + RunCommandThread @@ -1491,22 +1514,22 @@ p, li { white-space: pre-wrap; } SettingsDialog - + Settings Opciones de configuración - + <html><head/><body><p>Name &amp;&amp; label<span style=" color:#ff0000;">*</span>:</p></body></html> - + ---- ---- - + <html><head/><body><p>Template<span style=" color:#ff0000;">*</span>:</p></body></html> @@ -1516,12 +1539,12 @@ p, li { white-space: pre-wrap; } NetVM: - + Include in backups by default Incluir en copias de respaldo por defecto - + Run in debug mode Ejecutar en modo de depuración @@ -1536,27 +1559,27 @@ p, li { white-space: pre-wrap; } Interfaz gráfica integrada - + General General - + Type: Tipo: - + --- --- - + Installed by RPM: Instalada mediante RPM: - + Disk storage Almacenamiento en disco @@ -1566,32 +1589,32 @@ p, li { white-space: pre-wrap; } MB - + Private storage max. size: Tamaño máximo del almacenamiento privado: - + System storage max. size: Tamaño máximo del almacenamiento del sistema: - + Networking Conexión a la red - + IP: IP: - + Netmask: Máscara de red: - + Gateway: Puerta de enlace: @@ -1601,37 +1624,37 @@ p, li { white-space: pre-wrap; } <html><head/><body><p><span style=" color:#ff0000;">* </span><span style=" color:#000000;">No puede modificarse mientras la VM esta funcionando</span></p></body></html> - + Basic Básico - + Memory/CPU Memoria / Procesador - + Initial memory: Memoria inicial: - + Max memory: Memoria máxima: - + VCPUs no.: Cantidad de VCPUs: - + Include in memory balancing Incluir en el balanceo de memoria - + Dynamic memory balancing can result in some devices not working! ¡Utilizar el balanceo dinámico de memoria puede ocasionar que algunos dispositivos no funcionen! @@ -1666,7 +1689,7 @@ p, li { white-space: pre-wrap; } imagen privada: - + Other Otros @@ -1676,22 +1699,22 @@ p, li { white-space: pre-wrap; } NetVM para máquinas virtuales desechables: - + Kernel Kernel - + Kernel: Kernel: - + Kernel opts: Opciones para el kernel: - + [] @@ -1716,7 +1739,7 @@ p, li { white-space: pre-wrap; } El nuevo dispositivo será utilizado en el próximo arranque de la VM - + Advanced Avanzado @@ -1746,22 +1769,22 @@ p, li { white-space: pre-wrap; } Permitir conexión al proxy de actualizaciones - + Allow full access for Permitir acceso total por - + min minutos(s) - + Firewall rules Reglas del firewall - + You've enabled dynamic memory balancing, some devices might not work! Ha habilitado el balanceo dinámico de memoria, ¡algunos dispositivos pueden fallar! @@ -1771,250 +1794,250 @@ p, li { white-space: pre-wrap; } Para modificar los dispositivos PCI debe apagar la máquina virtual. - + Devices Dispositivos - + Applications Aplicaciones - + Checked services will be turned on. Los servicios marcados estarán encendidos. - + Unchecked services will be turned off. Los servicios no marcados estar apagados. - + Unlisted services will follow default settings. Los servicios que no están en la lista tomarán la configuración por defecto. - + Services Servicios - + MiB - + Virtual DNS: - + <html><head/><body><p><span style=" color:#ff0000;">* </span><span style=" color:#000000;">Cannot be changed while the qube is running</span></p></body></html> - + Networking: - + Rename - + <html><head/><body><p>&quot;default ([name])&quot; denotes system-wide default - if the default is changed in Global Settings, the networking qube will change. <br/>If you want to keep using a given networking qube regardless of system settings, select &quot;[name]&quot;.</p></body></html> - + Start qube automatically on boot - - <html><head/><body><p>Caution: default DispVM template has a different Networking setting than this qube. Unexpected network access may occur!</p></body></html> - - - - + Delete qube - + Clone qube - + WARNING: PVH mode requires Linux 4.11 or newer. - + Virtualization - + Mode: - + Using PV mode exposes more hypervisor attack surface! - + PVH mode is hidden since it doesn't support PCI passthrough. - + PVH mode is recommended if possible (Linux kernel 4.11 or newer, no PCI passthrough). For Windows qubes always use HVM. - + MB - + Provides network - + <html><head/><body><p>Allows using this qube as a template for DisposableVMs. The DisposableVMs will inherit the VM's state (configuration, installed programs etc.), but their state will not persist between restarts. </p><p>Setting this option will cause this qube to be listed as an option in the &quot;Default DisposableVM Template&quot; dropdown for all other qubes. </p></body></html> - + Disposable VM Template - + Boot qube from CDROM - + Windows (with Qubes Windows Tools installed) only. The qube must be running to enable seamless mode; this setting is not persistent. - + Enable seamless mode - + Windows (with Qubes Windows Tools installed) only. The qube must be running to disable seamless mode; this setting is not persistent. - + Disable seamless mode - + <html><head/><body><p>Which qube should be used by default as a template for DisposableVMs started from this one? DisposableVMs will inherit their template's configuration and installed programs.<br/>For a qube to to appear in this list, it must have the &quot;DisposableVM Template&quot; checkbox enabled. </p></body></html> - + Default DisposableVM Template - + This qube has no networking - it will not have any network access anyway. - + Networking qube does not support 'qubes-firewall' - firewall restrictions will not be applied. - + Firewall has been modified manually - please use qvm-firewall for any further configuration. - + Allow all outgoing Internet connections - + Changing firewall settings does NOT affect existing connections. - + Limit outgoing Internet connections to ... - + List of allowed (whitelisted) addresses: - + NOTE: To block all network access, set Networking to (none) on the Basic settings tab. This tab provides a very simplified firewall configuration. All DNS requests and ICMP (pings) will be allowed. For more granular control, use the command line tool qvm-firewall. - + To modify PCI devices you have to turn off the qube. - + Currently PVH qubes don't support PCI passthrough. Select another virtualization mode if you want to add PCI devices - + Configure strict reset for PCI devices - + Refresh Applications - + Services listed here are only base Qubes services - other services may be installed and implemented. + + + <html><head/><body><p><span style=" font-weight:600;">Caution:</span> The Default DisposableVM Template (see the Advanced tab) has a different Networking setting than this qube. This configuration may result in unexpected network access. For example, you may have set this qube's Networking to &quot;none&quot; in order to prevent any data from being transmitted out. However, if the Default DisposableVM Template's Networking is set to &quot;sys-firewall,&quot; then a DisposableVM started from this qube may be able to transmit data out, contrary to your intention. You may wish to set the Default DisposableVM Template for this qube to one with equally restrictive Networking settings.</p></body></html> + + + + + This qube has direct network access - to configure its firewall, use a dedicated firewall qube. + + StatusItem - - - Cannot change template on a running VM. - - TemplateManager - + qube is running @@ -2022,35 +2045,40 @@ The qube must be running to disable seamless mode; this setting is not persisten TemplateManagerWindow - + Errors encountered! - + Errors encountered on template change in the following qubes: <br> {}. - + (select template) - + Qube - + Current - + New + + + Template Manager + + UpdateVMThread @@ -2078,35 +2106,40 @@ The qube must be running to disable seamless mode; this setting is not persisten - + ERROR! - + No file or block device selected; please select one. - + Warning! ¡Atencion! - + Qube must be turned off before booting it from device. Please turn off the qube. - + Failed to display file selection dialog - + Check if the qube {0} can be started and has a file manager installed. + + + Boot Qube From Device + + VMSettingsWindow @@ -2121,27 +2154,27 @@ The qube must be running to disable seamless mode; this setting is not persisten Aplicando la configuración a <b>{0}</b>... - + Error while changing settings for {0}! ¡Error al cambiar la configuración de {0}! - + ERROR: {0} ERROR: {0} - + Error while saving changes: Error al guardar los cambios: - + Firewall tab: Solapa de firewall: - + Applications tab: Solapa de aplicaciones: @@ -2176,146 +2209,136 @@ The qube must be running to disable seamless mode; this setting is not persisten No es posible cambiar el nombre de la VM - Ya existe una VM llamada <b>{0}</b>en el sistema. - + Warning! ¡Atencion! - + Max memory can not be less than initial memory.<br>Setting max memory to equal initial memory. La memoria máxima no puede ser menor que la cantidad de memoria inicial.<br>Fijando la memoria máxima al mismo valor de la memoria inicial. - + Initial memory can not be less than one tenth Max memory.<br>Setting initial memory to the minimum allowed value. La memoria inicial no puede ser menor a un décimo de la memoria máxima.<br>Fijando la memoria inicial al mínimo aceptable. - - Qube configuration problem! - - - - - This qube has networking disabled (Basic -> Networking) - network will be disabled. If you want to use firewall, please enable networking. - - - - - The '{vm}' qube is network connected to '{netvm}', which does not support firewall!<br/>You may edit the '{vm}' qube firewall rules, but these will not take any effect until you connect it to a working Firewall qube. - - - - + Delete qube (cannot delete a running qube) - + To change system storage size, change properties of the underlying template. - + Qube cannot be renamed! - + The following qubes using this qube as a template are running: <br> {}. <br> In order to rename this qube, you must first shut them down. - + Rename qube - + New name: (WARNING: all other changes will be discarded) - + Renaming Qube... - + Qube cannot be removed! - + This qube cannot be removed. It is used as: <br> {} <small>If you want to remove this qube, you should remove or change settings of each qube or setting that uses it.</small> - + Delete qube - + Are you absolutely sure you want to delete this qube? <br/> All qube settings and data will be irrevocably deleted. <br/> If you are sure, please enter this qube's name below. - + Removal cancelled - + The qube will not be removed. - + Clone qube - + Name for the cloned qube: - + Cloning Qube... - + No finished thread found - + Basic tab: - + Advanced tab: - + Devices tab: - + Sevices tab: - + Cannot change this setting while this qube is used as a NetVM by the following qubes: + + + Qube Settings + + VmListItem @@ -2330,7 +2353,7 @@ The qube must be running to disable seamless mode; this setting is not persisten ¿Está seguro de que desea apagar las siguientes VMs: <b>{0}</b>?<br/><small>Esto finalizará todas las aplicaciones que estén ejecutándose en ellas.</small> - + Wait! ¡Atención! @@ -2340,22 +2363,22 @@ The qube must be running to disable seamless mode; this setting is not persisten Algunas de las VMs seleccionadas estan funcionando. Una VM en funcionamiento no puede ser respaldada. Por favor, apáguela o quítela de la lista. - + Enter backup target location first. Indique antes el destino de la copia de respaldo. - + Selected directory do not exists or not a directory (%s). El directorio seleccionado no existe, o no es un directorio (%s). - + Enter passphrase for backup encryption/verification first. Introduzca antes la frase de contraseña de cifrado y verificación. - + Enter the same passphrase in both fields. Introduzca la misma frase de contraseña en ambos campos. @@ -2395,40 +2418,45 @@ The qube must be running to disable seamless mode; this setting is not persisten Error en la copia de respaldo. - + ERROR: {} ERROR: {} - + Backup finished. Copia de respaldo terminada. - + Please unmount your backup volume and cancel the file selection dialog. Por favor, desmonte el volumen de respaldo y cancele el diálogo de selección de archivos. - + Backup aborted! - + Backup error - + ERROR: Aborted + + + Error cancelling backup! + + VmManagerWindow - + Warning! ¡Cuidado! @@ -2453,7 +2481,7 @@ The qube must be running to disable seamless mode; this setting is not persisten La confirmación de borrado del VM falló. - + Entered name did not match! Not removing {0}. ¡El nombre ingresado no coincide! La VM {0} no será borrada. @@ -2473,7 +2501,7 @@ The qube must be running to disable seamless mode; this setting is not persisten Ocurrió un error al borrar la VM. - + ERROR: {0} ERROR: {0} @@ -2593,7 +2621,7 @@ The qube must be running to disable seamless mode; this setting is not persisten Ocurrió un error al terminar la VM - + <b>An exception ocurred while killing {0}.</b><br>ERROR: {1} <b>Ocurrió una excepción al terminar {0}.</b><br>ERROR: {1} @@ -2618,12 +2646,12 @@ The qube must be running to disable seamless mode; this setting is not persisten Ocurrió un error al actualizar la VM - + Qubes command entry Qubes: Ejecución de comandos - + Run command in <b>{}</b>: Ejecutar el comando en <b>{}</b>: @@ -3119,7 +3147,7 @@ Error: {} - + Loading Qube Manager... @@ -3129,112 +3157,112 @@ Error: {} - + This qube cannot be removed. It is used as: <br> {} <small>If you want to remove this qube, you should remove or change settings of each qube or setting that uses it.</small> - + Qube Removal Confirmation - + Are you sure you want to remove the Qube <b>'{0}'</b>?<br> All data on this Qube's private storage will be lost!<br><br>Type the name of the Qube (<b>{1}</b>) below to confirm: - + Qube removal confirmation failed - + Qubes clone Qube - + Enter name for Qube <b>{}</b> clone: - + Name already in use! - + There already exists a qube called '{}'. Cloning aborted. - + Cloning Qube... - + Error unpausing Qube! - + Error pausing Qube! - + Qube Shutdown Confirmation - + Are you sure you want to power down the Qube <b>'{0}'</b>?<br><small>This will shutdown all the running applications within this Qube.</small> - + Error shutting down Qube! - + Qube Restart Confirmation - + Are you sure you want to restart the Qube <b>'{0}'</b>?<br><small>This will shutdown all the running applications within this Qube.</small> - + Qube <b>'{0}'</b> is not running. Are you absolutely sure you want to try to kill it?<br><small>This will end <b>(not shutdown!)</b> all the running applications within this Qube.</small> - + Are you sure you want to kill the Qube <b>'{0}'</b>?<br><small>This will end <b>(not shutdown!)</b> all the running applications within this Qube.</small> - + Qube Kill Confirmation - + Error while killing Qube! - + Qube Update Confirmation - + <b>{0}</b><br>The Qube has to be running to be updated.<br>Do you want to start it?<br> @@ -3498,12 +3526,12 @@ Template - + No finished thread found - + Cloning qube... @@ -3564,42 +3592,22 @@ Template Qubes Backup VMs - Qubes: Respaldo de VMs + Qubes: Respaldo de VMs - - Boot Qube From Device - - - - + Create qube Qubes Global Settings - Opciones de configuración global de Qubes OS - - - - Qube Manager - + Opciones de configuración global de Qubes OS Qubes Restore VMs - Qubes: Recuperar VM desde copia de respaldo - - - - Qube Settings - - - - - Template Manager - + Qubes: Recuperar VM desde copia de respaldo @@ -3622,9 +3630,12 @@ Template exception + + + template-manager - - qvm-appmenus --set-whitelist failed + + Cannot change template on a running VM. diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index 37c75c7..feb388d 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -520,6 +520,11 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtWidgets.QMainWindow): # correctly initialized self.table.selectRow(0) + def setup_application(self): + self.qt_app.setApplicationName(self.tr("Qube Manager")) + self.qt_app.setWindowIcon(QtGui.QIcon.fromTheme("qubes-manager")) + + def keyPressEvent(self, event): # pylint: disable=invalid-name if event.key() == QtCore.Qt.Key_Escape: self.searchbox.clear() @@ -1300,10 +1305,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtWidgets.QMainWindow): def main(): - manager_utils.run_asynchronous( - QtCore.QCoreApplication.translate("appname", "Qube Manager"), - "qubes-manager", - VmManagerWindow) + manager_utils.run_asynchronous(VmManagerWindow) if __name__ == "__main__": diff --git a/qubesmanager/restore.py b/qubesmanager/restore.py index b79e78c..6b62b44 100644 --- a/qubesmanager/restore.py +++ b/qubesmanager/restore.py @@ -20,7 +20,7 @@ # # -from PyQt5 import QtCore, QtWidgets # pylint: disable=import-error +from PyQt5 import QtCore, QtWidgets, QtGui # pylint: disable=import-error import os import os.path import logging @@ -110,6 +110,10 @@ class RestoreVMsWindow(ui_restoredlg.Ui_Restore, QtWidgets.QWizard): backup_utils.fill_appvms_list(self) + def setup_application(self): + self.qt_app.setApplicationName(self.tr("Qubes Restore VMs")) + self.qt_app.setWindowIcon(QtGui.QIcon.fromTheme("qubes-manager")) + @QtCore.pyqtSlot(name='on_select_path_button_clicked') def select_path_button_clicked(self): backup_utils.select_path_button_clicked(self, True) @@ -290,9 +294,7 @@ class RestoreVMsWindow(ui_restoredlg.Ui_Restore, QtWidgets.QWizard): def main(): - utils.run_synchronous( - QtCore.QCoreApplication.translate("appname", "Qubes Restore VMs"), - RestoreVMsWindow) + utils.run_synchronous(RestoreVMsWindow) if __name__ == "__main__": diff --git a/qubesmanager/settings.py b/qubesmanager/settings.py index d65a547..a4a4e12 100644 --- a/qubesmanager/settings.py +++ b/qubesmanager/settings.py @@ -222,6 +222,10 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtWidgets.QDialog): self.refresh_apps_button.clicked.connect( self.refresh_apps_button_pressed) + def setup_application(self): + self.qt_app.setApplicationName(self.tr("Qube Settings")) + self.qt_app.setWindowIcon(QtGui.QIcon.fromTheme("qubes-manager")) + def clear_threads(self): for thread in self.threads_list: if thread.isFinished(): @@ -1211,9 +1215,7 @@ def main(args=None): args = parser.parse_args(args) vm = args.domains.pop() - utils.run_synchronous( - QtCore.QCoreApplication.translate("appname", "Qube Settings"), - functools.partial(VMSettingsWindow, vm, args.tab)) + utils.run_synchronous(functools.partial(VMSettingsWindow, vm, args.tab)) if __name__ == "__main__": diff --git a/qubesmanager/template_manager.py b/qubesmanager/template_manager.py index d210e81..796b29f 100644 --- a/qubesmanager/template_manager.py +++ b/qubesmanager/template_manager.py @@ -62,6 +62,10 @@ class TemplateManagerWindow( self.vm_list.show() + def setup_application(self): + self.qt_app.setApplicationName(self.tr("Template Manager")) + self.qt_app.setWindowIcon(QtGui.QIcon.fromTheme("qubes-manager")) + def prepare_lists(self): self.templates = [vm.name for vm in self.qubes_app.domains if vm.klass == 'TemplateVM'] @@ -259,7 +263,8 @@ class StatusItem(QtWidgets.QTableWidgetItem): if self.state: self.setIcon(QtGui.QIcon.fromTheme('dialog-warning')) - self.setToolTip(self.tr("Cannot change template on a running VM.")) + self.setToolTip(QtCore.QCoreApplication.translate( + "template-manager", "Cannot change template on a running VM.")) else: self.setIcon(QtGui.QIcon()) self.setToolTip("") @@ -381,10 +386,7 @@ class VMRow: def main(): - utils.run_asynchronous( - QtCore.QCoreApplication.translate("appname", "Template Manager"), - "qubes-manager", - TemplateManagerWindow) + utils.run_asynchronous(TemplateManagerWindow) if __name__ == "__main__": diff --git a/qubesmanager/utils.py b/qubesmanager/utils.py index 94dc680..384d8a1 100644 --- a/qubesmanager/utils.py +++ b/qubesmanager/utils.py @@ -268,7 +268,7 @@ def handle_exception(exc_type, exc_value, exc_traceback): msg_box.exec_() -def run_asynchronous(app_name, icon_name, window_class): +def run_asynchronous(window_class): qt_app = QtWidgets.QApplication(sys.argv) translator = QtCore.QTranslator(qt_app) @@ -278,11 +278,10 @@ def run_asynchronous(app_name, icon_name, window_class): 'i18n') translator.load("qubesmanager_{!s}.qm".format(locale), i18n_dir) qt_app.installTranslator(translator) + QtCore.QCoreApplication.installTranslator(translator) qt_app.setOrganizationName("The Qubes Project") qt_app.setOrganizationDomain("http://qubes-os.org") - qt_app.setApplicationName(app_name) - qt_app.setWindowIcon(QIcon.fromTheme(icon_name)) qt_app.lastWindowClosed.connect(loop_shutdown) qubes_app = qubesadmin.Qubes() @@ -292,6 +291,10 @@ def run_asynchronous(app_name, icon_name, window_class): dispatcher = events.EventsDispatcher(qubes_app) window = window_class(qt_app, qubes_app, dispatcher) + + if hasattr(window, "setup_application"): + window.setup_application() + window.show() try: @@ -305,7 +308,7 @@ def run_asynchronous(app_name, icon_name, window_class): handle_exception(exc_type, exc_value, exc_traceback) -def run_synchronous(app_name, window_class): +def run_synchronous(window_class): qt_app = QtWidgets.QApplication(sys.argv) translator = QtCore.QTranslator(qt_app) @@ -315,10 +318,10 @@ def run_synchronous(app_name, window_class): 'i18n') translator.load("qubesmanager_{!s}.qm".format(locale), i18n_dir) qt_app.installTranslator(translator) + QtCore.QCoreApplication.installTranslator(translator) qt_app.setOrganizationName("The Qubes Project") qt_app.setOrganizationDomain("http://qubes-os.org") - qt_app.setApplicationName(app_name) sys.excepthook = handle_exception @@ -326,6 +329,9 @@ def run_synchronous(app_name, window_class): window = window_class(qt_app, qubes_app) + if hasattr(window, "setup_application"): + window.setup_application() + window.show() qt_app.exec_()