0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 8.2.4012: error messages are spread out

Problem:    Error messages are spread out.
Solution:   Move the last error messages to errors.h.
This commit is contained in:
Bram Moolenaar 2022-01-05 20:24:39 +00:00
parent bb8cac56d9
commit d82a47dd04
34 changed files with 357 additions and 156 deletions

View File

@ -707,8 +707,6 @@ channel_gui_unregister(channel_T *channel)
#endif // FEAT_GUI
static char *e_cannot_connect = N_("E902: Cannot connect to port");
/*
* For Unix we need to call connect() again after connect() failed.
* On Win32 one time is sufficient.
@ -737,7 +735,7 @@ channel_connect(
if (sd == -1)
{
ch_error(channel, "in socket() in channel_connect().");
PERROR(_("E898: socket() in channel_connect()"));
PERROR(_(e_socket_in_channel_connect));
return -1;
}
@ -778,7 +776,7 @@ channel_connect(
{
ch_error(channel,
"channel_connect: Connect failed with errno %d", errno);
PERROR(_(e_cannot_connect));
PERROR(_(e_cannot_connect_to_port));
sock_close(sd);
return -1;
}
@ -824,7 +822,7 @@ channel_connect(
SOCK_ERRNO;
ch_error(channel,
"channel_connect: Connect failed with errno %d", errno);
PERROR(_(e_cannot_connect));
PERROR(_(e_cannot_connect_to_port));
sock_close(sd);
return -1;
}
@ -863,7 +861,7 @@ channel_connect(
ch_error(channel,
"channel_connect: Connect failed with errno %d",
so_error);
PERROR(_(e_cannot_connect));
PERROR(_(e_cannot_connect_to_port));
sock_close(sd);
return -1;
}
@ -982,8 +980,7 @@ channel_open(
if ((err = getaddrinfo(hostname, NULL, &hints, &res)) != 0)
{
ch_error(channel, "in getaddrinfo() in channel_open()");
semsg(_("E901: getaddrinfo() in channel_open(): %s"),
gai_strerror(err));
semsg(_(e_getaddrinfo_in_channel_open_str), gai_strerror(err));
channel_free(channel);
return NULL;
}
@ -1047,7 +1044,7 @@ channel_open(
if ((host = gethostbyname(hostname)) == NULL)
{
ch_error(channel, "in gethostbyname() in channel_open()");
PERROR(_("E901: gethostbyname() in channel_open()"));
PERROR(_(e_gethostbyname_in_channel_open));
channel_free(channel);
return NULL;
}
@ -2480,7 +2477,7 @@ channel_exe_cmd(channel_T *channel, ch_part_T part, typval_T *argv)
{
ch_error(channel, "received command with non-string argument");
if (p_verbose > 2)
emsg(_("E903: received command with non-string argument"));
emsg(_(e_received_command_with_non_string_argument));
return;
}
arg = argv[1].vval.v_string;
@ -2537,13 +2534,13 @@ channel_exe_cmd(channel_T *channel, ch_part_T part, typval_T *argv)
{
ch_error(channel, "last argument for expr/call must be a number");
if (p_verbose > 2)
emsg(_("E904: last argument for expr/call must be a number"));
emsg(_(e_last_argument_for_expr_call_must_be_number));
}
else if (is_call && argv[2].v_type != VAR_LIST)
{
ch_error(channel, "third argument for call must be a list");
if (p_verbose > 2)
emsg(_("E904: third argument for call must be a list"));
emsg(_(e_third_argument_for_call_must_be_list));
}
else
{
@ -2600,7 +2597,7 @@ channel_exe_cmd(channel_T *channel, ch_part_T part, typval_T *argv)
else if (p_verbose > 2)
{
ch_error(channel, "Received unknown command: %s", (char *)cmd);
semsg(_("E905: received unknown command: %s"), cmd);
semsg(_(e_received_unknown_command_str), cmd);
}
}
@ -3843,7 +3840,7 @@ get_channel_arg(typval_T *tv, int check_open, int reading, ch_part_T part)
if (check_open && (channel == NULL || (!channel_is_open(channel)
&& !(reading && has_readahead))))
{
emsg(_("E906: not an open channel"));
emsg(_(e_not_an_open_channel));
return NULL;
}
return channel;
@ -4245,7 +4242,7 @@ send_common(
{
if (eval)
{
semsg(_("E917: Cannot use a callback with %s()"), fun);
semsg(_(e_cannot_use_callback_with_str), fun);
return NULL;
}
channel_set_req_callback(channel, *part_read, &opt->jo_callback, id);
@ -4290,7 +4287,7 @@ ch_expr_common(typval_T *argvars, typval_T *rettv, int eval)
ch_mode = channel_get_mode(channel, part_send);
if (ch_mode == MODE_RAW || ch_mode == MODE_NL)
{
emsg(_("E912: cannot use ch_evalexpr()/ch_sendexpr() with a raw or nl channel"));
emsg(_(e_cannot_use_evalexpr_sendexpr_with_raw_or_nl_channel));
return;
}

View File

@ -972,7 +972,7 @@ f_remote_startserver(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
if (server == NULL)
return; // type error; errmsg already given
if (serverName != NULL)
emsg(_("E941: already started a server"));
emsg(_(e_already_started_server));
else
{
# ifdef FEAT_X11
@ -983,7 +983,7 @@ f_remote_startserver(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
# endif
}
#else
emsg(_("E942: +clientserver feature not available"));
emsg(_(e_clientserver_feature_not_available));
#endif
}

View File

@ -1139,7 +1139,7 @@ diff_file_internal(diffio_T *diffio)
&diffio->dio_new.din_mmfile,
&param, &emit_cfg, &emit_cb) < 0)
{
emsg(_("E960: Problem creating the internal diff"));
emsg(_(e_problem_creating_internal_diff));
return FAIL;
}
return OK;
@ -1733,7 +1733,7 @@ diff_read(
}
else
{
emsg(_("E959: Invalid diff format."));
emsg(_(e_invalid_diff_format));
break;
}
}

View File

@ -395,6 +395,8 @@ EXTERN char e_argument_required_for_str[]
INIT(= N_("E179: argument required for %s"));
EXTERN char e_invalid_complete_value_str[]
INIT(= N_("E180: Invalid complete value: %s"));
EXTERN char e_invalid_address_type_value_str[]
INIT(= N_("E180: Invalid address type value: %s"));
EXTERN char e_invalid_attribute_str[]
INIT(= N_("E181: Invalid attribute: %s"));
EXTERN char e_invalid_command_name[]
@ -2024,41 +2026,161 @@ EXTERN char e_nfa_regexp_end_encountered_prematurely[]
INIT(= N_("E865: (NFA) Regexp end encountered prematurely"));
EXTERN char e_nfa_regexp_misplaced_chr[]
INIT(= N_("E866: (NFA regexp) Misplaced %c"));
EXTERN char e_nfa_unknown_operator_z_chr[]
INIT(= N_("E867: (NFA) Unknown operator '\\z%c'"));
EXTERN char e_nfa_unknown_operator_percent_chr[]
INIT(= N_("E867: (NFA) Unknown operator '\\%%%c'"));
EXTERN char e_nfa_regexp_unknown_operator_z_chr[]
INIT(= N_("E867: (NFA regexp) Unknown operator '\\z%c'"));
EXTERN char e_nfa_regexp_unknown_operator_percent_chr[]
INIT(= N_("E867: (NFA regexp) Unknown operator '\\%%%c'"));
EXTERN char e_error_building_nfa_with_equivalence_class[]
INIT(= N_("E868: Error building NFA with equivalence class!"));
EXTERN char e_nfa_unknown_operator_at_chr[]
INIT(= N_("E869: (NFA) Unknown operator '\\@%c'"));
EXTERN char e_nfa_regexp_unknown_operator_at_chr[]
INIT(= N_("E869: (NFA regexp) Unknown operator '\\@%c'"));
EXTERN char e_nfa_regexp_error_reading_repetition_limits[]
INIT(= N_("E870: (NFA regexp) Error reading repetition limits"));
EXTERN char e_nfa_regexp_cant_have_multi_follow_multi[]
INIT(= N_("E871: (NFA regexp) Can't have a multi follow a multi"));
EXTERN char e_nfa_regexp_too_many_parens[]
INIT(= N_("E872: (NFA regexp) Too many '('"));
EXTERN char e_nfa_regexp_proper_termination_error[]
INIT(= N_("E873: (NFA regexp) proper termination error"));
EXTERN char e_nfa_regexp_could_not_pop_stack[]
INIT(= N_("E874: (NFA regexp) Could not pop the stack!"));
EXTERN char e_nfa_regexp_while_converting_from_postfix_to_nfa_too_many_stats_left_on_stack[]
INIT(= N_("E875: (NFA regexp) (While converting from postfix to NFA), too many states left on stack"));
EXTERN char e_nfa_regexp_not_enough_space_to_store_whole_nfa[]
INIT(= N_("E876: (NFA regexp) Not enough space to store the whole NFA"));
EXTERN char e_nfa_regexp_invalid_character_class_nr[]
INIT(= N_("E877: (NFA regexp) Invalid character class: %d"));
EXTERN char e_nfa_regexp_could_not_allocate_memory_for_branch_traversal[]
INIT(= N_("E878: (NFA regexp) Could not allocate memory for branch traversal!"));
EXTERN char e_nfa_regexp_too_many_z[]
INIT(= N_("E879: (NFA regexp) Too many \\z("));
#if defined(FEAT_PYTHON) || defined(FEAT_PYTHON3)
EXTERN char e_cant_handle_systemexit_of_python_exception_in_vim[]
INIT(= N_("E880: Can't handle SystemExit of python exception in vim"));
#endif
EXTERN char e_line_count_changed_unexpectedly[]
INIT(= N_("E881: Line count changed unexpectedly"));
EXTERN char e_uniq_compare_function_failed[]
INIT(= N_("E882: Uniq compare function failed"));
EXTERN char e_search_pattern_and_expression_register_may_not_contain_two_or_more_lines[]
INIT(= N_("E883: search pattern and expression register may not contain two or more lines"));
EXTERN char e_function_name_cannot_contain_colon_str[]
INIT(= N_("E884: Function name cannot contain a colon: %s"));
EXTERN char e_not_possible_to_change_sign_str[]
INIT(= N_("E885: Not possible to change sign %s"));
EXTERN char e_cant_rename_viminfo_file_to_str[]
INIT(= N_("E886: Can't rename viminfo file to %s!"));
EXTERN char e_sorry_this_command_is_disabled_python_side_module_could_not_be_loaded[]
INIT(= N_("E887: Sorry, this command is disabled, the Python's site module could not be loaded."));
EXTERN char e_nfa_regexp_cannot_repeat_str[]
INIT(= N_("E888: (NFA regexp) cannot repeat %s"));
#ifdef FEAT_PROP_POPUP
EXTERN char e_number_required[]
INIT(= N_("E889: Number required"));
#endif
EXTERN char e_trailing_char_after_rsb_str_str[]
INIT(= N_("E890: trailing char after ']': %s]%s"));
#ifdef FEAT_FLOAT
EXTERN char e_using_funcref_as_float[]
INIT(= N_("E891: Using a Funcref as a Float"));
EXTERN char e_using_string_as_float[]
INIT(= N_("E892: Using a String as a Float"));
EXTERN char e_using_list_as_float[]
INIT(= N_("E893: Using a List as a Float"));
EXTERN char e_using_dictionary_as_float[]
INIT(= N_("E894: Using a Dictionary as a Float"));
#endif
#ifdef FEAT_MZSCHEME
EXTERN char e_sorry_this_command_is_disabled_the_mzscheme_racket_base_module_could_not_be_loaded[]
INIT(= N_("E895: Sorry, this command is disabled, the MzScheme's racket/base module could not be loaded."));
#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
EXTERN char e_socket_in_channel_connect[]
INIT(= N_("E898: socket() in channel_connect()"));
EXTERN char e_argument_of_str_must_be_list_or_blob[]
INIT(= N_("E899: Argument of %s must be a List or Blob"));
EXTERN char e_maxdepth_must_be_non_negative_number[]
INIT(= N_("E900: maxdepth must be non-negative number"));
#ifdef FEAT_JOB_CHANNEL
EXTERN char e_getaddrinfo_in_channel_open_str[]
INIT(= N_("E901: getaddrinfo() in channel_open(): %s"));
EXTERN char e_gethostbyname_in_channel_open[]
INIT(= N_("E901: gethostbyname() in channel_open()"));
EXTERN char e_cannot_connect_to_port[]
INIT(= N_("E902: Cannot connect to port"));
EXTERN char e_received_command_with_non_string_argument[]
INIT(= N_("E903: received command with non-string argument"));
EXTERN char e_last_argument_for_expr_call_must_be_number[]
INIT(= N_("E904: last argument for expr/call must be a number"));
EXTERN char e_third_argument_for_call_must_be_list[]
INIT(= N_("E904: third argument for call must be a list"));
EXTERN char e_received_unknown_command_str[]
INIT(= N_("E905: received unknown command: %s"));
EXTERN char e_not_an_open_channel[]
INIT(= N_("E906: not an open channel"));
#endif
#ifdef FEAT_FLOAT
EXTERN char e_using_special_value_as_float[]
INIT(= N_("E907: Using a special value as a Float"));
#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"));
#endif
#ifdef FEAT_JOB_CHANNEL
EXTERN char e_using_job_as_number[]
INIT(= N_("E910: Using a Job as a Number"));
EXTERN char e_using_job_as_float[]
INIT(= N_("E911: Using a Job as a Float"));
EXTERN char e_cannot_use_evalexpr_sendexpr_with_raw_or_nl_channel[]
INIT(= N_("E912: cannot use ch_evalexpr()/ch_sendexpr() with a raw or nl channel"));
EXTERN char e_using_channel_as_number[]
INIT(= N_("E913: Using a Channel as a Number"));
EXTERN char e_using_channel_as_float[]
INIT(= N_("E914: Using a Channel as a Float"));
#endif
EXTERN char e_in_io_buffer_requires_in_buf_or_in_name_to_be_set[]
INIT(= N_("E915: in_io buffer requires in_buf or in_name to be set"));
EXTERN char e_not_valid_job[]
INIT(= N_("E916: not a valid job"));
EXTERN char e_cannot_use_callback_with_str[]
INIT(= N_("E917: Cannot use a callback with %s()"));
EXTERN char e_buffer_must_be_loaded_str[]
INIT(= N_("E918: buffer must be loaded: %s"));
EXTERN char e_directory_not_found_in_str_str[]
INIT(= N_("E919: Directory not found in '%s': \"%s\""));
EXTERN char e_io_file_requires_name_to_be_set[]
INIT(= N_("E920: _io file requires _name to be set"));
EXTERN char e_invalid_callback_argument[]
INIT(= N_("E921: Invalid callback argument"));
EXTERN char e_expected_dict[]
INIT(= N_("E922: expected a dict"));
EXTERN char e_second_argument_of_function_must_be_list_or_dict[]
INIT(= N_("E923: Second argument of function() must be a list or a dict"));
EXTERN char e_current_window_was_closed[]
INIT(= N_("E924: Current window was closed"));
EXTERN char e_current_quickfix_list_was_changed[]
INIT(= N_("E925: Current quickfix list was changed"));
EXTERN char e_current_location_list_was_changed[]
INIT(= N_("E926: Current location list was changed"));
EXTERN char e_invalid_action_str_1[]
INIT(= N_("E927: Invalid action: '%s'"));
#ifdef FEAT_EVAL
EXTERN char e_string_required[]
INIT(= N_("E928: String required"));
#endif
EXTERN char e_too_many_viminfo_temp_files_like_str[]
INIT(= N_("E929: Too many viminfo temp files, like %s!"));
EXTERN char e_cannot_use_redir_inside_execute[]
INIT(= N_("E930: Cannot use :redir inside execute()"));
EXTERN char e_buffer_cannot_be_registered[]
INIT(= N_("E931: Buffer cannot be registered"));
#ifdef FEAT_EVAL
@ -2067,22 +2189,37 @@ EXTERN char e_closure_function_should_not_be_at_top_level[]
EXTERN char e_function_was_deleted_str[]
INIT(= N_("E933: Function was deleted: %s"));
#endif
EXTERN char e_cannot_jump_to_buffer_that_does_not_have_name[]
INIT(= N_("E934: Cannot jump to a buffer that does not have a name"));
EXTERN char e_invalid_submatch_number_nr[]
INIT(= N_("E935: invalid submatch number: %d"));
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[]
INIT(= N_("E937: Attempt to delete a buffer that is in use: %s"));
EXTERN char e_duplicate_key_in_json_str[]
INIT(= N_("E938: Duplicate key in JSON: \"%s\""));
EXTERN char e_positive_count_required[]
INIT(= N_("E939: Positive count required"));
#ifdef FEAT_EVAL
EXTERN char e_cannot_lock_or_unlock_variable_str[]
INIT(= N_("E940: Cannot lock or unlock variable %s"));
#endif
EXTERN char e_already_started_server[]
INIT(= N_("E941: already started a server"));
EXTERN char e_clientserver_feature_not_available[]
INIT(= N_("E942: +clientserver feature not available"));
EXTERN char e_command_table_needs_to_be_updated_run_make_cmdidxs[]
INIT(= N_("E943: Command table needs to be updated, run 'make cmdidxs'"));
EXTERN char e_reverse_range_in_character_class[]
INIT(= N_("E944: Reverse range in character class"));
EXTERN char e_range_too_large_in_character_class[]
INIT(= N_("E945: Range too large in character class"));
EXTERN char e_cannot_make_terminal_with_running_job_modifiable[]
INIT(= N_("E946: Cannot make a terminal with running job modifiable"));
#ifdef FEAT_TERMINAL
EXTERN char e_job_still_running_in_buffer_str[]
INIT(= N_("E947: Job still running in buffer \"%s\""));
EXTERN char e_job_still_running[]
INIT(= N_("E948: Job still running"));
EXTERN char e_job_still_running_add_bang_to_end_the_job[]
@ -2090,40 +2227,123 @@ EXTERN char e_job_still_running_add_bang_to_end_the_job[]
#endif
EXTERN char e_file_changed_while_writing[]
INIT(= N_("E949: File changed while writing"));
EXTERN char e_cannot_convert_between_str_and_str[]
INIT(= N_("E950: Cannot convert between %s and %s"));
EXTERN char e_percent_value_too_large[]
INIT(= N_("E951: \\% value too large"));
EXTERN char e_autocommand_caused_recursive_behavior[]
INIT(= N_("E952: Autocommand caused recursive behavior"));
EXTERN char e_file_exists_str[]
INIT(= N_("E953: File exists: %s"));
EXTERN char e_24_bit_colors_are_not_supported_on_this_environment[]
INIT(= N_("E954: 24-bit colors are not supported on this environment"));
EXTERN char e_not_terminal_buffer[]
INIT(= N_("E955: Not a terminal buffer"));
EXTERN char e_cannot_use_pattern_recursively[]
INIT(= N_("E956: Cannot use pattern recursively"));
EXTERN char e_invalid_window_number[]
INIT(= N_("E957: Invalid window number"));
EXTERN char e_job_already_finished[]
INIT(= N_("E958: Job already finished"));
EXTERN char e_invalid_diff_format[]
INIT(= N_("E959: Invalid diff format."));
EXTERN char e_problem_creating_internal_diff[]
INIT(= N_("E960: Problem creating the internal diff"));
EXTERN char e_no_line_number_to_use_for_sflnum[]
INIT(= N_("E961: no line number to use for \"<sflnum>\""));
EXTERN char e_invalid_action_str_2[]
INIT(= N_("E962: Invalid action: '%s'"));
EXTERN char e_setting_str_to_value_with_wrong_type[]
INIT(= N_("E963: setting %s to value with wrong type"));
EXTERN char_u e_invalid_column_number_nr[]
INIT(= N_("E964: Invalid column number: %ld"));
EXTERN char e_missing_property_type_name[]
INIT(= N_("E965: missing property type name"));
EXTERN char_u e_invalid_line_number_nr[]
INIT(= N_("E966: Invalid line number: %ld"));
EXTERN char e_text_property_info_corrupted[]
INIT(= N_("E967: text property info corrupted"));
EXTERN char e_need_at_least_one_of_id_or_type[]
INIT(= N_("E968: Need at least one of 'id' or 'type'"));
EXTERN char e_property_type_str_already_defined[]
INIT(= N_("E969: Property type %s already defined"));
EXTERN char e_unknown_highlight_group_name_str[]
INIT(= N_("E970: Unknown highlight group name: '%s'"));
EXTERN char e_type_not_exist[]
INIT(= N_("E971: Property type %s does not exist"));
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"));
EXTERN char e_blob_literal_should_have_an_even_number_of_hex_characters[]
INIT(= N_("E973: Blob literal should have an even number of hex characters"));
EXTERN char e_using_blob_as_number[]
INIT(= N_("E974: Using a Blob as a Number"));
EXTERN char e_using_blob_as_float[]
INIT(= N_("E975: Using a Blob as a Float"));
EXTERN char e_using_blob_as_string[]
INIT(= N_("E976: Using a Blob as a String"));
EXTERN char e_can_only_compare_blob_with_blob[]
INIT(= N_("E977: Can only compare Blob with Blob"));
#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_lowlevel_input_not_supported[]
INIT(= N_("E980: lowlevel input not supported"));
EXTERN char e_command_not_allowed_in_rvim[]
INIT(= N_("E981: Command not allowed in rvim"));
EXTERN char e_conpty_is_not_available[]
INIT(= N_("E982: ConPTY is not available"));
EXTERN char e_duplicate_argument_str[]
INIT(= N_("E983: Duplicate argument: %s"));
EXTERN char e_scriptversion_used_outside_of_sourced_file[]
INIT(= N_("E984: :scriptversion used outside of a sourced file"));
#ifdef FEAT_EVAL
EXTERN char e_dot_equal_not_supported_with_script_version_two[]
INIT(= N_("E985: .= is not supported with script version >= 2"));
EXTERN char e_cannot_modify_tag_stack_within_tagfunc[]
INIT(= N_("E986: cannot modify the tag stack within tagfunc"));
EXTERN char e_invalid_return_value_from_tagfunc[]
INIT(= N_("E987: invalid return value from tagfunc"));
#endif
EXTERN char e_gui_cannot_be_used_cannot_execute_gvim_exe[]
INIT(= N_("E988: GUI cannot be used. Cannot execute gvim.exe."));
EXTERN char e_non_default_argument_follows_default_argument[]
INIT(= N_("E989: Non-default argument follows default argument"));
#ifdef FEAT_EVAL
EXTERN char e_missing_end_marker_str[]
INIT(= N_("E990: Missing end marker '%s'"));
EXTERN char e_cannot_use_heredoc_here[]
INIT(= N_("E991: cannot use =<< here"));
EXTERN char e_not_allowed_in_modeline_when_modelineexpr_is_off[]
INIT(= N_("E992: Not allowed in a modeline when 'modelineexpr' is off"));
EXTERN char e_window_nr_is_not_popup_window[]
INIT(= N_("E993: window %d is not a popup window"));
EXTERN char e_not_allowed_in_popup_window[]
INIT(= N_("E994: Not allowed in a popup window"));
EXTERN char e_cannot_modify_existing_variable[]
INIT(= N_("E995: Cannot modify existing variable"));
EXTERN char e_cannot_lock_an_option[]
EXTERN char e_cannot_lock_range[]
INIT(= N_("E996: Cannot lock a range"));
EXTERN char e_cannot_lock_option[]
INIT(= N_("E996: Cannot lock an option"));
EXTERN char e_cannot_lock_list_or_dict[]
INIT(= N_("E996: Cannot lock a list or dict"));
EXTERN char e_cannot_lock_environment_variable[]
INIT(= N_("E996: Cannot lock an environment variable"));
EXTERN char e_cannot_lock_register[]
INIT(= N_("E996: Cannot lock a register"));
#endif
EXTERN char e_tabpage_not_found_nr[]
INIT(= N_("E997: Tabpage not found: %d"));
#ifdef FEAT_EVAL
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"));
EXTERN char e_scriptversion_not_supported_nr[]
INIT(= N_("E999: scriptversion not supported: %d"));
// E1000 unused
#ifdef FEAT_EVAL
EXTERN char e_variable_not_found_str[]
INIT(= N_("E1001: Variable not found: %s"));
@ -2329,6 +2549,10 @@ EXTERN char e_string_list_or_blob_required[]
INIT(= N_("E1098: String, List or Blob required"));
EXTERN char e_unknown_error_while_executing_str[]
INIT(= N_("E1099: Unknown error while executing %s"));
#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"));
#ifdef FEAT_EVAL
EXTERN char e_cannot_declare_script_variable_in_function[]
INIT(= N_("E1101: Cannot declare a script variable in a function: %s"));
EXTERN char e_lambda_function_not_found_str[]

View File

@ -2889,7 +2889,7 @@ get_buf_arg(typval_T *arg)
buf = tv_get_buf(arg, FALSE);
--emsg_off;
if (buf == NULL)
semsg(_("E158: Invalid buffer name: %s"), tv_get_string(arg));
semsg(_(e_invalid_buffer_name_str), tv_get_string(arg));
return buf;
}
@ -3983,7 +3983,7 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED)
add_to_input_buf(keys + idx, 1);
}
#else
emsg(_("E980: lowlevel input not supported"));
emsg(_(e_lowlevel_input_not_supported));
#endif
}
else
@ -4147,7 +4147,7 @@ common_function(typval_T *argvars, typval_T *rettv, int is_funcref)
{
if (argvars[dict_idx].v_type != VAR_DICT)
{
emsg(_("E922: expected a dict"));
emsg(_(e_expected_dict));
vim_free(name);
goto theend;
}
@ -4158,7 +4158,7 @@ common_function(typval_T *argvars, typval_T *rettv, int is_funcref)
{
if (argvars[arg_idx].v_type != VAR_LIST)
{
emsg(_("E923: Second argument of function() must be a list or a dict"));
emsg(_(e_second_argument_of_function_must_be_list_or_dict));
vim_free(name);
goto theend;
}
@ -9199,7 +9199,6 @@ free_lstval:
static void
f_settagstack(typval_T *argvars, typval_T *rettv)
{
static char *e_invact2 = N_("E962: Invalid action: '%s'");
win_T *wp;
dict_T *d;
int action = 'r';
@ -9242,7 +9241,7 @@ f_settagstack(typval_T *argvars, typval_T *rettv)
action = *actstr;
else
{
semsg(_(e_invact2), actstr);
semsg(_(e_invalid_action_str_2), actstr);
return;
}
}
@ -9611,7 +9610,7 @@ f_submatch(typval_T *argvars, typval_T *rettv)
return;
if (no < 0 || no >= NSUBEXP)
{
semsg(_("E935: invalid submatch number: %d"), no);
semsg(_(e_invalid_submatch_number_nr), no);
return;
}
if (argvars[1].v_type != VAR_UNKNOWN)

View File

@ -592,7 +592,7 @@ heredoc_get(exarg_T *eap, char_u *cmd, int script_get)
if (eap->getline == NULL)
{
emsg(_("E991: cannot use =<< here"));
emsg(_(e_cannot_use_heredoc_here));
return NULL;
}
@ -657,7 +657,7 @@ heredoc_get(exarg_T *eap, char_u *cmd, int script_get)
theline = eap->getline(NUL, eap->cookie, 0, FALSE);
if (theline == NULL)
{
semsg(_("E990: Missing end marker '%s'"), marker);
semsg(_(e_missing_end_marker_str), marker);
break;
}
@ -796,7 +796,7 @@ ex_let(exarg_T *eap)
if (*arg == '[')
emsg(_(e_invalid_argument));
else if (expr[0] == '.' && expr[1] == '=')
emsg(_("E985: .= is not supported with script version >= 2"));
emsg(_(e_dot_equal_not_supported_with_script_version_two));
else if (!ends_excmd2(eap->cmd, arg))
{
if (vim9script)
@ -1309,7 +1309,7 @@ ex_let_env(
if ((flags & (ASSIGN_CONST | ASSIGN_FINAL))
&& (flags & ASSIGN_FOR_LOOP) == 0)
{
emsg(_("E996: Cannot lock an environment variable"));
emsg(_(e_cannot_lock_environment_variable));
return NULL;
}
@ -1376,7 +1376,7 @@ ex_let_option(
if ((flags & (ASSIGN_CONST | ASSIGN_FINAL))
&& (flags & ASSIGN_FOR_LOOP) == 0)
{
emsg(_(e_cannot_lock_an_option));
emsg(_(e_cannot_lock_option));
return NULL;
}
@ -1502,7 +1502,7 @@ ex_let_register(
if ((flags & (ASSIGN_CONST | ASSIGN_FINAL))
&& (flags & ASSIGN_FOR_LOOP) == 0)
{
emsg(_("E996: Cannot lock a register"));
emsg(_(e_cannot_lock_register));
return NULL;
}
++arg;
@ -3493,7 +3493,7 @@ set_var_const(
}
else if (di->di_tv.v_type != tv->v_type)
{
semsg(_("E963: setting %s to value with wrong type"), name);
semsg(_(e_setting_str_to_value_with_wrong_type), name);
goto failed;
}
}
@ -4482,7 +4482,7 @@ get_callback(typval_T *arg)
if (r == FAIL)
{
emsg(_("E921: Invalid callback argument"));
emsg(_(e_invalid_callback_argument));
res.cb_name = NULL;
}
}

View File

@ -363,8 +363,7 @@ check_changed_any(
if (
#ifdef FEAT_TERMINAL
term_job_running(buf->b_term)
? semsg(_("E947: Job still running in buffer \"%s\""),
buf->b_fname)
? semsg(_(e_job_still_running_in_buffer_str), buf->b_fname)
:
#endif
semsg(_(e_no_write_since_last_change_for_buffer_str),

View File

@ -2082,7 +2082,7 @@ do_one_cmd(
#endif
if (restricted != 0 && (ea.argt & EX_RESTRICT))
{
errormsg = _("E981: Command not allowed in rvim");
errormsg = _(e_command_not_allowed_in_rvim);
goto doend;
}
if (!curbuf->b_p_ma && (ea.argt & EX_MODIFY))
@ -3715,7 +3715,7 @@ find_ex_command(
if (command_count != (int)CMD_SIZE)
{
iemsg(_("E943: Command table needs to be updated, run 'make cmdidxs'"));
iemsg(_(e_command_table_needs_to_be_updated_run_make_cmdidxs));
getout(1);
}
@ -8058,7 +8058,7 @@ ex_redir(exarg_T *eap)
#ifdef FEAT_EVAL
if (redir_execute)
{
emsg(_("E930: Cannot use :redir inside execute()"));
emsg(_(e_cannot_use_redir_inside_execute));
return;
}
#endif
@ -9158,7 +9158,7 @@ eval_vars(
case SPEC_SFLNUM: // line in script file
if (current_sctx.sc_lnum + SOURCING_LNUM == 0)
{
*errormsg = _("E961: no line number to use for \"<sflnum>\"");
*errormsg = _(e_no_line_number_to_use_for_sflnum);
return NULL;
}
sprintf((char *)strbuf, "%ld",

View File

@ -4991,7 +4991,7 @@ ole_error(char *arg)
static char *
gvim_error(void)
{
char *msg = _("E988: GUI cannot be used. Cannot execute gvim.exe.");
char *msg = _(e_gui_cannot_be_used_cannot_execute_gvim_exe);
if (starting)
{

View File

@ -1201,7 +1201,7 @@ do_helptags(char_u *dirname, int add_help_tags, int ignore_writeerr)
EW_FILE|EW_SILENT) == FAIL
|| filecount == 0)
{
semsg(_("E151: No match: %s"), NameBuff);
semsg(_(e_no_match_str_1), NameBuff);
return;
}

View File

@ -1248,7 +1248,7 @@ mzscheme_init(void)
#endif
if (load_base_module_failed || startup_mzscheme())
{
emsg(_("E895: Sorry, this command is disabled, the MzScheme's racket/base module could not be loaded."));
emsg(_(e_sorry_this_command_is_disabled_the_mzscheme_racket_base_module_could_not_be_loaded));
return -1;
}
initialized = TRUE;

View File

@ -13,8 +13,6 @@
* Common code for if_python.c and if_python3.c.
*/
static char_u e_py_systemexit[] = "E880: Can't handle SystemExit of %s exception in vim";
#if PY_VERSION_HEX < 0x02050000
typedef int Py_ssize_t; // Python 2.4 and earlier don't have this type.
#endif
@ -5697,7 +5695,7 @@ run_cmd(const char *cmd, void *arg UNUSED
}
else if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_SystemExit))
{
semsg(_(e_py_systemexit), "python");
emsg(_(e_cant_handle_systemexit_of_python_exception_in_vim));
PyErr_Clear();
}
else
@ -5742,7 +5740,7 @@ run_do(const char *cmd, void *arg UNUSED
else if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_SystemExit))
{
PyMem_Free(code);
semsg(_(e_py_systemexit), "python");
emsg(_(e_cant_handle_systemexit_of_python_exception_in_vim));
PyErr_Clear();
return;
}
@ -5843,7 +5841,7 @@ run_eval(const char *cmd, typval_T *rettv
{
if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_SystemExit))
{
semsg(_(e_py_systemexit), "python");
emsg(_(e_cant_handle_systemexit_of_python_exception_in_vim));
PyErr_Clear();
}
else

