#323303 aptitude: [l10n] format, align fields according to current locale

Package:
aptitude
Source:
aptitude
Description:
terminal-based package manager
Submitter:
Miernik
Date:
2012-12-08 06:00:07 UTC
Severity:
wishlist
#323303#5
Date:
2005-08-15 23:25:22 UTC
From:
To:
Currently all fields in the package list are left-aligned, no matter if
they are text or numerical. This looks bad for numerical fields. For
example, I have

aptitude::UI::Package-Display-Format "%c%a%M %27p%t%5i#%4r%8D%8I%8Z%v#%V#";

and example part of the display looks like this:

i A libbz2-1.0   unstable   6   41.8kB  131kB    1.0.2-8     1.0.2-8
i A libc6        unstable   436 4927kB  16.7MB   2.3.5-3     2.3.5-3
i   libc6-dev    unstable   3   2678kB  10.9MB   2.3.5-3     2.3.5-3
i A libcap1      unstable   3   9082B   61.4kB   1:1.10-14   1:1.10-14

I would want it to look like this:

i A libbz2-1.0   unstable     6 41.8kB   131kB   1.0.2-8     1.0.2-8
i A libc6        unstable   436 4927kB  16.7MB   2.3.5-3     2.3.5-3
i   libc6-dev    unstable     3 2678kB  10.9MB   2.3.5-3     2.3.5-3
i A libcap1      unstable     3 9082B   61.4kB   1:1.10-14   1:1.10-14

so that numerical fields are right-aligned with the rightmost numer in
the field.

#323303#14
Date:
2012-12-08 04:24:05 UTC
From:
To:
according to the current locale.

[Additional comments I am not tieing to this report:]

More generally: the formatting of most fields could use some
improvement, e.g. at least with a space before the unit prefix, perhaps
aligning on decimal point:

and see #569759 for a related request to use consistent units in
reporting.

Also, I'm not sure the use of those unit prefixes is correct (i.e. “M”
vs “m” vs “mi”).