[arch] improvement: optional packages installation dialog appearance (install)

This commit is contained in:
Vinicius Moreira
2022-04-07 15:58:43 -03:00
parent d9384d74a2
commit 26678a0138
11 changed files with 30 additions and 25 deletions

View File

@@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Improvements
- Arch
- install:
- optional packages installation dialog appearance (aligned with other dependencies dialogs)
- uninstall:
- displaying hard and unnecessary requirements versions and descriptions

View File

@@ -22,11 +22,9 @@ def request_optional_deps(pkgname: str, pkg_repos: dict, watcher: ProcessWatcher
for p, d in pkg_repos.items():
size = sizes.get(p)
op = InputOption('{}{} ({}: {}) - {}: {}'.format(p, ': ' + d['desc'] if d['desc'] else '',
i18n['repository'],
d['repository'].lower(),
i18n['size'].capitalize(),
get_human_size_str(size) if size is not None else '?'), p)
label = f"{p} ({i18n['repository']}: {d['repository'].lower()}) | " \
f"{i18n['size'].capitalize()}: {get_human_size_str(size) if size is not None else '?'}"
op = InputOption(label=label, value=p, tooltip=d.get('desc') or None)
op.icon_path = _get_repo_icon(d['repository'])
opts.append(op)
@@ -34,11 +32,16 @@ def request_optional_deps(pkgname: str, pkg_repos: dict, watcher: ProcessWatcher
options=opts,
default_options=set(opts))
msg = f"<p>{i18n['arch.install.optdeps.request.success'].format(pkg=bold(pkgname))}</p>" \
f"<p>{i18n['arch.install.optdeps.request.body']}:</p>"
install = watcher.request_confirmation(title=i18n['arch.install.optdeps.request.title'],
body='<p>{}.</p><p>{}:</p>'.format(i18n['arch.install.optdeps.request.body'].format(bold(pkgname)), i18n['arch.install.optdeps.request.help']),
body=msg,
components=[view_opts],
confirmation_label=i18n['install'].capitalize(),
deny_label=i18n['do_not.install'].capitalize())
deny_label=i18n['do_not.install'].capitalize(),
min_width=600,
min_height=200)
if install:
return {o.value for o in view_opts.values}

View File

@@ -224,8 +224,8 @@ arch.install.error.conflicting_files=The package {} wants to overwrite files fro
arch.install.error.conflicting_files.proceed=Allow
arch.install.error.conflicting_files.stop=Cancel installation
arch.install.optdep.error=Could not install the optional packages: {}
arch.install.optdeps.request.body={} sha instal·lat correctament. Hi ha paquets opcionals associats que potser voldreu instal·lar
arch.install.optdeps.request.help=Marqueu els que voleu
arch.install.optdeps.request.body=Check the optional associated packages below that you want to install
arch.install.optdeps.request.success={pkg} was successfully installed !
arch.install.optdeps.request.title=Dependències opcionals
arch.installing.package=Sestà instal·lant el paquet {}
arch.checking_unnecessary_deps=Checking if there are packages no longer needed

View File

@@ -224,8 +224,8 @@ arch.install.error.conflicting_files=The package {} wants to overwrite files fro
arch.install.error.conflicting_files.proceed=Allow
arch.install.error.conflicting_files.stop=Cancel installation
arch.install.optdep.error=Could not install the optional packages: {}
arch.install.optdeps.request.body={} wurde erfolgreich installiert! Es gibt optionale zugehörige Pakete welche du vielleicht auch installieren möchtest
arch.install.optdeps.request.help=Wähle entsprechende aus
arch.install.optdeps.request.body=Check the optional associated packages below that you want to install
arch.install.optdeps.request.success={pkg} was successfully installed !
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

View File

@@ -224,8 +224,8 @@ arch.install.error.conflicting_files=The package {} wants to overwrite files fro
arch.install.error.conflicting_files.proceed=Allow
arch.install.error.conflicting_files.stop=Cancel installation
arch.install.optdep.error=Could not install the optional packages: {}
arch.install.optdeps.request.body={} was succesfully installed ! There are some optional associated packages that you might want to install
arch.install.optdeps.request.help=Check those you want
arch.install.optdeps.request.body=Check the optional associated packages below that you want to install
arch.install.optdeps.request.success={pkg} was successfully installed !
arch.install.optdeps.request.title=Optional dependencies
arch.installing.package=Installing {} package
arch.checking_unnecessary_deps=Checking if there are packages no longer needed

View File