View File

@ -951,7 +951,7 @@ Python_Init(void)
site = PyImport_ImportModule("site");
if (site == NULL)
{
emsg(_("E887: Sorry, this command is disabled, the Python's site module could not be loaded."));
emsg(_(e_sorry_this_command_is_disabled_python_side_module_could_not_be_loaded));
goto fail;
}
Py_DECREF(site);

View File

@ -1320,7 +1320,7 @@ job_start(
&& (!(opt.jo_set & (JO_OUT_NAME << (part - PART_OUT)))
|| *opt.jo_io_name[part] == NUL))
{
emsg(_("E920: _io file requires _name to be set"));
emsg(_(e_io_file_requires_name_to_be_set));
goto theend;
}
@ -1338,7 +1338,7 @@ job_start(
}
else if (!(opt.jo_set & JO_IN_NAME))
{
emsg(_("E915: in_io buffer requires in_buf or in_name to be set"));
emsg(_(e_in_io_buffer_requires_in_buf_or_in_name_to_be_set));
}
else
buf = buflist_find_by_name(opt.jo_io_name[PART_IN], FALSE);
@ -1356,7 +1356,7 @@ job_start(
}
else
s = opt.jo_io_name[PART_IN];
semsg(_("E918: buffer must be loaded: %s"), s);
semsg(_(e_buffer_must_be_loaded_str), s);
goto theend;
}
job->jv_in_buf = buf;
@ -1781,7 +1781,7 @@ get_job_arg(typval_T *tv)
job = tv->vval.v_job;
if (job == NULL)
emsg(_("E916: not a valid job"));
emsg(_(e_not_valid_job));
return job;
}

