From 7b39282d48caac9173a553445c65772d7bde3920 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Moreira?= Date: Wed, 11 Dec 2019 19:46:28 -0300 Subject: [PATCH] [wgem] installation options beginning --- bauh/gems/web/controller.py | 11 +++++++++++ bauh/gems/web/resources/locale/en | 3 +++ bauh/gems/web/resources/locale/pt | 3 +++ 3 files changed, 17 insertions(+) diff --git a/bauh/gems/web/controller.py b/bauh/gems/web/controller.py index 4dfedd90..45fee4d0 100644 --- a/bauh/gems/web/controller.py +++ b/bauh/gems/web/controller.py @@ -160,6 +160,17 @@ class WebApplicationManager(SoftwareManager): pass def install(self, pkg: WebApplication, root_password: str, watcher: ProcessWatcher) -> bool: + + watcher.change_substatus(self.i18n['web.install.substatus.options']) + + bt_continue = self.i18n['continue'].capitalize() + if not watcher.request_confirmation(title=self.i18n['web.install.options_dialog.title'], + body=self.i18n['web.install.options_dialog.body'].format(bold(bt_continue)), + components=[], + confirmation_label=bt_continue, + deny_label=self.i18n['cancel'].capitalize()): + return False + if self.env_updater and self.env_updater.is_alive(): watcher.change_substatus(self.i18n['web.waiting.env_updater']) self.env_updater.join() diff --git a/bauh/gems/web/resources/locale/en b/bauh/gems/web/resources/locale/en index 1ec597b5..661c257f 100644 --- a/bauh/gems/web/resources/locale/en +++ b/bauh/gems/web/resources/locale/en @@ -3,11 +3,14 @@ web.environment.install=Installing {} web.waiting.env_updater=Updating environment web.env.checking=Checking the Web installation environment web.env.error=It seems there are issues with the Web installation environment. It wil not be possible to install {}. +web.install.options_dialog.title=Installation options +web.install.options_dialog.body=Select the wanted installation options and click in the {} button web.install.error=An error has happened during the {} installation web.install.nativefier.error.unknown=Have a look at the {} to identify the reason web.install.nativefier.error.inner_dir=The app installation directory was not found in {} web.install.substatus.call_nativefier=Running {} web.install.substatus.shortcut=Generating a menu shortcut +web.install.substatus.options=Waiting for the installation options web.uninstall.error.install_dir.not_found=The installation directory {} was not found web.uninstall.error.remove_dir=It was not possible to remove {} web.info.1_url=URL diff --git a/bauh/gems/web/resources/locale/pt b/bauh/gems/web/resources/locale/pt index d8b07e32..aeef678a 100644 --- a/bauh/gems/web/resources/locale/pt +++ b/bauh/gems/web/resources/locale/pt @@ -3,11 +3,14 @@ web.environment.nativefier=Instalando {} web.waiting.env_updater=Atualizando ambiente web.env.checking=Verificando o ambiente de instalação Web web.env.error=Parce que existem problemas com o ambiente de instalação Web. Não será possível instalar {}. +web.install.options_dialog.title=Opções de instalação +web.install.options_dialog.body=Selecione as opções de instalação desejadas e clique no botão {} wen.install.error=Ocorreu um erro durante a instalação de {} web.install.nativefier.error.unknown=Dê uma olhada em {} para identificar o motivo web.install.nativefier.error.inner_dir=O diretório de instalação do aplicativo não foi encontrado em {} web.install.substatus.call_nativefier=Executando {} web.install.substatus.shortcut=Criando um atalho no menu +web.install.substatus.options=Aguardando as opções de instalação web.uninstall.error.install_dir.not_found=O diretório de instalação {} não foi encontrado web.uninstall.error.remove=Não foi possível remover {} web.info.1_url=URL