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/ex_docmd.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/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index f932bbae5f..9412bff2e6 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -5116,23 +5116,16 @@ static int check_more(int message, bool forceit) if ((p_confirm || cmdmod.confirm) && curbuf->b_fname != NULL) { char_u buff[DIALOG_MSG_SIZE]; - if (n == 1) { - STRLCPY(buff, _("1 more file to edit. Quit anyway?"), - DIALOG_MSG_SIZE); - } else { - vim_snprintf((char *)buff, DIALOG_MSG_SIZE, - _("%d more files to edit. Quit anyway?"), n); - } + vim_snprintf((char *)buff, DIALOG_MSG_SIZE, + NGETTEXT("%d more file to edit. Quit anyway?", + "%d more files to edit. Quit anyway?", (unsigned long)n), n); if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 1) == VIM_YES) { return OK; } return FAIL; } - if (n == 1) { - EMSG(_("E173: 1 more file to edit")); - } else { - EMSGN(_("E173: %" PRId64 " more files to edit"), n); - } + EMSGN(NGETTEXT("E173: %d more file to edit", + "E173: %d more files to edit", (unsigned long)n), n); quitmore = 2; // next try to quit is allowed } return FAIL; |