View File

@ -1004,8 +1004,7 @@ item_end:
&& dict_find(top_item->jd_tv.vval.v_dict,
top_item->jd_key, -1) != NULL)
{
semsg(_("E938: Duplicate key in JSON: \"%s\""),
top_item->jd_key);
semsg(_(e_duplicate_key_in_json_str), top_item->jd_key);
clear_tv(cur_item);
retval = FAIL;
goto theend;

View File

@ -15,8 +15,6 @@
#if defined(FEAT_EVAL) || defined(PROTO)
static char *e_listblobarg = N_("E899: Argument of %s must be a List or Blob");
// List heads for garbage collection.
static list_T *first_list = NULL; // list of all lists
@ -1005,7 +1003,7 @@ flatten_common(typval_T *argvars, typval_T *rettv, int make_copy)
return;
if (maxdepth < 0)
{
emsg(_("E900: maxdepth must be non-negative number"));
emsg(_(e_maxdepth_must_be_non_negative_number));
return;
}
}
@ -2059,7 +2057,7 @@ do_uniq(list_T *l, sortinfo_T *info)
ptrs[i++].item = li;
if (info->item_compare_func_err)
{
emsg(_("E882: Uniq compare function failed"));
emsg(_(e_uniq_compare_function_failed));
break;
}
}
@ -2861,7 +2859,7 @@ f_insert(typval_T *argvars, typval_T *rettv)
if (argvars[0].v_type == VAR_BLOB)
blob_insert_func(argvars, rettv);
else if (argvars[0].v_type != VAR_LIST)
semsg(_(e_listblobarg), "insert()");
semsg(_(e_argument_of_str_must_be_list_or_blob), "insert()");
else
list_insert_func(argvars, rettv);
}
@ -2939,7 +2937,7 @@ f_reverse(typval_T *argvars, typval_T *rettv)
if (argvars[0].v_type == VAR_BLOB)
blob_reverse(argvars[0].vval.v_blob, rettv);
else if (argvars[0].v_type != VAR_LIST)
semsg(_(e_listblobarg), "reverse()");
semsg(_(e_argument_of_str_must_be_list_or_blob), "reverse()");
else
list_reverse(argvars[0].vval.v_list, rettv);
}

