diff --git a/CHANGELOG.md b/CHANGELOG.md index fff4fb16..143cdc71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - General - code refactoring +- Arch + - text length of some popups reduced + - Snap - allowing the actions output locale to be decided by the Snap client diff --git a/bauh/gems/arch/confirmation.py b/bauh/gems/arch/confirmation.py index 75728a26..616be095 100644 --- a/bauh/gems/arch/confirmation.py +++ b/bauh/gems/arch/confirmation.py @@ -1,4 +1,4 @@ -from typing import Set, List, Tuple, Dict, Optional +from typing import Set, Tuple, Dict, Collection from bauh.api.abstract.handler import ProcessWatcher from bauh.api.abstract.view import MultipleSelectComponent, InputOption, FormComponent, SingleSelectComponent, \ @@ -44,8 +44,8 @@ def request_optional_deps(pkgname: str, pkg_repos: dict, watcher: ProcessWatcher return {o.value for o in view_opts.values} -def request_install_missing_deps(pkgname: Optional[str], deps: List[Tuple[str, str]], watcher: ProcessWatcher, i18n: I18n) -> bool: - msg = '

{}

'.format(i18n['arch.missing_deps.body'].format(name=bold(pkgname) if pkgname else '', deps=bold(str(len(deps))))) +def request_install_missing_deps(deps: Collection[Tuple[str, str]], watcher: ProcessWatcher, i18n: I18n) -> bool: + msg = f"

{i18n['arch.missing_deps.body'].format(deps=bold(str(len(deps))))}:

" opts = [] @@ -65,7 +65,7 @@ def request_install_missing_deps(pkgname: Optional[str], deps: List[Tuple[str, s comp = MultipleSelectComponent(label='', options=opts, default_options=set(opts)) return watcher.request_confirmation(i18n['arch.missing_deps.title'], msg, [comp], confirmation_label=i18n['continue'].capitalize(), deny_label=i18n['cancel'].capitalize(), - min_width=672) + min_width=600) def request_providers(providers_map: Dict[str, Set[str]], repo_map: Dict[str, str], watcher: ProcessWatcher, i18n: I18n) -> Set[str]: diff --git a/bauh/gems/arch/controller.py b/bauh/gems/arch/controller.py index bfea0815..76cfea3d 100644 --- a/bauh/gems/arch/controller.py +++ b/bauh/gems/arch/controller.py @@ -2075,7 +2075,7 @@ class ArchManager(SoftwareManager): def _ask_and_install_missing_deps(self, context: TransactionContext, missing_deps: List[Tuple[str, str]]) -> bool: context.watcher.change_substatus(self.i18n['arch.missing_deps_found'].format(bold(context.name))) - if not confirmation.request_install_missing_deps(context.name, missing_deps, context.watcher, self.i18n): + if not confirmation.request_install_missing_deps(missing_deps, context.watcher, self.i18n): context.watcher.print(self.i18n['action.cancelled']) return False @@ -2265,7 +2265,8 @@ class ArchManager(SoftwareManager): sorted_deps = sorting.sort(to_sort, {**deps_data, **subdeps_data}, provided_map) - if display_deps_dialog and not confirmation.request_install_missing_deps(None, sorted_deps, context.watcher, self.i18n): + if display_deps_dialog and not confirmation.request_install_missing_deps(sorted_deps, context.watcher, + self.i18n): context.watcher.print(self.i18n['action.cancelled']) return True # because the main package installation was successful diff --git a/bauh/gems/arch/resources/locale/ca b/bauh/gems/arch/resources/locale/ca index 4a90cbb2..c551cb66 100644 --- a/bauh/gems/arch/resources/locale/ca +++ b/bauh/gems/arch/resources/locale/ca @@ -230,7 +230,7 @@ arch.install.optdeps.request.title=Dependències opcionals arch.installing.package=S’està instal·lant el paquet {} arch.checking_unnecessary_deps=Checking if there are packages no longer needed arch.makepkg.optimizing=Optimitzant la recopilació -arch.missing_deps.body=S’han d’instal·lar les {deps} dependències següents abans de continuar amb la instal·lació de {name} +arch.missing_deps.body=The following dependencies ({deps}) will be installed arch.missing_deps.title=Dependències mancants arch.missing_deps_found=Dependències mancants per a {} arch.mthread_downloaded.error.cache_dir=It was not possible to create the cache directory {} diff --git a/bauh/gems/arch/resources/locale/de b/bauh/gems/arch/resources/locale/de index 37e579bd..19ada1a5 100644 --- a/bauh/gems/arch/resources/locale/de +++ b/bauh/gems/arch/resources/locale/de @@ -230,7 +230,7 @@ arch.install.optdeps.request.title=Optionale Abhängigkeiten arch.installing.package=Paket {} installieren arch.checking_unnecessary_deps=Checking if there are packages no longer needed arch.makepkg.optimizing=Optimiert die Zusammenstellung -arch.missing_deps.body=Die folgenden {deps} Abhängigkeiten müssten installiert sein, bevor mit der {name} Installation fortgefahren werden kann +arch.missing_deps.body=The following dependencies ({deps}) will be installed arch.missing_deps.title=Fehlende Abhängigkeiten arch.missing_deps_found=Fehlende Abhängigkeiten für {} arch.mthread_downloaded.error.cache_dir=It was not possible to create the cache directory {} diff --git a/bauh/gems/arch/resources/locale/en b/bauh/gems/arch/resources/locale/en index 9a139db8..0a7ad9c6 100644 --- a/bauh/gems/arch/resources/locale/en +++ b/bauh/gems/arch/resources/locale/en @@ -230,7 +230,7 @@ arch.install.optdeps.request.title=Optional dependencies arch.installing.package=Installing {} package arch.checking_unnecessary_deps=Checking if there are packages no longer needed arch.makepkg.optimizing=Optimizing the compilation -arch.missing_deps.body=The following {deps} dependencies must be installed so the {name} installation can continue +arch.missing_deps.body=The following dependencies ({deps}) will be installed arch.missing_deps.title=Missing dependencies arch.missing_deps_found=Missing dependencies for {} arch.mthread_downloaded.error.cache_dir=It was not possible to create the cache directory {} diff --git a/bauh/gems/arch/resources/locale/es b/bauh/gems/arch/resources/locale/es index 7b794f1a..9035ab68 100644 --- a/bauh/gems/arch/resources/locale/es +++ b/bauh/gems/arch/resources/locale/es @@ -230,7 +230,7 @@ arch.install.optdeps.request.title=Dependencias opcionales arch.installing.package=Instalando el paquete {} arch.checking_unnecessary_deps=Verificando se hay paquetes innecesarios arch.makepkg.optimizing=Optimizing the compilation -arch.missing_deps.body=Deben instalarse las siguientes {deps} dependencias para que la instalación de {name} pueda continuar +arch.missing_deps.body=Las siguientes dependencias ({deps}) serán instaladas arch.missing_deps.title=Dependencias faltantes arch.missing_deps_found=Dependencias faltantes para {} arch.mthread_downloaded.error.cache_dir=No fue posible crear el directorio de caché {} diff --git a/bauh/gems/arch/resources/locale/fr b/bauh/gems/arch/resources/locale/fr index e7608733..ebdbd009 100644 --- a/bauh/gems/arch/resources/locale/fr +++ b/bauh/gems/arch/resources/locale/fr @@ -230,7 +230,7 @@ arch.install.optdeps.request.title=Dépendances optionnelles arch.installing.package=Installation du paquet {} arch.checking_unnecessary_deps=Calcul des paquets devenus inutiles arch.makepkg.optimizing=Optimisation de la compilation -arch.missing_deps.body=Les dependances {deps} doivent être installées pour que l'installation de {name} se poursuive +arch.missing_deps.body=The following dependencies ({deps}) will be installed arch.missing_deps.title=Dépendances manquantes arch.missing_deps_found=Dépendances manquantes pour {} arch.mthread_downloaded.error.cache_dir=Impossible de créer le dossier de cache {} diff --git a/bauh/gems/arch/resources/locale/it b/bauh/gems/arch/resources/locale/it index f842df16..1d4fd5a0 100644 --- a/bauh/gems/arch/resources/locale/it +++ b/bauh/gems/arch/resources/locale/it @@ -230,7 +230,7 @@ arch.install.optdeps.request.title=Dipendenze opzionali arch.installing.package=Installazione del pacchetto {} arch.checking_unnecessary_deps=Checking if there are packages no longer needed arch.makepkg.optimizing=Ottimizzando la compilazione -arch.missing_deps.body=Le seguenti {deps} dipendenze devono essere installate prima che l'installazione di {name} continui +arch.missing_deps.body=The following dependencies ({deps}) will be installed arch.missing_deps.title=Dipendenze mancanti arch.missing_deps_found=Dipendenze mancanti per {} arch.mthread_downloaded.error.cache_dir=It was not possible to create the cache directory {} diff --git a/bauh/gems/arch/resources/locale/pt b/bauh/gems/arch/resources/locale/pt index 434eb9f9..899415e2 100644 --- a/bauh/gems/arch/resources/locale/pt +++ b/bauh/gems/arch/resources/locale/pt @@ -229,7 +229,7 @@ arch.install.optdeps.request.title=Dependências opcionais arch.installing.package=Instalando o pacote {} arch.checking_unnecessary_deps=Verificando se há pacotes não mais necessários arch.makepkg.optimizing=Otimizando a compilação -arch.missing_deps.body=As seguintes {deps} dependências devem ser instaladas para que a instalação de {name} continue +arch.missing_deps.body=As seguintes dependências ({deps}) serão instaladas arch.missing_deps.title=Dependências ausentes arch.missing_deps_found=Dependencias ausentes para {} arch.mthread_downloaded.error.cache_dir=Não foi possível criar o diretório para cache {} diff --git a/bauh/gems/arch/resources/locale/ru b/bauh/gems/arch/resources/locale/ru index a3f4c91e..e755aa40 100644 --- a/bauh/gems/arch/resources/locale/ru +++ b/bauh/gems/arch/resources/locale/ru @@ -230,7 +230,7 @@ arch.install.optdeps.request.title=Необязательные зависимо arch.installing.package=Установка пакета {} arch.checking_unnecessary_deps=Checking if there are packages no longer needed arch.makepkg.optimizing=Оптимизация компиляции -arch.missing_deps.body=Необходимо установить следующие зависимости , чтобы продолжить установку {name} +arch.missing_deps.body=The following dependencies ({deps}) will be installed arch.missing_deps.title=Отсутствующие зависимости arch.missing_deps_found=Отсутствуют зависимости для {} arch.mthread_downloaded.error.cache_dir=It was not possible to create the cache directory {} diff --git a/bauh/gems/arch/resources/locale/tr b/bauh/gems/arch/resources/locale/tr index 116b6aa5..8d4731bf 100644 --- a/bauh/gems/arch/resources/locale/tr +++ b/bauh/gems/arch/resources/locale/tr @@ -230,7 +230,7 @@ arch.install.optdeps.request.title=İsteğe bağlı bağımlılıklar arch.installing.package={} Paketi yükleniyor arch.checking_unnecessary_deps=Artık gerekli olmayan paketler olup olmadığını kontrol et arch.makepkg.optimizing=Derlemeyi optimize et -arch.missing_deps.body={name} kurulumunun devam edebilmesi için aşağıdaki {deps} bağımlılık kurulmalıdır +arch.missing_deps.body=The following dependencies ({deps}) will be installed arch.missing_deps.title=Eksik bağımlılıklar arch.missing_deps_found={} için eksik bağımlılıklar arch.mthread_downloaded.error.cache_dir=It was not possible to create the cache directory {}