summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-08-24 22:11:55 +0200
committerBram Moolenaar <Bram@vim.org>2016-08-24 22:11:55 +0200
commit5b30291785e6b9be1a607504c14bd03c601b59a6 (patch)
tree86e6c5c0cf7090f485392cfecb80b43602a8b0cd
parentba2099034f92a2814494f37bddb0c57d034401b4 (diff)
patch 7.4.2250v7.4.2250
Problem: Some error message cannot be translated. Solution: Enclose them in _() and N_(). (Dominique Pelle)
-rw-r--r--src/channel.c16
-rw-r--r--src/evalfunc.c4
-rw-r--r--src/ex_cmds.c4
-rw-r--r--src/spell.c2
-rw-r--r--src/version.c2
-rw-r--r--src/window.c8
6 files changed, 19 insertions, 17 deletions
diff --git a/src/channel.c b/src/channel.c
index 5ee05e3332..4435248853 100644
--- 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 part, typval_T *argv)
{
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 part, typval_T *argv)
{
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 part, typval_T *argv)
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 part, char_u *buf, int len, char *fun)
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 part, char_u *buf, int len, char *fun)
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;
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 599a3d6db1..1b54b7ead2 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -7413,7 +7413,7 @@ f_matchadd(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
return;
if (id >= 1 && id <= 3)
{
- EMSGN("E798: ID is reserved for \":match\": %ld", id);
+ EMSGN(_("E798: ID is reserved for \":match\": %ld"), id);
return;
}
@@ -7478,7 +7478,7 @@ f_matchaddpos(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
/* id == 3 is ok because matchaddpos() is supposed to substitute :3match */
if (id == 1 || id == 2)
{
- EMSGN("E798: ID is reserved for \":match\": %ld", id);
+ EMSGN(_("E798: ID is reserved for \":match\": %ld"), id);
return;
}
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 9e6a72debe..d690f39a2b 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -7088,7 +7088,7 @@ helptags_one(
|| filecount == 0)
{
if (!got_int)
- EMSG2("E151: No match: %s", NameBuff);
+ EMSG2(_("E151: No match: %s"), NameBuff);
return;
}
@@ -7331,7 +7331,7 @@ do_helptags(char_u *dirname, int add_help_tags)
EW_FILE|EW_SILENT) == FAIL
|| filecount == 0)
{
- EMSG2("E151: No match: %s", NameBuff);
+ EMSG2(_("E151: No match: %s"), NameBuff);
return;
}
diff --git a/src/spell.c b/src/spell.c
index 8d8689ba2a..5fd38b3c63 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -2470,7 +2470,7 @@ did_set_spelllang(win_T *wp)
* destroying the buffer we are using... */
if (!bufref_valid(&bufref))
{
- ret_msg = (char_u *)"E797: SpellFileMissing autocommand deleted buffer";
+ ret_msg = (char_u *)N_("E797: SpellFileMissing autocommand deleted buffer");
goto theend;
}
#endif
diff --git a/src/version.c b/src/version.c
index b10a70cec8..b3237715dd 100644
--- a/src/version.c
+++ b/src/version.c
@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2250,
+/**/
2249,
/**/
2248,
diff --git a/src/window.c b/src/window.c
index b015d1d01f..65d8b36ea9 100644
--- a/src/window.c
+++ b/src/window.c
@@ -6751,7 +6751,7 @@ match_add(
return -1;
if (id < -1 || id == 0)
{
- EMSGN("E799: Invalid ID: %ld (must be greater than or equal to 1)", id);
+ EMSGN(_("E799: Invalid ID: %ld (must be greater than or equal to 1)"), id);
return -1;
}
if (id != -1)
@@ -6761,7 +6761,7 @@ match_add(
{
if (cur->id == id)
{
- EMSGN("E801: ID already taken: %ld", id);
+ EMSGN(_("E801: ID already taken: %ld"), id);
return -1;
}
cur = cur->next;
@@ -6938,7 +6938,7 @@ match_delete(win_T *wp, int id, int perr)
if (id < 1)
{
if (perr == TRUE)
- EMSGN("E802: Invalid ID: %ld (must be greater than or equal to 1)",
+ EMSGN(_("E802: Invalid ID: %ld (must be greater than or equal to 1)"),
id);
return -1;
}
@@ -6950,7 +6950,7 @@ match_delete(win_T *wp, int id, int perr)
if (cur == NULL)
{
if (perr == TRUE)
- EMSGN("E803: ID not found: %ld", id);
+ EMSGN(_("E803: ID not found: %ld"), id);
return -1;
}
if (cur == prev)