diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-01 14:19:49 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-01 14:19:49 +0000 |
commit | 460ae5dfca31fa627531c263184849976755cf6b (patch) | |
tree | d94de6a24285bc10fd62ad4ae9aecb53f9a7e913 /src | |
parent | b37a65e4bf08c4eec4fa5b81a5efc3945fca44de (diff) | |
download | vim-git-460ae5dfca31fa627531c263184849976755cf6b.tar.gz |
patch 8.2.3967: error messages are spread outv8.2.3967
Problem: Error messages are spread out.
Solution: Move more errors to errors.h.
Diffstat (limited to 'src')
70 files changed, 403 insertions, 334 deletions
diff --git a/src/arglist.c b/src/arglist.c index 104c67a00..3ca5e4ccc 100644 --- a/src/arglist.c +++ b/src/arglist.c @@ -460,7 +460,7 @@ do_arglist( vim_regfree(regmatch.regprog); vim_free(p); if (!didone) - semsg(_(e_nomatch2), ((char_u **)new_ga.ga_data)[i]); + semsg(_(e_no_match_str_2), ((char_u **)new_ga.ga_data)[i]); } ga_clear(&new_ga); } @@ -471,7 +471,7 @@ do_arglist( ga_clear(&new_ga); if (i == FAIL || exp_count == 0) { - emsg(_(e_nomatch)); + emsg(_(e_no_match)); return FAIL; } diff --git a/src/autocmd.c b/src/autocmd.c index 4831ea80d..862370fc6 100644 --- a/src/autocmd.c +++ b/src/autocmd.c @@ -911,7 +911,7 @@ do_autocmd(exarg_T *eap, char_u *arg_in, int forceit) if (STRNCMP(cmd, "++once", 6) == 0 && VIM_ISWHITE(cmd[6])) { if (once) - semsg(_(e_duparg2), "++once"); + semsg(_(e_duplicate_argument_str), "++once"); once = TRUE; cmd = skipwhite(cmd + 6); } @@ -920,7 +920,7 @@ do_autocmd(exarg_T *eap, char_u *arg_in, int forceit) if ((STRNCMP(cmd, "++nested", 8) == 0 && VIM_ISWHITE(cmd[8]))) { if (nested) - semsg(_(e_duparg2), "++nested"); + semsg(_(e_duplicate_argument_str), "++nested"); nested = TRUE; cmd = skipwhite(cmd + 8); } @@ -929,7 +929,7 @@ do_autocmd(exarg_T *eap, char_u *arg_in, int forceit) if (STRNCMP(cmd, "nested", 6) == 0 && VIM_ISWHITE(cmd[6])) { if (nested) - semsg(_(e_duparg2), "nested"); + semsg(_(e_duplicate_argument_str), "nested"); nested = TRUE; cmd = skipwhite(cmd + 6); } diff --git a/src/blob.c b/src/blob.c index 37d2be69b..b5b4428a8 100644 --- a/src/blob.c +++ b/src/blob.c @@ -350,7 +350,7 @@ blob_slice_or_index( } else { - semsg(_(e_blobidx), n1); + semsg(_(e_blob_index_out_of_range_nr), n1); return FAIL; } } @@ -366,7 +366,7 @@ check_blob_index(long bloblen, varnumber_T n1, int quiet) if (n1 < 0 || n1 > bloblen) { if (!quiet) - semsg(_(e_blobidx), n1); + semsg(_(e_blob_index_out_of_range_nr), n1); return FAIL; } return OK; @@ -381,7 +381,7 @@ check_blob_range(long bloblen, varnumber_T n1, varnumber_T n2, int quiet) if (n2 < 0 || n2 >= bloblen || n2 < n1) { if (!quiet) - semsg(_(e_blobidx), n2); + semsg(_(e_blob_index_out_of_range_nr), n2); return FAIL; } return OK; @@ -465,7 +465,7 @@ blob_remove(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg) idx = len + idx; if (idx < 0 || idx >= len) { - semsg(_(e_blobidx), idx); + semsg(_(e_blob_index_out_of_range_nr), idx); return; } if (argvars[2].v_type == VAR_UNKNOWN) @@ -487,7 +487,7 @@ blob_remove(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg) end = len + end; if (end >= len || idx > end) { - semsg(_(e_blobidx), end); + semsg(_(e_blob_index_out_of_range_nr), end); return; } newblob = blob_alloc(); @@ -563,7 +563,7 @@ blob_filter_map( if (newtv.v_type != VAR_NUMBER && newtv.v_type != VAR_BOOL) { clear_tv(&newtv); - emsg(_(e_invalblob)); + emsg(_(e_invalid_operation_for_blob)); break; } if (filtermap != FILTERMAP_FILTER) @@ -660,7 +660,7 @@ blob_reduce( { if (b == NULL || b->bv_ga.ga_len == 0) { - semsg(_(e_reduceempty), "Blob"); + semsg(_(e_reduce_of_an_empty_str_with_no_initial_value), "Blob"); return; } initial.v_type = VAR_NUMBER; diff --git a/src/bufwrite.c b/src/bufwrite.c index c0d5de36c..a7e1ad5ee 100644 --- a/src/bufwrite.c +++ b/src/bufwrite.c @@ -2178,7 +2178,7 @@ restore_backup: // If the 'fsync' option is FALSE, don't fsync(). Useful for laptops. if (p_fs && vim_fsync(fd) != 0 && !device) { - errmsg = (char_u *)_(e_fsync); + errmsg = (char_u *)_(e_fsync_failed); end = 0; } #endif diff --git a/src/channel.c b/src/channel.c index 513344017..ec9173970 100644 --- a/src/channel.c +++ b/src/channel.c @@ -161,7 +161,7 @@ ch_logfile(char_u *fname, char_u *opt) file = fopen((char *)fname, *opt == 'w' ? "w" : "a"); if (file == NULL) { - semsg(_(e_notopen), fname); + semsg(_(e_cant_open_file_str), fname); return; } vim_free(log_name); diff --git a/src/cmdexpand.c b/src/cmdexpand.c index 9468beba7..e496bc367 100644 --- a/src/cmdexpand.c +++ b/src/cmdexpand.c @@ -366,13 +366,13 @@ ExpandOne( // are wildcards, the real problem is that there was no match, // causing the pattern to be added, which has illegal characters. if (!(options & WILD_SILENT) && (options & WILD_LIST_NOTFOUND)) - semsg(_(e_nomatch2), str); + semsg(_(e_no_match_str_2), str); #endif } else if (xp->xp_numfiles == 0) { if (!(options & WILD_SILENT)) - semsg(_(e_nomatch2), str); + semsg(_(e_no_match_str_2), str); } else { diff --git a/src/dict.c b/src/dict.c index 6773c757d..0c9cea38b 100644 --- a/src/dict.c +++ b/src/dict.c @@ -1414,7 +1414,7 @@ dict_remove(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg) di = dict_find(d, key, -1); if (di == NULL) { - semsg(_(e_dictkey), key); + semsg(_(e_key_not_present_in_dictionary), key); return; } @@ -1449,7 +1449,7 @@ dict_list(typval_T *argvars, typval_T *rettv, int what) if (argvars[0].v_type != VAR_DICT) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return; } @@ -1572,7 +1572,7 @@ f_has_key(typval_T *argvars, typval_T *rettv) if (argvars[0].v_type != VAR_DICT) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return; } if (argvars[0].vval.v_dict == NULL) diff --git a/src/diff.c b/src/diff.c index a3bb9c405..59b7891b9 100644 --- a/src/diff.c +++ b/src/diff.c @@ -1319,7 +1319,7 @@ ex_diffpatch(exarg_T *eap) if (dirbuf[0] != NUL) { if (mch_chdir((char *)dirbuf) != 0) - emsg(_(e_prev_dir)); + emsg(_(e_cannot_go_back_to_previous_directory)); shorten_fnames(TRUE); } #endif diff --git a/src/errors.h b/src/errors.h index 7301b4a00..82b96b8a3 100644 --- a/src/errors.h +++ b/src/errors.h @@ -329,7 +329,7 @@ EXTERN char e_sorry_no_help_for_str[] INIT(= N_("E149: Sorry, no help for %s")); EXTERN char e_not_a_directory_str[] INIT(= N_("E150: Not a directory: %s")); -EXTERN char e_no_match_str[] +EXTERN char e_no_match_str_1[] INIT(= N_("E151: No match: %s")); EXTERN char e_cannot_open_str_for_writing_1[] INIT(= N_("E152: Cannot open %s for writing")); @@ -497,6 +497,10 @@ EXTERN char e_makemap_illegal_mode[] EXTERN char e_cannot_start_the_GUI[] INIT(= N_("E229: Cannot start the GUI")); +#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) +EXTERN char e_cannot_open_display[] + INIT(= N_("E233: cannot open display")); +#endif #if defined(FEAT_GUI) && defined(FEAT_XFONTSET) EXTERN char e_unknown_fontset_str[] INIT(= N_("E234: Unknown fontset: %s")); @@ -510,6 +514,10 @@ EXTERN char e_unknown_font_str[] EXTERN char e_font_str_is_not_fixed_width[] INIT(= N_("E236: Font \"%s\" is not fixed-width")); #endif +#ifdef FEAT_CLIENTSERVER +EXTERN char e_no_registered_server_named_str[] + INIT(= N_("E247: no registered server named \"%s\"")); +#endif EXTERN char e_window_layout_changed_unexpectedly[] INIT(= N_("E249: window layout changed unexpectedly")); #if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS) @@ -521,11 +529,31 @@ EXTERN char e_internal_error_lalloc_zero[] INIT(= N_("E341: Internal error: lalloc(0, )")); EXTERN char e_out_of_memory_allocating_nr_bytes[] INIT(= N_("E342: Out of memory! (allocating %lu bytes)")); +#ifdef FEAT_LIBCALL +EXTERN char e_library_call_failed_for_str[] + INIT(= N_("E364: Library call failed for \"%s()\"")); +#endif EXTERN char e_no_such_group_str[] INIT(= N_("E367: No such group: \"%s\"")); +#ifdef USING_LOAD_LIBRARY +EXTERN char e_could_not_load_library_str_str[] + INIT(= N_("E370: Could not load library %s: %s")); +#endif EXTERN char e_cannot_write_buftype_option_is_set[] INIT(= N_("E382: Cannot write, 'buftype' option is set")); +#ifdef USING_LOAD_LIBRARY +EXTERN char e_could_not_load_library_function_str[] + INIT(= N_("E448: Could not load library function %s")); +#endif +#if defined(UNIX) || defined(FEAT_SESSION) +EXTERN char e_cannot_go_back_to_previous_directory[] + INIT(= N_("E459: Cannot go back to previous directory")); +#endif +#ifdef FEAT_EVAL +EXTERN char e_illegal_variable_name_str[] + INIT(= N_("E461: Illegal variable name: %s")); +#endif EXTERN char e_ambiguous_use_of_user_defined_command[] INIT(= N_("E464: Ambiguous use of user-defined command")); EXTERN char e_command_aborted[] @@ -546,10 +574,32 @@ EXTERN char e_invalid_value_for_argument_str_str[] INIT(= N_("E475: Invalid value for argument %s: %s")); EXTERN char e_invalid_command[] INIT(= N_("E476: Invalid command")); +EXTERN char e_no_bang_allowed[] + INIT(= N_("E477: No ! allowed")); #ifdef FEAT_EVAL EXTERN char e_invalid_command_str[] INIT(= N_("E476: Invalid command: %s")); #endif +EXTERN char e_cant_create_file_str[] + INIT(= N_("E482: Can't create file %s")); +EXTERN char e_cant_get_temp_file_name[] + INIT(= N_("E483: Can't get temp file name")); +EXTERN char e_cant_open_file_str[] + INIT(= N_("E484: Can't open file %s")); +EXTERN char e_cant_read_file_str[] + INIT(= N_("E485: Can't read file %s")); +EXTERN char e_pattern_not_found[] + INIT(= N_("E486: Pattern not found")); +EXTERN char e_pattern_not_found_str[] + INIT(= N_("E486: Pattern not found: %s")); +EXTERN char e_argument_must_be_positive[] + INIT(= N_("E487: Argument must be positive")); +EXTERN char e_no_match[] + INIT(= N_("E479: No match")); +EXTERN char e_no_match_str_2[] + INIT(= N_("E480: No match: %s")); +EXTERN char e_no_range_allowed[] + INIT(= N_("E481: No range allowed")); // E502 EXTERN char e_is_a_directory[] @@ -615,20 +665,44 @@ EXTERN char e_netbeans_disallows_writes_of_unmodified_buffers[] EXTERN char e_partial_writes_disallowed_for_netbeans_buffers[] INIT(= N_("Partial writes disallowed for NetBeans buffers")); #endif +#ifdef HAVE_FSYNC +EXTERN char e_fsync_failed[] + INIT(= N_("E667: Fsync failed")); +#endif EXTERN char e_no_matching_autocommands_for_acwrite_buffer[] INIT(= N_("E676: No matching autocommands for acwrite buffer")); EXTERN char e_buffer_nr_invalid_buffer_number[] INIT(= N_("E680: <buffer=%d>: invalid buffer number")); #ifdef FEAT_EVAL +EXTERN char e_list_index_out_of_range_nr[] + INIT(= N_("E684: list index out of range: %ld")); +#endif +EXTERN char e_internal_error_str[] + INIT(= N_("E685: Internal error: %s")); +#ifdef FEAT_EVAL EXTERN char e_cannot_index_a_funcref[] INIT(= N_("E695: Cannot index a Funcref")); +EXTERN char e_missing_end_of_list_rsb_str[] + INIT(= N_("E697: Missing end of List ']': %s")); EXTERN char e_list_value_has_more_items_than_targets[] INIT(= N_("E710: List value has more items than targets")); EXTERN char e_list_value_does_not_have_enough_items[] INIT(= N_("E711: List value does not have enough items")); +EXTERN char e_argument_of_str_must_be_list_or_dictionary[] + INIT(= N_("E712: Argument of %s must be a List or Dictionary")); +EXTERN char e_cannot_use_empty_key_for_dictionary[] + INIT(= N_("E713: Cannot use empty key for Dictionary")); +EXTERN char e_list_required[] + INIT(= N_("E714: List required")); +EXTERN char e_dictionary_required[] + INIT(= N_("E715: Dictionary required")); +EXTERN char e_key_not_present_in_dictionary[] + INIT(= N_("E716: Key not present in Dictionary: \"%s\"")); EXTERN char e_cannot_slice_dictionary[] INIT(= N_("E719: Cannot slice a Dictionary")); +EXTERN char e_wrong_variable_type_for_str_equal[] + INIT(= N_("E734: Wrong variable type for %s=")); EXTERN char e_value_is_locked[] INIT(= N_("E741: Value is locked")); EXTERN char e_value_is_locked_str[] @@ -637,6 +711,16 @@ EXTERN char e_cannot_change_value[] INIT(= N_("E742: Cannot change value")); EXTERN char e_cannot_change_value_of_str[] INIT(= N_("E742: Cannot change value of %s")); +#endif +#ifdef FEAT_SPELL +EXTERN char e_spell_checking_is_not_possible[] + INIT(= N_("E756: Spell checking is not possible")); +#endif +#ifdef FEAT_QUICKFIX +EXTERN char e_no_location_list[] + INIT(= N_("E776: No location list")); +#endif +#ifdef FEAT_EVAL EXTERN char e_cannot_set_variable_in_sandbox[] INIT(= N_("E794: Cannot set variable in the sandbox")); EXTERN char e_cannot_set_variable_in_sandbox_str[] @@ -650,6 +734,14 @@ EXTERN char e_cannot_delete_variable_str[] INIT(= N_("E795: Cannot delete variable %s")); #endif +#ifndef FEAT_ARABIC +EXTERN char e_arabic_cannot_be_used_not_enabled_at_compile_time[] + INIT(= N_("E800: Arabic cannot be used: Not enabled at compile time\n")); +#endif +#ifdef FEAT_EVAL +EXTERN char e_cannot_use_percent_with_float[] + INIT(= N_("E804: Cannot use '%' with Float")); +#endif EXTERN char e_blowfish_big_little_endian_use_wrong[] INIT(= N_("E817: Blowfish big/little endian use wrong")); EXTERN char e_sha256_test_failed[] @@ -664,19 +756,40 @@ EXTERN char e_conflicts_with_value_of_listchars[] INIT(= N_("E834: Conflicts with value of 'listchars'")); EXTERN char e_conflicts_with_value_of_fillchars[] INIT(= N_("E835: Conflicts with value of 'fillchars'")); +// E839 unused EXTERN char e_autocommands_caused_command_to_abort[] INIT(= N_("E855: Autocommands caused command to abort")); #ifdef FEAT_EVAL EXTERN char e_assert_fails_second_arg[] INIT(= N_("E856: \"assert_fails()\" second argument must be a string or a list with one or two strings")); +EXTERN char e_dictionary_key_str_required[] + INIT(= N_("E857: Dictionary key \"%s\" required")); +#endif +#ifdef FEAT_PROP_POPUP +EXTERN char e_number_required[] + INIT(= N_("E889: Number required")); +#endif +#ifdef FEAT_EVAL +EXTERN char e_argument_of_str_must_be_list_dictionary_or_blob[] + INIT(= N_("E896: Argument of %s must be a List, Dictionary or Blob")); +EXTERN char e_list_or_blob_required[] + INIT(= N_("E897: List or Blob required")); +#endif +#ifdef FEAT_EVAL EXTERN char e_using_invalid_value_as_string_str[] INIT(= N_("E908: using an invalid value as a String: %s")); EXTERN char e_cannot_index_special_variable[] INIT(= N_("E909: Cannot index a special variable")); +EXTERN char e_string_required[] + INIT(= N_("E928: String required")); #endif EXTERN char e_buffer_cannot_be_registered[] INIT(= N_("E931: Buffer cannot be registered")); +#ifdef FEAT_EVAL +EXTERN char e_function_was_deleted_str[] + INIT(= N_("E933: Function was deleted: %s")); +#endif EXTERN char e_cannot_delete_current_group[] INIT(= N_("E936: Cannot delete the current group")); EXTERN char e_attempt_to_delete_buffer_that_is_in_use_str[] @@ -695,6 +808,22 @@ EXTERN char_u e_invalid_line_number_nr[] INIT(= N_("E966: Invalid line number: %ld")); EXTERN char e_blob_value_does_not_have_right_number_of_bytes[] INIT(= N_("E972: Blob value does not have the right number of bytes")); +#ifdef FEAT_EVAL +EXTERN char e_invalid_operation_for_blob[] + INIT(= N_("E978: Invalid operation for Blob")); +EXTERN char e_blob_index_out_of_range_nr[] + INIT(= N_("E979: Blob index out of range: %ld")); +#endif +EXTERN char e_duplicate_argument_str[] + INIT(= N_("E983: Duplicate argument: %s")); +#ifdef FEAT_EVAL +EXTERN char e_cannot_modify_existing_variable[] + INIT(= N_("E995: Cannot modify existing variable")); +EXTERN char e_cannot_lock_an_option[] + INIT(= N_("E996: Cannot lock an option")); +EXTERN char e_reduce_of_an_empty_str_with_no_initial_value[] + INIT(= N_("E998: Reduce of an empty %s with no initial value")); +#endif EXTERN char e_command_not_supported_in_vim9_script_missing_var_str[] INIT(= N_("E1100: Command not supported in Vim9 script (missing :var?): %s")); diff --git a/src/eval.c b/src/eval.c index 0c5967b6c..6094b60ad 100644 --- a/src/eval.c +++ b/src/eval.c @@ -997,7 +997,7 @@ get_lval( if (len == 0) { if (!quiet) - emsg(_(e_emptykey)); + emsg(_(e_cannot_use_empty_key_for_dictionary)); return NULL; } p = key + len; @@ -1148,7 +1148,7 @@ get_lval( if (lp->ll_dict == get_vimvar_dict() || &lp->ll_dict->dv_hashtab == get_funccal_args_ht()) { - semsg(_(e_illvar), name); + semsg(_(e_illegal_variable_name_str), name); clear_tv(&var1); return NULL; } @@ -1157,7 +1157,7 @@ get_lval( if (*p == '[' || *p == '.' || unlet) { if (!quiet) - semsg(_(e_dictkey), key); + semsg(_(e_key_not_present_in_dictionary), key); clear_tv(&var1); return NULL; } @@ -1306,7 +1306,7 @@ set_var_lval( if (op != NULL && *op != '=') { - semsg(_(e_letwrong), op); + semsg(_(e_wrong_variable_type_for_str_equal), op); return; } if (value_check_lock(lp->ll_blob->bv_lock, lp->ll_name, FALSE)) @@ -1335,7 +1335,7 @@ set_var_lval( if ((flags & (ASSIGN_CONST | ASSIGN_FINAL)) && (flags & ASSIGN_FOR_LOOP) == 0) { - emsg(_(e_cannot_mod)); + emsg(_(e_cannot_modify_existing_variable)); *endp = cc; return; } @@ -1401,7 +1401,7 @@ set_var_lval( { if (op != NULL && *op != '=') { - semsg(_(e_dictkey), lp->ll_newkey); + semsg(_(e_key_not_present_in_dictionary), lp->ll_newkey); return; } if (dict_wrong_func_name(lp->ll_tv->vval.v_dict, rettv, @@ -1590,7 +1590,7 @@ tv_op(typval_T *tv1, typval_T *tv2, char_u *op) } } - semsg(_(e_letwrong), op); + semsg(_(e_wrong_variable_type_for_str_equal), op); return FAIL; } @@ -3248,7 +3248,7 @@ eval6( } else { - emsg(_(e_modulus)); + emsg(_(e_cannot_use_percent_with_float)); return FAIL; } rettv->v_type = VAR_FLOAT; @@ -4325,7 +4325,7 @@ eval_index_inner( { if (keylen > 0) key[keylen] = NUL; - semsg(_(e_dictkey), key); + semsg(_(e_key_not_present_in_dictionary), key); } return FAIL; } diff --git a/src/evalfunc.c b/src/evalfunc.c index d61797ae3..e5a0a4504 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -2935,7 +2935,7 @@ f_call(typval_T *argvars, typval_T *rettv) if (argvars[1].v_type != VAR_LIST) { - emsg(_(e_listreq)); + emsg(_(e_list_required)); return; } if (argvars[1].vval.v_list == NULL) @@ -2957,7 +2957,7 @@ f_call(typval_T *argvars, typval_T *rettv) { if (argvars[2].v_type != VAR_DICT) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return; } selfdict = argvars[2].vval.v_dict; @@ -4411,7 +4411,7 @@ f_get(typval_T *argvars, typval_T *rettv) } } else - semsg(_(e_listdictblobarg), "get()"); + semsg(_(e_argument_of_str_must_be_list_dictionary_or_blob), "get()"); if (tv == NULL) { @@ -6458,7 +6458,7 @@ f_index(typval_T *argvars, typval_T *rettv) } else if (argvars[0].v_type != VAR_LIST) { - emsg(_(e_listblobreq)); + emsg(_(e_list_or_blob_required)); return; } @@ -6718,7 +6718,7 @@ f_islocked(typval_T *argvars, typval_T *rettv) else if (lv.ll_range) emsg(_("E786: Range not allowed")); else if (lv.ll_newkey != NULL) - semsg(_(e_dictkey), lv.ll_newkey); + semsg(_(e_key_not_present_in_dictionary), lv.ll_newkey); else if (lv.ll_list != NULL) // List item. rettv->vval.v_number = tv_islocked(&lv.ll_li->li_tv); @@ -7311,7 +7311,7 @@ max_min(typval_T *argvars, typval_T *rettv, int domax) } } else - semsg(_(e_listdictarg), domax ? "max()" : "min()"); + semsg(_(e_argument_of_str_must_be_list_or_dictionary), domax ? "max()" : "min()"); rettv->vval.v_number = n; } @@ -8877,7 +8877,7 @@ f_setcharsearch(typval_T *argvars, typval_T *rettv UNUSED) if (argvars[0].v_type != VAR_DICT) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return; } @@ -9221,7 +9221,7 @@ f_settagstack(typval_T *argvars, typval_T *rettv) // second argument: dict with items to set in the tag stack if (argvars[1].v_type != VAR_DICT) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return; } d = argvars[1].vval.v_dict; @@ -9249,7 +9249,7 @@ f_settagstack(typval_T *argvars, typval_T *rettv) } else { - emsg(_(e_stringreq)); + emsg(_(e_string_required)); return; } @@ -9365,7 +9365,7 @@ f_spellbadword(typval_T *argvars UNUSED, typval_T *rettv) if (*curwin->w_s->b_p_spl == NUL) { - emsg(_(e_no_spell)); + emsg(_(e_spell_checking_is_not_possible)); curwin->w_p_spell = wo_spell_save; return; } @@ -9455,7 +9455,7 @@ f_spellsuggest(typval_T *argvars UNUSED, typval_T *rettv) if (*curwin->w_s->b_p_spl == NUL) { - emsg(_(e_no_spell)); + emsg(_(e_spell_checking_is_not_possible)); curwin->w_p_spell = wo_spell_save; return; } diff --git a/src/evalvars.c b/src/evalvars.c index 381bda495..324355b19 100644 --- a/src/evalvars.c +++ b/src/evalvars.c @@ -955,7 +955,7 @@ ex_let_vars( // ":let [v1, v2] = list" or ":for [v1, v2] in listlist" if (tv->v_type != VAR_LIST || (l = tv->vval.v_list) == NULL) { - emsg(_(e_listreq)); + emsg(_(e_list_required)); return FAIL; } @@ -1320,7 +1320,7 @@ ex_let_env( else { if (op != NULL && vim_strchr((char_u *)"+-*/%", *op) != NULL) - semsg(_(e_letwrong), op); + semsg(_(e_wrong_variable_type_for_str_equal), op); else if (endchars != NULL && vim_strchr(endchars, *skipwhite(arg)) == NULL) emsg(_(e_unexpected_characters_in_let)); @@ -1374,7 +1374,7 @@ ex_let_option( if ((flags & (ASSIGN_CONST | ASSIGN_FINAL)) && (flags & ASSIGN_FOR_LOOP) == 0) { - emsg(_(e_const_option)); + emsg(_(e_cannot_lock_an_option)); return NULL; } @@ -1434,7 +1434,7 @@ ex_let_option( if (((opt_type == gov_bool || opt_type == gov_number) && *op == '.') || (opt_type == gov_string && *op != '.')) { - semsg(_(e_letwrong), op); + semsg(_(e_wrong_variable_type_for_str_equal), op); failed = TRUE; // don't set the value } @@ -1475,7 +1475,7 @@ ex_let_option( arg_end = p; } else - emsg(_(e_stringreq)); + emsg(_(e_string_required)); } *p = c1; vim_free(stringval); @@ -1505,7 +1505,7 @@ ex_let_register( } ++arg; if (op != NULL && vim_strchr((char_u *)"+-*/%", *op) != NULL) - semsg(_(e_letwrong), op); + semsg(_(e_wrong_variable_type_for_str_equal), op); else if (endchars != NULL && vim_strchr(endchars, *skipwhite(arg + 1)) == NULL) emsg(_(e_unexpected_characters_in_let)); @@ -3309,7 +3309,7 @@ set_var_const( ht = find_var_ht(name, &varname); if (ht == NULL || *varname == NUL) { - semsg(_(e_illvar), name); + semsg(_(e_illegal_variable_name_str), name); goto failed; } is_script_local = ht == get_script_local_ht(); @@ -3403,7 +3403,7 @@ set_var_const( if ((flags & (ASSIGN_CONST | ASSIGN_FINAL)) && (flags & ASSIGN_FOR_LOOP) == 0) { - emsg(_(e_cannot_mod)); + emsg(_(e_cannot_modify_existing_variable)); goto failed; } @@ -3518,7 +3518,7 @@ set_var_const( // Can't add "v:" or "a:" variable. if (ht == &vimvarht || ht == get_funccal_args_ht()) { - semsg(_(e_illvar), name); + semsg(_(e_illegal_variable_name_str), name); goto failed; } @@ -3748,7 +3748,7 @@ valid_varname(char_u *varname, int len, int autoload) if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p)) && !(autoload && *p == AUTOLOAD_CHAR)) { - semsg(_(e_illvar), varname); + semsg(_(e_illegal_variable_name_str), varname); return FALSE; } return TRUE; diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 25c1c8b2e..ae9d73fa3 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -1137,7 +1137,7 @@ do_filter( if ((do_in && (itmp = vim_tempname('i', FALSE)) == NULL) || (do_out && (otmp = vim_tempname('o', FALSE)) == NULL)) { - emsg(_(e_notmp)); + emsg(_(e_cant_get_temp_file_name)); goto filterend; } @@ -1154,7 +1154,7 @@ do_filter( #if defined(FEAT_EVAL) if (!aborting()) #endif - (void)semsg(_(e_notcreate), itmp); // will call wait_return + (void)semsg(_(e_cant_create_file_str), itmp); // will call wait_return goto filterend; } if (curbuf != old_curbuf) @@ -1229,7 +1229,7 @@ do_filter( #endif { msg_putchar('\n'); - semsg(_(e_notread), otmp); + semsg(_(e_cant_read_file_str), otmp); } goto error; } @@ -4780,7 +4780,7 @@ outofmem: else if (got_match) // did find something but nothing substituted msg(""); else if (subflags.do_error) // nothing found - semsg(_(e_patnotf2), get_search_pat()); + semsg(_(e_pattern_not_found_str), get_search_pat()); } #ifdef FEAT_FOLDING diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 0403143cf..187c34eb6 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -2124,15 +2124,14 @@ do_one_cmd( if (!ni && !(ea.argt & EX_RANGE) && ea.addr_count > 0) { - // no range allowed - errormsg = _(e_norange); + errormsg = _(e_no_range_allowed); goto doend; } } - if (!ni && !(ea.argt & EX_BANG) && ea.forceit) // no <!> allowed + if (!ni && !(ea.argt & EX_BANG) && ea.forceit) { - errormsg = _(e_nobang); + errormsg = _(e_no_bang_allowed); goto doend; } @@ -4016,7 +4015,7 @@ skip_range( addr_error(cmd_addr_T addr_type) { if (addr_type == ADDR_NONE) - emsg(_(e_norange)); + emsg(_(e_no_range_allowed)); else emsg(_(e_invalid_range)); } @@ -6882,7 +6881,7 @@ ex_open(exarg_T *eap) if (vim_regexec(®match, line, (colnr_T)0)) curwin->w_cursor.col = (colnr_T)(regmatch.startp[0] - line); else - emsg(_(e_nomatch)); + emsg(_(e_no_match)); vim_regfree(regmatch.regprog); vim_free(line); } @@ -7254,7 +7253,7 @@ ex_read(exarg_T *eap) #if defined(FEAT_EVAL) if (!aborting()) #endif - semsg(_(e_notopen), eap->arg); + semsg(_(e_cant_open_file_str), eap->arg); } else { diff --git a/src/feature.h b/src/feature.h index fa79d7a60..fcd0d4b5c 100644 --- a/src/feature.h +++ b/src/feature.h @@ -1258,3 +1258,15 @@ #if (!defined(FEAT_GUI) || defined(VIMDLL)) && defined(MSWIN) # define FEAT_VTP #endif + +#if defined(DYNAMIC_PERL) \ + || defined(DYNAMIC_PYTHON) || defined(DYNAMIC_PYTHON3) \ + || defined(DYNAMIC_RUBY) \ + || defined(DYNAMIC_TCL) \ + || defined(DYNAMIC_ICONV) \ + || defined(DYNAMIC_GETTEXT) \ + || defined(DYNAMIC_MZSCHEME) \ + || defined(DYNAMIC_LUA) \ + || defined(FEAT_TERMINAL) +# define USING_LOAD_LIBRARY +#endif diff --git a/src/fileio.c b/src/fileio.c index 73c724321..1aeb483a9 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4809,7 +4809,7 @@ readdir_core( if (!ok) { failed = TRUE; - semsg(_(e_notopen), path); + semsg(_(e_cant_open_file_str), path); } else { @@ -4879,7 +4879,7 @@ readdir_core( if (dirp == NULL) { failed = TRUE; - semsg(_(e_notopen), path); + semsg(_(e_cant_open_file_str), path); } else { diff --git a/src/filepath.c b/src/filepath.c index a9edf7d88..4a0022e20 100644 --- a/src/filepath.c +++ b/src/filepath.c @@ -1599,7 +1599,7 @@ readdirex_dict_arg(typval_T *tv, int *cmp) if (tv->v_type != VAR_DICT) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return FAIL; } @@ -1607,7 +1607,7 @@ readdirex_dict_arg(typval_T *tv, int *cmp) compare = dict_get_string(tv->vval.v_dict, (char_u *)"sort", FALSE); else { - semsg(_(e_no_dict_key), "sort"); + semsg(_(e_dictionary_key_str_required), "sort"); return FAIL; } @@ -1766,7 +1766,7 @@ read_file_or_blob(typval_T *argvars, typval_T *rettv, int always_blob) } if (*fname == NUL || (fd = mch_fopen((char *)fname, READBIN)) == NULL) { - semsg(_(e_notopen), *fname == NUL ? (char_u *)_("<empty>") : fname); + semsg(_(e_cant_open_file_str), *fname == NUL ? (char_u *)_("<empty>") : fname); return; } @@ -1774,7 +1774,7 @@ read_file_or_blob(typval_T *argvars, typval_T *rettv, int always_blob) { if (read_blob(fd, rettv->vval.v_blob) == FAIL) { - semsg(_(e_notread), fname); + semsg(_(e_cant_read_file_str), fname); // An empty blob is returned on error. blob_free(rettv->vval.v_blob); rettv->vval.v_blob = NULL; @@ -2299,7 +2299,7 @@ f_writefile(typval_T *argvars, typval_T *rettv) if (*fname == NUL || (fd = mch_fopen((char *)fname, append ? APPENDBIN : WRITEBIN)) == NULL) { - semsg(_(e_notcreate), *fname == NUL ? (char_u *)_("<empty>") : fname); + semsg(_(e_cant_create_file_str), *fname == NUL ? (char_u *)_("<empty>") : fname); ret = -1; } else if (blob) diff --git a/src/getchar.c b/src/getchar.c index 704d4d395..d9b55c081 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -1467,7 +1467,7 @@ openscript( expand_env(name, NameBuff, MAXPATHL); if ((scriptin[curscript] = mch_fopen((char *)NameBuff, READBIN)) == NULL) { - semsg(_(e_notopen), name); + semsg(_(e_cant_open_file_str), name); if (curscript) --curscript; return; diff --git a/src/globals.h b/src/globals.h index 98ad7106f..ad88583ad 100644 --- a/src/globals.h +++ b/src/globals.h @@ -1603,80 +1603,6 @@ EXTERN int netbeansSuppressNoLines INIT(= 0); // skip "No lines in buffer" * Some error messages that can be shared are included here. * They should be moved to errors.h. */ -EXTERN char e_intern2[] INIT(= N_("E685: Internal error: %s")); -EXTERN char e_duparg2[] INIT(= N_("E983: Duplicate argument: %s")); -#ifdef FEAT_SPELL -EXTERN char e_no_spell[] INIT(= N_("E756: Spell checking is not possible")); -#endif -#ifdef FEAT_LIBCALL -EXTERN char e_libcall[] INIT(= N_("E364: Library call failed for \"%s()\"")); -#endif -#ifdef HAVE_FSYNC -EXTERN char e_fsync[] INIT(= N_("E667: Fsync failed")); -#endif -#if defined(DYNAMIC_PERL) \ - || defined(DYNAMIC_PYTHON) || defined(DYNAMIC_PYTHON3) \ - || defined(DYNAMIC_RUBY) \ - || defined(DYNAMIC_TCL) \ - || defined(DYNAMIC_ICONV) \ - || defined(DYNAMIC_GETTEXT) \ - || defined(DYNAMIC_MZSCHEME) \ - || defined(DYNAMIC_LUA) \ - || defined(FEAT_TERMINAL) -EXTERN char e_loadlib[] INIT(= N_("E370: Could not load library %s: %s")); -EXTERN char e_loadfunc[] INIT(= N_("E448: Could not load library function %s")); -#endif -EXTERN char e_nobang[] INIT(= N_("E477: No ! allowed")); -#ifndef FEAT_ARABIC -EXTERN char e_noarabic[] INIT(= N_("E800: Arabic cannot be used: Not enabled at compile time\n")); -#endif -EXTERN char e_nomatch[] INIT(= N_("E479: No match")); -EXTERN char e_nomatch2[] INIT(= N_("E480: No match: %s")); -EXTERN char e_norange[] INIT(= N_("E481: No range allowed")); -#ifdef FEAT_CLIENTSERVER -EXTERN char e_noserver[] INIT(= N_("E247: no registered server named \"%s\"")); -#endif -EXTERN char e_notcreate[] INIT(= N_("E482: Can't create file %s")); -EXTERN char e_notmp[] INIT(= N_("E483: Can't get temp file name")); -EXTERN char e_notopen[] INIT(= N_("E484: Can't open file %s")); -EXTERN char e_notread[] INIT(= N_("E485: Can't read file %s")); -#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) -EXTERN char e_opendisp[] INIT(= N_("E233: cannot open display")); -#endif -EXTERN char e_patnotf[] INIT(= N_("Pattern not found")); -EXTERN char e_patnotf2[] INIT(= N_("E486: Pattern not found: %s")); -EXTERN char e_positive[] INIT(= N_("E487: Argument must be positive")); -#if defined(UNIX) || defined(FEAT_SESSION) -EXTERN char e_prev_dir[] INIT(= N_("E459: Cannot go back to previous directory")); -#endif - -#ifdef FEAT_QUICKFIX -EXTERN char e_loclist[] INIT(= N_("E776: No location list")); -#endif -#ifdef FEAT_EVAL -EXTERN char e_letwrong[] INIT(= N_("E734: Wrong variable type for %s=")); -EXTERN char e_illvar[] INIT(= N_("E461: Illegal variable name: %s")); -EXTERN char e_cannot_mod[] INIT(= N_("E995: Cannot modify existing variable")); -EXTERN char e_stringreq[] INIT(= N_("E928: String required")); -EXTERN char e_numberreq[] INIT(= N_("E889: Number required")); -EXTERN char e_boolreq[] INIT(= N_("E839: Bool required")); -EXTERN char e_emptykey[] INIT(= N_("E713: Cannot use empty key for Dictionary")); -EXTERN char e_dictreq[] INIT(= N_("E715: Dictionary required")); -EXTERN char e_listidx[] INIT(= N_("E684: list index out of range: %ld")); -EXTERN char e_blobidx[] INIT(= N_("E979: Blob index out of range: %ld")); -EXTERN char e_invalblob[] INIT(= N_("E978: Invalid operation for Blob")); -EXTERN char e_func_deleted[] INIT(= N_("E933: Function was deleted: %s")); -EXTERN char e_dictkey[] INIT(= N_("E716: Key not present in Dictionary: \"%s\"")); -EXTERN char e_listreq[] INIT(= N_("E714: List required")); -EXTERN char e_listblobreq[] INIT(= N_("E897: List or Blob required")); -EXTERN char e_list_end[] INIT(= N_("E697: Missing end of List ']': %s")); -EXTERN char e_listdictarg[] INIT(= N_("E712: Argument of %s must be a List or Dictionary")); -EXTERN char e_listdictblobarg[] INIT(= N_("E896: Argument of %s must be a List, Dictionary or Blob")); -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_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 EXTERN char e_secure[] INIT(= N_("E523: Not allowed here")); EXTERN char e_textlock[] INIT(= N_("E578: Not allowed to change text here")); EXTERN char e_textwinlock[] INIT(= N_("E565: Not allowed to change text or change window")); diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index ba3993b59..acd36d3ad 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -1507,7 +1507,7 @@ gui_mch_early_init_check(int give_message) { gui.dying = TRUE; if (give_message) - emsg(_((char *)e_opendisp)); + emsg(_((char *)e_cannot_open_display)); return FAIL; } return OK; @@ -1553,7 +1553,7 @@ gui_mch_init_check(void) if (!gtk_init_check(&gui_argc, &gui_argv)) { gui.dying = TRUE; - emsg(_((char *)e_opendisp)); + emsg(_((char *)e_cannot_open_display)); return FAIL; } diff --git a/src/gui_x11.c b/src/gui_x11.c index 2e871770f..07699d3fe 100644 --- a/src/gui_x11.c +++ b/src/gui_x11.c @@ -1218,7 +1218,7 @@ gui_mch_init_check(void) if (app_context == NULL || gui.dpy == NULL) { gui.dying = TRUE; - emsg(_(e_opendisp)); + emsg(_(e_cannot_open_display)); return FAIL; } return OK; diff --git a/src/hardcopy.c b/src/hardcopy.c index a04d5d85a..9a7e7c630 100644 --- a/src/hardcopy.c +++ b/src/hardcopy.c @@ -2625,7 +2625,7 @@ mch_print_init( prt_ps_file_name = vim_tempname('p', TRUE); if (prt_ps_file_name == NULL) { - emsg(_(e_notmp)); + emsg(_(e_cant_get_temp_file_name)); return FAIL; } prt_ps_fd = mch_fopen((char *)prt_ps_file_name, WRITEBIN); diff --git a/src/help.c b/src/help.c index 22a86ed64..a356e7fa7 100644 --- a/src/help.c +++ b/src/help.c @@ -982,7 +982,7 @@ helptags_one( || filecount == 0) { if (!got_int) - semsg(_(e_no_match_str), NameBuff); + semsg(_(e_no_match_str_1), NameBuff); return; } diff --git a/src/highlight.c b/src/highlight.c index c4f5c66c6..7349f4b4a 100644 --- a/src/highlight.c +++ b/src/highlight.c @@ -4273,7 +4273,7 @@ hldict_get_string(dict_T *dict, char_u *key, int *error) if (di->di_tv.v_type != VAR_STRING || di->di_tv.vval.v_string == NULL) { - emsg(_(e_stringreq)); + emsg(_(e_string_required)); *error = TRUE; return NULL; } @@ -4306,7 +4306,7 @@ hldict_attr_to_str( if (di->di_tv.v_type != VAR_DICT || di->di_tv.vval.v_dict == NULL) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return FALSE; } @@ -4548,7 +4548,7 @@ f_hlset(typval_T *argvars, typval_T *rettv) { if (li->li_tv.v_type != VAR_DICT) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return; } diff --git a/src/if_cscope.c b/src/if_cscope.c index d587587c4..c7bd9e33e 100644 --- a/src/if_cscope.c +++ b/src/if_cscope.c @@ -1176,7 +1176,7 @@ cs_find_common( f = mch_fopen((char *)tmp, "w"); if (f == NULL) - semsg(_(e_notopen), tmp); + semsg(_(e_cant_open_file_str), tmp); else { cs_file_results(f, nummatches); diff --git a/src/if_lua.c b/src/if_lua.c index 34eee8e0c..956fd4d7c 100644 --- a/src/if_lua.c +++ b/src/if_lua.c @@ -452,7 +452,7 @@ lua_link_init(char *libname, int verbose) if (!hinstLua) { if (verbose) - semsg(_(e_loadlib), libname, load_dll_error()); + semsg(_(e_could_not_load_library_str_str), libname, load_dll_error()); return FAIL; } for (reg = luaV_dll; reg->func; reg++) @@ -462,7 +462,7 @@ lua_link_init(char *libname, int verbose) close_dll(hinstLua); hinstLua = 0; if (verbose) - semsg(_(e_loadfunc), reg->name); + semsg(_(e_could_not_load_library_function_str), reg->name); return FAIL; } } diff --git a/src/if_mzsch.c b/src/if_mzsch.c index 41b6d0006..2d87238fe 100644 --- a/src/if_mzsch.c +++ b/src/if_mzsch.c @@ -668,14 +668,14 @@ mzscheme_runtime_link_init(char *sch_dll, char *gc_dll, int verbose) if (!hMzGC) { if (verbose) - semsg(_(e_loadlib), gc_dll, GetWin32Error()); + semsg(_(e_could_not_load_library_str_str), gc_dll, GetWin32Error()); return FAIL; } if (!hMzSch) { if (verbose) - semsg(_(e_loadlib), sch_dll, GetWin32Error()); + semsg(_(e_could_not_load_library_str_str), sch_dll, GetWin32Error()); return FAIL; } @@ -689,7 +689,7 @@ mzscheme_runtime_link_init(char *sch_dll, char *gc_dll, int verbose) FreeLibrary(hMzGC); hMzGC = 0; if (verbose) - semsg(_(e_loadfunc), thunk->name); + semsg(_(e_could_not_load_library_function_str), thunk->name); return FAIL; } } @@ -703,7 +703,7 @@ mzscheme_runtime_link_init(char *sch_dll, char *gc_dll, int verbose) FreeLibrary(hMzGC); hMzGC = 0; if (verbose) - semsg(_(e_loadfunc), thunk->name); + semsg(_(e_could_not_load_library_function_str), thunk->name); return FAIL; } } diff --git a/src/if_perl.xs b/src/if_perl.xs index 3d683bd9c..37b9cb292 100644 --- a/src/if_perl.xs +++ b/src/if_perl.xs @@ -773,7 +773,7 @@ perl_runtime_link_init(char *libname, int verbose) close_dll(hPerlLib); hPerlLib = NULL; if (verbose) - semsg((const char *)_(e_loadfunc), perl_funcname_table[i].name); + semsg((const char *)_(e_could_not_load_library_function_str), perl_funcname_table[i].name); return FAIL; } } diff --git a/src/if_python.c b/src/if_python.c index 1b7ff762f..22c2f0c0d 100644 --- a/src/if_python.c +++ b/src/if_python.c @@ -690,7 +690,7 @@ python_runtime_link_init(char *libname, int verbose) if (!hinstPython) { if (verbose) - semsg(_(e_loadlib), libname, load_dll_error()); + semsg(_(e_could_not_load_library_str_str), libname, load_dll_error()); return FAIL; } @@ -702,7 +702,7 @@ python_runtime_link_init(char *libname, int verbose) close_dll(hinstPython); hinstPython = 0; if (verbose) - semsg(_(e_loadfunc), python_funcname_table[i].name); + semsg(_(e_could_not_load_library_function_str), python_funcname_table[i].name); return FAIL; } } @@ -719,7 +719,7 @@ python_runtime_link_init(char *libname, int verbose) close_dll(hinstPython); hinstPython = 0; if (verbose) - semsg(_(e_loadfunc), "PyUnicode_UCSX_*"); + semsg(_(e_could_not_load_library_function_str), "PyUnicode_UCSX_*"); return FAIL; } diff --git a/src/if_python3.c b/src/if_python3.c index db88527a5..938ab8dd5 100644 --- a/src/if_python3.c +++ b/src/if_python3.c @@ -797,7 +797,7 @@ py3_runtime_link_init(char *libname, int verbose) if (!hinstPy3) { if (verbose) - semsg(_(e_loadlib), libname, load_dll_error()); + semsg(_(e_could_not_load_library_str_str), libname, load_dll_error()); return FAIL; } @@ -809,7 +809,7 @@ py3_runtime_link_init(char *libname, int verbose) close_dll(hinstPy3); hinstPy3 = 0; if (verbose) - semsg(_(e_loadfunc), py3_funcname_table[i].name); + semsg(_(e_could_not_load_library_function_str), py3_funcname_table[i].name); return FAIL; } } @@ -844,7 +844,7 @@ py3_runtime_link_init(char *libname, int verbose) close_dll(hinstPy3); hinstPy3 = 0; if (verbose) - semsg(_(e_loadfunc), "PyUnicode_UCSX_*"); + semsg(_(e_could_not_load_library_function_str), "PyUnicode_UCSX_*"); return FAIL; } diff --git a/src/if_ruby.c b/src/if_ruby.c index 07c817dce..ef332ee0b 100644 --- a/src/if_ruby.c +++ b/src/if_ruby.c @@ -845,7 +845,7 @@ ruby_runtime_link_init(char *libname, int verbose) if (!hinstRuby) { if (verbose) - semsg(_(e_loadlib), libname, load_dll_error()); + semsg(_(e_could_not_load_library_str_str), libname, load_dll_error()); return FAIL; } @@ -857,7 +857,7 @@ ruby_runtime_link_init(char *libname, int verbose) close_dll(hinstRuby); hinstRuby = NULL; if (verbose) - semsg(_(e_loadfunc), ruby_funcname_table[i].name); + semsg(_(e_could_not_load_library_function_str), ruby_funcname_table[i].name); return FAIL; } } diff --git a/src/if_tcl.c b/src/if_tcl.c index 75fa858e8..cc48c8e63 100644 --- a/src/if_tcl.c +++ b/src/if_tcl.c @@ -215,7 +215,7 @@ tcl_runtime_link_init(char *libname, int verbose) if (!(hTclLib = load_dll(libname))) { if (verbose) - semsg(_(e_loadlib), libname, load_dll_error()); + semsg(_(e_could_not_load_library_str_str), libname, load_dll_error()); return FAIL; } for (i = 0; tcl_funcname_table[i].ptr; ++i) @@ -226,7 +226,7 @@ tcl_runtime_link_init(char *libname, int verbose) close_dll(hTclLib); hTclLib = NULL; if (verbose) - semsg(_(e_loadfunc), tcl_funcname_table[i].name); + semsg(_(e_could_not_load_library_function_str), tcl_funcname_table[i].name); return FAIL; } } diff --git a/src/if_xcmdsrv.c b/src/if_xcmdsrv.c index c814f213d..763eee50d 100644 --- a/src/if_xcmdsrv.c +++ b/src/if_xcmdsrv.c @@ -425,7 +425,7 @@ serverSendToVim( if (w == None) { if (!silent) - semsg(_(e_noserver), name); + semsg(_(e_no_registered_server_named_str), name); return -1; } else if (loosename != NULL) diff --git a/src/indent.c b/src/indent.c index 12020f834..4a8b36725 100644 --- a/src/indent.c +++ b/src/indent.c @@ -42,7 +42,7 @@ tabstop_set(char_u *var, int **array) if (strtol((char *)cp, (char **)&end, 10) <= 0) { if (cp != end) - emsg(_(e_positive)); + emsg(_(e_argument_must_be_positive)); else semsg(_(e_invalid_argument_str), cp); return FAIL; @@ -1622,7 +1622,7 @@ ex_retab(exarg_T *eap) new_ts = getdigits(&ptr); if (new_ts < 0 && *eap->arg == '-') { - emsg(_(e_positive)); + emsg(_(e_argument_must_be_positive)); return; } if (new_ts < 0 || new_ts > 9999) diff --git a/src/insexpand.c b/src/insexpand.c index d006135d2..1051ae1ad 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -2960,7 +2960,7 @@ f_complete_info(typval_T *argvars, typval_T *rettv) { if (argvars[0].v_type != VAR_LIST) { - emsg(_(e_listreq)); + emsg(_(e_list_required)); return; } what_list = argvars[0].vval.v_list; @@ -4696,7 +4696,8 @@ ins_compl_show_statusmsg(void) { edit_submode_extra = (compl_cont_status & CONT_ADDING) && compl_length > 1 - ? (char_u *)_(e_hitend) : (char_u *)_(e_patnotf); + ? (char_u *)_(e_hitend) + : (char_u *)_(e_pattern_not_found); edit_submode_highl = HLF_E; } @@ -131,7 +131,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2) return OK; if (tv->v_type != VAR_DICT) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return FAIL; } dict = tv->vval.v_dict; diff --git a/src/list.c b/src/list.c index 42f9765a5..fe8c082fe 100644 --- a/src/list.c +++ b/src/list.c @@ -524,7 +524,7 @@ list_find_str(list_T *l, long idx) li = list_find(l, idx - 1); if (li == NULL) { - semsg(_(e_listidx), idx); + semsg(_(e_list_index_out_of_range_nr), idx); return NULL; } return tv_get_string(&li->li_tv); @@ -782,7 +782,7 @@ check_range_index_one(list_T *l, long *n1, int quiet) if (li == NULL) { if (!quiet) - semsg(_(e_listidx), *n1); + semsg(_(e_list_index_out_of_range_nr), *n1); return NULL; } } @@ -810,7 +810,7 @@ check_range_index_two( if (ni == NULL) { if (!quiet) - semsg(_(e_listidx), *n2); + semsg(_(e_list_index_out_of_range_nr), *n2); return FAIL; } *n2 = list_idx_of_item(l, ni); @@ -822,7 +822,7 @@ check_range_index_two( if (*n2 < *n1) { if (!quiet) - semsg(_(e_listidx), *n2); + semsg(_(e_list_index_out_of_range_nr), *n2); return FAIL; } return OK; @@ -1163,7 +1163,7 @@ list_slice_or_index( if (!range) { if (verbose) - semsg(_(e_listidx), (long)n1_arg); + semsg(_(e_list_index_out_of_range_nr), (long)n1_arg); return FAIL; } if (in_vim9script()) @@ -1449,7 +1449,7 @@ f_join(typval_T *argvars, typval_T *rettv) if (argvars[0].v_type != VAR_LIST) { - emsg(_(e_listreq)); + emsg(_(e_list_required)); return; } rettv->v_type = VAR_STRING; @@ -1551,7 +1551,7 @@ eval_list(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int do_error) if (**arg != ']') { if (do_error) - semsg(_(e_list_end), *arg); + semsg(_(e_missing_end_of_list_rsb_str), *arg); failret: if (evaluate) list_free(l); @@ -1725,7 +1725,7 @@ list_remove(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg) if ((item = list_find(l, idx)) == NULL) { - semsg(_(e_listidx), idx); + semsg(_(e_list_index_out_of_range_nr), idx); return; } @@ -1745,7 +1745,7 @@ list_remove(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg) if ((item2 = list_find(l, end)) == NULL) { - semsg(_(e_listidx), end); + semsg(_(e_list_index_out_of_range_nr), end); return; } @@ -2174,7 +2174,7 @@ parse_sort_uniq_args(typval_T *argvars, sortinfo_T *info) // optional third argument: {dict} if (argvars[2].v_type != VAR_DICT) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return FAIL; } info->item_compare_selfdict = argvars[2].vval.v_dict; @@ -2598,7 +2598,7 @@ f_add(typval_T *argvars, typval_T *rettv) else if (argvars[0].v_type == VAR_BLOB) blob_add(argvars, rettv); else - emsg(_(e_listblobreq)); + emsg(_(e_list_or_blob_required)); } /* @@ -2622,7 +2622,7 @@ list_count(list_T *l, typval_T *needle, long idx, int ic) li = list_find(l, idx); if (li == NULL) { - semsg(_(e_listidx), idx); + semsg(_(e_list_index_out_of_range_nr), idx); return 0; } @@ -2675,7 +2675,7 @@ f_count(typval_T *argvars, typval_T *rettv) n = dict_count(argvars[0].vval.v_dict, &argvars[1], ic); } else - semsg(_(e_listdictarg), "count()"); + semsg(_(e_argument_of_str_must_be_list_or_dictionary), "count()"); rettv->vval.v_number = n; } @@ -2728,7 +2728,7 @@ list_extend_func( item = list_find(l1, before); if (item == NULL) { - semsg(_(e_listidx), before); + semsg(_(e_list_index_out_of_range_nr), before); return; } } @@ -2773,7 +2773,7 @@ extend(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg, int is_new) else if (argvars[0].v_type == VAR_DICT && argvars[1].v_type == VAR_DICT) dict_extend_func(argvars, type, func_name, arg_errmsg, is_new, rettv); else - semsg(_(e_listdictarg), func_name); + semsg(_(e_argument_of_str_must_be_list_or_dictionary), func_name); if (type != NULL) clear_type_list(&type_list); @@ -2833,7 +2833,7 @@ list_insert_func(typval_T *argvars, typval_T *rettv) item = list_find(l, before); if (item == NULL) { - semsg(_(e_listidx), before); + semsg(_(e_list_index_out_of_range_nr), before); l = NULL; } } @@ -2890,7 +2890,7 @@ f_remove(typval_T *argvars, typval_T *rettv) else if (argvars[0].v_type == VAR_LIST) list_remove(argvars, rettv, arg_errmsg); else - semsg(_(e_listdictblobarg), "remove()"); + semsg(_(e_argument_of_str_must_be_list_dictionary_or_blob), "remove()"); } static void @@ -2969,7 +2969,7 @@ list_reduce( { if (l == NULL || l->lv_first == NULL) { - semsg(_(e_reduceempty), "List"); + semsg(_(e_reduce_of_an_empty_str_with_no_initial_value), "List"); return; } initial = l->lv_first->li_tv; diff --git a/src/main.c b/src/main.c index 53322498c..01dd50477 100644 --- a/src/main.c +++ b/src/main.c @@ -2094,7 +2094,7 @@ command_line_scan(mparm_T *parmp) #ifdef FEAT_ARABIC set_option_value((char_u *)"arabic", 1L, NULL, 0); #else - mch_errmsg(_(e_noarabic)); + mch_errmsg(_(e_arabic_cannot_be_used_not_enabled_at_compile_time)); mch_exit(2); #endif break; @@ -2362,7 +2362,7 @@ f_mapset(typval_T *argvars, typval_T *rettv UNUSED) if (argvars[2].v_type != VAR_DICT) { - emsg(_(e_dictkey)); + emsg(_(e_key_not_present_in_dictionary)); return; } d = argvars[2].vval.v_dict; diff --git a/src/match.c b/src/match.c index f1c7442a5..e0a301758 100644 --- a/src/match.c +++ b/src/match.c @@ -936,7 +936,7 @@ matchadd_dict_arg(typval_T *tv, char_u **conceal_char, win_T **win) if (tv->v_type != VAR_DICT) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return FAIL; } @@ -1070,7 +1070,7 @@ f_setmatches(typval_T *argvars UNUSED, typval_T *rettv UNUSED) if (argvars[0].v_type != VAR_LIST) { - emsg(_(e_listreq)); + emsg(_(e_list_required)); return; } win = get_optional_window(argvars, 1); diff --git a/src/mbyte.c b/src/mbyte.c index bbbb5066d..e9febcb98 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -4907,7 +4907,7 @@ iconv_enabled(int verbose) if (verbose && p_verbose > 0) { verbose_enter(); - semsg(_(e_loadlib), + semsg(_(e_could_not_load_library_str_str), hIconvDLL == 0 ? DYNAMIC_ICONV_DLL : DYNAMIC_MSVCRT_DLL, GetWin32Error()); verbose_leave(); @@ -4930,7 +4930,7 @@ iconv_enabled(int verbose) if (verbose && p_verbose > 0) { verbose_enter(); - semsg(_(e_loadfunc), "for libiconv"); + semsg(_(e_could_not_load_library_function_str), "for libiconv"); verbose_leave(); } return FALSE; @@ -5524,7 +5524,7 @@ f_setcellwidths(typval_T *argvars, typval_T *rettv UNUSED) if (argvars[0].v_type != VAR_LIST || argvars[0].vval.v_list == NULL) { - emsg(_(e_listreq)); + emsg(_(e_list_required)); return; } l = argvars[0].vval.v_list; diff --git a/src/message.c b/src/message.c index e738e6de0..a930a8063 100644 --- a/src/message.c +++ b/src/message.c @@ -873,7 +873,7 @@ siemsg(const char *s, ...) void internal_error(char *where) { - siemsg(_(e_intern2), where); + siemsg(_(e_internal_error_str), where); } /* @@ -883,7 +883,7 @@ internal_error(char *where) void internal_error_no_abort(char *where) { - semsg(_(e_intern2), where); + semsg(_(e_internal_error_str), where); } // emsg3() and emsgn() are in misc2.c to avoid warnings for the prototypes. @@ -3625,7 +3625,7 @@ verbose_open(void) verbose_fd = mch_fopen((char *)p_vfile, "a"); if (verbose_fd == NULL) { - semsg(_(e_notopen), p_vfile); + semsg(_(e_cant_open_file_str), p_vfile); return FAIL; } } diff --git a/src/misc1.c b/src/misc1.c index a8bc08e35..2bc0de01c 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -1262,7 +1262,7 @@ init_homedir(void) if (!mch_chdir((char *)var) && mch_dirname(IObuff, IOSIZE) == OK) var = IObuff; if (mch_chdir((char *)NameBuff) != 0) - emsg(_(e_prev_dir)); + emsg(_(e_cannot_go_back_to_previous_directory)); } #endif homedir = vim_strsave(var); @@ -2280,7 +2280,7 @@ get_cmd_output( // get a name for the temp file if ((tempname = vim_tempname('o', FALSE)) == NULL) { - emsg(_(e_notmp)); + emsg(_(e_cant_get_temp_file_name)); return NULL; } @@ -2311,7 +2311,7 @@ get_cmd_output( if (fd == NULL) { - semsg(_(e_notopen), tempname); + semsg(_(e_cant_open_file_str), tempname); goto done; } @@ -2331,7 +2331,7 @@ get_cmd_output( #endif if (i != len) { - semsg(_(e_notread), tempname); + semsg(_(e_cant_read_file_str), tempname); VIM_CLEAR(buffer); } else if (ret_len == NULL) @@ -2385,14 +2385,14 @@ get_cmd_output_as_rettv( */ if ((infile = vim_tempname('i', TRUE)) == NULL) { - emsg(_(e_notmp)); + emsg(_(e_cant_get_temp_file_name)); goto errret; } fd = mch_fopen((char *)infile, WRITEBIN); if (fd == NULL) { - semsg(_(e_notopen), infile); + semsg(_(e_cant_open_file_str), infile); goto errret; } if (argvars[1].v_type == VAR_NUMBER) diff --git a/src/option.c b/src/option.c index 2f81f8bb9..caa6abca4 100644 --- a/src/option.c +++ b/src/option.c @@ -3326,7 +3326,7 @@ set_num_option( if (curbuf->b_p_sw < 0) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; #ifdef FEAT_VARTABS // Use the first 'vartabstop' value, or 'tabstop' if vts isn't in use. curbuf->b_p_sw = tabstop_count(curbuf->b_p_vts_array) > 0 @@ -3345,7 +3345,7 @@ set_num_option( // 'winheight' and 'helpheight' if (p_wh < 1) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; p_wh = 1; } if (p_wmh > p_wh) @@ -3355,7 +3355,7 @@ set_num_option( } if (p_hh < 0) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; p_hh = 0; } @@ -3373,7 +3373,7 @@ set_num_option( // 'winminheight' if (p_wmh < 0) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; p_wmh = 0; } if (p_wmh > p_wh) @@ -3388,7 +3388,7 @@ set_num_option( // 'winwidth' if (p_wiw < 1) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; p_wiw = 1; } if (p_wmw > p_wiw) @@ -3406,7 +3406,7 @@ set_num_option( // 'winminwidth' if (p_wmw < 0) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; p_wmw = 0; } if (p_wmw > p_wiw) @@ -3466,7 +3466,7 @@ set_num_option( { if (curwin->w_p_fdc < 0) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; curwin->w_p_fdc = 0; } else if (curwin->w_p_fdc > 12) @@ -3552,7 +3552,7 @@ set_num_option( { if (p_titlelen < 0) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; p_titlelen = 85; } if (starting != NO_SCREEN && old_value != p_titlelen) @@ -3564,7 +3564,7 @@ set_num_option( { if (p_ch < 1) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; p_ch = 1; } if (p_ch > Rows - min_rows() + 1) @@ -3585,7 +3585,7 @@ set_num_option( { if (p_uc < 0) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; p_uc = 100; } if (p_uc && !old_value) @@ -3596,7 +3596,7 @@ set_num_option( { if (curwin->w_p_cole < 0) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; curwin->w_p_cole = 0; } else if (curwin->w_p_cole > 3) @@ -3642,7 +3642,7 @@ set_num_option( { if (curwin->w_p_nuw < 1) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; curwin->w_p_nuw = 1; } if (curwin->w_p_nuw > 20) @@ -3658,7 +3658,7 @@ set_num_option( { if (curbuf->b_p_tw < 0) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; curbuf->b_p_tw = 0; } #ifdef FEAT_SYN_HL @@ -3726,12 +3726,12 @@ set_num_option( if (curbuf->b_p_ts <= 0) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; curbuf->b_p_ts = 8; } if (p_tm < 0) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; p_tm = 0; } if ((curwin->w_p_scr <= 0 @@ -3754,7 +3754,7 @@ set_num_option( } if (p_hi < 0) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; p_hi = 0; } else if (p_hi > 10000) @@ -3769,7 +3769,7 @@ set_num_option( } if (p_report < 0) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; p_report = 1; } if ((p_sj < -100 || p_sj >= Rows) && full_screen) @@ -3784,29 +3784,29 @@ set_num_option( } if (p_so < 0 && full_screen) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; p_so = 0; } if (p_siso < 0 && full_screen) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; p_siso = 0; } #ifdef FEAT_CMDWIN if (p_cwh < 1) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; p_cwh = 1; } #endif if (p_ut < 0) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; p_ut = 2000; } if (p_ss < 0) { - errmsg = e_positive; + errmsg = e_argument_must_be_positive; p_ss = 0; } diff --git a/src/optionstr.c b/src/optionstr.c index 85405edec..49d23b06e 100644 --- a/src/optionstr.c +++ b/src/optionstr.c @@ -380,7 +380,7 @@ set_string_option_direct( idx = findoption(name); if (idx < 0) // not found (should not happen) { - semsg(_(e_intern2), "set_string_option_direct()"); + semsg(_(e_internal_error_str), "set_string_option_direct()"); siemsg(_("For option %s"), name); return; } diff --git a/src/os_mswin.c b/src/os_mswin.c index e27f38908..bd9976bf0 100644 --- a/src/os_mswin.c +++ b/src/os_mswin.c @@ -892,7 +892,7 @@ mch_libcall( if (!fRunTimeLinkSuccess) { - semsg(_(e_libcall), funcname); + semsg(_(e_library_call_failed_for_str), funcname); return FAIL; } @@ -2388,7 +2388,7 @@ serverSendToVim( if (target == 0) { if (!silent) - semsg(_(e_noserver), name); + semsg(_(e_no_registered_server_named_str), name); return -1; } diff --git a/src/os_unix.c b/src/os_unix.c index e24c09f4a..e22f14670 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -2702,7 +2702,7 @@ mch_FullName( #endif l = mch_chdir((char *)olddir); if (l != 0) - emsg(_(e_prev_dir)); + emsg(_(e_cannot_go_back_to_previous_directory)); } #ifdef HAVE_FCHDIR if (fd >= 0) @@ -5528,7 +5528,7 @@ mch_job_start(char **argv, job_T *job, jobopt_T *options, int is_terminal) fd_in[0] = mch_open((char *)fname, O_RDONLY, 0); if (fd_in[0] < 0) { - semsg(_(e_notopen), fname); + semsg(_(e_cant_open_file_str), fname); goto failed; } } @@ -5546,7 +5546,7 @@ mch_job_start(char **argv, job_T *job, jobopt_T *options, int is_terminal) fd_out[1] = mch_open((char *)fname, O_WRONLY | O_CREAT | O_TRUNC, 0644); if (fd_out[1] < 0) { - semsg(_(e_notopen), fname); + semsg(_(e_cant_open_file_str), fname); goto failed; } } @@ -5560,7 +5560,7 @@ mch_job_start(char **argv, job_T *job, jobopt_T *options, int is_terminal) fd_err[1] = mch_open((char *)fname, O_WRONLY | O_CREAT | O_TRUNC, 0600); if (fd_err[1] < 0) { - semsg(_(e_notopen), fname); + semsg(_(e_cant_open_file_str), fname); goto failed; } } @@ -6627,7 +6627,7 @@ mch_expand_wildcards( */ if ((tempname = vim_tempname('o', FALSE)) == NULL) { - emsg(_(e_notmp)); + emsg(_(e_cant_get_temp_file_name)); return FAIL; } @@ -6888,7 +6888,7 @@ mch_expand_wildcards( if (i != (int)len) { // unexpected read error - semsg(_(e_notread), tempname); + semsg(_(e_cant_read_file_str), tempname); vim_free(tempname); vim_free(buffer); return FAIL; @@ -7594,7 +7594,7 @@ mch_libcall( if (!success) { - semsg(_(e_libcall), funcname); + semsg(_(e_library_call_failed_for_str), funcname); return FAIL; } diff --git a/src/os_win32.c b/src/os_win32.c index b0ff1bb55..e4ebc0c6d 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -716,7 +716,7 @@ dyn_libintl_init(void) if (p_verbose > 0) { verbose_enter(); - semsg(_(e_loadlib), GETTEXT_DLL, GetWin32Error()); + semsg(_(e_could_not_load_library_str_str), GETTEXT_DLL, GetWin32Error()); verbose_leave(); } return 0; @@ -731,7 +731,7 @@ dyn_libintl_init(void) if (p_verbose > 0) { verbose_enter(); - semsg(_(e_loadfunc), libintl_entry[i].name); + semsg(_(e_could_not_load_library_function_str), libintl_entry[i].name); verbose_leave(); } return 0; @@ -5311,7 +5311,7 @@ mch_job_start(char *cmd, job_T *job, jobopt_T *options) &saAttr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL); if (ifd[0] == INVALID_HANDLE_VALUE) { - semsg(_(e_notopen), fname); + semsg(_(e_cant_open_file_str), fname); goto failed; } } @@ -5329,7 +5329,7 @@ mch_job_start(char *cmd, job_T *job, jobopt_T *options) &saAttr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL); if (ofd[1] == INVALID_HANDLE_VALUE) { - semsg(_(e_notopen), fname); + semsg(_(e_cant_open_file_str), fname); goto failed; } } @@ -5347,7 +5347,7 @@ mch_job_start(char *cmd, job_T *job, jobopt_T *options) &saAttr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL); if (efd[1] == INVALID_HANDLE_VALUE) { - semsg(_(e_notopen), fname); + semsg(_(e_cant_open_file_str), fname); goto failed; } } diff --git a/src/popupwin.c b/src/popupwin.c index dfe0cac62..ee33a4305 100644 --- a/src/popupwin.c +++ b/src/popupwin.c @@ -86,7 +86,7 @@ set_padding_border(dict_T *dict, int *array, char *name, int max_val) if (di != NULL) { if (di->di_tv.v_type != VAR_LIST) - emsg(_(e_listreq)); + emsg(_(e_list_required)); else { list_T *list = di->di_tv.vval.v_list; @@ -755,7 +755,7 @@ apply_general_options(win_T *wp, dict_T *dict) if (di != NULL) { if (di->di_tv.v_type != VAR_LIST || di->di_tv.vval.v_list == NULL) - emsg(_(e_listreq)); + emsg(_(e_list_required)); else { list_T *list = di->di_tv.vval.v_list; @@ -787,7 +787,7 @@ apply_general_options(win_T *wp, dict_T *dict) if (di != NULL) { if (di->di_tv.v_type != VAR_LIST) - emsg(_(e_listreq)); + emsg(_(e_list_required)); else { list_T *list = di->di_tv.vval.v_list; @@ -1010,7 +1010,7 @@ add_popup_dicts(buf_T *buf, list_T *l) { if (li->li_tv.v_type != VAR_DICT) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return; } dict = li->li_tv.vval.v_dict; @@ -1033,7 +1033,7 @@ add_popup_dicts(buf_T *buf, list_T *l) { if (di->di_tv.v_type != VAR_LIST) { - emsg(_(e_listreq)); + emsg(_(e_list_required)); return; } plist = di->di_tv.vval.v_list; @@ -1043,7 +1043,7 @@ add_popup_dicts(buf_T *buf, list_T *l) { if (pli->li_tv.v_type != VAR_DICT) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return; } dict = pli->li_tv.vval.v_dict; @@ -1898,7 +1898,7 @@ popup_create(typval_T *argvars, typval_T *rettv, create_type_T type) } if (argvars[1].v_type != VAR_DICT || argvars[1].vval.v_dict == NULL) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return NULL; } d = argvars[1].vval.v_dict; @@ -2800,7 +2800,7 @@ f_popup_move(typval_T *argvars, typval_T *rettv UNUSED) if (argvars[1].v_type != VAR_DICT || argvars[1].vval.v_dict == NULL) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return; } dict = argvars[1].vval.v_dict; @@ -2835,7 +2835,7 @@ f_popup_setoptions(typval_T *argvars, typval_T *rettv UNUSED) if (argvars[1].v_type != VAR_DICT || argvars[1].vval.v_dict == NULL) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return; } dict = argvars[1].vval.v_dict; diff --git a/src/profiler.c b/src/profiler.c index 3638a0b5c..0aec86239 100644 --- a/src/profiler.c +++ b/src/profiler.c @@ -921,7 +921,7 @@ profile_dump(void) { fd = mch_fopen((char *)profile_fname, "w"); if (fd == NULL) - semsg(_(e_notopen), profile_fname); + semsg(_(e_cant_open_file_str), profile_fname); else { script_dump_profile(fd); diff --git a/src/quickfix.c b/src/quickfix.c index 05cae9e88..a5f3470f9 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -2202,7 +2202,7 @@ qf_cmd_get_stack(exarg_T *eap, int print_emsg) if (qi == NULL) { if (print_emsg) - emsg(_(e_loclist)); + emsg(_(e_no_location_list)); return NULL; } } @@ -3819,7 +3819,7 @@ qf_history(exarg_T *eap) { if (qi == NULL) { - emsg(_(e_loclist)); + emsg(_(e_no_location_list)); return; } @@ -4891,7 +4891,7 @@ get_mef_name(void) { name = vim_tempname('e', FALSE); if (name == NULL) - emsg(_(e_notmp)); + emsg(_(e_cant_get_temp_file_name)); return name; } @@ -6125,7 +6125,7 @@ vgr_process_args( if ((get_arglist_exp(p, &args->fcount, &args->fnames, TRUE) == FAIL) || args->fcount == 0) { - emsg(_(e_nomatch)); + emsg(_(e_no_match)); return FAIL; } @@ -6394,7 +6394,7 @@ ex_vimgrep(exarg_T *eap) first_match_buf, target_dir); } else - semsg(_(e_nomatch2), args.spat); + semsg(_(e_no_match_str_2), args.spat); decr_quickfix_busy(); @@ -8293,7 +8293,7 @@ ex_helpgrep(exarg_T *eap) if (!qf_list_empty(qf_get_curlist(qi))) qf_jump(qi, 0, 0, FALSE); else - semsg(_(e_nomatch2), eap->arg); + semsg(_(e_no_match_str_2), eap->arg); decr_quickfix_busy(); @@ -8336,7 +8336,7 @@ get_qf_loc_list(int is_qf, win_T *wp, typval_T *what_arg, typval_T *rettv) qf_get_properties(wp, d, rettv->vval.v_dict); } else - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); } } } @@ -8397,7 +8397,7 @@ set_qf_ll_list( # ifdef FEAT_QUICKFIX if (list_arg->v_type != VAR_LIST) - emsg(_(e_listreq)); + emsg(_(e_list_required)); else if (recursive != 0) emsg(_(e_au_recursive)); else @@ -8420,7 +8420,7 @@ set_qf_ll_list( else if (action_arg->v_type == VAR_UNKNOWN) action = ' '; else - emsg(_(e_stringreq)); + emsg(_(e_string_required)); if (action_arg->v_type != VAR_UNKNOWN && what_arg->v_type != VAR_UNKNOWN) @@ -8429,7 +8429,7 @@ set_qf_ll_list( what = what_arg->vval.v_dict; else { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); valid_dict = FALSE; } } diff --git a/src/scriptfile.c b/src/scriptfile.c index b9322587a..c85263ef7 100644 --- a/src/scriptfile.c +++ b/src/scriptfile.c @@ -983,7 +983,7 @@ cmd_source(char_u *fname, exarg_T *eap) // ":source" read ex commands else if (do_source(fname, FALSE, DOSO_NONE, NULL) == FAIL) - semsg(_(e_notopen), fname); + semsg(_(e_cant_open_file_str), fname); } /* diff --git a/src/search.c b/src/search.c index abe71a1ab..35a4a3a1e 100644 --- a/src/search.c +++ b/src/search.c @@ -1124,7 +1124,7 @@ searchit( else if ((options & SEARCH_MSG) == SEARCH_MSG) { if (p_ws) - semsg(_(e_patnotf2), mr_pattern); + semsg(_(e_pattern_not_found_str), mr_pattern); else if (lnum == 0) semsg(_("E384: search hit TOP without match for: %s"), mr_pattern); @@ -4121,7 +4121,7 @@ f_searchcount(typval_T *argvars, typval_T *rettv) if (argvars[0].v_type != VAR_DICT || argvars[0].vval.v_dict == NULL) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return; } dict = argvars[0].vval.v_dict; @@ -4824,7 +4824,7 @@ do_fuzzymatch(typval_T *argvars, typval_T *rettv, int retmatchpos) if (argvars[2].v_type != VAR_DICT || argvars[2].vval.v_dict == NULL) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return; } diff --git a/src/session.c b/src/session.c index e64697fd9..fdda5ee20 100644 --- a/src/session.c +++ b/src/session.c @@ -1298,7 +1298,7 @@ ex_mkrc(exarg_T *eap) || ((ssop_flags & SSOP_CURDIR) && globaldir != NULL))) { if (mch_chdir((char *)dirnow) != 0) - emsg(_(e_prev_dir)); + emsg(_(e_cannot_go_back_to_previous_directory)); shorten_fnames(TRUE); } vim_free(dirnow); diff --git a/src/sign.c b/src/sign.c index 1fef7692e..c9415445d 100644 --- a/src/sign.c +++ b/src/sign.c @@ -2314,7 +2314,7 @@ sign_define_multiple(list_T *l, list_T *retlist) if (li->li_tv.v_type == VAR_DICT) retval = sign_define_from_dict(NULL, li->li_tv.vval.v_dict); else - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); list_append_number(retlist, retval); } } @@ -2351,7 +2351,7 @@ f_sign_define(typval_T *argvars, typval_T *rettv) if (argvars[1].v_type != VAR_UNKNOWN && argvars[1].v_type != VAR_DICT) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return; } @@ -2414,7 +2414,7 @@ f_sign_getplaced(typval_T *argvars, typval_T *rettv) if (argvars[1].v_type != VAR_DICT || ((dict = argvars[1].vval.v_dict) == NULL)) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return; } if ((di = dict_find(dict, (char_u *)"lnum", -1)) != NULL) @@ -2644,7 +2644,7 @@ f_sign_place(typval_T *argvars, typval_T *rettv) && (argvars[4].v_type != VAR_DICT || ((dict = argvars[4].vval.v_dict) == NULL))) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return; } @@ -2669,7 +2669,7 @@ f_sign_placelist(typval_T *argvars, typval_T *rettv) if (argvars[0].v_type != VAR_LIST) { - emsg(_(e_listreq)); + emsg(_(e_list_required)); return; } @@ -2681,7 +2681,7 @@ f_sign_placelist(typval_T *argvars, typval_T *rettv) sign_id = sign_place_from_dict(NULL, NULL, NULL, NULL, li->li_tv.vval.v_dict); else - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); list_append_number(rettv->vval.v_list, sign_id); } } @@ -2874,7 +2874,7 @@ f_sign_unplace(typval_T *argvars, typval_T *rettv) { if (argvars[1].v_type != VAR_DICT) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return; } dict = argvars[1].vval.v_dict; @@ -2900,7 +2900,7 @@ f_sign_unplacelist(typval_T *argvars, typval_T *rettv) if (argvars[0].v_type != VAR_LIST) { - emsg(_(e_listreq)); + emsg(_(e_list_required)); return; } @@ -2910,7 +2910,7 @@ f_sign_unplacelist(typval_T *argvars, typval_T *rettv) if (li->li_tv.v_type == VAR_DICT) retval = sign_unplace_from_dict(NULL, li->li_tv.vval.v_dict); else - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); list_append_number(rettv->vval.v_list, retval); } } diff --git a/src/spell.c b/src/spell.c index 17b3ff8d5..21ffc3de9 100644 --- a/src/spell.c +++ b/src/spell.c @@ -1246,7 +1246,7 @@ no_spell_checking(win_T *wp) if (!wp->w_p_spell || *wp->w_s->b_p_spl == NUL || wp->w_s->b_langp.ga_len == 0) { - emsg(_(e_no_spell)); + emsg(_(e_spell_checking_is_not_possible)); return TRUE; } return FALSE; diff --git a/src/spellfile.c b/src/spellfile.c index dc6647a8b..4aa60e459 100644 --- a/src/spellfile.c +++ b/src/spellfile.c @@ -365,11 +365,11 @@ spell_load_file( if (fd == NULL) { if (!silent) - semsg(_(e_notopen), fname); + semsg(_(e_cant_open_file_str), fname); else if (p_verbose > 2) { verbose_enter(); - smsg((const char *)e_notopen, fname); + smsg((const char *)e_cant_open_file_str, fname); verbose_leave(); } goto endFAIL; @@ -2226,7 +2226,7 @@ spell_read_aff(spellinfo_T *spin, char_u *fname) fd = mch_fopen((char *)fname, "r"); if (fd == NULL) { - semsg(_(e_notopen), fname); + semsg(_(e_cant_open_file_str), fname); return NULL; } @@ -3520,7 +3520,7 @@ spell_read_dic(spellinfo_T *spin, char_u *fname, afffile_T *affile) fd = mch_fopen((char *)fname, "r"); if (fd == NULL) { - semsg(_(e_notopen), fname); + semsg(_(e_cant_open_file_str), fname); return FAIL; } @@ -4104,7 +4104,7 @@ spell_read_wordfile(spellinfo_T *spin, char_u *fname) fd = mch_fopen((char *)fname, "r"); if (fd == NULL) { - semsg(_(e_notopen), fname); + semsg(_(e_cant_open_file_str), fname); return FAIL; } @@ -4873,7 +4873,7 @@ write_vim_spell(spellinfo_T *spin, char_u *fname) fd = mch_fopen((char *)fname, "w"); if (fd == NULL) { - semsg(_(e_notopen), fname); + semsg(_(e_cant_open_file_str), fname); return FAIL; } @@ -5802,7 +5802,7 @@ sug_write(spellinfo_T *spin, char_u *fname) fd = mch_fopen((char *)fname, "w"); if (fd == NULL) { - semsg(_(e_notopen), fname); + semsg(_(e_cant_open_file_str), fname); return; } @@ -6316,7 +6316,7 @@ spell_add_word( } if (fd == NULL) - semsg(_(e_notopen), fname); + semsg(_(e_cant_open_file_str), fname); else { if (what == SPELL_ADD_BAD) diff --git a/src/spellsuggest.c b/src/spellsuggest.c index f21d55f62..e9f2cd570 100644 --- a/src/spellsuggest.c +++ b/src/spellsuggest.c @@ -481,7 +481,7 @@ spell_suggest(int count) if (*curwin->w_s->b_p_spl == NUL) { - emsg(_(e_no_spell)); + emsg(_(e_spell_checking_is_not_possible)); return; } @@ -935,7 +935,7 @@ spell_suggest_file(suginfo_T *su, char_u *fname) fd = mch_fopen((char *)fname, "r"); if (fd == NULL) { - semsg(_(e_notopen), fname); + semsg(_(e_cant_open_file_str), fname); return; } diff --git a/src/syntax.c b/src/syntax.c index 579c19486..d5d916c5a 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -4796,7 +4796,7 @@ syn_cmd_include(exarg_T *eap, int syncing UNUSED) curwin->w_s->b_syn_topgrp = sgl_id; if (source ? do_source(eap->arg, FALSE, DOSO_NONE, NULL) == FAIL : source_runtime(eap->arg, DIP_ALL) == FAIL) - semsg(_(e_notopen), eap->arg); + semsg(_(e_cant_open_file_str), eap->arg); curwin->w_s->b_syn_topgrp = prev_toplvl_grp; current_syn_inc_tag = prev_syn_inc_tag; } @@ -4358,7 +4358,7 @@ set_tagstack(win_T *wp, dict_T *d, int action) { if (di->di_tv.v_type != VAR_LIST) { - emsg(_(e_listreq)); + emsg(_(e_list_required)); return FAIL; } l = di->di_tv.vval.v_list; diff --git a/src/terminal.c b/src/terminal.c index 46307ea3a..ca5b835dc 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -4872,7 +4872,7 @@ f_term_dumpwrite(typval_T *argvars, typval_T *rettv UNUSED) if (argvars[2].v_type != VAR_DICT) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return; } d = argvars[2].vval.v_dict; @@ -4894,7 +4894,7 @@ f_term_dumpwrite(typval_T *argvars, typval_T *rettv UNUSED) if (*fname == NUL || (fd = mch_fopen((char *)fname, WRITEBIN)) == NULL) { - semsg(_(e_notcreate), *fname == NUL ? (char_u *)_("<empty>") : fname); + semsg(_(e_cant_create_file_str), *fname == NUL ? (char_u *)_("<empty>") : fname); return; } @@ -5374,7 +5374,7 @@ term_load_dump(typval_T *argvars, typval_T *rettv, int do_diff) fd1 = mch_fopen((char *)fname1, READBIN); if (fd1 == NULL) { - semsg(_(e_notread), fname1); + semsg(_(e_cant_read_file_str), fname1); return; } if (do_diff) @@ -5383,7 +5383,7 @@ term_load_dump(typval_T *argvars, typval_T *rettv, int do_diff) if (fd2 == NULL) { fclose(fd1); - semsg(_(e_notread), fname2); + semsg(_(e_cant_read_file_str), fname2); return; } } @@ -6346,7 +6346,7 @@ f_term_setansicolors(typval_T *argvars, typval_T *rettv UNUSED) if (argvars[1].v_type != VAR_LIST || argvars[1].vval.v_list == NULL) { - emsg(_(e_listreq)); + emsg(_(e_list_required)); return; } @@ -6639,7 +6639,7 @@ dyn_conpty_init(int verbose) conpty_entry[i].name)) == NULL) { if (verbose) - semsg(_(e_loadfunc), conpty_entry[i].name); + semsg(_(e_could_not_load_library_function_str), conpty_entry[i].name); hKerneldll = NULL; return FAIL; } @@ -6836,7 +6836,7 @@ conpty_term_and_job_init( ch_log(channel, "Opening output file %s", fname); term->tl_out_fd = mch_fopen((char *)fname, WRITEBIN); if (term->tl_out_fd == NULL) - semsg(_(e_notopen), fname); + semsg(_(e_cant_open_file_str), fname); } return OK; @@ -6979,7 +6979,7 @@ dyn_winpty_init(int verbose) if (!hWinPtyDLL) { if (verbose) - semsg(_(e_loadlib), + semsg(_(e_could_not_load_library_str_str), (*p_winptydll != NUL ? p_winptydll : (char_u *)WINPTY_DLL), GetWin32Error()); return FAIL; @@ -6991,7 +6991,7 @@ dyn_winpty_init(int verbose) winpty_entry[i].name)) == NULL) { if (verbose) - semsg(_(e_loadfunc), winpty_entry[i].name); + semsg(_(e_could_not_load_library_function_str), winpty_entry[i].name); hWinPtyDLL = NULL; return FAIL; } @@ -7172,7 +7172,7 @@ winpty_term_and_job_init( ch_log(channel, "Opening output file %s", fname); term->tl_out_fd = mch_fopen((char *)fname, WRITEBIN); if (term->tl_out_fd == NULL) - semsg(_(e_notopen), fname); + semsg(_(e_cant_open_file_str), fname); } return OK; diff --git a/src/testing.c b/src/testing.c index 782d35c5a..f401863ad 100644 --- a/src/testing.c +++ b/src/testing.c @@ -433,7 +433,7 @@ assert_equalfile(typval_T *argvars) fd1 = mch_fopen((char *)fname1, READBIN); if (fd1 == NULL) { - vim_snprintf((char *)IObuff, IOSIZE, (char *)e_notread, fname1); + vim_snprintf((char *)IObuff, IOSIZE, (char *)e_cant_read_file_str, fname1); } else { @@ -441,7 +441,7 @@ assert_equalfile(typval_T *argvars) if (fd2 == NULL) { fclose(fd1); - vim_snprintf((char *)IObuff, IOSIZE, (char *)e_notread, fname2); + vim_snprintf((char *)IObuff, IOSIZE, (char *)e_cant_read_file_str, fname2); } else { diff --git a/src/textprop.c b/src/textprop.c index 3159920ee..4c17a4aca 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -132,7 +132,7 @@ get_bufnr_from_arg(typval_T *arg, buf_T **buf) if (arg->v_type != VAR_DICT) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return FAIL; } if (arg->vval.v_dict == NULL) @@ -172,7 +172,7 @@ f_prop_add(typval_T *argvars, typval_T *rettv UNUSED) } if (argvars[2].v_type != VAR_DICT) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return; } @@ -328,7 +328,7 @@ f_prop_add_list(typval_T *argvars, typval_T *rettv UNUSED) if (argvars[1].vval.v_list == NULL) { - emsg(_(e_listreq)); + emsg(_(e_list_required)); return; } @@ -350,7 +350,7 @@ f_prop_add_list(typval_T *argvars, typval_T *rettv UNUSED) { if (li->li_tv.v_type != VAR_LIST || li->li_tv.vval.v_list == NULL) { - emsg(_(e_listreq)); + emsg(_(e_list_required)); return; } @@ -732,7 +732,7 @@ f_prop_find(typval_T *argvars, typval_T *rettv) if (argvars[0].v_type != VAR_DICT || argvars[0].vval.v_dict == NULL) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return; } dict = argvars[0].vval.v_dict; @@ -984,7 +984,7 @@ get_prop_types_from_names(list_T *l, buf_T *buf, int *num_types) { if (li->li_tv.v_type != VAR_STRING) { - emsg(_(e_stringreq)); + emsg(_(e_string_required)); goto errret; } name = li->li_tv.vval.v_string; @@ -1079,7 +1079,7 @@ f_prop_list(typval_T *argvars, typval_T *rettv) if (argvars[1].v_type != VAR_DICT) { - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); return; } d = argvars[1].vval.v_dict; @@ -1091,7 +1091,7 @@ f_prop_list(typval_T *argvars, typval_T *rettv) { if (di->di_tv.v_type != VAR_NUMBER) { - emsg(_(e_numberreq)); + emsg(_(e_number_required)); return; } end_lnum = tv_get_number(&di->di_tv); @@ -1107,7 +1107,7 @@ f_prop_list(typval_T *argvars, typval_T *rettv) { if (di->di_tv.v_type != VAR_LIST) { - emsg(_(e_listreq)); + emsg(_(e_list_required)); return; } @@ -1123,7 +1123,7 @@ f_prop_list(typval_T *argvars, typval_T *rettv) { if (di->di_tv.v_type != VAR_LIST) { - emsg(_(e_listreq)); + emsg(_(e_list_required)); goto errret; } diff --git a/src/typval.c b/src/typval.c index 34ff47c0a..0afd572b0 100644 --- a/src/typval.c +++ b/src/typval.c @@ -1388,7 +1388,7 @@ typval_compare_blob( if (tv1->v_type != tv2->v_type) emsg(_("E977: Can only compare Blob with Blob")); else - emsg(_(e_invalblob)); + emsg(_(e_invalid_operation_for_blob)); return FAIL; } else diff --git a/src/userfunc.c b/src/userfunc.c index 65970e1d1..0d365ceed 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -3271,7 +3271,7 @@ user_func_error(int error, char_u *name, funcexe_T *funcexe) N_("E276: Cannot use function as a method: %s"), name); break; case FCERR_DELETED: - emsg_funcname(e_func_deleted, name); + emsg_funcname(e_function_was_deleted_str, name); break; case FCERR_TOOMANY: emsg_funcname((char *)e_too_many_arguments_for_function_str, @@ -4127,7 +4127,7 @@ define_function(exarg_T *eap, char_u *name_arg, char_u **line_to_free) if (!aborting()) { if (!eap->skip && fudi.fd_newkey != NULL) - semsg(_(e_dictkey), fudi.fd_newkey); + semsg(_(e_key_not_present_in_dictionary), fudi.fd_newkey); vim_free(fudi.fd_newkey); return NULL; } @@ -4224,7 +4224,7 @@ define_function(exarg_T *eap, char_u *name_arg, char_u **line_to_free) // In Vim9 script only global functions can be redefined. if (vim9script && eap->forceit && !is_global) { - emsg(_(e_nobang)); + emsg(_(e_no_bang_allowed)); goto ret_free; } @@ -5145,7 +5145,7 @@ ex_call(exarg_T *eap) if (fudi.fd_newkey != NULL) { // Still need to give an error message for missing key. - semsg(_(e_dictkey), fudi.fd_newkey); + semsg(_(e_key_not_present_in_dictionary), fudi.fd_newkey); vim_free(fudi.fd_newkey); } if (tofree == NULL) diff --git a/src/version.c b/src/version.c index 195c3d5ee..337bcd5c5 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3967, +/**/ 3966, /**/ 3965, diff --git a/src/vim9execute.c b/src/vim9execute.c index b92f5b925..ea4c85e05 100644 --- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -271,7 +271,7 @@ call_dfunc( if (dfunc->df_deleted) { // don't use ufunc->uf_name, it may have been freed - emsg_funcname(e_func_deleted, + emsg_funcname(e_function_was_deleted_str, dfunc->df_name == NULL ? (char_u *)"unknown" : dfunc->df_name); return FAIL; } @@ -2578,7 +2578,7 @@ exec_instructions(ectx_T *ectx) lidx = list->lv_len + lidx; if (lidx < 0 || lidx > list->lv_len) { - semsg(_(e_listidx), lidx); + semsg(_(e_list_index_out_of_range_nr), lidx); goto on_error; } if (lidx < list->lv_len) @@ -2659,7 +2659,7 @@ exec_instructions(ectx_T *ectx) // Can add one byte at the end. if (lidx < 0 || lidx > len) { - semsg(_(e_blobidx), lidx); + semsg(_(e_blob_index_out_of_range_nr), lidx); goto on_error; } if (value_check_lock(blob->bv_lock, @@ -2879,7 +2879,7 @@ exec_instructions(ectx_T *ectx) if (di == NULL) { // NULL dict is equivalent to empty dict - semsg(_(e_dictkey), key); + semsg(_(e_key_not_present_in_dictionary), key); status = FAIL; } else if (var_check_fixed(di->di_flags, @@ -2915,7 +2915,7 @@ exec_instructions(ectx_T *ectx) if (li == NULL) { SOURCING_LNUM = iptr->isn_lnum; - semsg(_(e_listidx), n); + semsg(_(e_list_index_out_of_range_nr), n); status = FAIL; } else if (value_check_lock(li->li_tv.v_lock, @@ -2991,7 +2991,7 @@ exec_instructions(ectx_T *ectx) && tv_idx2->v_type != VAR_SPECIAL && n2 < n1) { - semsg(_(e_listidx), n2); + semsg(_(e_list_index_out_of_range_nr), n2); status = FAIL; } if (status != FAIL @@ -4022,7 +4022,7 @@ exec_instructions(ectx_T *ectx) case EXPR_SUB: f1 = f1 - f2; break; case EXPR_ADD: f1 = f1 + f2; break; default: SOURCING_LNUM = iptr->isn_lnum; - emsg(_(e_modulus)); + emsg(_(e_cannot_use_percent_with_float)); goto on_error; } clear_tv(tv1); @@ -4249,7 +4249,7 @@ exec_instructions(ectx_T *ectx) if ((di = dict_find(dict, key, -1)) == NULL) { SOURCING_LNUM = iptr->isn_lnum; - semsg(_(e_dictkey), key); + semsg(_(e_key_not_present_in_dictionary), key); // If :silent! is used we will continue, make sure the // stack contents makes sense and the dict stack is @@ -4283,7 +4283,7 @@ exec_instructions(ectx_T *ectx) if (tv->v_type != VAR_DICT || tv->vval.v_dict == NULL) { SOURCING_LNUM = iptr->isn_lnum; - emsg(_(e_dictreq)); + emsg(_(e_dictionary_required)); goto on_error; } dict = tv->vval.v_dict; @@ -4292,7 +4292,7 @@ exec_instructions(ectx_T *ectx) == NULL) { SOURCING_LNUM = iptr->isn_lnum; - semsg(_(e_dictkey), iptr->isn_arg.string); + semsg(_(e_key_not_present_in_dictionary), iptr->isn_arg.string); goto on_error; } // Put the dict used on the dict stack, it might be used by diff --git a/src/vim9expr.c b/src/vim9expr.c index 1e87b8eae..d2e84a87d 100644 --- a/src/vim9expr.c +++ b/src/vim9expr.c @@ -855,7 +855,7 @@ compile_list(char_u **arg, cctx_T *cctx, ppconst_T *ppconst) { if (may_get_next_line(whitep, &p, cctx) == FAIL) { - semsg(_(e_list_end), *arg); + semsg(_(e_missing_end_of_list_rsb_str), *arg); return FAIL; } if (*p == ',') diff --git a/src/vim9instr.c b/src/vim9instr.c index 0483068aa..49936c37b 100644 --- a/src/vim9instr.c +++ b/src/vim9instr.c @@ -757,7 +757,7 @@ generate_GETITEM(cctx_T *cctx, int index, int with_op) if (type->tt_type != VAR_LIST) { // cannot happen, caller has checked the type - emsg(_(e_listreq)); + emsg(_(e_list_required)); return FAIL; } item_type = type->tt_member; diff --git a/src/vim9script.c b/src/vim9script.c index ad0830fa2..ab6557073 100644 --- a/src/vim9script.c +++ b/src/vim9script.c @@ -127,7 +127,7 @@ not_in_vim9(exarg_T *eap) case CMD_k: if (eap->addr_count > 0) { - emsg(_(e_norange)); + emsg(_(e_no_range_allowed)); return FAIL; } // FALLTHROUGH |