View File

@ -1462,7 +1462,7 @@ do_set(
}
if ((flags & P_MLE) && !p_mle)
{
errmsg = N_("E992: Not allowed in a modeline when 'modelineexpr' is off");
errmsg = N_(e_not_allowed_in_modeline_when_modelineexpr_is_off);
goto skip;
}
#ifdef FEAT_DIFF
@ -2822,7 +2822,7 @@ set_bool_option(
&& curbuf->b_term != NULL && !term_is_finished(curbuf))))
{
curbuf->b_p_ma = FALSE;
return N_("E946: Cannot make a terminal with running job modifiable");
return N_(e_cannot_make_terminal_with_running_job_modifiable);
}
# endif
redraw_titles();
@ -3223,7 +3223,7 @@ set_bool_option(
!has_vtp_working())
{
p_tgc = 0;
return N_("E954: 24-bit colors are not supported on this environment");
return N_(e_24_bit_colors_are_not_supported_on_this_environment);
}
if (is_term_win32())
swap_tcap();

View File

@ -1026,8 +1026,8 @@ ambw_end:
if (convert_setup(&input_conv, p_tenc, p_enc) == FAIL
|| convert_setup(&output_conv, p_enc, p_tenc) == FAIL)
{
semsg(_("E950: Cannot convert between %s and %s"),
p_tenc, p_enc);
semsg(_(e_cannot_convert_between_str_and_str),
p_tenc, p_enc);
errmsg = e_invalid_argument;
}
}

