diff src/misc1.c @ 14585:c8f07e8b273e v8.1.0306

patch 8.1.0306: plural messages are not translated properly commit https://github.com/vim/vim/commit/da6e8919e75fa8f961d1b805e877c8a92e76dafb Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 21 15:12:14 2018 +0200 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)
author Christian Brabandt <cb@256bit.org>
date Tue, 21 Aug 2018 15:15:06 +0200
parents 0a69e6e708f9
children 100a44722322
line wrap: on
line diff
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -3802,24 +3802,12 @@ msgmore(long n)
 
     if (pn > p_report)
     {
-	if (pn == 1)
-	{
-	    if (n > 0)
-		vim_strncpy(msg_buf, (char_u *)_("1 more line"),
-							     MSG_BUF_LEN - 1);
-	    else
-		vim_strncpy(msg_buf, (char_u *)_("1 line less"),
-							     MSG_BUF_LEN - 1);
-	}
+	if (n > 0)
+	    vim_snprintf((char *)msg_buf, MSG_BUF_LEN,
+		    NGETTEXT("%ld more line", "%ld more lines", pn), pn);
 	else
-	{
-	    if (n > 0)
-		vim_snprintf((char *)msg_buf, MSG_BUF_LEN,
-						     _("%ld more lines"), pn);
-	    else
-		vim_snprintf((char *)msg_buf, MSG_BUF_LEN,
-						    _("%ld fewer lines"), pn);
-	}
+	    vim_snprintf((char *)msg_buf, MSG_BUF_LEN,
+		    NGETTEXT("%ld line less", "%ld fewer lines", pn), pn);
 	if (got_int)
 	    vim_strcat(msg_buf, (char_u *)_(" (Interrupted)"), MSG_BUF_LEN);
 	if (msg(msg_buf))