diff options
author | James McCoy <jamessan@jamessan.com> | 2021-10-23 15:10:28 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2021-11-01 06:40:00 -0400 |
commit | 684640f5518a483cf2bc48efc8f68449379cef69 (patch) | |
tree | a57866f1d9ca7d05e1a3436015d8aaa3c59438e8 /src/nvim/misc1.c | |
parent | 7f4b7320f63eee37841b9b7608495a3f6f9d2fb7 (diff) | |
download | rneovim-684640f5518a483cf2bc48efc8f68449379cef69.tar.gz rneovim-684640f5518a483cf2bc48efc8f68449379cef69.tar.bz2 rneovim-684640f5518a483cf2bc48efc8f68449379cef69.zip |
vim-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)
https://github.com/vim/vim/commit/da6e8919e75fa8f961d1b805e877c8a92e76dafb
Diffstat (limited to 'src/nvim/misc1.c')
-rw-r--r-- | src/nvim/misc1.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index f4f2690e47..561bcd4929 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -686,20 +686,14 @@ void msgmore(long n) } if (pn > p_report) { - if (pn == 1) { - if (n > 0) { - STRLCPY(msg_buf, _("1 more line"), MSG_BUF_LEN); - } else { - STRLCPY(msg_buf, _("1 line less"), MSG_BUF_LEN); - } + if (n > 0) { + vim_snprintf(msg_buf, MSG_BUF_LEN, + NGETTEXT("%ld more line", "%ld more lines", pn), + pn); } else { - if (n > 0) { - vim_snprintf(msg_buf, MSG_BUF_LEN, - _("%" PRId64 " more lines"), (int64_t)pn); - } else { - vim_snprintf(msg_buf, MSG_BUF_LEN, - _("%" PRId64 " fewer lines"), (int64_t)pn); - } + vim_snprintf(msg_buf, MSG_BUF_LEN, + NGETTEXT("%ld line less", "%ld fewer lines", pn), + pn); } if (got_int) { xstrlcat(msg_buf, _(" (Interrupted)"), MSG_BUF_LEN); |