Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
9952:dc765f42b3f1 | 9953:9560a2eb7968 |
---|---|
700 server.sin_family = AF_INET; | 700 server.sin_family = AF_INET; |
701 server.sin_port = htons(port); | 701 server.sin_port = htons(port); |
702 if ((host = gethostbyname(hostname)) == NULL) | 702 if ((host = gethostbyname(hostname)) == NULL) |
703 { | 703 { |
704 ch_error(channel, "in gethostbyname() in channel_open()"); | 704 ch_error(channel, "in gethostbyname() in channel_open()"); |
705 PERROR("E901: gethostbyname() in channel_open()"); | 705 PERROR(_("E901: gethostbyname() in channel_open()")); |
706 channel_free(channel); | 706 channel_free(channel); |
707 return NULL; | 707 return NULL; |
708 } | 708 } |
709 memcpy((char *)&server.sin_addr, host->h_addr, host->h_length); | 709 memcpy((char *)&server.sin_addr, host->h_addr, host->h_length); |
710 | 710 |
727 sock_close(sd); | 727 sock_close(sd); |
728 sd = socket(AF_INET, SOCK_STREAM, 0); | 728 sd = socket(AF_INET, SOCK_STREAM, 0); |
729 if (sd == -1) | 729 if (sd == -1) |
730 { | 730 { |
731 ch_error(channel, "in socket() in channel_open()."); | 731 ch_error(channel, "in socket() in channel_open()."); |
732 PERROR("E898: socket() in channel_open()"); | 732 PERROR(_("E898: socket() in channel_open()")); |
733 channel_free(channel); | 733 channel_free(channel); |
734 return NULL; | 734 return NULL; |
735 } | 735 } |
736 | 736 |
737 if (waittime >= 0) | 737 if (waittime >= 0) |
2068 | 2068 |
2069 if (argv[1].v_type != VAR_STRING) | 2069 if (argv[1].v_type != VAR_STRING) |
2070 { | 2070 { |
2071 ch_error(channel, "received command with non-string argument"); | 2071 ch_error(channel, "received command with non-string argument"); |
2072 if (p_verbose > 2) | 2072 if (p_verbose > 2) |
2073 EMSG("E903: received command with non-string argument"); | 2073 EMSG(_("E903: received command with non-string argument")); |
2074 return; | 2074 return; |
2075 } | 2075 } |
2076 arg = argv[1].vval.v_string; | 2076 arg = argv[1].vval.v_string; |
2077 if (arg == NULL) | 2077 if (arg == NULL) |
2078 arg = (char_u *)""; | 2078 arg = (char_u *)""; |
2127 if (argv[id_idx].v_type != VAR_UNKNOWN | 2127 if (argv[id_idx].v_type != VAR_UNKNOWN |
2128 && argv[id_idx].v_type != VAR_NUMBER) | 2128 && argv[id_idx].v_type != VAR_NUMBER) |
2129 { | 2129 { |
2130 ch_error(channel, "last argument for expr/call must be a number"); | 2130 ch_error(channel, "last argument for expr/call must be a number"); |
2131 if (p_verbose > 2) | 2131 if (p_verbose > 2) |
2132 EMSG("E904: last argument for expr/call must be a number"); | 2132 EMSG(_("E904: last argument for expr/call must be a number")); |
2133 } | 2133 } |
2134 else if (is_call && argv[2].v_type != VAR_LIST) | 2134 else if (is_call && argv[2].v_type != VAR_LIST) |
2135 { | 2135 { |
2136 ch_error(channel, "third argument for call must be a list"); | 2136 ch_error(channel, "third argument for call must be a list"); |
2137 if (p_verbose > 2) | 2137 if (p_verbose > 2) |
2138 EMSG("E904: third argument for call must be a list"); | 2138 EMSG(_("E904: third argument for call must be a list")); |
2139 } | 2139 } |
2140 else | 2140 else |
2141 { | 2141 { |
2142 typval_T *tv; | 2142 typval_T *tv; |
2143 typval_T res_tv; | 2143 typval_T res_tv; |
2193 } | 2193 } |
2194 } | 2194 } |
2195 else if (p_verbose > 2) | 2195 else if (p_verbose > 2) |
2196 { | 2196 { |
2197 ch_errors(channel, "Received unknown command: %s", (char *)cmd); | 2197 ch_errors(channel, "Received unknown command: %s", (char *)cmd); |
2198 EMSG2("E905: received unknown command: %s", cmd); | 2198 EMSG2(_("E905: received unknown command: %s"), cmd); |
2199 } | 2199 } |
2200 } | 2200 } |
2201 | 2201 |
2202 /* | 2202 /* |
2203 * Invoke the callback at "cbhead". | 2203 * Invoke the callback at "cbhead". |
3380 if (fd == INVALID_FD) | 3380 if (fd == INVALID_FD) |
3381 { | 3381 { |
3382 if (!channel->ch_error && fun != NULL) | 3382 if (!channel->ch_error && fun != NULL) |
3383 { | 3383 { |
3384 ch_errors(channel, "%s(): write while not connected", fun); | 3384 ch_errors(channel, "%s(): write while not connected", fun); |
3385 EMSG2("E630: %s(): write while not connected", fun); | 3385 EMSG2(_("E630: %s(): write while not connected"), fun); |
3386 } | 3386 } |
3387 channel->ch_error = TRUE; | 3387 channel->ch_error = TRUE; |
3388 return FAIL; | 3388 return FAIL; |
3389 } | 3389 } |
3390 | 3390 |
3405 if (res != len) | 3405 if (res != len) |
3406 { | 3406 { |
3407 if (!channel->ch_error && fun != NULL) | 3407 if (!channel->ch_error && fun != NULL) |
3408 { | 3408 { |
3409 ch_errors(channel, "%s(): write failed", fun); | 3409 ch_errors(channel, "%s(): write failed", fun); |
3410 EMSG2("E631: %s(): write failed", fun); | 3410 EMSG2(_("E631: %s(): write failed"), fun); |
3411 } | 3411 } |
3412 channel->ch_error = TRUE; | 3412 channel->ch_error = TRUE; |
3413 return FAIL; | 3413 return FAIL; |
3414 } | 3414 } |
3415 | 3415 |