]> granicus.if.org Git - vim/commitdiff
patch 7.4.2250 v7.4.2250
authorBram Moolenaar <Bram@vim.org>
Wed, 24 Aug 2016 20:11:55 +0000 (22:11 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 24 Aug 2016 20:11:55 +0000 (22:11 +0200)
Problem:    Some error message cannot be translated.
Solution:   Enclose them in _() and N_(). (Dominique Pelle)

src/channel.c
src/evalfunc.c
src/ex_cmds.c
src/spell.c
src/version.c
src/window.c

index 5ee05e3332a3c39b49ac37a604f64bfc963e022e..4435248853a6665422149ee44f88d7a4d69ea8cb 100644 (file)
@@ -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;
index 599a3d6db1f1c07f88cf2489c32493113eadc66b..1b54b7ead25796196bc60a10ebeb9dbbcac79716 100644 (file)
@@ -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;
     }
 
index 9e6a72debed1ca4f411556ac9ae227686d75eaaa..d690f39a2b7faccfb41f6152e92d1df779796f40 100644 (file)
@@ -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;
     }
 
index 8d8689ba2a98dfa597b855b9df3f98702fc6bba4..5fd38b3c638f2dd81932ca866bfb1961060a692f 100644 (file)
@@ -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
index b10a70cec8c35d58ad25a45b83f6f592701f416c..b3237715dd6be5b6c76d8e5ec713226007fe308c 100644 (file)
@@ -763,6 +763,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2250,
 /**/
     2249,
 /**/
index b015d1d01f3b42b5cb2c244399e07079ab94f139..65d8b36ea99289e95e3c47a4f62dac823e27c5f0 100644 (file)
@@ -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)