diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-08-21 15:12:14 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-08-21 15:12:14 +0200 |
commit | da6e8919e75fa8f961d1b805e877c8a92e76dafb (patch) | |
tree | 1e001a2e07d4a1d51d83f4d5a5efe91b3caeef84 /src/misc1.c | |
parent | 830e3583da682eee41ed6b027c9912547d4022c0 (diff) | |
download | vim-git-da6e8919e75fa8f961d1b805e877c8a92e76dafb.tar.gz |
patch 8.1.0306: plural messages are not translated properlyv8.1.0306
Problem: Plural messages are not translated properly.
Solution: Add more usage of NGETTEXT(). (Sergey Alyoshin)
Diffstat (limited to 'src/misc1.c')
-rw-r--r-- | src/misc1.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/misc1.c b/src/misc1.c index 1647aa952..f2aa96b37 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -3802,24 +3802,12 @@ msgmore(long n) if (pn > p_report) { - if (pn == 1) - { - if (n > 0) - vim_strncpy(msg_buf, (char_u *)_("1 more line"), - MSG_BUF_LEN - 1); - else - vim_strncpy(msg_buf, (char_u *)_("1 line less"), - MSG_BUF_LEN - 1); - } + if (n > 0) + vim_snprintf((char *)msg_buf, MSG_BUF_LEN, + NGETTEXT("%ld more line", "%ld more lines", pn), pn); else - { - if (n > 0) - vim_snprintf((char *)msg_buf, MSG_BUF_LEN, - _("%ld more lines"), pn); - else - vim_snprintf((char *)msg_buf, MSG_BUF_LEN, - _("%ld fewer lines"), pn); - } + vim_snprintf((char *)msg_buf, MSG_BUF_LEN, + NGETTEXT("%ld line less", "%ld fewer lines", pn), pn); if (got_int) vim_strcat(msg_buf, (char_u *)_(" (Interrupted)"), MSG_BUF_LEN); if (msg(msg_buf)) |