[pacman-dev] pacman: correct inconsistent spelling of Packages

Message ID 20210726193421.13414-1-noreply.torsten@gmail.com
State New
Headers show
Series [pacman-dev] pacman: correct inconsistent spelling of Packages | expand

Commit Message

Torsten Schmitz July 26, 2021, 7:34 p.m. UTC
When using VerbosePkgLists the header spells
Package instead of Packages as it does normally.

Signed-off-by: Torsten Schmitz <noreply.torsten@gmail.com>
---
 src/pacman/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

morganamilo July 26, 2021, 7:46 p.m. UTC | #1
On 26/07/2021 20:34, Torsten Schmitz wrote:
> When using VerbosePkgLists the header spells
> Package instead of Packages as it does normally.
> 
> Signed-off-by: Torsten Schmitz <noreply.torsten@gmail.com>
> ---
>  src/pacman/util.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/pacman/util.c b/src/pacman/util.c
> index 5486e7a5..36ae0bf0 100644
> --- a/src/pacman/util.c
> +++ b/src/pacman/util.c
> @@ -824,7 +824,7 @@ static alpm_list_t *create_verbose_header(size_t count)
>  	alpm_list_t *ret = NULL;
>  
>  	char *header;
> -	pm_asprintf(&header, "%s (%zu)", _("Package"), count);
> +	pm_asprintf(&header, "%s (%zu)", _("Packages"), count);
>  
>  	add_table_cell(&ret, header, CELL_TITLE | CELL_FREE);
>  	add_table_cell(&ret, _("Old Version"), CELL_TITLE);
> 

Table headings are generally singular as one row contains one package.
Torsten Schmitz July 26, 2021, 8:09 p.m. UTC | #2
On Mon, Jul 26, 2021 at 9:46 PM Morgan Adamiec
<morganamilo@archlinux.org> wrote:
>
> Table headings are generally singular as one row contains one package.

That makes sense. I thought the Packages referred to the number in
brackets after.
I was grepping for that number in a script which broke when I enabled
VerbosePkgLists,
which is how I stumbled upon this.

The script is doing something like checkupdates -d but displays the
number of downloaded
packages.

Patch

diff --git a/src/pacman/util.c b/src/pacman/util.c
index 5486e7a5..36ae0bf0 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -824,7 +824,7 @@  static alpm_list_t *create_verbose_header(size_t count)
 	alpm_list_t *ret = NULL;
 
 	char *header;
-	pm_asprintf(&header, "%s (%zu)", _("Package"), count);
+	pm_asprintf(&header, "%s (%zu)", _("Packages"), count);
 
 	add_table_cell(&ret, header, CELL_TITLE | CELL_FREE);
 	add_table_cell(&ret, _("Old Version"), CELL_TITLE);