patch 8.2.4010: error messages are spread out
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
diff --git a/src/crypt.c b/src/crypt.c
index f2f643f..5a83588 100644
--- a/src/crypt.c
+++ b/src/crypt.c
@@ -200,7 +200,7 @@
i = (int)STRLEN(crypt_magic_head);
if (len >= i && memcmp(ptr, crypt_magic_head, i) == 0)
- emsg(_("E821: File is encrypted with unknown method"));
+ emsg(_(e_file_is_encrypted_with_unknown_method));
return -1;
}
diff --git a/src/diff.c b/src/diff.c
index fa2ab41..5a98196 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -1096,7 +1096,7 @@
if (!ok)
{
if (io_error)
- emsg(_("E810: Cannot read or write temp files"));
+ emsg(_(e_cannot_read_or_write_temp_files));
emsg(_(e_cannot_create_diffs));
diff_a_works = MAYBE;
#if defined(MSWIN)
@@ -1337,7 +1337,7 @@
// Only continue if the output file was created.
if (mch_stat((char *)tmp_new, &st) < 0 || st.st_size == 0)
- emsg(_("E816: Cannot read patch output"));
+ emsg(_(e_cannot_read_patch_output));
else
{
if (curbuf->b_fname != NULL)
diff --git a/src/errors.h b/src/errors.h
index 8a6e85f..41ce5c1 100644
--- a/src/errors.h
+++ b/src/errors.h
@@ -1861,24 +1861,55 @@
#endif
EXTERN char e_id_is_reserved_for_match_nr[]
INIT(= N_("E798: ID is reserved for \":match\": %d"));
-EXTERN char e_invalid_id_nr_must_be_greater_than_or_equal_to_one[]
- INIT(= N_("E799: Invalid ID: %d (must be greater than or equal to 1)"));
+// E799 unused
#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
-
+EXTERN char e_id_already_taken_nr[]
+ INIT(= N_("E801: ID already taken: %d"));
+EXTERN char e_invalid_id_nr_must_be_greater_than_or_equal_to_one[]
+ INIT(= N_("E802: Invalid ID: %d (must be greater than or equal to 1)"));
+EXTERN char e_id_not_found_nr[]
+ INIT(= N_("E803: ID not found: %d"));
#ifdef FEAT_EVAL
EXTERN char e_cannot_use_percent_with_float[]
INIT(= N_("E804: Cannot use '%' with Float"));
#endif
-
#ifdef FEAT_FLOAT
+EXTERN char e_using_float_as_number[]
+ INIT(= N_("E805: Using a Float as a Number"));
EXTERN char e_using_float_as_string[]
INIT(= N_("E806: using Float as a String"));
#endif
+#ifdef FEAT_FLOAT
+EXTERN char e_expected_float_argument_for_printf[]
+ INIT(= N_("E807: Expected Float argument for printf()"));
+#endif
+#if defined(FEAT_EVAL) && defined(FEAT_FLOAT)
+EXTERN char e_number_or_float_required[]
+ INIT(= N_("E808: Number or Float required"));
+#endif
+#ifndef FEAT_EVAL
+EXTERN char e_hashsmall_is_not_available_without_the_eval_feature[]
+ INIT(= N_("E809: #< is not available without the +eval feature"));
+#endif
+EXTERN char e_cannot_read_or_write_temp_files[]
+ INIT(= N_("E810: Cannot read or write temp files"));
+EXTERN char e_not_allowed_to_change_buffer_information_now[]
+ INIT(= N_("E811: Not allowed to change buffer information now"));
+EXTERN char e_autocommands_changed_buffer_or_buffer_name[]
+ INIT(= N_("E812: Autocommands changed buffer or buffer name"));
EXTERN char e_cannot_close_autocmd_or_popup_window[]
INIT(= N_("E813: Cannot close autocmd or popup window"));
+EXTERN char e_cannot_close_window_only_autocmd_window_would_remain[]
+ INIT(= N_("E814: Cannot close window, only autocmd window would remain"));
+#ifdef FEAT_MZSCHEME
+EXTERN char e_sorry_this_command_is_disabled_the_mzscheme_libraries_could_not_be_loaded[]
+ INIT(= N_("E815: Sorry, this command is disabled, the MzScheme libraries could not be loaded."));
+#endif
+EXTERN char e_cannot_read_patch_output[]
+ INIT(= N_("E816: Cannot read patch output"));
EXTERN char e_blowfish_big_little_endian_use_wrong[]
INIT(= N_("E817: Blowfish big/little endian use wrong"));
EXTERN char e_sha256_test_failed[]
@@ -1887,21 +1918,83 @@
INIT(= N_("E819: Blowfish test failed"));
EXTERN char e_sizeof_uint32_isnot_four[]
INIT(= N_("E820: sizeof(uint32_t) != 4"));
+EXTERN char e_file_is_encrypted_with_unknown_method[]
+ INIT(= N_("E821: File is encrypted with unknown method"));
+EXTERN char e_cannot_open_undo_file_for_reading_str[]
+ INIT(= N_("E822: Cannot open undo file for reading: %s"));
+EXTERN char e_not_an_undo_file_str[]
+ INIT(= N_("E823: Not an undo file: %s"));
+EXTERN char e_incompatible_undo_file_str[]
+ INIT(= N_("E824: Incompatible undo file: %s"));
+EXTERN char e_corrupted_undo_file_str_str[]
+ INIT(= N_("E825: Corrupted undo file (%s): %s"));
+EXTERN char e_undo_file_decryption_failed[]
+ INIT(= N_("E826: Undo file decryption failed: %s"));
+EXTERN char e_undo_file_is_encrypted_str[]
+ INIT(= N_("E827: Undo file is encrypted: %s"));
+EXTERN char e_cannot_open_undo_file_for_writing_str[]
+ INIT(= N_("E828: Cannot open undo file for writing: %s"));
+EXTERN char e_write_error_in_undo_file_str[]
+ INIT(= N_("E829: write error in undo file: %s"));
+EXTERN char e_undo_number_nr_not_found[]
+ INIT(= N_("E830: Undo number %ld not found"));
EXTERN char e_bf_key_init_called_with_empty_password[]
INIT(= N_("E831: bf_key_init() called with empty password"));
+EXTERN char e_non_encrypted_file_has_encrypted_undo_file[]
+ INIT(= N_("E832: Non-encrypted file has encrypted undo file: %s"));
+EXTERN char e_str_is_encrypted_and_this_version_of_vim_does_not_support_encryption[]
+ INIT(= N_("E833: %s is encrypted and this version of Vim does not support encryption"));
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'"));
+EXTERN char e_this_vim_cannot_execute_python_after_using_py3[]
+ INIT(= N_("E836: This Vim cannot execute :python after using :py3"));
+EXTERN char e_this_vim_cannot_execute_py3_after_using_python[]
+ INIT(= N_("E837: This Vim cannot execute :py3 after using :python"));
#ifdef FEAT_NETBEANS_INTG
EXTERN char e_netbeans_is_not_supported_with_this_GUI[]
INIT(= N_("E838: netbeans is not supported with this GUI"));
#endif
// E839 unused
+# ifdef FEAT_COMPL_FUNC
+EXTERN char e_complete_function_deleted_text[]
+ INIT(= N_("E840: Completion function deleted text"));
+# endif
+EXTERN char e_reserved_name_cannot_be_used_for_user_defined_command[]
+ INIT(= N_("E841: Reserved name, cannot be used for user defined command"));
+EXTERN char e_no_line_number_to_use_for_slnum[]
+ INIT(= N_("E842: no line number to use for \"<slnum>\""));
+EXTERN char e_error_while_updating_swap_file_crypt[]
+ INIT(= N_("E843: Error while updating swap file crypt"));
+EXTERN char e_invalid_cchar_value[]
+ INIT(= N_("E844: invalid cchar value"));
+#ifdef FEAT_SPELL
+EXTERN char e_insufficient_memory_word_list_will_be_incomplete[]
+ INIT(= N_("E845: Insufficient memory, word list will be incomplete"));
+#endif
+EXTERN char e_key_code_not_set[]
+ INIT(= N_("E846: Key code not set"));
+EXTERN char e_too_many_syntax_includes[]
+ INIT(= N_("E847: Too many syntax includes"));
+EXTERN char e_too_many_syntax_clusters[]
+ INIT(= N_("E848: Too many syntax clusters"));
+EXTERN char e_too_many_highlight_and_syntax_groups[]
+ INIT(= N_("E849: Too many highlight and syntax groups"));
#ifndef FEAT_CLIPBOARD
EXTERN char e_invalid_register_name[]
INIT(= N_("E850: Invalid register name"));
#endif
+#ifdef FEAT_GUI
+EXTERN char e_failed_to_create_new_process_for_GUI[]
+ INIT(= N_("E851: Failed to create a new process for the GUI"));
+EXTERN char e_the_child_process_failed_to_start_GUI[]
+ INIT(= N_("E852: The child process failed to start the GUI"));
+#endif
+EXTERN char e_duplicate_argument_name_str[]
+ INIT(= N_("E853: Duplicate argument name: %s"));
+EXTERN char e_path_too_long_for_completion[]
+ INIT(= N_("E854: path too long for completion"));
EXTERN char e_autocommands_caused_command_to_abort[]
INIT(= N_("E855: Autocommands caused command to abort"));
#ifdef FEAT_EVAL
@@ -1910,6 +2003,38 @@
EXTERN char e_dictionary_key_str_required[]
INIT(= N_("E857: Dictionary key \"%s\" required"));
#endif
+#if defined(FEAT_PYTHON) || defined(FEAT_PYTHON3)
+EXTERN char e_eval_did_not_return_valid_python_object[]
+ INIT(= N_("E858: Eval did not return a valid python object"));
+EXTERN char e_failed_to_convert_returned_python_object_to_vim_value[]
+ INIT(= N_("E859: Failed to convert returned python object to a Vim value"));
+#endif
+EXTERN char e_need_id_and_type_with_both[]
+ INIT(= N_("E860: Need 'id' and 'type' with 'both'"));
+EXTERN char e_cannot_open_second_popup_with_terminal[]
+ INIT(= N_("E861: Cannot open a second popup with a terminal"));
+EXTERN char e_cannot_use_g_here[]
+ INIT(= N_("E862: Cannot use g: here"));
+EXTERN char e_not_allowed_for_terminal_in_popup_window[]
+ INIT(= N_("E863: Not allowed for a terminal in a popup window"));
+EXTERN char e_percent_hash_can_only_be_followed_by_zero_one_two_automatic_engine_will_be_used[]
+ INIT(= N_("E864: \\%#= can only be followed by 0, 1, or 2. The automatic engine will be used"));
+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_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_invalid_character_class_nr[]
+ INIT(= N_("E877: (NFA regexp) Invalid character class: %d"));
+
#ifdef FEAT_PROP_POPUP
EXTERN char e_number_required[]
INIT(= N_("E889: Number required"));
@@ -1964,6 +2089,9 @@
#endif
EXTERN char e_file_changed_while_writing[]
INIT(= N_("E949: File changed while writing"));
+
+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_cannot_use_pattern_recursively[]
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 1f15bc8..1df6e23 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -9051,7 +9051,7 @@
return NULL;
}
#else
- *errormsg = _("E809: #< is not available without the +eval feature");
+ *errormsg = _(e_hashsmall_is_not_available_without_the_eval_feature);
return NULL;
#endif
}
@@ -9147,7 +9147,7 @@
case SPEC_SLNUM: // line in file for ":so" command
if (SOURCING_NAME == NULL || SOURCING_LNUM == 0)
{
- *errormsg = _("E842: no line number to use for \"<slnum>\"");
+ *errormsg = _(e_no_line_number_to_use_for_slnum);
return NULL;
}
sprintf((char *)strbuf, "%ld", SOURCING_LNUM);
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 01bd3b4..ede0f20 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -2679,7 +2679,7 @@
{
if (allbuf_lock > 0)
{
- emsg(_("E811: Not allowed to change buffer information now"));
+ emsg(_(e_not_allowed_to_change_buffer_information_now));
return TRUE;
}
return FALSE;
diff --git a/src/fileio.c b/src/fileio.c
index 7390309..c33625a 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -41,7 +41,6 @@
#endif
static linenr_T readfile_linenr(linenr_T linecnt, char_u *p, char_u *endp);
static char_u *check_for_bom(char_u *p, long size, int *lenp, int flags);
-static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name");
#ifdef FEAT_EVAL
static int readdirex_sort;
@@ -527,7 +526,7 @@
|| (using_b_fname
&& (old_b_fname != curbuf->b_fname)))
{
- emsg(_(e_auchangedbuf));
+ emsg(_(e_autocommands_changed_buffer_or_buffer_name));
return FAIL;
}
}
@@ -605,7 +604,7 @@
|| (using_b_ffname && (old_b_ffname != curbuf->b_ffname))
|| (using_b_fname && (old_b_fname != curbuf->b_fname))))
{
- emsg(_(e_auchangedbuf));
+ emsg(_(e_autocommands_changed_buffer_or_buffer_name));
if (!read_buffer)
close(fd);
return FAIL;
@@ -3012,7 +3011,7 @@
if (curbuf != buf)
{
// We are in another buffer now, don't do the renaming.
- emsg(_(e_auchangedbuf));
+ emsg(_(e_autocommands_changed_buffer_or_buffer_name));
return FAIL;
}
diff --git a/src/findfile.c b/src/findfile.c
index cc0cc6e..230f487 100644
--- a/src/findfile.c
+++ b/src/findfile.c
@@ -206,8 +206,6 @@
static int ff_path_in_stoplist(char_u *, int, char_u **);
#endif
-static char_u e_pathtoolong[] = N_("E854: path too long for completion");
-
static char_u *ff_expand_buffer = NULL; // used for expanding filenames
#if 0
@@ -501,7 +499,7 @@
{
if (len + 5 >= MAXPATHL)
{
- emsg(_(e_pathtoolong));
+ emsg(_(e_path_too_long_for_completion));
break;
}
if (STRNCMP(wc_part, "**", 2) == 0)
@@ -551,7 +549,7 @@
if (STRLEN(search_ctx->ffsc_start_dir)
+ STRLEN(search_ctx->ffsc_fix_path) + 3 >= MAXPATHL)
{
- emsg(_(e_pathtoolong));
+ emsg(_(e_path_too_long_for_completion));
goto error_return;
}
STRCPY(ff_expand_buffer, search_ctx->ffsc_start_dir);
diff --git a/src/float.c b/src/float.c
index ee0ceda..ef9b830 100644
--- a/src/float.c
+++ b/src/float.c
@@ -99,7 +99,7 @@
*f = (float_T)argvars[0].vval.v_number;
return OK;
}
- emsg(_("E808: Number or Float required"));
+ emsg(_(e_number_or_float_required));
return FAIL;
}
diff --git a/src/gui.c b/src/gui.c
index 2e2097d..4aae106 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -241,7 +241,7 @@
pid = fork();
if (pid < 0) // Fork error
{
- emsg(_("E851: Failed to create a new process for the GUI"));
+ emsg(_(e_failed_to_create_new_process_for_GUI));
return;
}
else if (pid > 0) // Parent
@@ -265,7 +265,7 @@
# else
waitpid(pid, &exit_status, 0);
# endif
- emsg(_("E852: The child process failed to start the GUI"));
+ emsg(_(e_the_child_process_failed_to_start_GUI));
return;
}
else if (status == GUI_CHILD_IO_ERROR)
diff --git a/src/highlight.c b/src/highlight.c
index 484634b..fa32981 100644
--- a/src/highlight.c
+++ b/src/highlight.c
@@ -3466,7 +3466,7 @@
if (highlight_ga.ga_len >= MAX_HL_ID)
{
- emsg(_("E849: Too many highlight and syntax groups"));
+ emsg(_(e_too_many_highlight_and_syntax_groups));
vim_free(name);
return 0;
}
diff --git a/src/if_mzsch.c b/src/if_mzsch.c
index 2d87238..09dd3de 100644
--- a/src/if_mzsch.c
+++ b/src/if_mzsch.c
@@ -1242,7 +1242,7 @@
#ifdef DYNAMIC_MZSCHEME
if (disabled || !mzscheme_enabled(TRUE))
{
- emsg(_("E815: Sorry, this command is disabled, the MzScheme libraries could not be loaded."));
+ emsg(_(e_sorry_this_command_is_disabled_the_mzscheme_libraries_could_not_be_loaded));
return -1;
}
#endif
diff --git a/src/if_py_both.h b/src/if_py_both.h
index b8716fa..ab495a8 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -5850,13 +5850,13 @@
{
if (PyErr_Occurred() && !msg_silent)
PyErr_PrintEx(0);
- emsg(_("E858: Eval did not return a valid python object"));
+ emsg(_(e_eval_did_not_return_valid_python_object));
}
}
else
{
if (ConvertFromPyObject(run_ret, rettv) == -1)
- emsg(_("E859: Failed to convert returned python object to a Vim value"));
+ emsg(_(e_failed_to_convert_returned_python_object_to_vim_value));
Py_DECREF(run_ret);
}
PyErr_Clear();
diff --git a/src/if_python.c b/src/if_python.c
index 63e9068..06d45d8 100644
--- a/src/if_python.c
+++ b/src/if_python.c
@@ -679,7 +679,7 @@
if (python3_loaded())
{
if (verbose)
- emsg(_("E836: This Vim cannot execute :python after using :py3"));
+ emsg(_(e_this_vim_cannot_execute_python_after_using_py3));
return FAIL;
}
# endif
diff --git a/src/if_python3.c b/src/if_python3.c
index 3bf387a..c8ca3c3 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -771,7 +771,7 @@
if (python_loaded())
{
if (verbose)
- emsg(_("E837: This Vim cannot execute :py3 after using :python"));
+ emsg(_(e_this_vim_cannot_execute_py3_after_using_python));
return FAIL;
}
# endif
diff --git a/src/insexpand.c b/src/insexpand.c
index 5dbd782..e6d05bf 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -124,9 +124,6 @@
# define CP_FAST 32 // use fast_breakcheck instead of ui_breakcheck
static char e_hitend[] = N_("Hit end of paragraph");
-# ifdef FEAT_COMPL_FUNC
-static char e_compldel[] = N_("E840: Completion function deleted text");
-# endif
/*
* All the current matches are stored in a list.
@@ -2670,7 +2667,7 @@
validate_cursor();
if (!EQUAL_POS(curwin->w_cursor, pos))
{
- emsg(_(e_compldel));
+ emsg(_(e_complete_function_deleted_text));
goto theend;
}
@@ -4506,7 +4503,7 @@
validate_cursor();
if (!EQUAL_POS(curwin->w_cursor, pos))
{
- emsg(_(e_compldel));
+ emsg(_(e_complete_function_deleted_text));
return FAIL;
}
diff --git a/src/match.c b/src/match.c
index 6bd2b8f..491f8c0 100644
--- a/src/match.c
+++ b/src/match.c
@@ -55,7 +55,7 @@
{
if (cur->id == id)
{
- semsg(_("E801: ID already taken: %d"), id);
+ semsg(_(e_id_already_taken_nr), id);
return -1;
}
cur = cur->next;
@@ -233,8 +233,7 @@
if (id < 1)
{
if (perr == TRUE)
- semsg(_("E802: Invalid ID: %d (must be greater than or equal to 1)"),
- id);
+ semsg(_(e_invalid_id_nr_must_be_greater_than_or_equal_to_one), id);
return -1;
}
while (cur != NULL && cur->id != id)
@@ -245,7 +244,7 @@
if (cur == NULL)
{
if (perr == TRUE)
- semsg(_("E803: ID not found: %d"), id);
+ semsg(_(e_id_not_found_nr), id);
return -1;
}
if (cur == prev)
diff --git a/src/memline.c b/src/memline.c
index 07b0f57..a42c5f1 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -621,7 +621,7 @@
mf_put(mfp, hp, FALSE, FALSE); // release previous block
if (error > 0)
- emsg(_("E843: Error while updating swap file crypt"));
+ emsg(_(e_error_while_updating_swap_file_crypt));
}
mfp->mf_old_key = NULL;
@@ -1342,7 +1342,7 @@
#else
if (b0p->b0_id[1] != BLOCK0_ID1)
{
- semsg(_("E833: %s is encrypted and this version of Vim does not support encryption"), mfp->mf_fname);
+ semsg(_(e_str_is_encrypted_and_this_version_of_vim_does_not_support_encryption), mfp->mf_fname);
goto theend;
}
#endif
diff --git a/src/option.c b/src/option.c
index ef1908f..9cd3031 100644
--- a/src/option.c
+++ b/src/option.c
@@ -1558,7 +1558,7 @@
p = find_termcode(key_name);
if (p == NULL)
{
- errmsg = N_("E846: Key code not set");
+ errmsg = N_(e_key_code_not_set);
goto skip;
}
else
diff --git a/src/popupwin.c b/src/popupwin.c
index a556f68..0702222 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -1883,7 +1883,7 @@
#ifdef FEAT_TERMINAL
if (buf->b_term != NULL && popup_terminal_exists())
{
- emsg(_("E861: Cannot open a second popup with a terminal"));
+ emsg(_(e_cannot_open_second_popup_with_terminal));
return NULL;
}
#endif
@@ -3162,7 +3162,7 @@
if (WIN_IS_POPUP(curwin) && curbuf->b_term != NULL
&& term_job_running(curbuf->b_term))
{
- emsg(_("E863: Not allowed for a terminal in a popup window"));
+ emsg(_(e_not_allowed_for_terminal_in_popup_window));
return TRUE;
}
return FALSE;
diff --git a/src/regexp.c b/src/regexp.c
index 2dad2b8..115231e 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -2638,7 +2638,7 @@
}
else
{
- emsg(_("E864: \\%#= can only be followed by 0, 1, or 2. The automatic engine will be used "));
+ emsg(_(e_percent_hash_can_only_be_followed_by_zero_one_two_automatic_engine_will_be_used));
regexp_engine = AUTOMATIC_ENGINE;
}
}
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index e90f98d..5592957 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -243,11 +243,6 @@
NFA_UPPER, NFA_NUPPER
};
-static char_u e_nul_found[] = N_("E865: (NFA) Regexp end encountered prematurely");
-static char_u e_misplaced[] = N_("E866: (NFA regexp) Misplaced %c");
-static char_u e_ill_char_class[] = N_("E877: (NFA regexp) Invalid character class: %d");
-static char_u e_value_too_large[] = N_("E951: \\% value too large");
-
// Variables only used in nfa_regcomp() and descendants.
static int nfa_re_flags; // re_flags passed to nfa_regcomp()
static int *post_start; // holds the postfix form of r.e.
@@ -1377,7 +1372,7 @@
switch (c)
{
case NUL:
- EMSG_RET_FAIL(_(e_nul_found));
+ EMSG_RET_FAIL(_(e_nfa_regexp_end_encountered_prematurely));
case Magic('^'):
EMIT(NFA_BOL);
@@ -1401,7 +1396,7 @@
case Magic('_'):
c = no_Magic(getchr());
if (c == NUL)
- EMSG_RET_FAIL(_(e_nul_found));
+ EMSG_RET_FAIL(_(e_nfa_regexp_end_encountered_prematurely));
if (c == '^') // "\_^" is start-of-line
{
@@ -1461,7 +1456,7 @@
{
if (extra == NFA_ADD_NL)
{
- semsg(_(e_ill_char_class), c);
+ semsg(_(e_nfa_regexp_invalid_character_class_nr), c);
rc_did_emsg = TRUE;
return FAIL;
}
@@ -1506,7 +1501,7 @@
case Magic('|'):
case Magic('&'):
case Magic(')'):
- semsg(_(e_misplaced), no_Magic(c));
+ semsg(_(e_nfa_regexp_misplaced_chr), no_Magic(c));
return FAIL;
case Magic('='):
@@ -1516,7 +1511,7 @@
case Magic('*'):
case Magic('{'):
// these should follow an atom, not form an atom
- semsg(_(e_misplaced), no_Magic(c));
+ semsg(_(e_nfa_regexp_misplaced_chr), no_Magic(c));
return FAIL;
case Magic('~'):
@@ -1602,8 +1597,7 @@
break;
#endif
default:
- semsg(_("E867: (NFA) Unknown operator '\\z%c'"),
- no_Magic(c));
+ semsg(_(e_nfa_unknown_operator_z_chr), no_Magic(c));
return FAIL;
}
break;
@@ -1725,7 +1719,7 @@
if (tmp < n)
{
// overflow.
- emsg(_(e_value_too_large));
+ emsg(_(e_percent_value_too_large));
return FAIL;
}
n = tmp;
@@ -1773,7 +1767,7 @@
}
if (n >= limit)
{
- emsg(_(e_value_too_large));
+ emsg(_(e_percent_value_too_large));
return FAIL;
}
EMIT((int)n);
@@ -1788,8 +1782,7 @@
break;
}
}
- semsg(_("E867: (NFA) Unknown operator '\\%%%c'"),
- no_Magic(c));
+ semsg(_(e_nfa_unknown_operator_percent_chr), no_Magic(c));
return FAIL;
}
break;
@@ -1947,7 +1940,7 @@
if (result == FAIL)
{
// should never happen
- EMSG_RET_FAIL(_("E868: Error building NFA with equivalence class!"));
+ EMSG_RET_FAIL(_(e_error_building_nfa_with_equivalence_class));
}
continue;
}
@@ -2273,7 +2266,7 @@
}
if (i == 0)
{
- semsg(_("E869: (NFA) Unknown operator '\\@%c'"), op);
+ semsg(_(e_nfa_unknown_operator_at_chr), op);
return FAIL;
}
EMIT(i);
@@ -5125,7 +5118,7 @@
default:
// should not be here :P
- siemsg(_(e_ill_char_class), class);
+ siemsg(_(e_nfa_regexp_invalid_character_class_nr), class);
return FAIL;
}
return FAIL;
diff --git a/src/spellfile.c b/src/spellfile.c
index 473d600..c00930d 100644
--- a/src/spellfile.c
+++ b/src/spellfile.c
@@ -4307,7 +4307,7 @@
{
if (!spin->si_did_emsg)
{
- emsg(_("E845: Insufficient memory, word list will be incomplete"));
+ emsg(_(e_insufficient_memory_word_list_will_be_incomplete));
spin->si_did_emsg = TRUE;
}
return NULL;
diff --git a/src/strings.c b/src/strings.c
index 496312d..5c55c1e 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -1934,7 +1934,7 @@
else if (tvs[idx].v_type == VAR_NUMBER)
f = (double)tvs[idx].vval.v_number;
else
- emsg(_("E807: Expected Float argument for printf()"));
+ emsg(_(e_expected_float_argument_for_printf));
}
return f;
}
diff --git a/src/syntax.c b/src/syntax.c
index 7758254..36f3510 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -4635,7 +4635,7 @@
#ifdef FEAT_CONCEAL
if (!vim_isprintc_strict(*conceal_char))
{
- emsg(_("E844: invalid cchar value"));
+ emsg(_(e_invalid_cchar_value));
return NULL;
}
#endif
@@ -4785,7 +4785,7 @@
*/
if (running_syn_inc_tag >= MAX_SYN_INC_TAG)
{
- emsg(_("E847: Too many syntax includes"));
+ emsg(_(e_too_many_syntax_includes));
return;
}
prev_syn_inc_tag = current_syn_inc_tag;
@@ -5522,7 +5522,7 @@
len = curwin->w_s->b_syn_clusters.ga_len;
if (len >= MAX_CLUSTER_ID)
{
- emsg(_("E848: Too many syntax clusters"));
+ emsg(_(e_too_many_syntax_clusters));
vim_free(name);
return 0;
}
diff --git a/src/textprop.c b/src/textprop.c
index c28d4e4..1f03908 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -801,7 +801,7 @@
}
if (both && (!id_found || type_id == -1))
{
- emsg(_("E860: Need 'id' and 'type' with 'both'"));
+ emsg(_(e_need_id_and_type_with_both));
return;
}
@@ -1224,7 +1224,7 @@
}
if (both && (id == -1 || type_id == -1))
{
- emsg(_("E860: Need 'id' and 'type' with 'both'"));
+ emsg(_(e_need_id_and_type_with_both));
return;
}
diff --git a/src/typval.c b/src/typval.c
index 564cc50..75cc336 100644
--- a/src/typval.c
+++ b/src/typval.c
@@ -191,7 +191,7 @@
return varp->vval.v_number;
case VAR_FLOAT:
#ifdef FEAT_FLOAT
- emsg(_("E805: Using a Float as a Number"));
+ emsg(_(e_using_float_as_number));
break;
#endif
case VAR_FUNC:
diff --git a/src/undo.c b/src/undo.c
index 40f97b1..4c02551 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -784,8 +784,6 @@
// extra fields for uhp
# define UHP_SAVE_NR 1
-static char_u e_not_open[] = N_("E828: Cannot open undo file for writing: %s");
-
/*
* Compute the hash for the current buffer text into hash[UNDO_HASH_SIZE].
*/
@@ -898,7 +896,7 @@
static void
corruption_error(char *mesg, char_u *file_name)
{
- semsg(_("E825: Corrupted undo file (%s): %s"), mesg, file_name);
+ semsg(_(e_corrupted_undo_file_str_str), mesg, file_name);
}
static void
@@ -1680,7 +1678,7 @@
O_CREAT|O_EXTRA|O_WRONLY|O_EXCL|O_NOFOLLOW, perm);
if (fd < 0)
{
- semsg(_(e_not_open), file_name);
+ semsg(_(e_cannot_open_undo_file_for_writing_str), file_name);
goto theend;
}
(void)mch_setperm(file_name, perm);
@@ -1719,7 +1717,7 @@
fp = fdopen(fd, "w");
if (fp == NULL)
{
- semsg(_(e_not_open), file_name);
+ semsg(_(e_cannot_open_undo_file_for_writing_str), file_name);
close(fd);
mch_remove(file_name);
goto theend;
@@ -1792,7 +1790,7 @@
write_error:
fclose(fp);
if (!write_ok)
- semsg(_("E829: write error in undo file: %s"), file_name);
+ semsg(_(e_write_error_in_undo_file_str), file_name);
#if defined(MSWIN)
// Copy file attributes; for systems where this can only be done after
@@ -1904,7 +1902,7 @@
if (fp == NULL)
{
if (name != NULL || p_verbose > 0)
- semsg(_("E822: Cannot open undo file for reading: %s"), file_name);
+ semsg(_(e_cannot_open_undo_file_for_reading_str), file_name);
goto error;
}
bi.bi_buf = curbuf;
@@ -1916,7 +1914,7 @@
if (fread(magic_buf, UF_START_MAGIC_LEN, 1, fp) != 1
|| memcmp(magic_buf, UF_START_MAGIC, UF_START_MAGIC_LEN) != 0)
{
- semsg(_("E823: Not an undo file: %s"), file_name);
+ semsg(_(e_not_an_undo_file_str), file_name);
goto error;
}
version = get2c(fp);
@@ -1925,14 +1923,13 @@
#ifdef FEAT_CRYPT
if (*curbuf->b_p_key == NUL)
{
- semsg(_("E832: Non-encrypted file has encrypted undo file: %s"),
- file_name);
+ semsg(_(e_non_encrypted_file_has_encrypted_undo_file), file_name);
goto error;
}
bi.bi_state = crypt_create_from_file(fp, curbuf->b_p_key);
if (bi.bi_state == NULL)
{
- semsg(_("E826: Undo file decryption failed: %s"), file_name);
+ semsg(_(e_undo_file_decryption_failed), file_name);
goto error;
}
if (crypt_whole_undofile(bi.bi_state->method_nr))
@@ -1948,13 +1945,13 @@
bi.bi_used = 0;
}
#else
- semsg(_("E827: Undo file is encrypted: %s"), file_name);
+ semsg(_(e_undo_file_is_encrypted_str), file_name);
goto error;
#endif
}
else if (version != UF_VERSION)
{
- semsg(_("E824: Incompatible undo file: %s"), file_name);
+ semsg(_(e_incompatible_undo_file_str), file_name);
goto error;
}
@@ -2522,7 +2519,7 @@
if (absolute)
{
- semsg(_("E830: Undo number %ld not found"), step);
+ semsg(_(e_undo_number_nr_not_found), step);
return;
}
diff --git a/src/usercmd.c b/src/usercmd.c
index 72c011b..d4ed0a4 100644
--- a/src/usercmd.c
+++ b/src/usercmd.c
@@ -1101,7 +1101,7 @@
else if ((name_len == 1 && *name == 'X')
|| (name_len <= 4
&& STRNCMP(name, "Next", name_len > 4 ? 4 : name_len) == 0))
- emsg(_("E841: Reserved name, cannot be used for user defined command"));
+ emsg(_(e_reserved_name_cannot_be_used_for_user_defined_command));
else if (compl > 0 && (argt & EX_EXTRA) == 0)
{
// Some plugins rely on silently ignoring the mistake, only make this
diff --git a/src/userfunc.c b/src/userfunc.c
index fb9e97e..b7f9dfc 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -109,7 +109,7 @@
for (i = 0; i < newargs->ga_len; ++i)
if (STRCMP(((char_u **)(newargs->ga_data))[i], arg_copy) == 0)
{
- semsg(_("E853: Duplicate argument name: %s"), arg_copy);
+ semsg(_(e_duplicate_argument_name_str), arg_copy);
vim_free(arg_copy);
return arg;
}
@@ -4268,7 +4268,7 @@
// Disallow using the g: dict.
if (fudi.fd_dict != NULL && fudi.fd_dict->dv_scope == VAR_DEF_SCOPE)
{
- emsg(_("E862: Cannot use g: here"));
+ emsg(_(e_cannot_use_g_here));
goto ret_free;
}
}
diff --git a/src/version.c b/src/version.c
index 6b7a915..8a508d3 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4010,
+/**/
4009,
/**/
4008,
diff --git a/src/window.c b/src/window.c
index 1d09781..4a17c62 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2501,7 +2501,7 @@
}
if ((firstwin == aucmd_win || lastwin == aucmd_win) && one_window())
{
- emsg(_("E814: Cannot close window, only autocmd window would remain"));
+ emsg(_(e_cannot_close_window_only_autocmd_window_would_remain));
return FAIL;
}