View File

@ -219,11 +219,6 @@ static qf_info_T *ll_get_or_alloc_list(win_T *);
static char_u *qf_last_bufname = NULL;
static bufref_T qf_last_bufref = {NULL, 0, 0};
static char *e_current_quickfix_list_was_changed =
N_("E925: Current quickfix list was changed");
static char *e_current_location_list_was_changed =
N_("E926: Current location list was changed");
/*
* Maximum number of bytes allowed per line while reading a errorfile.
*/
@ -3160,7 +3155,7 @@ qf_jump_edit_buffer(
win_T *wp = win_id2wp(prev_winid);
if (wp == NULL && curwin->w_llist != qi)
{
emsg(_("E924: Current window was closed"));
emsg(_(e_current_window_was_closed));
*opened_window = FALSE;
return NOTDONE;
}
@ -8386,7 +8381,6 @@ set_qf_ll_list(
typval_T *rettv)
{
# ifdef FEAT_QUICKFIX
static char *e_invact = N_("E927: Invalid action: '%s'");
char_u *act;
int action = 0;
static int recursive = 0;
@ -8414,7 +8408,7 @@ set_qf_ll_list(
act[1] == NUL)
action = *act;
else
semsg(_(e_invact), act);
semsg(_(e_invalid_action_str_1), act);
}
else if (action_arg->v_type == VAR_UNKNOWN)
action = ' ';

View File

@ -1495,7 +1495,7 @@ re_mult_next(char *what)
{
if (re_multi_type(peekchr()) == MULTI_MULT)
{
semsg(_("E888: (NFA regexp) cannot repeat %s"), what);
semsg(_(e_nfa_regexp_cannot_repeat_str), what);
rc_did_emsg = TRUE;
return FAIL;
}

View File

@ -1597,7 +1597,7 @@ nfa_regatom(void)
break;
#endif
default:
semsg(_(e_nfa_unknown_operator_z_chr), no_Magic(c));
semsg(_(e_nfa_regexp_unknown_operator_z_chr), no_Magic(c));
return FAIL;
}
break;
@ -1782,7 +1782,7 @@ nfa_regatom(void)
break;
}
}
semsg(_(e_nfa_unknown_operator_percent_chr), no_Magic(c));
semsg(_(e_nfa_regexp_unknown_operator_percent_chr), no_Magic(c));
return FAIL;
}
break;
@ -2266,7 +2266,7 @@ nfa_regpiece(void)
}
if (i == 0)
{
semsg(_(e_nfa_unknown_operator_at_chr), op);
semsg(_(e_nfa_regexp_unknown_operator_at_chr), op);
return FAIL;
}
EMIT(i);
@ -2295,7 +2295,7 @@ nfa_regpiece(void)
greedy = FALSE;
}
if (!read_limits(&minval, &maxval))
EMSG_RET_FAIL(_("E870: (NFA regexp) Error reading repetition limits"));
EMSG_RET_FAIL(_(e_nfa_regexp_error_reading_repetition_limits));
// <atom>{0,inf}, <atom>{0,} and <atom>{} are equivalent to
// <atom>*
@ -2378,7 +2378,7 @@ nfa_regpiece(void)
if (re_multi_type(peekchr()) != NOT_MULTI)
// Can't have a multi follow a multi.
EMSG_RET_FAIL(_("E871: (NFA regexp) Can't have a multi follow a multi"));
EMSG_RET_FAIL(_(e_nfa_regexp_cant_have_multi_follow_multi));
return OK;
}
@ -2525,7 +2525,7 @@ nfa_reg(
if (paren == REG_PAREN)
{
if (regnpar >= NSUBEXP) // Too many `('
EMSG_RET_FAIL(_("E872: (NFA regexp) Too many '('"));
EMSG_RET_FAIL(_(e_nfa_regexp_too_many_parens));
parno = regnpar++;
}
#ifdef FEAT_SYN_HL
@ -2533,7 +2533,7 @@ nfa_reg(
{
// Make a ZOPEN node.
if (regnzpar >= NSUBEXP)
EMSG_RET_FAIL(_("E879: (NFA regexp) Too many \\z("));
EMSG_RET_FAIL(_(e_nfa_regexp_too_many_z));
parno = regnzpar++;
}
#endif
@ -2563,7 +2563,7 @@ nfa_reg(
if (peekchr() == Magic(')'))
EMSG2_RET_FAIL(_(e_unmatched_str_close), reg_magic == MAGIC_ALL);
else
EMSG_RET_FAIL(_("E873: (NFA regexp) proper termination error"));
EMSG_RET_FAIL(_(e_nfa_regexp_proper_termination_error));
}
/*
* Here we set the flag allowing back references to this set of
@ -3126,7 +3126,7 @@ st_error(int *postfix UNUSED, int *end UNUSED, int *p UNUSED)
fclose(df);
}
#endif
emsg(_("E874: (NFA) Could not pop the stack!"));
emsg(_(e_nfa_regexp_could_not_pop_stack));
}
/*
@ -3884,13 +3884,13 @@ post2nfa(int *postfix, int *end, int nfa_calc_size)
if (stackp != stack)
{
vim_free(stack);
EMSG_RET_NULL(_("E875: (NFA regexp) (While converting from postfix to NFA), too many states left on stack"));
EMSG_RET_NULL(_(e_nfa_regexp_while_converting_from_postfix_to_nfa_too_many_stats_left_on_stack));
}
if (istate >= nstate)
{
vim_free(stack);
EMSG_RET_NULL(_("E876: (NFA regexp) Not enough space to store the whole NFA "));
EMSG_RET_NULL(_(e_nfa_regexp_not_enough_space_to_store_whole_nfa));
}
matchstate = &state_ptr[istate++]; // the match state
@ -5385,7 +5385,7 @@ recursive_regmatch(
*listids = ALLOC_MULT(int, prog->nstate);
if (*listids == NULL)
{
emsg(_("E878: (NFA) Could not allocate memory for branch traversal!"));
emsg(_(e_nfa_regexp_could_not_allocate_memory_for_branch_traversal));
return 0;
}
*listids_len = prog->nstate;

View File

@ -2780,8 +2780,7 @@ write_reg_contents_lst(
s = (char_u *)"";
else if (strings[1] != NULL)
{
emsg(_("E883: search pattern and expression register may not "
"contain two or more lines"));
emsg(_(e_search_pattern_and_expression_register_may_not_contain_two_or_more_lines));
return;
}
else

View File

@ -1950,7 +1950,7 @@ ex_scriptversion(exarg_T *eap UNUSED)
if (!getline_equal(eap->getline, eap->cookie, getsourceline))
{
emsg(_("E984: :scriptversion used outside of a sourced file"));
emsg(_(e_scriptversion_used_outside_of_sourced_file));
return;
}
if (in_vim9script())
@ -1963,7 +1963,7 @@ ex_scriptversion(exarg_T *eap UNUSED)
if (nr == 0 || *eap->arg != NUL)
emsg(_(e_invalid_argument));
else if (nr > SCRIPT_VERSION_MAX)
semsg(_("E999: scriptversion not supported: %d"), nr);
semsg(_(e_scriptversion_not_supported_nr), nr);
else
{
current_sctx.sc_version = nr;

View File

@ -1224,7 +1224,7 @@ sign_place(
}
else
{
semsg(_("E885: Not possible to change sign %s"), sign_name);
semsg(_(e_not_possible_to_change_sign_str), sign_name);
return FAIL;
}
@ -1307,7 +1307,7 @@ sign_jump(int sign_id, char_u *sign_group, buf_T *buf)
if (buf->b_fname == NULL)
{
emsg(_("E934: Cannot jump to a buffer that does not have a name"));
emsg(_(e_cannot_jump_to_buffer_that_does_not_have_name));
return -1;
}
cmd = alloc(STRLEN(buf->b_fname) + 25);

View File

@ -4889,8 +4889,8 @@ syn_cmd_keyword(exarg_T *eap, int syncing UNUSED)
{
if (p[2] != NUL)
{
semsg(_("E890: trailing char after ']': %s]%s"),
kw, &p[2]);
semsg(_(e_trailing_char_after_rsb_str_str),
kw, &p[2]);
goto error;
}
kw = p + 1; // skip over the "]"

View File

@ -84,11 +84,6 @@ static int add_llist_tags(char_u *tag, int num_matches, char_u **matches);
#endif
static void tagstack_clear_entry(taggy_T *item);
#ifdef FEAT_EVAL
static char_u *recurmsg = (char_u *)N_("E986: cannot modify the tag stack within tagfunc");
static char_u *tfu_inv_ret_msg = (char_u *)N_("E987: invalid return value from tagfunc");
#endif
static char_u *tagmatchname = NULL; // name of last used tag
#if defined(FEAT_QUICKFIX)
@ -234,7 +229,7 @@ do_tag(
#ifdef FEAT_EVAL
if (tfu_in_use)
{
emsg(_(recurmsg));
emsg(_(e_cannot_modify_tag_stack_within_tagfunc));
return FALSE;
}
#endif
@ -1419,7 +1414,7 @@ find_tagfunc_tags(
if (rettv.v_type != VAR_LIST || !rettv.vval.v_list)
{
clear_tv(&rettv);
emsg(_(tfu_inv_ret_msg));
emsg(_(e_invalid_return_value_from_tagfunc));
return FAIL;
}
taglist = rettv.vval.v_list;
@ -1437,7 +1432,7 @@ find_tagfunc_tags(
if (item->li_tv.v_type != VAR_DICT)
{
emsg(_(tfu_inv_ret_msg));
emsg(_(e_invalid_return_value_from_tagfunc));
break;
}
@ -1489,7 +1484,7 @@ find_tagfunc_tags(
if (!res_name || !res_fname || !res_cmd)
{
emsg(_(tfu_inv_ret_msg));
emsg(_(e_invalid_return_value_from_tagfunc));
break;
}
@ -4347,7 +4342,7 @@ set_tagstack(win_T *wp, dict_T *d, int action)
// not allowed to alter the tag stack entries from inside tagfunc
if (tfu_in_use)
{
emsg(_(recurmsg));
emsg(_(e_cannot_modify_tag_stack_within_tagfunc));
return FAIL;
}
#endif

View File

@ -883,7 +883,7 @@ ex_terminal(exarg_T *eap)
{
if (*p)
*p = NUL;
semsg(_("E181: Invalid attribute: %s"), cmd);
semsg(_(e_invalid_attribute_str), cmd);
goto theend;
}
# undef OPTARG_HAS
@ -4862,7 +4862,7 @@ f_term_dumpwrite(typval_T *argvars, typval_T *rettv UNUSED)
term = buf->b_term;
if (term->tl_vterm == NULL)
{
emsg(_("E958: Job already finished"));
emsg(_(e_job_already_finished));
return;
}
@ -4888,7 +4888,7 @@ f_term_dumpwrite(typval_T *argvars, typval_T *rettv UNUSED)
return;
if (mch_stat((char *)fname, &st) >= 0)
{
semsg(_("E953: File exists: %s"), fname);
semsg(_(e_file_exists_str), fname);
return;
}
@ -5992,7 +5992,7 @@ f_term_setsize(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
buf = term_get_buf(argvars, "term_setsize()");
if (buf == NULL)
{
emsg(_("E955: Not a terminal buffer"));
emsg(_(e_not_terminal_buffer));
return;
}
if (buf->b_term->tl_vterm == NULL)
@ -6623,7 +6623,7 @@ dyn_conpty_init(int verbose)
if (!has_conpty_working())
{
if (verbose)
emsg(_("E982: ConPTY is not available"));
emsg(_(e_conpty_is_not_available));
return FAIL;
}

View File

@ -47,8 +47,6 @@ static hashtab_T *global_proptypes = NULL;
// The last used text property type ID.
static int proptype_id = 0;
static char_u e_type_not_exist[] = N_("E971: Property type %s does not exist");
/*
* Find a property type by name, return the hashitem.
* Returns NULL if the item can't be found.
@ -335,7 +333,7 @@ f_prop_add_list(typval_T *argvars, typval_T *rettv UNUSED)
dict = argvars[0].vval.v_dict;
if (dict == NULL || dict_find(dict, (char_u *)"type", -1) == NULL)
{
emsg(_("E965: missing property type name"));
emsg(_(e_missing_property_type_name));
return;
}
type_name = dict_get_string(dict, (char_u *)"type", FALSE);
@ -395,7 +393,7 @@ prop_add_common(
if (dict == NULL || dict_find(dict, (char_u *)"type", -1) == NULL)
{
emsg(_("E965: missing property type name"));
emsg(_(e_missing_property_type_name));
return;
}
type_name = dict_get_string(dict, (char_u *)"type", FALSE);
@ -473,7 +471,7 @@ get_text_props(buf_T *buf, linenr_T lnum, char_u **props, int will_change)
proplen = buf->b_ml.ml_line_len - textlen;
if (proplen % sizeof(textprop_T) != 0)
{
iemsg(_("E967: text property info corrupted"));
iemsg(_(e_text_property_info_corrupted));
return 0;
}
if (proplen > 0)
@ -796,7 +794,7 @@ f_prop_find(typval_T *argvars, typval_T *rettv)
both = dict_get_bool(dict, (char_u *)"both", FALSE);
if (!id_found && type_id == -1)
{
emsg(_("E968: Need at least one of 'id' or 'type'"));
emsg(_(e_need_at_least_one_of_id_or_type));
return;
}
if (both && (!id_found || type_id == -1))
@ -1219,7 +1217,7 @@ f_prop_remove(typval_T *argvars, typval_T *rettv)
if (id == -1 && type_id == -1)
{
emsg(_("E968: Need at least one of 'id' or 'type'"));
emsg(_(e_need_at_least_one_of_id_or_type));
return;
}
if (both && (id == -1 || type_id == -1))
@ -1331,7 +1329,7 @@ prop_type_set(typval_T *argvars, int add)
if (prop != NULL)
{
semsg(_("E969: Property type %s already defined"), name);
semsg(_(e_property_type_str_already_defined), name);
return;
}
prop = alloc_clear(offsetof(proptype_T, pt_name) + STRLEN(name) + 1);
@ -1375,7 +1373,7 @@ prop_type_set(typval_T *argvars, int add)
hl_id = syn_name2id(highlight);
if (hl_id <= 0)
{
semsg(_("E970: Unknown highlight group name: '%s'"),
semsg(_(e_unknown_highlight_group_name_str),
highlight == NULL ? (char_u *)"" : highlight);
return;
}

View File

@ -227,16 +227,16 @@ tv_get_bool_or_number_chk(typval_T *varp, int *denote, int want_bool)
return varp->vval.v_number == VVAL_TRUE ? 1 : 0;
case VAR_JOB:
#ifdef FEAT_JOB_CHANNEL
emsg(_("E910: Using a Job as a Number"));
emsg(_(e_using_job_as_number));
break;
#endif
case VAR_CHANNEL:
#ifdef FEAT_JOB_CHANNEL
emsg(_("E913: Using a Channel as a Number"));
emsg(_(e_using_channel_as_number));
break;
#endif
case VAR_BLOB:
emsg(_("E974: Using a Blob as a Number"));
emsg(_(e_using_blob_as_number));
break;
case VAR_VOID:
emsg(_(e_cannot_use_void_value));
@ -308,35 +308,35 @@ tv_get_float_chk(typval_T *varp, int *error)
return varp->vval.v_float;
case VAR_FUNC:
case VAR_PARTIAL:
emsg(_("E891: Using a Funcref as a Float"));
emsg(_(e_using_funcref_as_float));
break;
case VAR_STRING:
emsg(_("E892: Using a String as a Float"));
emsg(_(e_using_string_as_float));
break;
case VAR_LIST:
emsg(_("E893: Using a List as a Float"));
emsg(_(e_using_list_as_float));
break;
case VAR_DICT:
emsg(_("E894: Using a Dictionary as a Float"));
emsg(_(e_using_dictionary_as_float));
break;
case VAR_BOOL:
emsg(_(e_using_boolean_valud_as_float));
break;
case VAR_SPECIAL:
emsg(_("E907: Using a special value as a Float"));
emsg(_(e_using_special_value_as_float));
break;
case VAR_JOB:
# ifdef FEAT_JOB_CHANNEL
emsg(_("E911: Using a Job as a Float"));
emsg(_(e_using_job_as_float));
break;
# endif
case VAR_CHANNEL:
# ifdef FEAT_JOB_CHANNEL
emsg(_("E914: Using a Channel as a Float"));
emsg(_(e_using_channel_as_float));
break;
# endif
case VAR_BLOB:
emsg(_("E975: Using a Blob as a Float"));
emsg(_(e_using_blob_as_float));
break;
case VAR_VOID:
emsg(_(e_cannot_use_void_value));
@ -954,7 +954,7 @@ tv_get_string_buf_chk_strict(typval_T *varp, char_u *buf, int strict)
STRCPY(buf, get_var_special_name(varp->vval.v_number));
return buf;
case VAR_BLOB:
emsg(_("E976: Using a Blob as a String"));
emsg(_(e_using_blob_as_string));
break;
case VAR_JOB:
#ifdef FEAT_JOB_CHANNEL
@ -1386,7 +1386,7 @@ typval_compare_blob(
|| (type != EXPR_EQUAL && type != EXPR_NEQUAL))
{
if (tv1->v_type != tv2->v_type)
emsg(_("E977: Can only compare Blob with Blob"));
emsg(_(e_can_only_compare_blob_with_blob));
else
emsg(_(e_invalid_operation_for_blob));
return FAIL;
@ -1922,7 +1922,7 @@ eval_number(
{
if (blob != NULL)
{
emsg(_("E973: Blob literal should have an even number of hex characters"));
emsg(_(e_blob_literal_should_have_an_even_number_of_hex_characters));
ga_clear(&blob->bv_ga);
VIM_CLEAR(blob);
}

View File

@ -464,7 +464,7 @@ u_savecommon(
{
// This happens when the FileChangedRO autocommand changes the
// file in a way it becomes shorter.
emsg(_("E881: Line count changed unexpectedly"));
emsg(_(e_line_count_changed_unexpectedly));
return FAIL;
}
}

View File

@ -339,7 +339,7 @@ get_function_args(
}
else if (any_default)
{
emsg(_("E989: Non-default argument follows default argument"));
emsg(_(e_non_default_argument_follows_default_argument));
goto err_ret;
}
@ -3850,7 +3850,7 @@ trans_function_name(
if (cp != NULL && cp < end)
{
semsg(_("E884: Function name cannot contain a colon: %s"), start);
semsg(_(e_function_name_cannot_contain_colon_str), start);
goto theend;
}
}

View File

@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4012,
/**/
4011,
/**/

View File

@ -1109,7 +1109,7 @@ get_var_dest(
*dest = dest_option;
if (cmdidx == CMD_final || cmdidx == CMD_const)
{
emsg(_(e_cannot_lock_an_option));
emsg(_(e_cannot_lock_option));
return FAIL;
}
p = name;

View File

@ -3220,8 +3220,7 @@ write_viminfo(char_u *file, int forceit)
{
// They all exist? Must be something wrong! Don't write
// the viminfo file then.
semsg(_("E929: Too many viminfo temp files, like %s!"),
tempname);
semsg(_(e_too_many_viminfo_temp_files_like_str), tempname);
break;
}
*wp = next_char;
@ -3293,7 +3292,7 @@ write_viminfo(char_u *file, int forceit)
if (vim_rename(tempname, fname) == -1)
{
++viminfo_errcnt;
semsg(_("E886: Can't rename viminfo file to %s!"), fname);
semsg(_(e_cant_rename_viminfo_file_to_str), fname);
}
# ifdef MSWIN
// If the viminfo file was hidden then also hide the new file.