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.
This commit is contained in:
parent
3c079c821a
commit
fb0915c3ca
24
free.c
24
free.c
@ -351,13 +351,13 @@ int main(int argc, char **argv)
|
|||||||
* the header, and the words need to be right align to
|
* the header, and the words need to be right align to
|
||||||
* beginning of a number. */
|
* beginning of a number. */
|
||||||
if (flags & FREE_WIDE) {
|
if (flags & FREE_WIDE) {
|
||||||
printf(_(" total used free shared buffers cache available"));
|
printf(_(" total used free shared buffers cache available"));
|
||||||
} else {
|
} else {
|
||||||
printf(_(" total used free shared buff/cache available"));
|
printf(_(" total used free shared buff/cache available"));
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf("%-7s", _("Mem:"));
|
printf("%-9s", _("Mem:"));
|
||||||
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_TOTAL, ul_int), flags, args));
|
printf("%11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_TOTAL, ul_int), flags, args));
|
||||||
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_USED, ul_int), flags, args));
|
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_USED, ul_int), flags, args));
|
||||||
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_FREE, ul_int), flags, args));
|
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_FREE, ul_int), flags, args));
|
||||||
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_SHARED, ul_int), flags, args));
|
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_SHARED, ul_int), flags, args));
|
||||||
@ -379,28 +379,28 @@ int main(int argc, char **argv)
|
|||||||
* to print the high info, even if it is zero.
|
* to print the high info, even if it is zero.
|
||||||
*/
|
*/
|
||||||
if (flags & FREE_LOHI) {
|
if (flags & FREE_LOHI) {
|
||||||
printf("%-7s", _("Low:"));
|
printf("%-9s", _("Low:"));
|
||||||
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_LOW_TOTAL, ul_int), flags, args));
|
printf("%11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_LOW_TOTAL, ul_int), flags, args));
|
||||||
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_LOW_USED, ul_int), flags, args));
|
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_LOW_USED, ul_int), flags, args));
|
||||||
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_LOW_FREE, ul_int), flags, args));
|
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_LOW_FREE, ul_int), flags, args));
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
printf("%-7s", _("High:"));
|
printf("%-9s", _("High:"));
|
||||||
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_HIGH_TOTAL, ul_int), flags, args));
|
printf("%11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_HIGH_TOTAL, ul_int), flags, args));
|
||||||
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_HIGH_USED, ul_int), flags, args));
|
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_HIGH_USED, ul_int), flags, args));
|
||||||
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_HIGH_FREE, ul_int), flags, args));
|
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_MEM_HIGH_FREE, ul_int), flags, args));
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("%-7s", _("Swap:"));
|
printf("%-9s", _("Swap:"));
|
||||||
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_SWAP_TOTAL, ul_int), flags, args));
|
printf("%11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_SWAP_TOTAL, ul_int), flags, args));
|
||||||
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_SWAP_USED, ul_int), flags, args));
|
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_SWAP_USED, ul_int), flags, args));
|
||||||
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_SWAP_FREE, ul_int), flags, args));
|
printf(" %11s", scale_size(MEMINFO_GET(mem_info, MEMINFO_SWAP_FREE, ul_int), flags, args));
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
if (flags & FREE_TOTAL) {
|
if (flags & FREE_TOTAL) {
|
||||||
printf("%-7s", _("Total:"));
|
printf("%-9s", _("Total:"));
|
||||||
printf(" %11s", scale_size(
|
printf("%11s", scale_size(
|
||||||
MEMINFO_GET(mem_info, MEMINFO_MEM_TOTAL, ul_int) +
|
MEMINFO_GET(mem_info, MEMINFO_MEM_TOTAL, ul_int) +
|
||||||
MEMINFO_GET(mem_info, MEMINFO_SWAP_TOTAL, ul_int), flags, args));
|
MEMINFO_GET(mem_info, MEMINFO_SWAP_TOTAL, ul_int), flags, args));
|
||||||
printf(" %11s", scale_size(
|
printf(" %11s", scale_size(
|
||||||
|
8
po/de.po
8
po/de.po
@ -123,19 +123,19 @@ msgstr "Anzahl im Argument konnte nicht verarbeitet werden: »%s«"
|
|||||||
#: free.c:352
|
#: free.c:352
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
" total used free shared buffers "
|
" total used free shared buffers "
|
||||||
"cache available"
|
"cache available"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
" gesamt benutzt frei gemeins. Puffer "
|
" gesamt benutzt frei gemeins. Puffer "
|
||||||
"Cache verfügbar"
|
"Cache verfügbar"
|
||||||
|
|
||||||
#: free.c:354
|
#: free.c:354
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
" total used free shared buff/cache "
|
" total used free shared buff/cache "
|
||||||
"available"
|
"available"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
" gesamt benutzt frei gemns. Puffer/Cache "
|
" gesamt benutzt frei gemns. Puffer/Cache "
|
||||||
"verfügbar"
|
"verfügbar"
|
||||||
|
|
||||||
#: free.c:357
|
#: free.c:357
|
||||||
|
8
po/fr.po
8
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
|
#: free.c:352
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
" total used free shared buffers "
|
" total used free shared buffers "
|
||||||
"cache available"
|
"cache available"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
" total utilisé libre partagé tampons "
|
" total utilisé libre partagé tampons "
|
||||||
"cache disponible"
|
"cache disponible"
|
||||||
|
|
||||||
#: free.c:354
|
#: free.c:354
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
" total used free shared buff/cache "
|
" total used free shared buff/cache "
|
||||||
"available"
|
"available"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
" total utilisé libre partagé tamp/cache "
|
" total utilisé libre partagé tamp/cache "
|
||||||
"disponible"
|
"disponible"
|
||||||
|
|
||||||
#: free.c:357
|
#: free.c:357
|
||||||
|
8
po/pl.po
8
po/pl.po
@ -120,19 +120,19 @@ msgstr "niezrozumiały argument liczby powtórzeń: '%s'"
|
|||||||
#: free.c:352
|
#: free.c:352
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
" total used free shared buffers "
|
" total used free shared buffers "
|
||||||
"cache available"
|
"cache available"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
" razem użyte wolne dzielone bufory w "
|
" razem użyte wolne dzielone bufory w "
|
||||||
"cache dostępne"
|
"cache dostępne"
|
||||||
|
|
||||||
#: free.c:354
|
#: free.c:354
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
" total used free shared buff/cache "
|
" total used free shared buff/cache "
|
||||||
"available"
|
"available"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
" razem użyte wolne dzielone buf/cache "
|
" razem użyte wolne dzielone buf/cache "
|
||||||
"dostępne"
|
"dostępne"
|
||||||
|
|
||||||
#: free.c:357
|
#: free.c:357
|
||||||
|
@ -122,19 +122,19 @@ msgstr "falha ao analisar a quantidade de argumentos: \"%s\""
|
|||||||
#: free.c:352
|
#: free.c:352
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
" total used free shared buffers "
|
" total used free shared buffers "
|
||||||
"cache available"
|
"cache available"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
" total usada livre compart. buffers "
|
" total usada livre compart. buffers "
|
||||||
"cache disponível"
|
"cache disponível"
|
||||||
|
|
||||||
#: free.c:354
|
#: free.c:354
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
" total used free shared buff/cache "
|
" total used free shared buff/cache "
|
||||||
"available"
|
"available"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
" total usada livre compart. buff/cache "
|
" total usada livre compart. buff/cache "
|
||||||
"disponível"
|
"disponível"
|
||||||
|
|
||||||
#: free.c:357
|
#: free.c:357
|
||||||
|
8
po/sv.po
8
po/sv.po
@ -121,19 +121,19 @@ msgstr "misslyckades att tolka upprepningsargumentet: ”%s”"
|
|||||||
#: free.c:352
|
#: free.c:352
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
" total used free shared buffers "
|
" total used free shared buffers "
|
||||||
"cache available"
|
"cache available"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
" totalt använt fritt delat buffertar "
|
" totalt använt fritt delat buffertar "
|
||||||
"cache tillgängl."
|
"cache tillgängl."
|
||||||
|
|
||||||
#: free.c:354
|
#: free.c:354
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
" total used free shared buff/cache "
|
" total used free shared buff/cache "
|
||||||
"available"
|
"available"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
" totalt använt fritt delat buff/cache "
|
" totalt använt fritt delat buff/cache "
|
||||||
"tillgängl."
|
"tillgängl."
|
||||||
|
|
||||||
#: free.c:357
|
#: free.c:357
|
||||||
|
8
po/uk.po
8
po/uk.po
@ -126,19 +126,19 @@ msgstr "не вдалося обробити аргумент кількості
|
|||||||
#: free.c:352
|
#: free.c:352
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
" total used free shared buffers "
|
" total used free shared buffers "
|
||||||
"cache available"
|
"cache available"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
" загалом використ. вільна спільна буфери "
|
" загалом використ. вільна спільна буфери "
|
||||||
"кеш дост."
|
"кеш дост."
|
||||||
|
|
||||||
#: free.c:354
|
#: free.c:354
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
" total used free shared buff/cache "
|
" total used free shared buff/cache "
|
||||||
"available"
|
"available"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
" загалом використ. вільна спільна буфери/кеш дост."
|
" загалом використ. вільна спільна буфери/кеш дост."
|
||||||
|
|
||||||
#: free.c:357
|
#: free.c:357
|
||||||
msgid "Mem:"
|
msgid "Mem:"
|
||||||
|
8
po/vi.po
8
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
|
#: free.c:352
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
" total used free shared buffers "
|
" total used free shared buffers "
|
||||||
"cache available"
|
"cache available"
|
||||||
msgstr ""
|
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"
|
"tạm sẵn sàng"
|
||||||
|
|
||||||
#: free.c:354
|
#: free.c:354
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
" total used free shared buff/cache "
|
" total used free shared buff/cache "
|
||||||
"available"
|
"available"
|
||||||
msgstr ""
|
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"
|
"sàng"
|
||||||
|
|
||||||
#: free.c:357
|
#: free.c:357
|
||||||
|
@ -132,7 +132,7 @@ msgstr "查询 spec 文件 %s 失败,无法解析\n"
|
|||||||
#: free.c:352
|
#: free.c:352
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
" total used free shared buffers "
|
" total used free shared buffers "
|
||||||
"cache available"
|
"cache available"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
" 总计 已用 空闲 共享 缓冲 缓"
|
" 总计 已用 空闲 共享 缓冲 缓"
|
||||||
@ -141,7 +141,7 @@ msgstr ""
|
|||||||
#: free.c:354
|
#: free.c:354
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
" total used free shared buff/cache "
|
" total used free shared buff/cache "
|
||||||
"available"
|
"available"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
" 总计 已用 空闲 共享 缓冲/缓存 可用"
|
" 总计 已用 空闲 共享 缓冲/缓存 可用"
|
||||||
|
Loading…
Reference in New Issue
Block a user