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/fileio.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/fileio.c')
-rw-r--r-- | src/nvim/fileio.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index f7e248dce9..cde6a55199 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -3849,20 +3849,16 @@ void msg_add_lines(int insert_space, long lnum, off_T nchars) *p++ = ' '; } if (shortmess(SHM_LINES)) { - sprintf((char *)p, "%" PRId64 "L, %" PRId64 "C", - (int64_t)lnum, (int64_t)nchars); + vim_snprintf((char *)p, IOSIZE - (p - IObuff), "%" PRId64 "L, %" PRId64 "C", + (int64_t)lnum, (int64_t)nchars); } else { - if (lnum == 1) { - STRCPY(p, _("1 line, ")); - } else { - sprintf((char *)p, _("%" PRId64 " lines, "), (int64_t)lnum); - } + vim_snprintf((char *)p, IOSIZE - (p - IObuff), + NGETTEXT("%" PRId64 " line, ", "%" PRId64 " lines, ", lnum), + (int64_t)lnum); p += STRLEN(p); - if (nchars == 1) { - STRCPY(p, _("1 character")); - } else { - sprintf((char *)p, _("%" PRId64 " characters"), (int64_t)nchars); - } + vim_snprintf((char *)p, IOSIZE - (p - IObuff), + NGETTEXT("%" PRId64 " character", "%" PRId64 " characters", nchars), + (int64_t)nchars); } } |