From 91a396d76ec8452db1920116bc7521fdf3821dd2 Mon Sep 17 00:00:00 2001 From: Craig Small Date: Fri, 24 Apr 2020 17:42:58 +1000 Subject: [PATCH] free: Adjust space to really use 9 chars @steffhip found that while the translation hint said use 9 characters in the free headers, it really was only 7. Currently each line is constructed with the following (in non wide format): Header + 6 Columns. The header takes 7 characters and each column is 11 characters wide and prefixed with one space. Thus we have 7 + (1 + 11) * 6 = 79 characters for each line By dropping the leading space for the first column after the header -the header is already terminated by a colon- one could indeed provide the needed 9 letters for the header and thus have 9 + 11 * 1 + (1 + 11) * 5 = 80 Chars per line which would fit into one line. --- free.c | 24 ++++++++++++------------ po/de.po | 8 ++++---- po/fr.po | 8 ++++---- po/pl.po | 8 ++++---- po/pt_BR.po | 8 ++++---- po/sv.po | 8 ++++---- po/uk.po | 8 ++++---- po/vi.po | 8 ++++---- po/zh_CN.po | 4 ++-- 9 files changed, 42 insertions(+), 42 deletions(-) diff --git a/free.c b/free.c index 70ecb127..f82546eb 100644 --- a/free.c +++ b/free.c @@ -349,13 +349,13 @@ int main(int argc, char **argv) * the header, and the words need to be right align to * beginning of a number. */ if (flags & FREE_WIDE) { - printf(_(" total used free shared buffers cache available")); + printf(_(" total used free shared buffers cache available")); } else { - printf(_(" total used free shared buff/cache available")); + printf(_(" total used free shared buff/cache available")); } printf("\n"); - printf("%-7s", _("Mem:")); - printf(" %11s", scale_size(kb_main_total, flags, args)); + printf("%-9s", _("Mem:")); + printf("%11s", scale_size(kb_main_total, flags, args)); printf(" %11s", scale_size(kb_main_used, flags, args)); printf(" %11s", scale_size(kb_main_free, flags, args)); printf(" %11s", scale_size(kb_main_shared, flags, args)); @@ -374,28 +374,28 @@ int main(int argc, char **argv) * to print the high info, even if it is zero. */ if (flags & FREE_LOHI) { - printf("%-7s", _("Low:")); - printf(" %11s", scale_size(kb_low_total, flags, args)); + printf("%-9s", _("Low:")); + printf("%11s", scale_size(kb_low_total, flags, args)); printf(" %11s", scale_size(kb_low_total - kb_low_free, flags, args)); printf(" %11s", scale_size(kb_low_free, flags, args)); printf("\n"); - printf("%-7s", _("High:")); - printf(" %11s", scale_size(kb_high_total, flags, args)); + printf("%-9s", _("High:")); + printf("%11s", scale_size(kb_high_total, flags, args)); printf(" %11s", scale_size(kb_high_total - kb_high_free, flags, args)); printf(" %11s", scale_size(kb_high_free, flags, args)); printf("\n"); } - printf("%-7s", _("Swap:")); - printf(" %11s", scale_size(kb_swap_total, flags, args)); + printf("%-9s", _("Swap:")); + printf("%11s", scale_size(kb_swap_total, flags, args)); printf(" %11s", scale_size(kb_swap_used, flags, args)); printf(" %11s", scale_size(kb_swap_free, flags, args)); printf("\n"); if (flags & FREE_TOTAL) { - printf("%-7s", _("Total:")); - printf(" %11s", scale_size(kb_main_total + kb_swap_total, flags, args)); + printf("%-9s", _("Total:")); + printf("%11s", scale_size(kb_main_total + kb_swap_total, flags, args)); printf(" %11s", scale_size(kb_main_used + kb_swap_used, flags, args)); printf(" %11s", scale_size(kb_main_free + kb_swap_free, flags, args)); printf("\n"); diff --git a/po/de.po b/po/de.po index 3d6c6c22..a4e21b75 100644 --- a/po/de.po +++ b/po/de.po @@ -123,19 +123,19 @@ msgstr "Anzahl im Argument konnte nicht verarbeitet werden: »%s«" #: free.c:352 #, c-format msgid "" -" total used free shared buffers " +" total used free shared buffers " "cache available" msgstr "" -" gesamt benutzt frei gemeins. Puffer " +" gesamt benutzt frei gemeins. Puffer " "Cache verfügbar" #: free.c:354 #, c-format msgid "" -" total used free shared buff/cache " +" total used free shared buff/cache " "available" msgstr "" -" gesamt benutzt frei gemns. Puffer/Cache " +" gesamt benutzt frei gemns. Puffer/Cache " "verfügbar" #: free.c:357 diff --git a/po/fr.po b/po/fr.po index 8ec3f41f..394299ca 100644 --- a/po/fr.po +++ b/po/fr.po @@ -139,19 +139,19 @@ msgstr "échec du décodage de l'argument du nombre de répétitions: « %s » #: free.c:352 #, c-format msgid "" -" total used free shared buffers " +" total used free shared buffers " "cache available" msgstr "" -" total utilisé libre partagé tampons " +" total utilisé libre partagé tampons " "cache disponible" #: free.c:354 #, c-format msgid "" -" total used free shared buff/cache " +" total used free shared buff/cache " "available" msgstr "" -" total utilisé libre partagé tamp/cache " +" total utilisé libre partagé tamp/cache " "disponible" #: free.c:357 diff --git a/po/pl.po b/po/pl.po index f56f8f71..33494343 100644 --- a/po/pl.po +++ b/po/pl.po @@ -120,19 +120,19 @@ msgstr "niezrozumiały argument liczby powtórzeń: '%s'" #: free.c:352 #, c-format msgid "" -" total used free shared buffers " +" total used free shared buffers " "cache available" msgstr "" -" razem użyte wolne dzielone bufory w " +" razem użyte wolne dzielone bufory w " "cache dostępne" #: free.c:354 #, c-format msgid "" -" total used free shared buff/cache " +" total used free shared buff/cache " "available" msgstr "" -" razem użyte wolne dzielone buf/cache " +" razem użyte wolne dzielone buf/cache " "dostępne" #: free.c:357 diff --git a/po/pt_BR.po b/po/pt_BR.po index 410ce73d..8b471e10 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -122,19 +122,19 @@ msgstr "falha ao analisar a quantidade de argumentos: \"%s\"" #: free.c:352 #, c-format msgid "" -" total used free shared buffers " +" total used free shared buffers " "cache available" msgstr "" -" total usada livre compart. buffers " +" total usada livre compart. buffers " "cache disponível" #: free.c:354 #, c-format msgid "" -" total used free shared buff/cache " +" total used free shared buff/cache " "available" msgstr "" -" total usada livre compart. buff/cache " +" total usada livre compart. buff/cache " "disponível" #: free.c:357 diff --git a/po/sv.po b/po/sv.po index 2e0ef9a8..7e5d4102 100644 --- a/po/sv.po +++ b/po/sv.po @@ -121,19 +121,19 @@ msgstr "misslyckades att tolka upprepningsargumentet: ”%s”" #: free.c:352 #, c-format msgid "" -" total used free shared buffers " +" total used free shared buffers " "cache available" msgstr "" -" totalt använt fritt delat buffertar " +" totalt använt fritt delat buffertar " "cache tillgängl." #: free.c:354 #, c-format msgid "" -" total used free shared buff/cache " +" total used free shared buff/cache " "available" msgstr "" -" totalt använt fritt delat buff/cache " +" totalt använt fritt delat buff/cache " "tillgängl." #: free.c:357 diff --git a/po/uk.po b/po/uk.po index eb84bc25..90c3dcf6 100644 --- a/po/uk.po +++ b/po/uk.po @@ -126,19 +126,19 @@ msgstr "не вдалося обробити аргумент кількості #: free.c:352 #, c-format msgid "" -" total used free shared buffers " +" total used free shared buffers " "cache available" msgstr "" -" загалом використ. вільна спільна буфери " +" загалом використ. вільна спільна буфери " "кеш дост." #: free.c:354 #, c-format msgid "" -" total used free shared buff/cache " +" total used free shared buff/cache " "available" msgstr "" -" загалом використ. вільна спільна буфери/кеш дост." +" загалом використ. вільна спільна буфери/кеш дост." #: free.c:357 msgid "Mem:" diff --git a/po/vi.po b/po/vi.po index e66ca8c7..7dcc0e20 100644 --- a/po/vi.po +++ b/po/vi.po @@ -131,19 +131,19 @@ msgstr "gặp lỗi khi phân tích số lượng đối số: “%s”" #: free.c:352 #, c-format msgid "" -" total used free shared buffers " +" total used free shared buffers " "cache available" msgstr "" -" tổng dùng trống chsẻ đệm nhớ " +" tổng dùng trống chsẻ đệm nhớ " "tạm sẵn sàng" #: free.c:354 #, c-format msgid "" -" total used free shared buff/cache " +" total used free shared buff/cache " "available" msgstr "" -" tổng dùng trống chsẻ đệm/tạm sẵn " +" tổng dùng trống chsẻ đệm/tạm sẵn " "sàng" #: free.c:357 diff --git a/po/zh_CN.po b/po/zh_CN.po index f5c27653..e0e0fbbb 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -132,7 +132,7 @@ msgstr "查询 spec 文件 %s 失败,无法解析\n" #: free.c:352 #, c-format msgid "" -" total used free shared buffers " +" total used free shared buffers " "cache available" msgstr "" " 总计 已用 空闲 共享 缓冲 缓" @@ -141,7 +141,7 @@ msgstr "" #: free.c:354 #, c-format msgid "" -" total used free shared buff/cache " +" total used free shared buff/cache " "available" msgstr "" " 总计 已用 空闲 共享 缓冲/缓存 可用"