diff src/channel.c @ 9953:9560a2eb7968 v7.4.2250

commit https://github.com/vim/vim/commit/5b30291785e6b9be1a607504c14bd03c601b59a6 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 24 22:11:55 2016 +0200 patch 7.4.2250 Problem: Some error message cannot be translated. Solution: Enclose them in _() and N_(). (Dominique Pelle)
author Christian Brabandt <cb@256bit.org>
date Wed, 24 Aug 2016 22:15:08 +0200
parents 80ac9cf77c9b
children 176e34b0d678
line wrap: on
line diff
--- a/src/channel.c
+++ b/src/channel.c
@@ -702,7 +702,7 @@ channel_open(
     if ((host = gethostbyname(hostname)) == NULL)
     {
 	ch_error(channel, "in gethostbyname() in channel_open()");
-	PERROR("E901: gethostbyname() in channel_open()");
+	PERROR(_("E901: gethostbyname() in channel_open()"));
 	channel_free(channel);
 	return NULL;
     }
@@ -729,7 +729,7 @@ channel_open(
 	if (sd == -1)
 	{
 	    ch_error(channel, "in socket() in channel_open().");
-	    PERROR("E898: socket() in channel_open()");
+	    PERROR(_("E898: socket() in channel_open()"));
 	    channel_free(channel);
 	    return NULL;
 	}
@@ -2070,7 +2070,7 @@ channel_exe_cmd(channel_T *channel, int 
     {
 	ch_error(channel, "received command with non-string argument");
 	if (p_verbose > 2)
-	    EMSG("E903: received command with non-string argument");
+	    EMSG(_("E903: received command with non-string argument"));
 	return;
     }
     arg = argv[1].vval.v_string;
@@ -2129,13 +2129,13 @@ channel_exe_cmd(channel_T *channel, int 
 	{
 	    ch_error(channel, "last argument for expr/call must be a number");
 	    if (p_verbose > 2)
-		EMSG("E904: last argument for expr/call must be a number");
+		EMSG(_("E904: last argument for expr/call must be a number"));
 	}
 	else if (is_call && argv[2].v_type != VAR_LIST)
 	{
 	    ch_error(channel, "third argument for call must be a list");
 	    if (p_verbose > 2)
-		EMSG("E904: third argument for call must be a list");
+		EMSG(_("E904: third argument for call must be a list"));
 	}
 	else
 	{
@@ -2195,7 +2195,7 @@ channel_exe_cmd(channel_T *channel, int 
     else if (p_verbose > 2)
     {
 	ch_errors(channel, "Received unknown command: %s", (char *)cmd);
-	EMSG2("E905: received unknown command: %s", cmd);
+	EMSG2(_("E905: received unknown command: %s"), cmd);
     }
 }
 
@@ -3382,7 +3382,7 @@ channel_send(channel_T *channel, int par
 	if (!channel->ch_error && fun != NULL)
 	{
 	    ch_errors(channel, "%s(): write while not connected", fun);
-	    EMSG2("E630: %s(): write while not connected", fun);
+	    EMSG2(_("E630: %s(): write while not connected"), fun);
 	}
 	channel->ch_error = TRUE;
 	return FAIL;
@@ -3407,7 +3407,7 @@ channel_send(channel_T *channel, int par
 	if (!channel->ch_error && fun != NULL)
 	{
 	    ch_errors(channel, "%s(): write failed", fun);
-	    EMSG2("E631: %s(): write failed", fun);
+	    EMSG2(_("E631: %s(): write failed"), fun);
 	}
 	channel->ch_error = TRUE;
 	return FAIL;