Skip to content
  • Dan McGee's avatar
    VerbosePkgLists: format table lines in i18n-compatible way · 61c6ae01
    Dan McGee authored
    
    
    This had the unfortunate implementation detail that depended on the
    strings having 1 byte == 1 column hold true. As we know, this is not at
    all the case once you move past the base ASCII character set.
    
    Reimplement this whole thing so it doesn't depend on format strings at
    all. Instead, simply calculate the max column widths, and then when
    displaying each row add the correct amount of padding using UTF-8 safe
    string length functions.
    
    Before:
    
    名字        旧版本新版本  净变化 下载大小
    
    libgee                0.6.2.1-1  0.60 MiB    0.10 MiB
    libsocialweb          0.25.19-2  1.92 MiB    0.23 MiB
    folks                 0.6.3.2-1  1.38 MiB    0.25 MiB
    
    After:
    
    名字          旧版本  新版本     净变化    下载大小
    
    libgee                0.6.2.1-1  0.60 MiB  0.10 MiB
    libsocialweb          0.25.19-2  1.92 MiB  0.23 MiB
    folks                 0.6.3.2-1  1.38 MiB  0.25 MiB
    
    Signed-off-by: default avatarDan McGee <dan@archlinux.org>
    61c6ae01
To find the state of this project's repository at the time of any of these versions, check out the tags.