statusbar: properly pluralize the line+word+character count report
This avoids poor wordings such as "Words: 1 Lines: 1 Chars: 1". Also, display the numbers in a more logical, ascending order: lines first, words second, characters third. This is what 'wc' uses, too.master
parent
925a1a11f9
commit
d3d2d324d2
|
@ -2987,9 +2987,12 @@ void do_wordlinechar_count(void)
|
||||||
openfile->current = was_current;
|
openfile->current = was_current;
|
||||||
openfile->current_x = was_x;
|
openfile->current_x = was_x;
|
||||||
|
|
||||||
/* Display the total word, line, and character counts on the status bar. */
|
/* Report on the status bar the number of lines, words, and characters. */
|
||||||
statusline(HUSH, _("%sWords: %zu Lines: %zd Chars: %zu"), openfile->mark ?
|
statusline(HUSH, _("%s%zd %s, %zu %s, %zu %s"),
|
||||||
_("In Selection: ") : "", words, lines, chars);
|
openfile->mark ? _("In Selection: ") : "",
|
||||||
|
lines, P_("line", "lines", lines),
|
||||||
|
words, P_("word", "words", words),
|
||||||
|
chars, P_("character", "characters", chars));
|
||||||
}
|
}
|
||||||
#endif /* !NANO_TINY */
|
#endif /* !NANO_TINY */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue