From 8a776d7efca18a2a72a9ba0e214efdce5ee40d9f Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Thu, 7 Apr 2022 15:15:21 -0300 Subject: [PATCH] [debian] improvement: installation/download sizes order (installation dependencies dialog) --- CHANGELOG.md | 1 + bauh/gems/debian/gui.py | 8 ++++---- bauh/gems/debian/resources/locale/ca | 2 +- bauh/gems/debian/resources/locale/de | 2 +- bauh/gems/debian/resources/locale/en | 2 +- bauh/gems/debian/resources/locale/es | 2 +- bauh/gems/debian/resources/locale/fr | 2 +- bauh/gems/debian/resources/locale/it | 2 +- bauh/gems/debian/resources/locale/pt | 2 +- bauh/gems/debian/resources/locale/ru | 2 +- bauh/gems/debian/resources/locale/tr | 2 +- 11 files changed, 14 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d76ac9eb..4275aa92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - displaying hard and unnecessary requirements versions and descriptions - Debian + - install: installation/download sizes order (to follow the upgrade dialog order) - uninstall: dependencies dialog size - General diff --git a/bauh/gems/debian/gui.py b/bauh/gems/debian/gui.py index 76555737..8348e825 100644 --- a/bauh/gems/debian/gui.py +++ b/bauh/gems/debian/gui.py @@ -36,13 +36,13 @@ class DebianViewBridge: else: uncompressed = '?' - views.append(InputOption(label=f"{p.name} ({compressed} | {uncompressed})", + views.append(InputOption(label=f"{p.name} ({uncompressed} | {compressed})", value=p.name, read_only=True, icon_path=DEBIAN_ICON_PATH, tooltip=p.description if p.description else '?')) dsize = get_human_size_str(download_size) if download_size > 0 else '?' isize = get_human_size_str(install_size) if install_size > 0 else '?' - return views, dsize, isize + return views, isize, dsize def _map_to_remove(self, pkgs: Optional[Collection[DebianPackage]]) -> Optional[Tuple[List[InputOption], str]]: if pkgs: @@ -88,8 +88,8 @@ class DebianViewBridge: if to_install_data: to_install_data[0].sort(key=attrgetter('label')) lb_deps = self._i18n['debian.transaction.to_install'].format(no=bold(str(len(to_install_data[0]))), - dsize=bold(to_install_data[1]), - isize=bold(to_install_data[2])) + dsize=bold(to_install_data[2]), + isize=bold(to_install_data[1])) components.append(TextComponent(html=f'
{lb_deps}', min_width=text_width)) components.append(MultipleSelectComponent(id_='inst', label='', options=to_install_data[0], diff --git a/bauh/gems/debian/resources/locale/ca b/bauh/gems/debian/resources/locale/ca index 97ed20e0..299e9c93 100644 --- a/bauh/gems/debian/resources/locale/ca +++ b/bauh/gems/debian/resources/locale/ca @@ -77,7 +77,7 @@ debian.task.sync_pkgs.status=Synchronizing packages debian.transaction.dependency_of=Dependency of {pkgs} debian.transaction.get_data=Retrieving the operation's data debian.transaction.title=Operation details -debian.transaction.to_install=The following additional packages ({no}) will be installed (Download: {dsize} | Installation: {isize}) +debian.transaction.to_install=The following additional packages ({no}) will be installed (Installation: {isize} | Download: {dsize}) debian.transaction.to_remove=The following packages ({no}) will be removed (Freed space: {fspace}) debian.uninstall.failed_to_remove=It was not possible to remove the following {no} packages: {pkgs} debian.uninstall.removing=Removing packages diff --git a/bauh/gems/debian/resources/locale/de b/bauh/gems/debian/resources/locale/de index b4ed2943..402fb90c 100644 --- a/bauh/gems/debian/resources/locale/de +++ b/bauh/gems/debian/resources/locale/de @@ -77,7 +77,7 @@ debian.task.sync_pkgs.status=Synchronizing packages debian.transaction.dependency_of=Dependency of {pkgs} debian.transaction.get_data=Retrieving the operation's data debian.transaction.title=Operation details -debian.transaction.to_install=The following additional packages ({no}) will be installed (Download: {dsize} | Installation: {isize}) +debian.transaction.to_install=The following additional packages ({no}) will be installed (Installation: {isize} | Download: {dsize}) debian.transaction.to_remove=The following packages ({no}) will be removed (Freed space: {fspace}) debian.uninstall.failed_to_remove=It was not possible to remove the following {no} packages: {pkgs} debian.uninstall.removing=Removing packages diff --git a/bauh/gems/debian/resources/locale/en b/bauh/gems/debian/resources/locale/en index b4ed2943..402fb90c 100644 --- a/bauh/gems/debian/resources/locale/en +++ b/bauh/gems/debian/resources/locale/en @@ -77,7 +77,7 @@ debian.task.sync_pkgs.status=Synchronizing packages debian.transaction.dependency_of=Dependency of {pkgs} debian.transaction.get_data=Retrieving the operation's data debian.transaction.title=Operation details -debian.transaction.to_install=The following additional packages ({no}) will be installed (Download: {dsize} | Installation: {isize}) +debian.transaction.to_install=The following additional packages ({no}) will be installed (Installation: {isize} | Download: {dsize}) debian.transaction.to_remove=The following packages ({no}) will be removed (Freed space: {fspace}) debian.uninstall.failed_to_remove=It was not possible to remove the following {no} packages: {pkgs} debian.uninstall.removing=Removing packages diff --git a/bauh/gems/debian/resources/locale/es b/bauh/gems/debian/resources/locale/es index ad024ef7..149c4989 100644 --- a/bauh/gems/debian/resources/locale/es +++ b/bauh/gems/debian/resources/locale/es @@ -77,7 +77,7 @@ debian.task.sync_pkgs.status=Sincronizando paquetes debian.transaction.dependency_of=Dependencia de {pkgs} debian.transaction.get_data=Recuperando datos de la operación debian.transaction.title=Detalles de la operación -debian.transaction.to_install=Los siguientes paquetes adicionales ({no}) serán instalados (Descarga: {dsize} | Instalación: {isize}) +debian.transaction.to_install=Los siguientes paquetes adicionales ({no}) serán instalados (Instalación: {isize} | Descarga: {dsize}) debian.transaction.to_remove=Los siguientes paquetes ({no}) serán eliminados (Espacio liberado: {fspace}) debian.uninstall.failed_to_remove=No fue posible eliminar los siguientes {no} paquetes: {pkgs} debian.uninstall.removing=Removendo paquetes diff --git a/bauh/gems/debian/resources/locale/fr b/bauh/gems/debian/resources/locale/fr index 976147c2..0a25b532 100644 --- a/bauh/gems/debian/resources/locale/fr +++ b/bauh/gems/debian/resources/locale/fr @@ -76,7 +76,7 @@ debian.task.sync_pkgs.status=Synchronizing packages debian.transaction.dependency_of=Dependency of {pkgs} debian.transaction.get_data=Retrieving the operation's data debian.transaction.title=Operation details -debian.transaction.to_install=The following additional packages ({no}) will be installed (Download: {dsize} | Installation: {isize}) +debian.transaction.to_install=The following additional packages ({no}) will be installed (Installation: {isize} | Download: {dsize}) debian.transaction.to_remove=The following packages ({no}) will be removed (Freed space: {fspace}) debian.uninstall.failed_to_remove=It was not possible to remove the following {no} packages: {pkgs} debian.uninstall.removing=Removing packages diff --git a/bauh/gems/debian/resources/locale/it b/bauh/gems/debian/resources/locale/it index b4ed2943..402fb90c 100644 --- a/bauh/gems/debian/resources/locale/it +++ b/bauh/gems/debian/resources/locale/it @@ -77,7 +77,7 @@ debian.task.sync_pkgs.status=Synchronizing packages debian.transaction.dependency_of=Dependency of {pkgs} debian.transaction.get_data=Retrieving the operation's data debian.transaction.title=Operation details -debian.transaction.to_install=The following additional packages ({no}) will be installed (Download: {dsize} | Installation: {isize}) +debian.transaction.to_install=The following additional packages ({no}) will be installed (Installation: {isize} | Download: {dsize}) debian.transaction.to_remove=The following packages ({no}) will be removed (Freed space: {fspace}) debian.uninstall.failed_to_remove=It was not possible to remove the following {no} packages: {pkgs} debian.uninstall.removing=Removing packages diff --git a/bauh/gems/debian/resources/locale/pt b/bauh/gems/debian/resources/locale/pt index a90cc94d..bc7d4113 100644 --- a/bauh/gems/debian/resources/locale/pt +++ b/bauh/gems/debian/resources/locale/pt @@ -77,7 +77,7 @@ debian.task.sync_pkgs.status=Sincronizando pacotes debian.transaction.dependency_of=Dependência de {pkgs} debian.transaction.get_data=Obtendo dados da operação debian.transaction.title=Detalhes da operação -debian.transaction.to_install=Os seguintes pacotes adicionais ({no}) serão instaladas (Download: {dsize} | Instalação: {isize}) +debian.transaction.to_install=Os seguintes pacotes adicionais ({no}) serão instaladas (Instalação: {isize} | Download: {dsize}) debian.transaction.to_remove=Os seguintes pacotes ({no}) serão removidos (Espaço liberado: {fspace}) debian.uninstall.failed_to_remove=Não foi possível remover os seguintes {no} pacotes: {pkgs} debian.uninstall.removing=Removendo pacotes diff --git a/bauh/gems/debian/resources/locale/ru b/bauh/gems/debian/resources/locale/ru index b4ed2943..402fb90c 100644 --- a/bauh/gems/debian/resources/locale/ru +++ b/bauh/gems/debian/resources/locale/ru @@ -77,7 +77,7 @@ debian.task.sync_pkgs.status=Synchronizing packages debian.transaction.dependency_of=Dependency of {pkgs} debian.transaction.get_data=Retrieving the operation's data debian.transaction.title=Operation details -debian.transaction.to_install=The following additional packages ({no}) will be installed (Download: {dsize} | Installation: {isize}) +debian.transaction.to_install=The following additional packages ({no}) will be installed (Installation: {isize} | Download: {dsize}) debian.transaction.to_remove=The following packages ({no}) will be removed (Freed space: {fspace}) debian.uninstall.failed_to_remove=It was not possible to remove the following {no} packages: {pkgs} debian.uninstall.removing=Removing packages diff --git a/bauh/gems/debian/resources/locale/tr b/bauh/gems/debian/resources/locale/tr index 45660332..07da69a6 100644 --- a/bauh/gems/debian/resources/locale/tr +++ b/bauh/gems/debian/resources/locale/tr @@ -76,7 +76,7 @@ debian.task.sync_pkgs.status=Synchronizing packages debian.transaction.dependency_of=Dependency of {pkgs} debian.transaction.get_data=Retrieving the operation's data debian.transaction.title=Operation details -debian.transaction.to_install=The following additional packages ({no}) will be installed (Download: {dsize} | Installation: {isize}) +debian.transaction.to_install=The following additional packages ({no}) will be installed (Installation: {isize} | Download: {dsize}) debian.transaction.to_remove=The following packages ({no}) will be removed (Freed space: {fspace}) debian.uninstall.failed_to_remove=It was not possible to remove the following {no} packages: {pkgs} debian.uninstall.removing=Removing packages