From d033268cd91e06e05bc244982c231c4dc74949e3 Mon Sep 17 00:00:00 2001 From: grossmj Date: Mon, 14 Jan 2019 17:19:37 +0700 Subject: [PATCH] Change some text regarding appliance installation. --- gns3/dialogs/appliance_wizard.py | 6 +++--- gns3/ui/appliance_wizard.ui | 12 ++++++------ gns3/ui/appliance_wizard_ui.py | 12 ++++++------ gns3/ui/new_template_wizard.ui | 10 +++++----- gns3/ui/new_template_wizard_ui.py | 8 ++++---- tests/registry/test_appliance_to_template.py | 2 +- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/gns3/dialogs/appliance_wizard.py b/gns3/dialogs/appliance_wizard.py index c4e5cbd3..65fd764c 100644 --- a/gns3/dialogs/appliance_wizard.py +++ b/gns3/dialogs/appliance_wizard.py @@ -198,7 +198,7 @@ class ApplianceWizard(QtWidgets.QWizard, Ui_ApplianceWizard): Qemu.instance().getQemuBinariesFromServer(self._compute_id, qpartial(self._getQemuBinariesFromServerCallback), [self._appliance["qemu"]["arch"]]) elif self.page(page_id) == self.uiUsageWizardPage: - self.uiUsageTextEdit.setText("The appliance is available in the {} category.\n\n{}".format(self._appliance["category"].replace("_", " "), self._appliance.get("usage", ""))) + self.uiUsageTextEdit.setText("The template will be available in the {} category.\n\n{}".format(self._appliance["category"].replace("_", " "), self._appliance.get("usage", ""))) def _qemuServerCapabilitiesCallback(self, result, error=None, *args, **kwargs): """ @@ -576,10 +576,10 @@ class ApplianceWizard(QtWidgets.QWizard, Ui_ApplianceWizard): def _templateCreatedCallback(self, result, error=False, **kwargs): if error is True: - QtWidgets.QMessageBox.critical(self.parent(), "Add template", "Template cannot be created: {}".format(result.get("message", "unknown"))) + QtWidgets.QMessageBox.critical(self.parent(), "Add template", "The template cannot be created: {}".format(result.get("message", "unknown"))) return - QtWidgets.QMessageBox.information(self.parent(), "Add template", "Template '{}' has been successfully created!".format(result["name"])) + QtWidgets.QMessageBox.information(self.parent(), "Add template", "The appliance has been installed and a template named '{}' has been successfully created!".format(result["name"])) self._template_created = True self.done(True) diff --git a/gns3/ui/appliance_wizard.ui b/gns3/ui/appliance_wizard.ui index fb2e38e8..3811547f 100644 --- a/gns3/ui/appliance_wizard.ui +++ b/gns3/ui/appliance_wizard.ui @@ -23,7 +23,7 @@ - Add appliance + Install appliance true @@ -39,7 +39,7 @@ Server - Please choose a server type to run the appliance. The grayed out server types are not supported or configured. + Please choose a server type to install the appliance. The grayed out server types are not supported or configured. @@ -75,7 +75,7 @@ - Run the appliance on a remote server + Install the appliance on a remote server true @@ -97,7 +97,7 @@ - Run the appliance on the GNS3 VM (recommended) + Install the appliance on the GNS3 VM (recommended) @@ -116,7 +116,7 @@ - Run the appliance on your local computer + Install the appliance on your local computer @@ -197,7 +197,7 @@ Qemu settings - Please choose the qemu binary that we will use for running this appliance. + Please choose the qemu binary that will be used to run this appliance. diff --git a/gns3/ui/appliance_wizard_ui.py b/gns3/ui/appliance_wizard_ui.py index fcd8c2fc..bc882c23 100644 --- a/gns3/ui/appliance_wizard_ui.py +++ b/gns3/ui/appliance_wizard_ui.py @@ -162,17 +162,17 @@ class Ui_ApplianceWizard(object): def retranslateUi(self, ApplianceWizard): _translate = QtCore.QCoreApplication.translate - ApplianceWizard.setWindowTitle(_translate("ApplianceWizard", "Add appliance")) + ApplianceWizard.setWindowTitle(_translate("ApplianceWizard", "Install appliance")) self.uiServerWizardPage.setTitle(_translate("ApplianceWizard", "Server")) - self.uiServerWizardPage.setSubTitle(_translate("ApplianceWizard", "Please choose a server type to run the appliance. The grayed out server types are not supported or configured.")) + self.uiServerWizardPage.setSubTitle(_translate("ApplianceWizard", "Please choose a server type to install the appliance. The grayed out server types are not supported or configured.")) self.uiServerTypeGroupBox.setTitle(_translate("ApplianceWizard", "Server type")) - self.uiRemoteRadioButton.setText(_translate("ApplianceWizard", "Run the appliance on a remote server")) - self.uiVMRadioButton.setText(_translate("ApplianceWizard", "Run the appliance on the GNS3 VM (recommended)")) - self.uiLocalRadioButton.setText(_translate("ApplianceWizard", "Run the appliance on your local computer")) + self.uiRemoteRadioButton.setText(_translate("ApplianceWizard", "Install the appliance on a remote server")) + self.uiVMRadioButton.setText(_translate("ApplianceWizard", "Install the appliance on the GNS3 VM (recommended)")) + self.uiLocalRadioButton.setText(_translate("ApplianceWizard", "Install the appliance on your local computer")) self.uiRemoteServersGroupBox.setTitle(_translate("ApplianceWizard", "Remote server")) self.uiRemoteServersLabel.setText(_translate("ApplianceWizard", "Run on:")) self.uiQemuWizardPage.setTitle(_translate("ApplianceWizard", "Qemu settings")) - self.uiQemuWizardPage.setSubTitle(_translate("ApplianceWizard", "Please choose the qemu binary that we will use for running this appliance.")) + self.uiQemuWizardPage.setSubTitle(_translate("ApplianceWizard", "Please choose the qemu binary that will be used to run this appliance.")) self.uiQemuListLabel.setText(_translate("ApplianceWizard", "Qemu binary:")) self.uiFilesWizardPage.setTitle(_translate("ApplianceWizard", "Required files")) self.uiFilesWizardPage.setSubTitle(_translate("ApplianceWizard", "The following files are required to install the appliance")) diff --git a/gns3/ui/new_template_wizard.ui b/gns3/ui/new_template_wizard.ui index 3ecfbcc7..f8c19e25 100644 --- a/gns3/ui/new_template_wizard.ui +++ b/gns3/ui/new_template_wizard.ui @@ -24,13 +24,13 @@ New template - Please choose how you want to create a new template + Please select how you want to create a new template - &Import appliances from the GNS3 server (recommended) + &Install an appliance from the GNS3 server (recommended) true @@ -40,14 +40,14 @@ - &Import a GNS3 appliance file (.gns3a) + &Import an appliance file (.gns3a extension) - &Create a template manually + &Manually create a new template @@ -58,7 +58,7 @@ Appliances from server - Please select the appliances to install. Update will request the server to download appliances from our online registry. + Select one or more appliances to install. Update will request the server to download appliances from our online registry. diff --git a/gns3/ui/new_template_wizard_ui.py b/gns3/ui/new_template_wizard_ui.py index 6d39104f..c53ebc74 100644 --- a/gns3/ui/new_template_wizard_ui.py +++ b/gns3/ui/new_template_wizard_ui.py @@ -51,12 +51,12 @@ class Ui_NewTemplateWizard(object): _translate = QtCore.QCoreApplication.translate NewTemplateWizard.setWindowTitle(_translate("NewTemplateWizard", "New template")) self.uiSelectTemplateSourceWizardPage.setTitle(_translate("NewTemplateWizard", "New template")) - self.uiSelectTemplateSourceWizardPage.setSubTitle(_translate("NewTemplateWizard", "Please choose how you want to create a new template")) - self.uiImportApplianceFromServerRadioButton.setText(_translate("NewTemplateWizard", "&Import appliances from the GNS3 server (recommended)")) - self.uiImportApplianceFromFileRadioButton.setText(_translate("NewTemplateWizard", "&Import a GNS3 appliance file (.gns3a)")) + self.uiSelectTemplateSourceWizardPage.setSubTitle(_translate("NewTemplateWizard", "Please select how you want to create a new template")) + self.uiImportApplianceFromServerRadioButton.setText(_translate("NewTemplateWizard", "&Install an appliance from the GNS3 server (recommended)")) + self.uiImportApplianceFromFileRadioButton.setText(_translate("NewTemplateWizard", "&Import an appliance file (.gns3a extension)")) self.uiCreateTemplateManuallyRadioButton.setText(_translate("NewTemplateWizard", "&Create a template manually")) self.uiApplianceFromServerWizardPage.setTitle(_translate("NewTemplateWizard", "Appliances from server")) - self.uiApplianceFromServerWizardPage.setSubTitle(_translate("NewTemplateWizard", "Please select the appliances to install. Update will request the server to download appliances from our online registry.")) + self.uiApplianceFromServerWizardPage.setSubTitle(_translate("NewTemplateWizard", "Select one or more appliances to install. Update will request the server to download appliances from our online registry.")) self.uiFilterLineEdit.setPlaceholderText(_translate("NewTemplateWizard", "Filter")) self.uiAppliancesTreeWidget.setSortingEnabled(True) self.uiAppliancesTreeWidget.headerItem().setText(0, _translate("NewTemplateWizard", "Appliance name")) diff --git a/tests/registry/test_appliance_to_template.py b/tests/registry/test_appliance_to_template.py index c489fe77..c4f75b15 100644 --- a/tests/registry/test_appliance_to_template.py +++ b/tests/registry/test_appliance_to_template.py @@ -190,7 +190,7 @@ def test_add_appliance_with_symbol(linux_microcore_img): assert new_template["symbol"] == ":/symbols/asa.svg" -def test_add_appliance_with_symbol_from_symbols_dir(linux_microcore_img, symbols_dir): +def test_add_appliance_with_symbol_from_symbols_dir(empty_config, linux_microcore_img, symbols_dir): with open("tests/registry/appliances/microcore-linux.gns3a", encoding="utf-8") as f: config = json.load(f) config["images"] = [