0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.0306: plural messages are not translated properly

Problem:    Plural messages are not translated properly.
Solution:   Add more usage of NGETTEXT(). (Sergey Alyoshin)
This commit is contained in:
Bram Moolenaar
2018-08-21 15:12:14 +02:00
parent 830e3583da
commit da6e8919e7
8 changed files with 79 additions and 128 deletions

View File

@@ -1174,26 +1174,14 @@ do_bufdel(
else if (deleted >= p_report)
{
if (command == DOBUF_UNLOAD)
{
if (deleted == 1)
MSG(_("1 buffer unloaded"));
else
smsg((char_u *)_("%d buffers unloaded"), deleted);
}
smsg((char_u *)NGETTEXT("%d buffer unloaded",
"%d buffers unloaded", deleted), deleted);
else if (command == DOBUF_DEL)
{
if (deleted == 1)
MSG(_("1 buffer deleted"));
else
smsg((char_u *)_("%d buffers deleted"), deleted);
}
smsg((char_u *)NGETTEXT("%d buffer deleted",
"%d buffers deleted", deleted), deleted);
else
{
if (deleted == 1)
MSG(_("1 buffer wiped out"));
else
smsg((char_u *)_("%d buffers wiped out"), deleted);
}
smsg((char_u *)NGETTEXT("%d buffer wiped out",
"%d buffers wiped out", deleted), deleted);
}
}
@@ -3485,19 +3473,14 @@ fileinfo(
n = (int)(((long)curwin->w_cursor.lnum * 100L) /
(long)curbuf->b_ml.ml_line_count);
if (curbuf->b_ml.ml_flags & ML_EMPTY)
{
vim_snprintf_add((char *)buffer, IOSIZE, "%s", _(no_lines_msg));
}
#ifdef FEAT_CMDL_INFO
else if (p_ru)
{
/* Current line and column are already on the screen -- webb */
if (curbuf->b_ml.ml_line_count == 1)
vim_snprintf_add((char *)buffer, IOSIZE, _("1 line --%d%%--"), n);
else
vim_snprintf_add((char *)buffer, IOSIZE, _("%ld lines --%d%%--"),
(long)curbuf->b_ml.ml_line_count, n);
}
vim_snprintf_add((char *)buffer, IOSIZE,
NGETTEXT("%ld line --%d%%--", "%ld lines --%d%%--",
curbuf->b_ml.ml_line_count),
(long)curbuf->b_ml.ml_line_count, n);
#endif
else
{