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)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 14ec213..ccd96b1 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -5749,22 +5749,16 @@
{
char_u buff[DIALOG_MSG_SIZE];
- if (n == 1)
- vim_strncpy(buff,
- (char_u *)_("1 more file to edit. Quit anyway?"),
- DIALOG_MSG_SIZE - 1);
- 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?", n), n);
if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 1) == VIM_YES)
return OK;
return FAIL;
}
#endif
- if (n == 1)
- EMSG(_("E173: 1 more file to edit"));
- else
- EMSGN(_("E173: %ld more files to edit"), n);
+ EMSGN(NGETTEXT("E173: %ld more file to edit",
+ "E173: %ld more files to edit", n), n);
quitmore = 2; /* next try to quit is allowed */
}
return FAIL;