diff --git a/bauh/api/abstract/view.py b/bauh/api/abstract/view.py index 6d07539a..ec379442 100644 --- a/bauh/api/abstract/view.py +++ b/bauh/api/abstract/view.py @@ -68,13 +68,14 @@ class SelectViewType(Enum): class SingleSelectComponent(InputViewComponent): - def __init__(self, type_: SelectViewType, label: str, options: List[InputOption], default_option: InputOption = None, max_per_line: int = 1, id_: str = None): + def __init__(self, type_: SelectViewType, label: str, options: List[InputOption], default_option: InputOption = None, max_per_line: int = 1, tooltip: str = None, id_: str = None): super(SingleSelectComponent, self).__init__(id_=id_) self.type = type_ self.label = label self.options = options self.value = default_option self.max_per_line = max_per_line + self.tooltip = tooltip def get_selected(self): if self.value: diff --git a/bauh/gems/appimage/controller.py b/bauh/gems/appimage/controller.py index 1067248b..8a8178e0 100644 --- a/bauh/gems/appimage/controller.py +++ b/bauh/gems/appimage/controller.py @@ -512,6 +512,7 @@ class AppImageManager(SoftwareManager): default_option=[o for o in enabled_opts if o.value == config['db_updater']['enabled']][0], max_per_line=len(enabled_opts), type_=SelectViewType.RADIO, + tooltip=self.i18n['appimage.config.db_updates.activated.tip'].format(app=self.context.app_name), id_='up_enabled'), TextInputComponent(label=self.i18n['interval'], value=str(config['db_updater']['interval']), diff --git a/bauh/gems/appimage/resources/locale/ca b/bauh/gems/appimage/resources/locale/ca index 0637701b..c4fa599a 100644 --- a/bauh/gems/appimage/resources/locale/ca +++ b/bauh/gems/appimage/resources/locale/ca @@ -19,4 +19,5 @@ appimage.install.download.error=No s’ha pogut baixar el fitxer {}. El servidor appimage.install.appimagelauncher.error = {appimgl} no permet la instal·lació de {app}. Desinstal·leu {appimgl}, reinicieu el sistema i torneu a provar d’instal·lar {app}. appimage.config.db_updates=Actualització de la base de dades appimage.config.db_updates.activated=activada +appimage.config.db_updates.activated.tip={app} és capaç de verificar si hi ha actualitzacions de les aplicacions instal·lades appimage.config.db_updates.interval.tip=Interval d'actualització a SECONDS \ No newline at end of file diff --git a/bauh/gems/appimage/resources/locale/de b/bauh/gems/appimage/resources/locale/de index f87978e6..9f179a8a 100644 --- a/bauh/gems/appimage/resources/locale/de +++ b/bauh/gems/appimage/resources/locale/de @@ -19,4 +19,5 @@ appimage.install.download.error=Das Herunterladen der Datei {} ist fehlgeschlage appimage.install.appimagelauncher.error={appimgl} verhindert die installation von {app}. Deinstalliere {appimgl}, starte deinen Computer neu und versuche die installation von {app} erneut. appimage.config.db_updates=Datenbankaktualisierung appimage.config.db_updates.activated=aktiviert +appimage.config.db_updates.activated.tip={app} kann überprüfen, ob Aktualisierungen für Ihre installierten Anwendungen vorhanden sind appimage.config.db_updates.interval.tip=Aktualisierungsintervall in SEKUNDEN \ No newline at end of file diff --git a/bauh/gems/appimage/resources/locale/en b/bauh/gems/appimage/resources/locale/en index e50bc5f2..074e57d6 100644 --- a/bauh/gems/appimage/resources/locale/en +++ b/bauh/gems/appimage/resources/locale/en @@ -19,4 +19,5 @@ appimage.install.download.error=It was not possible to download the file {}. The appimage.install.appimagelauncher.error={appimgl} is not allowing {app} to be installed. Uninstall {appimgl}, reboot your system and try to install {app} again. appimage.config.db_updates=Database update appimage.config.db_updates.activated=activated +appimage.config.db_updates.activated.tip={app} is able to verify if there are updates for your installed applications appimage.config.db_updates.interval.tip=Update interval in SECONDS \ No newline at end of file diff --git a/bauh/gems/appimage/resources/locale/es b/bauh/gems/appimage/resources/locale/es index 4c0aec57..c68e0106 100644 --- a/bauh/gems/appimage/resources/locale/es +++ b/bauh/gems/appimage/resources/locale/es @@ -19,4 +19,5 @@ appimage.install.download.error=No fue posible descargar el archivo {}. El servi appimage.install.appimagelauncher.error={appimgl} no permite la instalación de {app}. Desinstale {appimgl}, reinicie su sistema e intente instalar {app} nuevamente. appimage.config.db_updates=Actualización de la base de datos appimage.config.db_updates.activated=activada +appimage.config.db_updates.activated.tip={app} puede verificar si hay actualizaciones para sus aplicaciones instaladas appimage.config.db_updates.interval.tip=Intervalo de actualización en SEGUNDOS \ No newline at end of file diff --git a/bauh/gems/appimage/resources/locale/it b/bauh/gems/appimage/resources/locale/it index 869a7e8b..83f3f44c 100644 --- a/bauh/gems/appimage/resources/locale/it +++ b/bauh/gems/appimage/resources/locale/it @@ -19,5 +19,6 @@ appimage.install.download.error=Non è stato possibile scaricare il file {}. Il appimage.install.appimagelauncher.error={appimgl} non consente l'installazione di {app}. Disinstallare {appimgl}, riavviare il sistema e provare a installare nuovamente {app}. appimage.config.db_updates=Aggiornamento della banca dati appimage.config.db_updates.activated=attivata +appimage.config.db_updates.activated.tip={app} è in grado di verificare se ci sono aggiornamenti per le tue applicazioni installate appimage.config.db_updates.interval.tip=Intervallo di aggiornamento in SECONDI diff --git a/bauh/gems/appimage/resources/locale/pt b/bauh/gems/appimage/resources/locale/pt index 63f5bdac..f2dc4f00 100644 --- a/bauh/gems/appimage/resources/locale/pt +++ b/bauh/gems/appimage/resources/locale/pt @@ -19,4 +19,5 @@ appimage.install.download.error=Não foi possível baixar o arquivo {}. O servid appimage.install.appimagelauncher.error={appimgl} não está permitindo que o {app} seja instalado. Desinstale o {appimgl}, reinicie o sistema e tente instalar o {app} novamente. appimage.config.db_updates=Atualização da base de dados appimage.config.db_updates.activated=ativada +appimage.config.db_updates.activated.tip=O {app} consegue verificar se há atualizações para seus aplicativos instalados appimage.config.db_updates.interval.tip=Intervalo de atualização em SEGUNDOS \ No newline at end of file diff --git a/bauh/gems/arch/controller.py b/bauh/gems/arch/controller.py index e03b9901..be1f3f85 100644 --- a/bauh/gems/arch/controller.py +++ b/bauh/gems/arch/controller.py @@ -891,11 +891,11 @@ class ArchManager(SoftwareManager): def get_settings(self) -> ViewComponent: config = read_config() - optz_opts = [InputOption(label=self.i18n['yes'].capitalize(), value=True, tooltip=self.i18n['arch.config.optimize.true.tip']), - InputOption(label=self.i18n['no'].capitalize(), value=False, tooltip=self.i18n['arch.config.optimize.false.tip'])] + optz_opts = [InputOption(label=self.i18n['yes'].capitalize(), value=True), + InputOption(label=self.i18n['no'].capitalize(), value=False)] - trans_check_opts = [InputOption(label=self.i18n['yes'].capitalize(), value=True, tooltip=self.i18n['arch.config.trans_dep_check.true.tip']), - InputOption(label=self.i18n['no'].capitalize(), value=False, tooltip=self.i18n['arch.config.trans_dep_check.false.tip'])] + trans_check_opts = [InputOption(label=self.i18n['yes'].capitalize(), value=True), + InputOption(label=self.i18n['no'].capitalize(), value=False)] fields = [ SingleSelectComponent(label=self.i18n['arch.config.optimize'].capitalize(), @@ -903,12 +903,14 @@ class ArchManager(SoftwareManager): default_option=[o for o in optz_opts if o.value == config['optimize']][0], max_per_line=len(optz_opts), type_=SelectViewType.RADIO, + tooltip=self.i18n['arch.config.optimize.tip'], id_='opts'), SingleSelectComponent(label=self.i18n['arch.config.trans_dep_check'].capitalize(), options=trans_check_opts, default_option=[o for o in trans_check_opts if o.value == config['transitive_checking']][0], max_per_line=len(trans_check_opts), type_=SelectViewType.RADIO, + tooltip=self.i18n['arch.config.trans_dep_check.tip'], id_='dep_check')] return PanelComponent([FormComponent(fields, label=self.i18n['installation'].capitalize())]) diff --git a/bauh/gems/arch/resources/locale/ca b/bauh/gems/arch/resources/locale/ca index b49f2cf8..1709871c 100644 --- a/bauh/gems/arch/resources/locale/ca +++ b/bauh/gems/arch/resources/locale/ca @@ -104,7 +104,5 @@ arch.aur.install.validity_check.body=Alguns dels fitxers font necessaris per a l arch.makepkg.optimizing=Optimitzant la recopilació arch.config.optimize=optimitzar arch.config.trans_dep_check=verificar dependències -arch.config.optimize.true.tip=La configuració optimitzada s'utilitzarà per fer més ràpida la instal·lació dels paquets -arch.config.optimize.false.tip=La configuració predeterminada del sistema s'utilitzarà per realitzar la instal·lació dels paquets -arch.config.trans_dep_check.true.tip=Si totes les dependències del paquet s’han de verificar abans de la instal·lació. -arch.config.trans_dep_check.false.tip=Si s'han de destapar les dependències del paquet durant la seva instal·lació \ No newline at end of file +arch.config.optimize.tip=La configuració optimitzada s'utilitzarà per fer més ràpida la instal·lació dels paquets, en cas contrari s'utilitzarà la configuració del sistema +arch.config.trans_dep_check.tip=Si totes les dependències del paquet s’han de verificar abans de començar la instal·lació. En cas contrari, es descobriran durant la instal·lació \ No newline at end of file diff --git a/bauh/gems/arch/resources/locale/de b/bauh/gems/arch/resources/locale/de index 863c136c..a3cc7c6f 100644 --- a/bauh/gems/arch/resources/locale/de +++ b/bauh/gems/arch/resources/locale/de @@ -104,7 +104,5 @@ aur.info.conflicts with=Konflikt mit arch.makepkg.optimizing=Optimiert die Zusammenstellung arch.config.optimize=optimieren arch.config.trans_dep_check=Um Abhängigkeiten zu verifizieren -arch.config.optimize.true.tip=Optimierte Einstellungen werden verwendet, um die Paketinstallation zu beschleunigen -arch.config.optimize.false.tip=Für die Installation der Pakete werden die Standardsystemeinstellungen verwendet -arch.config.trans_dep_check.true.tip=Wenn alle Paketabhängigkeiten überprüft werden sollen, bevor die Installation beginnt -arch.config.trans_dep_check.false.tip=Wenn die Paketabhängigkeiten bei der Installation aufgedeckt werden sollen \ No newline at end of file +arch.config.optimize.tip=Optimierte Einstellungen werden verwendet, um die Paketinstallation zu beschleunigen, andernfalls werden die Systemeinstellungen verwendet +arch.config.trans_dep_check.tip=Wenn alle Paketabhängigkeiten überprüft werden sollen, bevor die Installation beginnt. Andernfalls werden sie während der Installation erkannt \ No newline at end of file diff --git a/bauh/gems/arch/resources/locale/en b/bauh/gems/arch/resources/locale/en index eaec2ece..5d0c44cc 100644 --- a/bauh/gems/arch/resources/locale/en +++ b/bauh/gems/arch/resources/locale/en @@ -104,7 +104,5 @@ aur.info.conflicts with=conflicts with arch.makepkg.optimizing=Optimizing the compilation arch.config.optimize=optimize arch.config.trans_dep_check=check dependencies -arch.config.optimize.true.tip=Optimized settings will be used in order to make the packages installation faster -arch.config.optimize.false.tip=The default system settings will be used to perform the packages installation -arch.config.trans_dep_check.true.tip=If all the package dependencies should be verified before the installation starts -arch.config.trans_dep_check.false.tip=If the package dependencies should be uncovered during its installation \ No newline at end of file +arch.config.optimize.tip=Optimized settings will be used in order to make the packages installation faster, otherwise the system settings will be used +arch.config.trans_dep_check.tip=If all the package dependencies should be verified before the installation starts. Otherwise they will be discovered during the installation \ No newline at end of file diff --git a/bauh/gems/arch/resources/locale/es b/bauh/gems/arch/resources/locale/es index f9a4d06f..3a3ebbc7 100644 --- a/bauh/gems/arch/resources/locale/es +++ b/bauh/gems/arch/resources/locale/es @@ -104,7 +104,5 @@ arch.aur.install.validity_check.body=Algunos de los archivos fuente necesarios p arch.makepkg.optimizing=Optimizando la compilación arch.config.optimize=optimizar arch.config.trans_dep_check=verificar dependencias -arch.config.optimize.true.tip=Se utilizará una configuración optimizada para acelerar la instalación de los paquetes -arch.config.optimize.false.tip=Se utilizará la configuración predeterminada del sistema para realizar la instalación de paquetes -arch.config.trans_dep_check.true.tip=Si todas las dependencias del paquete deben ser verificadas antes de que comience la instalación -arch.config.trans_dep_check.false.tip=Si las dependencias del paquete deben ser descubiertas durante su instalación \ No newline at end of file +arch.config.optimize.tip=Se usará una configuración optimizada para acelerar la instalación de los paquetes, de lo contrario se usará la configuración del sistema +arch.config.trans_dep_check.tip=Si todas las dependencias del paquete deben ser verificadas antes de que comience la instalación. De lo contrario, se descubrirán durante la instalación. \ No newline at end of file diff --git a/bauh/gems/arch/resources/locale/it b/bauh/gems/arch/resources/locale/it index 1fb1763c..f1a24de3 100644 --- a/bauh/gems/arch/resources/locale/it +++ b/bauh/gems/arch/resources/locale/it @@ -72,7 +72,5 @@ arch.aur.install.validity_check.body=Alcuni dei file di origine necessari per l' arch.makepkg.optimizing=Ottimizzando la compilazione arch.config.optimize=ottimizzare arch.config.trans_dep_check=verificare dipendenze -arch.config.optimize.true.tip=Le impostazioni ottimizzate verranno utilizzate per rendere l'installazione dei pacchetti più veloce -arch.config.optimize.false.tip=Le impostazioni di sistema predefinite verranno utilizzate per eseguire l'installazione dei pacchetti -arch.config.trans_dep_check.true.tip=Se tutte le dipendenze del pacchetto devono essere verificate prima dell'inizio dell'installazione -arch.config.trans_dep_check.false.tip=Se le dipendenze del pacchetto devono essere scoperte durante la sua installazione \ No newline at end of file +arch.config.optimize.tip=Le impostazioni ottimizzate verranno utilizzate per rendere l'installazione dei pacchetti più veloce, altrimenti verranno utilizzate le impostazioni di sistema +arch.config.trans_dep_check.tip=Se tutte le dipendenze del pacchetto devono essere verificate prima dell'inizio dell'installazione. Altrimenti verranno scoperti durante l'installazione \ No newline at end of file diff --git a/bauh/gems/arch/resources/locale/pt b/bauh/gems/arch/resources/locale/pt index ec44c859..621705d2 100644 --- a/bauh/gems/arch/resources/locale/pt +++ b/bauh/gems/arch/resources/locale/pt @@ -104,7 +104,5 @@ arch.aur.install.validity_check.body=Alguns dos arquivos-fonte necessários para arch.makepkg.optimizing=Otimizando a compilação arch.config.optimize=otimizar arch.config.trans_dep_check=verificar dependências -arch.config.optimize.true.tip=Utilizará configurações otimizadas para que a instalação de pacotes seja mais rápida -arch.config.optimize.false.tip=Utilizará as configurações padrões do sistema para realizar a instalação de pacotes -arch.config.trans_dep_check.true.tip=Se todas as dependências do pacote devem ser verificadas antes da instalação começar -arch.config.trans_dep_check.false.tip=Se as dependências do pacote devem ser descobertas durante a instalação \ No newline at end of file +arch.config.optimize.tip=Utilizará configurações otimizadas para que a instalação de pacotes seja mais rápida, caso contrário utilizará a do sistema +arch.config.trans_dep_check.tip=Se todas as dependências do pacote devem ser verificadas antes da instalação começar, caso contrário elas serão descobertas durante a instalação \ No newline at end of file diff --git a/bauh/gems/web/controller.py b/bauh/gems/web/controller.py index 307f2e7d..b5e9fce9 100644 --- a/bauh/gems/web/controller.py +++ b/bauh/gems/web/controller.py @@ -909,6 +909,7 @@ class WebApplicationManager(SoftwareManager): options=native_opts, default_option=[o for o in native_opts if o.value == config['environment']['system']][0], type_=SelectViewType.COMBO, + tooltip=self.i18n['web.settings.nativefier.tip'], id_='nativefier') form_env = FormComponent(label=self.i18n['web.settings.nativefier.env'].capitalize(), components=[input_electron, select_nativefier]) diff --git a/bauh/gems/web/resources/locale/en b/bauh/gems/web/resources/locale/en index 80f9cef4..d8da1f03 100644 --- a/bauh/gems/web/resources/locale/en +++ b/bauh/gems/web/resources/locale/en @@ -60,8 +60,9 @@ web.info.08_icon_path=icon web.info.09_size=size web.info.10_config_dir=configuration dir web.settings.electron.version.label=Electron version -web.settings.electron.version.tooltip=An alternative Electron version to render the new installed apps +web.settings.electron.version.tooltip=Defines an alternative Electron version to render the new installed apps web.settings.nativefier.env=environment web.settings.nativefier.system=system web.settings.nativefier.env.tooltip=The Nativefier version installed on the isolated {app} environment will be used to install applications -web.settings.nativefier.system.tooltip=The Nativefier version installed on your system will be used to install applications \ No newline at end of file +web.settings.nativefier.system.tooltip=The Nativefier version installed on your system will be used to install applications +web.settings.nativefier.tip=Defines which Nativefier version should be used to generate the Web applications \ No newline at end of file diff --git a/bauh/gems/web/resources/locale/es b/bauh/gems/web/resources/locale/es index 89517224..eef64cf1 100644 --- a/bauh/gems/web/resources/locale/es +++ b/bauh/gems/web/resources/locale/es @@ -60,8 +60,9 @@ web.info.08_icon_path=icono web.info.09_size=tamaño web.info.10_config_dir=directorio de configuración web.settings.electron.version.label=Versión del Electron -web.settings.electron.version.tooltip=Una versión alternativa del Electron para renderizar las nuevas aplicaciones instaladas +web.settings.electron.version.tooltip=Define una versión alternativa del Electron para renderizar las nuevas aplicaciones instaladas web.settings.nativefier.env=ambiente web.settings.nativefier.system=sistema web.settings.nativefier.env.tooltip=Se utilizará la versión de Nativefier instalada en el ambiente aislado de {app} para instalar aplicaciones -web.settings.nativefier.system.tooltip=Se utilizará la versión de Nativefier instalada en su sistema para instalar aplicaciones \ No newline at end of file +web.settings.nativefier.system.tooltip=Se utilizará la versión de Nativefier instalada en su sistema para instalar aplicaciones +web.settings.nativefier.tip=Define qué versión de Nativefier debe usarse para generar las aplicaciones Web \ No newline at end of file diff --git a/bauh/gems/web/resources/locale/pt b/bauh/gems/web/resources/locale/pt index 50140fa8..e37ba8ea 100644 --- a/bauh/gems/web/resources/locale/pt +++ b/bauh/gems/web/resources/locale/pt @@ -60,8 +60,9 @@ web.info.08_icon_path=ícone web.info.09_size=tamanho web.info.10_config_dir=diretório de configuração web.settings.electron.version.label=Versão do Electron -web.settings.electron.version.tooltip=Uma versão alternativa do Electron para renderizar os novos aplicativos instalados +web.settings.electron.version.tooltip=Define uma versão alternativa do Electron para renderizar os novos aplicativos instalados web.settings.nativefier.env=ambiente web.settings.nativefier.system=sistema web.settings.nativefier.env.tooltip=A versão do Nativefier instalada no ambiente isolado do {app} será utilizada para instalar aplicativos -web.settings.nativefier.system.tooltip=A versão do Nativefier instalada no seu sistema será utilizada para instalar aplicativos \ No newline at end of file +web.settings.nativefier.system.tooltip=A versão do Nativefier instalada no seu sistema será utilizada para instalar aplicativos +web.settings.nativefier.tip=Define qual versão do Nativefier será utilizada para gerar os aplicativos Web \ No newline at end of file diff --git a/bauh/view/core/controller.py b/bauh/view/core/controller.py index d55972a0..d8c05f85 100755 --- a/bauh/view/core/controller.py +++ b/bauh/view/core/controller.py @@ -407,7 +407,7 @@ class GenericSoftwareManager(SoftwareManager): return [m for m in self.managers if self._can_work(m)] def _gen_settings_panel(self) -> TabComponent: - # core_config = read_config() + core_config = read_config() current_locale = self.i18n.current_key locale_opts = [InputOption(label=self.i18n['locale.{}'.format(k)].capitalize(), value=k) for k in translation.get_available_keys()] @@ -417,7 +417,20 @@ class GenericSoftwareManager(SoftwareManager): type_=SelectViewType.COMBO, id_='locale') - return TabComponent(self.i18n['core.config.tab_label'].capitalize(), PanelComponent([FormComponent([select_locale])]), None, 'core') + disk_cache = core_config['disk_cache']['enabled'] + dcache_opts = [InputOption(label=self.i18n['yes'].capitalize(), value=True), + InputOption(label=self.i18n['no'].capitalize(), value=False)] + + select_dcache = SingleSelectComponent(label=self.i18n['core.config.disk_cache'], + options=dcache_opts, + default_option=[o for o in dcache_opts if o.value == disk_cache][0], + type_=SelectViewType.RADIO, + tooltip=self.i18n['core.config.disk_cache.tip'].format(app=self.context.app_name), + max_per_line=len(dcache_opts), + id_='dcache') + + sub_comps = [select_locale, select_dcache] + return TabComponent(self.i18n['core.config.tab_label'].capitalize(), PanelComponent([FormComponent(sub_comps)]), None, 'core') def _save_settings(self, panel: PanelComponent) -> Tuple[bool, List[str]]: core_config = config.read_config() @@ -428,6 +441,8 @@ class GenericSoftwareManager(SoftwareManager): if locale != self.i18n.current_key: core_config['locale'] = locale + core_config['disk_cache']['enabled'] = main_form.get_component('dcache').get_selected() + try: config.save(core_config) return True, None @@ -435,7 +450,7 @@ class GenericSoftwareManager(SoftwareManager): return False, [traceback.format_exc()] def get_settings(self) -> ViewComponent: - tabs = [] + tabs = list() tabs.append(self._gen_settings_panel()) diff --git a/bauh/view/qt/components.py b/bauh/view/qt/components.py index de7a2280..01d83025 100644 --- a/bauh/view/qt/components.py +++ b/bauh/view/qt/components.py @@ -1,7 +1,7 @@ from pathlib import Path from typing import Tuple -from PyQt5.QtCore import Qt +from PyQt5.QtCore import Qt, QSize from PyQt5.QtGui import QIcon, QPixmap, QIntValidator from PyQt5.QtWidgets import QRadioButton, QGroupBox, QCheckBox, QComboBox, QGridLayout, QWidget, \ QLabel, QSizePolicy, QLineEdit, QToolButton, QHBoxLayout, QFormLayout, QFileDialog, QTabWidget, QVBoxLayout @@ -337,7 +337,19 @@ class FormQt(QGroupBox): label, field = self._new_text_input(c) self.layout().addRow(label, field) elif isinstance(c, SingleSelectComponent): - label = QLabel(c.label.capitalize() if c.label else '') + + label = QWidget() + label.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum) + label.setLayout(QHBoxLayout()) + label_comp = QLabel() + label.layout().addWidget(label_comp) + + if c.label: + label_comp.setText(c.label.capitalize()) + + if c.tooltip: + label.layout().addWidget(self.gen_tip_icon(c.tooltip)) + field = ComboBoxQt(c) if c.type == SelectViewType.COMBO else RadioBoxQt(c) self.layout().addRow(label, field) elif isinstance(c, FileChooserComponent): @@ -350,6 +362,12 @@ class FormQt(QGroupBox): self.layout().addRow(QLabel(), QLabel()) + def gen_tip_icon(self, tip: str) -> QLabel: + tip_icon = QLabel() + tip_icon.setToolTip(tip.strip()) + tip_icon.setPixmap(QIcon(resource.get_path('img/about.svg')).pixmap(QSize(12, 12))) + return tip_icon + def _new_text_input(self, c: TextInputComponent) -> Tuple[QLabel, QLineEdit]: line_edit = QLineEdit() @@ -373,7 +391,21 @@ class FormQt(QGroupBox): c.value = text line_edit.textChanged.connect(update_model) - return QLabel(c.label.capitalize() if c.label else ''), line_edit + + label = QWidget() + label.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum) + label.setLayout(QHBoxLayout()) + + label_component = QLabel() + label.layout().addWidget(label_component) + + if label: + label_component.setText(c.label.capitalize()) + + if c.tooltip: + label.layout().addWidget(self.gen_tip_icon(c.tooltip)) + + return label, line_edit def _new_file_chooser(self, c: FileChooserComponent) -> Tuple[QLabel, QLineEdit]: chooser = QLineEdit() diff --git a/bauh/view/resources/locale/ca b/bauh/view/resources/locale/ca index ebb01ab8..dfda360e 100644 --- a/bauh/view/resources/locale/ca +++ b/bauh/view/resources/locale/ca @@ -223,6 +223,7 @@ user=usuari example.short=ex core.config.tab_label=general core.config.locale.label=idioma +core.config.disk_cache=Cau em disco locale.en=anglès locale.es=castellà locale.pt=portuguès diff --git a/bauh/view/resources/locale/de b/bauh/view/resources/locale/de index b6508b75..980f82aa 100644 --- a/bauh/view/resources/locale/de +++ b/bauh/view/resources/locale/de @@ -178,6 +178,8 @@ user=Benutzer example.short=z.B core.config.tab_label=Allgemeines core.config.locale.label=Sprache +core.config.disk_cache=Festplattencache +core.config.disk_cache.tip={app} speichert einige Daten zu Ihren installierten Anwendungen auf der Festplatte, um sie bei den nächsten Initialisierungen schneller zu laden locale.en=englisch locale.es=spanisch locale.pt=portugiesisch diff --git a/bauh/view/resources/locale/en b/bauh/view/resources/locale/en index 690e7684..c08bba7f 100644 --- a/bauh/view/resources/locale/en +++ b/bauh/view/resources/locale/en @@ -182,6 +182,8 @@ user=user example.short=e.g core.config.tab_label=general core.config.locale.label=language +core.config.disk_cache=Disk cache +core.config.disk_cache.tip={app} will save some data about your installed applications on the disk to load them faster in the next initializations locale.en=english locale.es=spanish locale.pt=portuguese diff --git a/bauh/view/resources/locale/es b/bauh/view/resources/locale/es index d208f21c..ccc20ddc 100644 --- a/bauh/view/resources/locale/es +++ b/bauh/view/resources/locale/es @@ -222,6 +222,8 @@ user=usuario example.short=p.ej core.config.tab_label=general core.config.locale.label=idioma +core.config.disk_cache=Cache em disco +core.config.disk_cache.tip={app} guardará algunos datos sobre sus aplicaciones instaladas en el disco para cargarlas más rápido en las próximas inicializaciones locale.es=inglés locale.es=español locale.pt=portugués diff --git a/bauh/view/resources/locale/it b/bauh/view/resources/locale/it index 2f0ae3f7..42cae996 100644 --- a/bauh/view/resources/locale/it +++ b/bauh/view/resources/locale/it @@ -178,6 +178,8 @@ icon_button.tooltip.disabled=Questa azione non è disponibile user=utente core.config.tab_label=generale core.config.locale.label=idioma +core.config.disk_cache=cache nel disco +core.config.disk_cache.tip={app} salverà alcuni dati sulle applicazioni installate sul disco per caricarle più velocemente nelle successive inizializzazioni example.short=es locale.en=inglese locale.es=spagnolo diff --git a/bauh/view/resources/locale/pt b/bauh/view/resources/locale/pt index 06738571..74f7b115 100644 --- a/bauh/view/resources/locale/pt +++ b/bauh/view/resources/locale/pt @@ -225,6 +225,8 @@ user=usuário example.short=ex core.config.tab_label=geral core.config.locale.label=idioma +core.config.disk_cache=Cache em disco +core.config.disk_cache.tip={app} gravará alguns dados sobre seus aplicativos instalados no disco para que eles sejam carregados rapidamente nas próximas inicializações locale.en=inglês locale.es=espanhol locale.pt=português