To: vim_dev@googlegroups.com Subject: Patch 7.4.2250 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2250 Problem: Some error message cannot be translated. Solution: Enclose them in _() and N_(). (Dominique Pelle) Files: src/channel.c, src/evalfunc.c, src/ex_cmds.c, src/spell.c, src/window.c *** ../vim-7.4.2249/src/channel.c 2016-08-01 15:40:24.179878441 +0200 --- src/channel.c 2016-08-24 22:10:07.810886548 +0200 *************** *** 702,708 **** if ((host = gethostbyname(hostname)) == NULL) { ch_error(channel, "in gethostbyname() in channel_open()"); ! PERROR("E901: gethostbyname() in channel_open()"); channel_free(channel); return NULL; } --- 702,708 ---- if ((host = gethostbyname(hostname)) == NULL) { ch_error(channel, "in gethostbyname() in channel_open()"); ! PERROR(_("E901: gethostbyname() in channel_open()")); channel_free(channel); return NULL; } *************** *** 729,735 **** if (sd == -1) { ch_error(channel, "in socket() in channel_open()."); ! PERROR("E898: socket() in channel_open()"); channel_free(channel); return NULL; } --- 729,735 ---- if (sd == -1) { ch_error(channel, "in socket() in channel_open()."); ! PERROR(_("E898: socket() in channel_open()")); channel_free(channel); return NULL; } *************** *** 2070,2076 **** { ch_error(channel, "received command with non-string argument"); if (p_verbose > 2) ! EMSG("E903: received command with non-string argument"); return; } arg = argv[1].vval.v_string; --- 2070,2076 ---- { ch_error(channel, "received command with non-string argument"); if (p_verbose > 2) ! EMSG(_("E903: received command with non-string argument")); return; } arg = argv[1].vval.v_string; *************** *** 2129,2141 **** { 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"); } 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"); } else { --- 2129,2141 ---- { 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")); } 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")); } else { *************** *** 2195,2201 **** else if (p_verbose > 2) { ch_errors(channel, "Received unknown command: %s", (char *)cmd); ! EMSG2("E905: received unknown command: %s", cmd); } } --- 2195,2201 ---- else if (p_verbose > 2) { ch_errors(channel, "Received unknown command: %s", (char *)cmd); ! EMSG2(_("E905: received unknown command: %s"), cmd); } } *************** *** 3382,3388 **** if (!channel->ch_error && fun != NULL) { ch_errors(channel, "%s(): write while not connected", fun); ! EMSG2("E630: %s(): write while not connected", fun); } channel->ch_error = TRUE; return FAIL; --- 3382,3388 ---- if (!channel->ch_error && fun != NULL) { ch_errors(channel, "%s(): write while not connected", fun); ! EMSG2(_("E630: %s(): write while not connected"), fun); } channel->ch_error = TRUE; return FAIL; *************** *** 3407,3413 **** if (!channel->ch_error && fun != NULL) { ch_errors(channel, "%s(): write failed", fun); ! EMSG2("E631: %s(): write failed", fun); } channel->ch_error = TRUE; return FAIL; --- 3407,3413 ---- if (!channel->ch_error && fun != NULL) { ch_errors(channel, "%s(): write failed", fun); ! EMSG2(_("E631: %s(): write failed"), fun); } channel->ch_error = TRUE; return FAIL; *** ../vim-7.4.2249/src/evalfunc.c 2016-08-21 15:26:50.989702872 +0200 --- src/evalfunc.c 2016-08-24 22:08:23.480497324 +0200 *************** *** 7413,7419 **** return; if (id >= 1 && id <= 3) { ! EMSGN("E798: ID is reserved for \":match\": %ld", id); return; } --- 7413,7419 ---- return; if (id >= 1 && id <= 3) { ! EMSGN(_("E798: ID is reserved for \":match\": %ld"), id); return; } *************** *** 7478,7484 **** /* 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); return; } --- 7478,7484 ---- /* 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); return; } *** ../vim-7.4.2249/src/ex_cmds.c 2016-08-24 00:39:01.421663470 +0200 --- src/ex_cmds.c 2016-08-24 22:08:23.480497324 +0200 *************** *** 7088,7094 **** || filecount == 0) { if (!got_int) ! EMSG2("E151: No match: %s", NameBuff); return; } --- 7088,7094 ---- || filecount == 0) { if (!got_int) ! EMSG2(_("E151: No match: %s"), NameBuff); return; } *************** *** 7331,7337 **** EW_FILE|EW_SILENT) == FAIL || filecount == 0) { ! EMSG2("E151: No match: %s", NameBuff); return; } --- 7331,7337 ---- EW_FILE|EW_SILENT) == FAIL || filecount == 0) { ! EMSG2(_("E151: No match: %s"), NameBuff); return; } *** ../vim-7.4.2249/src/spell.c 2016-08-17 21:31:54.441870400 +0200 --- src/spell.c 2016-08-24 22:08:23.484497266 +0200 *************** *** 2470,2476 **** * destroying the buffer we are using... */ if (!bufref_valid(&bufref)) { ! ret_msg = (char_u *)"E797: SpellFileMissing autocommand deleted buffer"; goto theend; } #endif --- 2470,2476 ---- * destroying the buffer we are using... */ if (!bufref_valid(&bufref)) { ! ret_msg = (char_u *)N_("E797: SpellFileMissing autocommand deleted buffer"); goto theend; } #endif *** ../vim-7.4.2249/src/window.c 2016-08-14 19:08:41.834022311 +0200 --- src/window.c 2016-08-24 22:08:23.484497266 +0200 *************** *** 6751,6757 **** return -1; if (id < -1 || id == 0) { ! EMSGN("E799: Invalid ID: %ld (must be greater than or equal to 1)", id); return -1; } if (id != -1) --- 6751,6757 ---- return -1; if (id < -1 || id == 0) { ! EMSGN(_("E799: Invalid ID: %ld (must be greater than or equal to 1)"), id); return -1; } if (id != -1) *************** *** 6761,6767 **** { if (cur->id == id) { ! EMSGN("E801: ID already taken: %ld", id); return -1; } cur = cur->next; --- 6761,6767 ---- { if (cur->id == id) { ! EMSGN(_("E801: ID already taken: %ld"), id); return -1; } cur = cur->next; *************** *** 6938,6944 **** if (id < 1) { if (perr == TRUE) ! EMSGN("E802: Invalid ID: %ld (must be greater than or equal to 1)", id); return -1; } --- 6938,6944 ---- if (id < 1) { if (perr == TRUE) ! EMSGN(_("E802: Invalid ID: %ld (must be greater than or equal to 1)"), id); return -1; } *************** *** 6950,6956 **** if (cur == NULL) { if (perr == TRUE) ! EMSGN("E803: ID not found: %ld", id); return -1; } if (cur == prev) --- 6950,6956 ---- if (cur == NULL) { if (perr == TRUE) ! EMSGN(_("E803: ID not found: %ld"), id); return -1; } if (cur == prev) *** ../vim-7.4.2249/src/version.c 2016-08-24 22:06:34.930093873 +0200 --- src/version.c 2016-08-24 22:09:51.367143281 +0200 *************** *** 765,766 **** --- 765,768 ---- { /* Add new patch number below this line */ + /**/ + 2250, /**/ -- hundred-and-one symptoms of being an internet addict: 67. Your hard drive crashes. You haven't logged in for two hours. You start to twitch. You pick up the phone and manually dial your ISP's access number. You try to hum to communicate with the modem. You succeed. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///