diff options
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index bee50c595..6e713c49a 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -985,12 +985,8 @@ do_move(linenr_T line1, linenr_T line2, linenr_T dest) ml_delete(line1 + extra, TRUE); if (!global_busy && num_lines > p_report) - { - if (num_lines == 1) - MSG(_("1 line moved")); - else - smsg((char_u *)_("%ld lines moved"), num_lines); - } + smsg((char_u *)NGETTEXT("%ld line moved", "%ld lines moved", num_lines), + (long)num_lines); /* * Leave the cursor on the last of the moved lines. @@ -5940,23 +5936,29 @@ do_sub_msg( || count_only) && messaging()) { + char *msg_single; + char *msg_plural; + if (got_int) STRCPY(msg_buf, _("(Interrupted) ")); else *msg_buf = NUL; - if (sub_nsubs == 1) - vim_snprintf_add((char *)msg_buf, sizeof(msg_buf), - "%s", count_only ? _("1 match") : _("1 substitution")); - else - vim_snprintf_add((char *)msg_buf, sizeof(msg_buf), - count_only ? _("%ld matches") : _("%ld substitutions"), - sub_nsubs); - if (sub_nlines == 1) - vim_snprintf_add((char *)msg_buf, sizeof(msg_buf), - "%s", _(" on 1 line")); - else - vim_snprintf_add((char *)msg_buf, sizeof(msg_buf), - _(" on %ld lines"), (long)sub_nlines); + + msg_single = count_only + ? NGETTEXT("%ld match on %ld line", + "%ld matches on %ld line", sub_nsubs) + : NGETTEXT("%ld substitution on %ld line", + "%ld substitutions on %ld line", sub_nsubs); + msg_plural = count_only + ? NGETTEXT("%ld match on %ld lines", + "%ld matches on %ld lines", sub_nsubs) + : NGETTEXT("%ld substitution on %ld lines", + "%ld substitutions on %ld lines", sub_nsubs); + + vim_snprintf_add((char *)msg_buf, sizeof(msg_buf), + NGETTEXT(msg_single, msg_plural, sub_nlines), + sub_nsubs, (long)sub_nlines); + if (msg(msg_buf)) /* save message to display it after redraw */ set_keep_msg(msg_buf, 0); |