@@ -224,8 +224,8 @@ arch.install.error.conflicting_files=El paquete {} quiere sobrescribir archivos
arch.install.error.conflicting_files.proceed=Permitir
arch.install.error.conflicting_files.stop=Cancelar instalación
arch.install.optdep.error=No se pudo instalar los paquetes opcionales: {}
arch.install.optdeps.request.body=¡{} se instaló correctamente! Hay algunos paquetes opcionales asociados que es posible que desee instalar
arch.install.optdeps.request.help=Marque los que desee
arch.install.optdeps.request.body=Marque los paquetes opcionales asociados abajo que desea instalar
arch.install.optdeps.request.success=¡{pkg} se instaló correctamente!
arch.install.optdeps.request.title=Dependencias opcionales
arch.installing.package=Instalando el paquete {}
arch.checking_unnecessary_deps=Verificando se hay paquetes innecesarios

View File

@@ -224,8 +224,8 @@ arch.install.error.conflicting_files=Le paquet {} veut écraser les fichiers d'a
arch.install.error.conflicting_files.proceed=Permettre
arch.install.error.conflicting_files.stop=Annuler l'installation
arch.install.optdep.error=Impossible d'installer les paquets optionnels: {}
arch.install.optdeps.request.body={} installé avec succès ! Il y a des paquets optionnels que vous pouvez installer
arch.install.optdeps.request.help=Cochez ceux que vous désirez
arch.install.optdeps.request.body=Check the optional associated packages below that you want to install
arch.install.optdeps.request.success={pkg} was successfully installed !
arch.install.optdeps.request.title=Dépendances optionnelles
arch.installing.package=Installation du paquet {}
arch.checking_unnecessary_deps=Calcul des paquets devenus inutiles

View File

@@ -224,8 +224,8 @@ arch.install.error.conflicting_files=The package {} wants to overwrite files fro
arch.install.error.conflicting_files.proceed=Allow
arch.install.error.conflicting_files.stop=Cancel installation
arch.install.optdep.error=Could not install the optional packages: {}
arch.install.optdeps.request.body={} è stato installato con successo! Ci sono alcuni pacchetti associati opzionali che potresti voler installare
arch.install.optdeps.request.help=Controlla quelli che vuoi
arch.install.optdeps.request.body=Check the optional associated packages below that you want to install
arch.install.optdeps.request.success={pkg} was successfully installed !
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

View File

@@ -223,8 +223,8 @@ arch.install.error.conflicting_files=O pacote {} quer sobrepor alguns arquivos d
arch.install.error.conflicting_files.proceed=Permitir
arch.install.error.conflicting_files.stop=Cancelar instalação
arch.install.optdep.error=Não foi possível instalar os pacotes opcionais: {}
arch.install.optdeps.request.body={} foi instalado com sucesso ! Existem alguns pacotes opcionais associados que você talvez queira instalar
arch.install.optdeps.request.help=Marque os desejados
arch.install.optdeps.request.body=Selecione abaixo os pacotes opcionais associados que você queira instalar
arch.install.optdeps.request.success={pkg} foi instalado com sucesso !
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

View File

@@ -224,8 +224,8 @@ arch.install.error.conflicting_files=The package {} wants to overwrite files fro
arch.install.error.conflicting_files.proceed=Allow
arch.install.error.conflicting_files.stop=Cancel installation
arch.install.optdep.error=Could not install the optional packages: {}
arch.install.optdeps.request.body={} успешно установлен ! Есть некоторые дополнительные связанные пакеты, которые вы можете установить
arch.install.optdeps.request.help=Отметьте те, которые вы хотите установить
arch.install.optdeps.request.body=Check the optional associated packages below that you want to install
arch.install.optdeps.request.success={pkg} was successfully installed !
arch.install.optdeps.request.title=Необязательные зависимости
arch.installing.package=Установка пакета {}
arch.checking_unnecessary_deps=Checking if there are packages no longer needed

View File

@@ -224,8 +224,8 @@ arch.install.error.conflicting_files=The package {} wants to overwrite files fro
arch.install.error.conflicting_files.proceed=Allow
arch.install.error.conflicting_files.stop=Cancel installation
arch.install.optdep.error=Tercihe bağlı paketler yüklenemedi: {}
arch.install.optdeps.request.body={} başarıyla yüklendi! Yüklemek isteyebileceğiniz bazı tercihe bağlı bağımlılıklar vardır
arch.install.optdeps.request.help=İstediklerinizi kontrol edin
arch.install.optdeps.request.body=Check the optional associated packages below that you want to install
arch.install.optdeps.request.success={pkg} was successfully installed !
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