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)
da6e8919e7
This commit is contained in:
James McCoy
2021-10-23 15:10:28 -04:00
parent 7f4b7320f6
commit 684640f551
7 changed files with 73 additions and 122 deletions

View File

@@ -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;