# HG changeset patch # User Christian Brabandt # Date 1472069708 -7200 # Node ID 9560a2eb79687d8f1df7798344863654b3de312f # Parent dc765f42b3f1d20908663213d3bdfe878ac082fd commit https://github.com/vim/vim/commit/5b30291785e6b9be1a607504c14bd03c601b59a6 Author: Bram Moolenaar 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) diff --git a/src/channel.c b/src/channel.c --- 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; diff --git a/src/evalfunc.c b/src/evalfunc.c --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -7413,7 +7413,7 @@ f_matchadd(typval_T *argvars UNUSED, typ 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, /* 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 --- 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_hel 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 --- 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 --- 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 --- 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)