Fix wide character output for add/remove/upgrade/conflict progress
commita6470956bc2db5acb821485e590822953966586a
authorDan McGee <dan@archlinux.org>
Sat, 23 Feb 2008 04:00:15 +0000 (22 22:00 -0600)
committerDan McGee <dan@archlinux.org>
Sat, 23 Feb 2008 04:00:15 +0000 (22 22:00 -0600)
tree4821069ebe14931d8cdf52445d700de1319a9595
parent29f55fb7c9e2d7d3923d796216a9506d95b1fd60
Fix wide character output for add/remove/upgrade/conflict progress

Due to the addition of the Chinese translation, our column widths were all
messed up as mentioned in the download progress commit fixing this same
problem there. This is a port of the code and ideas from that fix to the
installation progress bars. Once again, a handful of examples were tested to
ensure we work in all locales and with varying byte and char widths.

English (before & after):
(1/1) checking for file conflicts                   [-----------------] 100%
(1/1) upgrading man-pages                           [-----------------] 100%

German (before & after):
(1/1) Prüfe auf Dateikonflikte                      [-----------------] 100%
(1/1) Aktualisiere man-pages                        [-----------------] 100%

Chinese (before):
(1/1) 正在检查文件冲突                                      [-----------------] 100%
(1/1) 生在升级 man-pages                                [c  o  o  o  o  o ] (1/1) 生在升级 man-pages                                [----------C o  o ] (1/1) 生在升级 man-pages                                [-----------------] 100%

Chinese (after):
(1/1) 正在检查文件冲突                              [-----------------] 100%
(1/1) 生在升级 man-pages                            [-----------------] 100%

Signed-off-by: Dan McGee <dan@archlinux.org>
src/pacman/callback.c