diff options
-rw-r--r-- | src/arglist.c | 4 | ||||
-rw-r--r-- | src/buffer.c | 4 | ||||
-rw-r--r-- | src/channel.c | 4 | ||||
-rw-r--r-- | src/errors.h | 38 | ||||
-rw-r--r-- | src/eval.c | 16 | ||||
-rw-r--r-- | src/evalfunc.c | 2 | ||||
-rw-r--r-- | src/evalvars.c | 8 | ||||
-rw-r--r-- | src/evalwindow.c | 6 | ||||
-rw-r--r-- | src/ex_cmds.c | 12 | ||||
-rw-r--r-- | src/ex_docmd.c | 57 | ||||
-rw-r--r-- | src/ex_getln.c | 2 | ||||
-rw-r--r-- | src/filepath.c | 4 | ||||
-rw-r--r-- | src/fold.c | 2 | ||||
-rw-r--r-- | src/getchar.c | 2 | ||||
-rw-r--r-- | src/globals.h | 20 | ||||
-rw-r--r-- | src/indent.c | 2 | ||||
-rw-r--r-- | src/list.c | 2 | ||||
-rw-r--r-- | src/map.c | 2 | ||||
-rw-r--r-- | src/mark.c | 4 | ||||
-rw-r--r-- | src/normal.c | 6 | ||||
-rw-r--r-- | src/ops.c | 2 | ||||
-rw-r--r-- | src/optionstr.c | 4 | ||||
-rw-r--r-- | src/popupwin.c | 2 | ||||
-rw-r--r-- | src/quickfix.c | 6 | ||||
-rw-r--r-- | src/spellfile.c | 4 | ||||
-rw-r--r-- | src/textprop.c | 8 | ||||
-rw-r--r-- | src/typval.c | 2 | ||||
-rw-r--r-- | src/undo.c | 2 | ||||
-rw-r--r-- | src/userfunc.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim9compile.c | 4 | ||||
-rw-r--r-- | src/window.c | 4 |
32 files changed, 130 insertions, 109 deletions
diff --git a/src/arglist.c b/src/arglist.c index 79628fda62..863b1cc6a9 100644 --- a/src/arglist.c +++ b/src/arglist.c @@ -832,7 +832,7 @@ ex_argdelete(exarg_T *eap) { // Don't give an error for ":%argdel" if the list is empty. if (eap->line1 != 1 || eap->line2 != 0) - emsg(_(e_invrange)); + emsg(_(e_invalid_range)); } else { @@ -920,7 +920,7 @@ do_arg_all( #ifdef FEAT_CMDWIN if (cmdwin_type != 0) { - emsg(_(e_cmdwin)); + emsg(_(e_invalid_in_cmdline_window)); return; } #endif diff --git a/src/buffer.c b/src/buffer.c index d038e3c922..59f51aaf7a 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2407,7 +2407,7 @@ buflist_getfile( if (buf == NULL) { if ((options & GETF_ALT) && n == 0) - emsg(_(e_noalt)); + emsg(_(e_no_alternate_file)); else semsg(_("E92: Buffer %d not found"), n); return FAIL; @@ -3516,7 +3516,7 @@ getaltfname( if (buflist_name_nr(0, &fname, &dummy) == FAIL) { if (errmsg) - emsg(_(e_noalt)); + emsg(_(e_no_alternate_file)); return NULL; } return fname; diff --git a/src/channel.c b/src/channel.c index 2a93e2578c..5818dc399b 100644 --- a/src/channel.c +++ b/src/channel.c @@ -1232,7 +1232,7 @@ channel_set_options(channel_T *channel, jobopt_T *opt) if (!buf->b_p_ma && !channel->ch_part[PART_OUT].ch_nomodifiable) { - emsg(_(e_modifiable)); + emsg(_(e_cannot_make_changes_modifiable_is_off)); } else { @@ -1278,7 +1278,7 @@ channel_set_options(channel_T *channel, jobopt_T *opt) !opt->jo_modifiable[PART_ERR]; if (!buf->b_p_ma && !channel->ch_part[PART_ERR].ch_nomodifiable) { - emsg(_(e_modifiable)); + emsg(_(e_cannot_make_changes_modifiable_is_off)); } else { diff --git a/src/errors.h b/src/errors.h index 00894ef21c..f2624dfc1d 100644 --- a/src/errors.h +++ b/src/errors.h @@ -10,6 +10,44 @@ * Definition of error messages, sorted on error number. */ +EXTERN char e_backslash_should_be_followed_by[] + INIT(= N_("E10: \\ should be followed by /, ? or &")); +#ifdef FEAT_CMDWIN +EXTERN char e_invalid_in_cmdline_window[] + INIT(= N_("E11: Invalid in command-line window; <CR> executes, CTRL-C quits")); +#endif +EXTERN char e_command_not_allowed_from_vimrc_in_current_dir_or_tag_search[] + INIT(= N_("E12: Command not allowed from exrc/vimrc in current dir or tag search")); +EXTERN char e_file_exists[] + INIT(= N_("E13: File exists (add ! to override)")); +#ifdef FEAT_EVAL +EXTERN char e_invalid_expression_str[] + INIT(= N_("E15: Invalid expression: \"%s\"")); +#endif +EXTERN char e_invalid_range[] + INIT(= N_("E16: Invalid range")); +#if defined(UNIX) || defined(FEAT_SYN_HL) || defined(FEAT_SPELL) +EXTERN char e_src_is_directory[] + INIT(= N_("E17: \"%s\" is a directory")); +#endif +#ifdef FEAT_EVAL +EXTERN char e_unexpected_characters_in_let[] + INIT(= N_("E18: Unexpected characters in :let")); +EXTERN char e_unexpected_characters_in_assignment[] + INIT(= N_("E18: Unexpected characters in assignment")); +#endif +EXTERN char e_mark_has_invalid_line_number[] + INIT(= N_("E19: Mark has invalid line number")); +EXTERN char e_mark_not_set[] + INIT(= N_("E20: Mark not set")); +EXTERN char e_cannot_make_changes_modifiable_is_off[] + INIT(= N_("E21: Cannot make changes, 'modifiable' is off")); +EXTERN char e_scripts_nested_too_deep[] + INIT(= N_("E22: Scripts nested too deep")); +EXTERN char e_no_alternate_file[] + INIT(= N_("E23: No alternate file")); +EXTERN char e_no_such_abbreviation[] + INIT(= N_("E24: No such abbreviation")); #ifdef FEAT_EVAL EXTERN char e_undefined_variable_str[] INIT(= N_("E121: Undefined variable: %s")); diff --git a/src/eval.c b/src/eval.c index 7990c23f00..f57001647c 100644 --- a/src/eval.c +++ b/src/eval.c @@ -216,7 +216,7 @@ eval1_emsg(char_u **arg, typval_T *rettv, exarg_T *eap) // Also check called_emsg for when using assert_fails(). if (!aborting() && did_emsg == did_emsg_before && called_emsg == called_emsg_before) - semsg(_(e_invexpr2), start); + semsg(_(e_invalid_expression_str), start); } clear_evalarg(&evalarg, eap); return ret; @@ -297,7 +297,7 @@ eval_expr_typval(typval_T *expr, typval_T *argv, int argc, typval_T *rettv) if (*skipwhite(s) != NUL) // check for trailing chars after expr { clear_tv(rettv); - semsg(_(e_invexpr2), s); + semsg(_(e_invalid_expression_str), s); return FAIL; } } @@ -2268,7 +2268,7 @@ eval0( if (end_error) semsg(_(e_trailing_arg), p); else - semsg(_(e_invexpr2), arg); + semsg(_(e_invalid_expression_str), arg); } // Some of the expression may not have been consumed. Do not check for @@ -2758,7 +2758,7 @@ eval4(char_u **arg, typval_T *rettv, evalarg_T *evalarg) if (vim9script && type_is && (p[len] == '?' || p[len] == '#')) { - semsg(_(e_invexpr2), p); + semsg(_(e_invalid_expression_str), p); clear_tv(rettv); return FAIL; } @@ -3367,7 +3367,7 @@ eval_leader(char_u **arg, int vim9) // ++, --, -+ and +- are not accepted in Vim9 script if (vim9 && (*p == '-' || *p == '+') && (*n == '-' || *n == '+')) { - semsg(_(e_invexpr2), s); + semsg(_(e_invalid_expression_str), s); return FAIL; } p = n; @@ -3441,7 +3441,7 @@ eval7( #endif )) { - semsg(_(e_invexpr2), *arg); + semsg(_(e_invalid_expression_str), *arg); ++*arg; return FAIL; } @@ -5607,7 +5607,7 @@ get_name_len( // Only give an error when there is something, otherwise it will be // reported at a higher level. if (len == 0 && verbose && **arg != NUL) - semsg(_(e_invexpr2), *arg); + semsg(_(e_invalid_expression_str), *arg); return len; } @@ -6153,7 +6153,7 @@ ex_echo(exarg_T *eap) */ if (!aborting() && did_emsg == did_emsg_before && called_emsg == called_emsg_before) - semsg(_(e_invexpr2), arg_start); + semsg(_(e_invalid_expression_str), arg_start); need_clr_eos = FALSE; break; } diff --git a/src/evalfunc.c b/src/evalfunc.c index d3b2cde657..6c467d8ae5 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -2923,7 +2923,7 @@ f_eval(typval_T *argvars, typval_T *rettv) if (s == NULL || eval1(&s, rettv, &EVALARG_EVALUATE) == FAIL) { if (p != NULL && !aborting()) - semsg(_(e_invexpr2), p); + semsg(_(e_invalid_expression_str), p); need_clr_eos = FALSE; rettv->v_type = VAR_NUMBER; rettv->vval.v_number = 0; diff --git a/src/evalvars.c b/src/evalvars.c index dc66eb6919..1b3d1f6b1f 100644 --- a/src/evalvars.c +++ b/src/evalvars.c @@ -1334,7 +1334,7 @@ ex_let_one( semsg(_(e_letwrong), op); else if (endchars != NULL && vim_strchr(endchars, *skipwhite(arg)) == NULL) - emsg(_(e_letunexp)); + emsg(_(e_unexpected_characters_in_let)); else if (!check_secure()) { c1 = name[len]; @@ -1379,7 +1379,7 @@ ex_let_one( p = find_option_end(&arg, &opt_flags); if (p == NULL || (endchars != NULL && vim_strchr(endchars, *skipwhite(p)) == NULL)) - emsg(_(e_letunexp)); + emsg(_(e_unexpected_characters_in_let)); else { long n = 0; @@ -1481,7 +1481,7 @@ ex_let_one( semsg(_(e_letwrong), op); else if (endchars != NULL && vim_strchr(endchars, *skipwhite(arg + 1)) == NULL) - emsg(_(e_letunexp)); + emsg(_(e_unexpected_characters_in_let)); else { char_u *ptofree = NULL; @@ -1520,7 +1520,7 @@ ex_let_one( { if (endchars != NULL && vim_strchr(endchars, *skipwhite(lv.ll_name_end)) == NULL) - emsg(_(e_letunexp)); + emsg(_(e_unexpected_characters_in_let)); else { set_var_lval(&lv, p, tv, copy, flags, op, var_idx); diff --git a/src/evalwindow.c b/src/evalwindow.c index b1b60d1533..0e1a202da3 100644 --- a/src/evalwindow.c +++ b/src/evalwindow.c @@ -363,7 +363,7 @@ get_winnr(tabpage_T *tp, typval_T *argvar) if (invalid_arg) { - semsg(_(e_invexpr2), arg); + semsg(_(e_invalid_expression_str), arg); nr = 0; } } @@ -636,7 +636,7 @@ f_tabpagenr(typval_T *argvars UNUSED, typval_T *rettv) nr = valid_tabpage(lastused_tabpage) ? tabpage_index(lastused_tabpage) : 0; else - semsg(_(e_invexpr2), arg); + semsg(_(e_invalid_expression_str), arg); } } else @@ -726,7 +726,7 @@ f_win_gotoid(typval_T *argvars, typval_T *rettv) #ifdef FEAT_CMDWIN if (cmdwin_type != 0) { - emsg(_(e_cmdwin)); + emsg(_(e_invalid_in_cmdline_window)); return; } #endif diff --git a/src/ex_cmds.c b/src/ex_cmds.c index d8c5a12c72..7e0bd64ab7 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -2120,7 +2120,7 @@ check_overwrite( // with UNIX it is possible to open a directory if (mch_isdir(ffname)) { - semsg(_(e_isadir2), ffname); + semsg(_(e_src_is_directory), ffname); return FAIL; } #endif @@ -2137,7 +2137,7 @@ check_overwrite( else #endif { - emsg(_(e_exists)); + emsg(_(e_file_exists)); return FAIL; } } @@ -3586,7 +3586,7 @@ check_secure(void) if (secure) { secure = 2; - emsg(_(e_curdir)); + emsg(_(e_command_not_allowed_from_vimrc_in_current_dir_or_tag_search)); return TRUE; } #ifdef HAVE_SANDBOX @@ -3729,7 +3729,7 @@ ex_substitute(exarg_T *eap) ++cmd; if (vim_strchr((char_u *)"/?&", *cmd) == NULL) { - emsg(_(e_backslash)); + emsg(_(e_backslash_should_be_followed_by)); return; } if (*cmd != '&') @@ -3944,7 +3944,7 @@ ex_substitute(exarg_T *eap) if (!subflags.do_count && !curbuf->b_p_ma) { // Substitution is not allowed in non-'modifiable' buffer - emsg(_(e_modifiable)); + emsg(_(e_cannot_make_changes_modifiable_is_off)); return; } @@ -4903,7 +4903,7 @@ ex_global(exarg_T *eap) ++cmd; if (vim_strchr((char_u *)"/?&", *cmd) == NULL) { - emsg(_(e_backslash)); + emsg(_(e_backslash_should_be_followed_by)); return; } if (*cmd == '&') diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 027d139da4..62d50b2d95 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -1997,7 +1997,7 @@ do_one_cmd( } if (ea.line2 < 0) - errormsg = _(e_invrange); + errormsg = _(e_invalid_range); else { if (ea.line2 == 0) @@ -2124,7 +2124,7 @@ do_one_cmd( if (!curbuf->b_p_ma && (ea.argt & EX_MODIFY)) { // Command not allowed in non-'modifiable' buffer - errormsg = _(e_modifiable); + errormsg = _(e_cannot_make_changes_modifiable_is_off); goto doend; } @@ -2134,7 +2134,7 @@ do_one_cmd( if (cmdwin_type != 0 && !(ea.argt & EX_CMDWIN)) { // Command not allowed in the command line window - errormsg = _(e_cmdwin); + errormsg = _(e_invalid_in_cmdline_window); goto doend; } #endif @@ -2996,7 +2996,7 @@ parse_command_modifiers( { if (tabnr < 0 || tabnr > LAST_TAB_NR) { - *errormsg = _(e_invrange); + *errormsg = _(e_invalid_range); return FAIL; } cmod->cmod_tab = tabnr + 1; @@ -3239,14 +3239,14 @@ parse_cmd_address(exarg_T *eap, char **errormsg, int silent) { // there is no Vim command which uses '%' and // ADDR_WINDOWS or ADDR_TABS - *errormsg = _(e_invrange); + *errormsg = _(e_invalid_range); return FAIL; } break; case ADDR_TABS_RELATIVE: case ADDR_UNSIGNED: case ADDR_QUICKFIX: - *errormsg = _(e_invrange); + *errormsg = _(e_invalid_range); return FAIL; case ADDR_ARGUMENTS: if (ARGCOUNT == 0) @@ -3278,7 +3278,7 @@ parse_cmd_address(exarg_T *eap, char **errormsg, int silent) // '*' - visual area if (eap->addr_type != ADDR_LINES) { - *errormsg = _(e_invrange); + *errormsg = _(e_invalid_range); return FAIL; } @@ -3923,7 +3923,7 @@ addr_error(cmd_addr_T addr_type) if (addr_type == ADDR_NONE) emsg(_(e_norange)); else - emsg(_(e_invrange)); + emsg(_(e_invalid_range)); } /* @@ -4210,7 +4210,7 @@ get_address( i = RE_SEARCH; else { - emsg(_(e_backslash)); + emsg(_(e_backslash_should_be_followed_by)); cmd = NULL; goto error; } @@ -4312,7 +4312,7 @@ get_address( if (addr_type == ADDR_TABS_RELATIVE) { - emsg(_(e_invrange)); + emsg(_(e_invalid_range)); cmd = NULL; goto error; } @@ -4460,7 +4460,7 @@ invalid_range(exarg_T *eap) if ( eap->line1 < 0 || eap->line2 < 0 || eap->line1 > eap->line2) - return _(e_invrange); + return _(e_invalid_range); if (eap->argt & EX_RANGE) { @@ -4472,46 +4472,46 @@ invalid_range(exarg_T *eap) + (eap->cmdidx == CMD_diffget) #endif ) - return _(e_invrange); + return _(e_invalid_range); break; case ADDR_ARGUMENTS: // add 1 if ARGCOUNT is 0 if (eap->line2 > ARGCOUNT + (!ARGCOUNT)) - return _(e_invrange); + return _(e_invalid_range); break; case ADDR_BUFFERS: // Only a boundary check, not whether the buffers actually // exist. if (eap->line1 < 1 || eap->line2 > get_highest_fnum()) - return _(e_invrange); + return _(e_invalid_range); break; case ADDR_LOADED_BUFFERS: buf = firstbuf; while (buf->b_ml.ml_mfp == NULL) { if (buf->b_next == NULL) - return _(e_invrange); + return _(e_invalid_range); buf = buf->b_next; } if (eap->line1 < buf->b_fnum) - return _(e_invrange); + return _(e_invalid_range); buf = lastbuf; while (buf->b_ml.ml_mfp == NULL) { if (buf->b_prev == NULL) - return _(e_invrange); + return _(e_invalid_range); buf = buf->b_prev; } if (eap->line2 > buf->b_fnum) - return _(e_invrange); + return _(e_invalid_range); break; case ADDR_WINDOWS: if (eap->line2 > LAST_WIN_NR) - return _(e_invrange); + return _(e_invalid_range); break; case ADDR_TABS: if (eap->line2 > LAST_TAB_NR) - return _(e_invrange); + return _(e_invalid_range); break; case ADDR_TABS_RELATIVE: case ADDR_OTHER: @@ -4521,14 +4521,14 @@ invalid_range(exarg_T *eap) #ifdef FEAT_QUICKFIX // No error for value that is too big, will use the last entry. if (eap->line2 <= 0) - return _(e_invrange); + return _(e_invalid_range); #endif break; case ADDR_QUICKFIX_VALID: #ifdef FEAT_QUICKFIX if ((eap->line2 != 1 && eap->line2 > qf_get_valid_size(eap)) || eap->line2 < 0) - return _(e_invrange); + return _(e_invalid_range); #endif break; case ADDR_UNSIGNED: @@ -5187,7 +5187,8 @@ ex_autocmd(exarg_T *eap) if (secure) { secure = 2; - eap->errmsg = _(e_curdir); + eap->errmsg = + _(e_command_not_allowed_from_vimrc_in_current_dir_or_tag_search); } else if (eap->cmdidx == CMD_autocmd) do_autocmd(eap->arg, eap->forceit); @@ -5842,7 +5843,7 @@ get_tabpage_arg(exarg_T *eap) { if (unaccept_arg0 && eap->line2 == 0) { - eap->errmsg = _(e_invrange); + eap->errmsg = _(e_invalid_range); tab_number = 0; } else @@ -5852,7 +5853,7 @@ get_tabpage_arg(exarg_T *eap) { --tab_number; if (tab_number < unaccept_arg0) - eap->errmsg = _(e_invrange); + eap->errmsg = _(e_invalid_range); } } } @@ -6564,7 +6565,7 @@ ex_tabnext(exarg_T *eap) tab_number = eap->line2; if (tab_number < 1) { - eap->errmsg = _(e_invrange); + eap->errmsg = _(e_invalid_range); return; } } @@ -7715,7 +7716,7 @@ ex_copymove(exarg_T *eap) */ if (n == MAXLNUM || n < 0 || n > curbuf->b_ml.ml_line_count) { - emsg(_(e_invrange)); + emsg(_(e_invalid_range)); return; } @@ -8163,7 +8164,7 @@ open_exfile( // with Unix it is possible to open a directory if (mch_isdir(fname)) { - semsg(_(e_isadir2), fname); + semsg(_(e_src_is_directory), fname); return NULL; } #endif diff --git a/src/ex_getln.c b/src/ex_getln.c index e7d71a510f..22f1cf6d2f 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -2622,7 +2622,7 @@ get_text_locked_msg(void) { #ifdef FEAT_CMDWIN if (cmdwin_type != 0) - return e_cmdwin; + return e_invalid_in_cmdline_window; #endif if (textwinlock != 0) return e_textwinlock; diff --git a/src/filepath.c b/src/filepath.c index 69bc8b5f49..0e29977227 100644 --- a/src/filepath.c +++ b/src/filepath.c @@ -856,7 +856,7 @@ f_delete(typval_T *argvars, typval_T *rettv) // delete a directory recursively rettv->vval.v_number = delete_recursive(name); else - semsg(_(e_invexpr2), flags); + semsg(_(e_invalid_expression_str), flags); } /* @@ -1685,7 +1685,7 @@ read_file_or_blob(typval_T *argvars, typval_T *rettv, int always_blob) if (mch_isdir(fname)) { - semsg(_(e_isadir2), fname); + semsg(_(e_src_is_directory), fname); return; } if (*fname == NUL || (fd = mch_fopen((char *)fname, READBIN)) == NULL) diff --git a/src/fold.c b/src/fold.c index 75b436a67e..f10294d756 100644 --- a/src/fold.c +++ b/src/fold.c @@ -1762,7 +1762,7 @@ foldCreateMarkers(linenr_T start, linenr_T end) { if (!curbuf->b_p_ma) { - emsg(_(e_modifiable)); + emsg(_(e_cannot_make_changes_modifiable_is_off)); return; } parseMarker(curwin); diff --git a/src/getchar.c b/src/getchar.c index 149bf55a0a..39aee22f8d 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -1447,7 +1447,7 @@ openscript( { if (curscript + 1 == NSCRIPT) { - emsg(_(e_nesting)); + emsg(_(e_scripts_nested_too_deep)); return; } diff --git a/src/globals.h b/src/globals.h index 07acc2602b..dd24cbbae3 100644 --- a/src/globals.h +++ b/src/globals.h @@ -1581,11 +1581,6 @@ EXTERN int netbeansSuppressNoLines INIT(= 0); // skip "No lines in buffer" */ EXTERN char e_abort[] INIT(= N_("E470: Command aborted")); EXTERN char e_argreq[] INIT(= N_("E471: Argument required")); -EXTERN char e_backslash[] INIT(= N_("E10: \\ should be followed by /, ? or &")); -#ifdef FEAT_CMDWIN -EXTERN char e_cmdwin[] INIT(= N_("E11: Invalid in command-line window; <CR> executes, CTRL-C quits")); -#endif -EXTERN char e_curdir[] INIT(= N_("E12: Command not allowed from exrc/vimrc in current dir or tag search")); #ifdef FEAT_EVAL EXTERN char e_endif[] INIT(= N_("E171: Missing :endif")); EXTERN char e_catch[] INIT(= N_("E603: :catch without :try")); @@ -1598,7 +1593,6 @@ EXTERN char e_endfor[] INIT(= N_("E170: Missing :endfor")); EXTERN char e_while[] INIT(= N_("E588: :endwhile without :while")); EXTERN char e_for[] INIT(= N_("E588: :endfor without :for")); #endif -EXTERN char e_exists[] INIT(= N_("E13: File exists (add ! to override)")); EXTERN char e_failed[] INIT(= N_("E472: Command failed")); #if defined(FEAT_GUI) && defined(FEAT_XFONTSET) EXTERN char e_fontset[] INIT(= N_("E234: Unknown fontset: %s")); @@ -1618,13 +1612,6 @@ EXTERN char e_invarg2[] INIT(= N_("E475: Invalid argument: %s")); EXTERN char e_duparg2[] INIT(= N_("E983: Duplicate argument: %s")); EXTERN char e_invargval[] INIT(= N_("E475: Invalid value for argument %s")); EXTERN char e_invargNval[] INIT(= N_("E475: Invalid value for argument %s: %s")); -#ifdef FEAT_EVAL -EXTERN char e_invexpr2[] INIT(= N_("E15: Invalid expression: \"%s\"")); -#endif -EXTERN char e_invrange[] INIT(= N_("E16: Invalid range")); -#if defined(UNIX) || defined(FEAT_SYN_HL) || defined(FEAT_SPELL) -EXTERN char e_isadir2[] INIT(= N_("E17: \"%s\" is a directory")); -#endif #ifdef FEAT_SPELL EXTERN char e_no_spell[] INIT(= N_("E756: Spell checking is not possible")); #endif @@ -1646,12 +1633,6 @@ EXTERN char e_fsync[] INIT(= N_("E667: Fsync failed")); EXTERN char e_loadlib[] INIT(= N_("E370: Could not load library %s")); EXTERN char e_loadfunc[] INIT(= N_("E448: Could not load library function %s")); #endif -EXTERN char e_markinval[] INIT(= N_("E19: Mark has invalid line number")); -EXTERN char e_marknotset[] INIT(= N_("E20: Mark not set")); -EXTERN char e_modifiable[] INIT(= N_("E21: Cannot make changes, 'modifiable' is off")); -EXTERN char e_nesting[] INIT(= N_("E22: Scripts nested too deep")); -EXTERN char e_noalt[] INIT(= N_("E23: No alternate file")); -EXTERN char e_noabbr[] INIT(= N_("E24: No such abbreviation")); EXTERN char e_nobang[] INIT(= N_("E477: No ! allowed")); #if !defined(FEAT_GUI) || defined(VIMDLL) EXTERN char e_nogvim[] INIT(= N_("E25: GUI cannot be used: Not enabled at compile time")); @@ -1733,7 +1714,6 @@ EXTERN char e_listdictblobarg[] INIT(= N_("E896: Argument of %s must be a List, EXTERN char e_modulus[] INIT(= N_("E804: Cannot use '%' with Float")); EXTERN char e_const_option[] INIT(= N_("E996: Cannot lock an option")); EXTERN char e_unknown_option[] INIT(= N_("E113: Unknown option: %s")); -EXTERN char e_letunexp[] INIT(= N_("E18: Unexpected characters in :let")); EXTERN char e_reduceempty[] INIT(= N_("E998: Reduce of an empty %s with no initial value")); EXTERN char e_no_dict_key[] INIT(= N_("E857: Dictionary key \"%s\" required")); #endif diff --git a/src/indent.c b/src/indent.c index e1c6f522a9..a26344b7d6 100644 --- a/src/indent.c +++ b/src/indent.c @@ -991,7 +991,7 @@ op_reindent(oparg_T *oap, int (*how)(void)) // Don't even try when 'modifiable' is off. if (!curbuf->b_p_ma) { - emsg(_(e_modifiable)); + emsg(_(e_cannot_make_changes_modifiable_is_off)); return; } diff --git a/src/list.c b/src/list.c index b67dcefb1b..6041bd2c39 100644 --- a/src/list.c +++ b/src/list.c @@ -1556,7 +1556,7 @@ list_remove(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg) break; } if (li == NULL) // didn't find "item2" after "item" - emsg(_(e_invrange)); + emsg(_(e_invalid_range)); else { vimlist_remove(l, item, item2); @@ -2717,7 +2717,7 @@ do_exmap(exarg_T *eap, int isabbrev) { case 1: emsg(_(e_invarg)); break; - case 2: emsg((isabbrev ? _(e_noabbr) : _(e_nomap))); + case 2: emsg((isabbrev ? _(e_no_such_abbreviation) : _(e_nomap))); break; } } diff --git a/src/mark.c b/src/mark.c index 6107c9ac4e..b5f2a7e80a 100644 --- a/src/mark.c +++ b/src/mark.c @@ -588,12 +588,12 @@ check_mark(pos_T *pos) // lnum is negative if mark is in another file can can't get that // file, error message already give then. if (pos->lnum == 0) - emsg(_(e_marknotset)); + emsg(_(e_mark_not_set)); return FAIL; } if (pos->lnum > curbuf->b_ml.ml_line_count) { - emsg(_(e_markinval)); + emsg(_(e_mark_has_invalid_line_number)); return FAIL; } return OK; diff --git a/src/normal.c b/src/normal.c index b2d0c011ea..18f14ec4e1 100644 --- a/src/normal.c +++ b/src/normal.c @@ -5210,7 +5210,7 @@ nv_Replace(cmdarg_T *cap) else if (!checkclearopq(cap->oap)) { if (!curbuf->b_p_ma) - emsg(_(e_modifiable)); + emsg(_(e_cannot_make_changes_modifiable_is_off)); else { if (virtual_active()) @@ -5235,7 +5235,7 @@ nv_vreplace(cmdarg_T *cap) else if (!checkclearopq(cap->oap)) { if (!curbuf->b_p_ma) - emsg(_(e_modifiable)); + emsg(_(e_cannot_make_changes_modifiable_is_off)); else { if (cap->extra_char == Ctrl_V) // get another character @@ -7075,7 +7075,7 @@ nv_edit(cmdarg_T *cap) else if (!curbuf->b_p_ma && !p_im) { // Only give this error when 'insertmode' is off. - emsg(_(e_modifiable)); + emsg(_(e_cannot_make_changes_modifiable_is_off)); clearop(cap->oap); if (cap->cmdchar == K_PS) // drop the pasted text @@ -621,7 +621,7 @@ op_delete(oparg_T *oap) if (!curbuf->b_p_ma) { - emsg(_(e_modifiable)); + emsg(_(e_cannot_make_changes_modifiable_is_off)); return FAIL; } diff --git a/src/optionstr.c b/src/optionstr.c index 47aee35be3..4c1cacc5cf 100644 --- a/src/optionstr.c +++ b/src/optionstr.c @@ -971,7 +971,7 @@ ambw_end: if (gvarp == &p_fenc) { if (!curbuf->b_p_ma && opt_flags != OPT_GLOBAL) - errmsg = e_modifiable; + errmsg = e_cannot_make_changes_modifiable_is_off; else if (vim_strchr(*varp, ',') != NULL) // No comma allowed in 'fileencoding'; catches confusing it // with 'fileencodings'. @@ -1130,7 +1130,7 @@ ambw_end: else if (gvarp == &p_ff) { if (!curbuf->b_p_ma && !(opt_flags & OPT_GLOBAL)) - errmsg = e_modifiable; + errmsg = e_cannot_make_changes_modifiable_is_off; else if (check_opt_strings(*varp, p_ff_values, FALSE) != OK) errmsg = e_invarg; else diff --git a/src/popupwin.c b/src/popupwin.c index cd343f819d..8751bb4059 100644 --- a/src/popupwin.c +++ b/src/popupwin.c @@ -61,7 +61,7 @@ popup_options_one(dict_T *dict, char_u *key) n = strtol((char *)s, (char **)&endp, 10); if (endp != NULL && *skipwhite(endp) != NUL) { - semsg(_(e_invexpr2), val); + semsg(_(e_invalid_expression_str), val); return 0; } } diff --git a/src/quickfix.c b/src/quickfix.c index 36574b80f7..4ac4a01a10 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -3830,7 +3830,7 @@ qf_history(exarg_T *eap) qf_update_buffer(qi, NULL); } else - emsg(_(e_invrange)); + emsg(_(e_invalid_range)); return; } @@ -5655,7 +5655,7 @@ ex_cbelow(exarg_T *eap) if (eap->addr_count > 0 && eap->line2 <= 0) { - emsg(_(e_invrange)); + emsg(_(e_invalid_range)); return; } @@ -7817,7 +7817,7 @@ cbuffer_process_args( if (eap->line1 < 1 || eap->line1 > buf->b_ml.ml_line_count || eap->line2 < 1 || eap->line2 > buf->b_ml.ml_line_count) { - emsg(_(e_invrange)); + emsg(_(e_invalid_range)); return FAIL; } diff --git a/src/spellfile.c b/src/spellfile.c< |