1
0
forked from aniani/vim

patch 8.2.3983: error messages are spread out

Problem:    Error messages are spread out.
Solution:   Move more error messages to errors.h.
This commit is contained in:
Bram Moolenaar 2022-01-02 17:00:40 +00:00
parent 8bfa0eb863
commit eaaac014a0
12 changed files with 163 additions and 64 deletions

View File

@ -703,15 +703,116 @@ EXTERN char e_didnt_get_block_nr_one[]
EXTERN char e_didnt_get_block_nr_two[] EXTERN char e_didnt_get_block_nr_two[]
INIT(= N_("E298: Didn't get block nr 2?")); INIT(= N_("E298: Didn't get block nr 2?"));
// E299 unused // E299 unused
EXTERN char e_swap_file_already_exists_symlink_attack[]
INIT(= N_("E300: Swap file already exists (symlink attack?)"));
EXTERN char e_oops_lost_the_swap_file[]
INIT(= N_("E301: Oops, lost the swap file!!!"));
EXTERN char e_could_not_rename_swap_file[]
INIT(= N_("E302: Could not rename swap file"));
EXTERN char e_unable_to_open_swap_file_for_str_recovery_impossible[]
INIT(= N_("E303: Unable to open swap file for \"%s\", recovery impossible"));
EXTERN char e_ml_upd_block0_didnt_get_block_zero[]
INIT(= N_("E304: ml_upd_block0(): Didn't get block 0??"));
EXTERN char e_no_swap_file_found_for_str[]
INIT(= N_("E305: No swap file found for %s"));
EXTERN char e_cannot_open_str[]
INIT(= N_("E306: Cannot open %s"));
EXTERN char e_str_does_not_look_like_vim_swap_file[]
INIT(= N_("E307: %s does not look like a Vim swap file"));
EXTERN char e_warning_original_file_may_have_been_changed[]
INIT(= N_("E308: Warning: Original file may have been changed"));
EXTERN char e_unable_to_read_block_one_from_str[]
INIT(= N_("E309: Unable to read block 1 from %s"));
EXTERN char e_block_one_id_wrong_str_not_swp_file[]
INIT(= N_("E310: Block 1 ID wrong (%s not a .swp file?)"));
EXTERN char e_recovery_interrupted[]
INIT(= N_("E311: Recovery Interrupted"));
EXTERN char e_errors_detected_while_recovering_look_for_lines_starting_with_questions[]
INIT(= N_("E312: Errors detected while recovering; look for lines starting with ???"));
EXTERN char e_cannot_preserve_there_is_no_swap_file[]
INIT(= N_("E313: Cannot preserve, there is no swap file"));
EXTERN char e_preserve_failed[]
INIT(= N_("E314: Preserve failed"));
EXTERN char e_ml_get_invalid_lnum_nr[]
INIT(= N_("E315: ml_get: invalid lnum: %ld"));
EXTERN char e_ml_get_cannot_find_line_nr_in_buffer_nr_str[]
INIT(= N_("E316: ml_get: cannot find line %ld in buffer %d %s"));
EXTERN char e_pointer_block_id_wrong[]
INIT(= N_("E317: pointer block id wrong"));
EXTERN char e_pointer_block_id_wrong_two[]
INIT(= N_("E317: pointer block id wrong 2"));
EXTERN char e_pointer_block_id_wrong_three[]
INIT(= N_("E317: pointer block id wrong 3"));
EXTERN char e_pointer_block_id_wrong_four[]
INIT(= N_("E317: pointer block id wrong 4"));
EXTERN char e_updated_too_many_blocks[]
INIT(= N_("E318: Updated too many blocks?"));
EXTERN char e_sorry_command_is_not_available_in_this_version[]
INIT(= N_("E319: Sorry, the command is not available in this version"));
EXTERN char e_cannot_find_line_nr[]
INIT(= N_("E320: Cannot find line %ld"));
EXTERN char e_could_not_reload_str[]
INIT(= N_("E321: Could not reload \"%s\""));
EXTERN char e_line_number_out_of_range_nr_past_the_end[]
INIT(= N_("E322: line number out of range: %ld past the end"));
EXTERN char e_line_count_wrong_in_block_nr[]
INIT(= N_("E323: line count wrong in block %ld"));
#ifdef FEAT_POSTSCRIPT
EXTERN char e_cant_open_postscript_output_file[]
INIT(= N_("E324: Can't open PostScript output file"));
#endif
EXTERN char e_attention[]
INIT(= N_("E325: ATTENTION"));
EXTERN char e_too_many_swap_files_found[]
INIT(= N_("E326: Too many swap files found"));
EXTERN char_u e_part_of_menu_item_path_is_not_sub_menu[]
INIT(= N_("E327: Part of menu-item path is not sub-menu"));
#ifdef FEAT_MENU #ifdef FEAT_MENU
EXTERN char e_menu_only_exists_in_another_mode[] EXTERN char e_menu_only_exists_in_another_mode[]
INIT(= N_("E328: Menu only exists in another mode")); INIT(= N_("E328: Menu only exists in another mode"));
#endif #endif
EXTERN char_u e_no_menu_str[]
INIT(= N_("E329: No menu \"%s\""));
EXTERN char e_menu_path_must_not_loead_to_sub_menu[]
INIT(= N_("E330: Menu path must not lead to a sub-menu"));
EXTERN char e_must_not_add_menu_items_directly_to_menu_bar[]
INIT(= N_("E331: Must not add menu items directly to menu bar"));
EXTERN char e_separator_cannot_be_part_of_menu_path[]
INIT(= N_("E332: Separator cannot be part of a menu path"));
EXTERN char e_menu_path_must_lead_to_menu_item[]
INIT(= N_("E333: Menu path must lead to a menu item"));
EXTERN char e_menu_not_found_str[]
INIT(= N_("E334: Menu not found: %s"));
EXTERN char e_menu_not_defined_for_str_mode[]
INIT(= N_("E335: Menu not defined for %s mode"));
EXTERN char e_menu_path_must_lead_to_sub_menu[]
INIT(= N_("E336: Menu path must lead to a sub-menu"));
EXTERN char e_menu_not_found_check_menu_names[]
INIT(= N_("E337: Menu not found - check menu names"));
EXTERN char e_sorry_no_file_browser_in_console_mode[]
INIT(= N_("E338: Sorry, no file browser in console mode"));
EXTERN char e_pattern_too_long[]
INIT(= N_("E339: Pattern too long"));
// E340 unused
EXTERN char e_internal_error_lalloc_zero[] EXTERN char e_internal_error_lalloc_zero[]
INIT(= N_("E341: Internal error: lalloc(0, )")); INIT(= N_("E341: Internal error: lalloc(0, )"));
EXTERN char e_out_of_memory_allocating_nr_bytes[] EXTERN char e_out_of_memory_allocating_nr_bytes[]
INIT(= N_("E342: Out of memory! (allocating %lu bytes)")); INIT(= N_("E342: Out of memory! (allocating %lu bytes)"));
EXTERN char e_invalid_path_number_must_be_at_end_of_path_or_be_followed_by_str[]
INIT(= N_("E343: Invalid path: '**[number]' must be at the end of the path or be followed by '%s'."));
EXTERN char e_cant_find_directory_str_in_cdpath[]
INIT(= N_("E344: Can't find directory \"%s\" in cdpath"));
EXTERN char e_cant_find_file_str_in_path[]
INIT(= N_("E345: Can't find file \"%s\" in path"));
EXTERN char e_no_more_directory_str_found_in_cdpath[]
INIT(= N_("E346: No more directory \"%s\" found in cdpath"));
EXTERN char e_no_more_file_str_found_in_path[]
INIT(= N_("E347: No more file \"%s\" found in path"));
EXTERN char e_no_string_under_cursor[]
INIT(= N_("E348: No string under cursor"));
EXTERN char e_no_identifier_under_cursor[]
INIT(= N_("E349: No identifier under cursor"));
#if defined(AMIGA) || defined(MACOS_X) || defined(MSWIN) \ #if defined(AMIGA) || defined(MACOS_X) || defined(MSWIN) \
|| defined(UNIX) || defined(VMS) || defined(UNIX) || defined(VMS)
EXTERN char e_screen_mode_setting_not_supported[] EXTERN char e_screen_mode_setting_not_supported[]

View File

@ -4540,7 +4540,7 @@ ex_ni(exarg_T *eap)
{ {
if (!eap->skip) if (!eap->skip)
eap->errmsg = eap->errmsg =
_("E319: Sorry, the command is not available in this version"); _(e_sorry_command_is_not_available_in_this_version);
} }
#ifdef HAVE_EX_SCRIPT_NI #ifdef HAVE_EX_SCRIPT_NI

View File

@ -4402,7 +4402,7 @@ buf_reload(buf_T *buf, int orig_mode)
#if defined(FEAT_EVAL) #if defined(FEAT_EVAL)
if (!aborting()) if (!aborting())
#endif #endif
semsg(_("E321: Could not reload \"%s\""), buf->b_fname); semsg(_(e_could_not_reload_str), buf->b_fname);
if (savebuf != NULL && bufref_valid(&bufref) && buf == curbuf) if (savebuf != NULL && bufref_valid(&bufref) && buf == curbuf)
{ {
// Put the text back from the save buffer. First // Put the text back from the save buffer. First

View File

@ -2464,7 +2464,7 @@ do_browse(
# endif # endif
{ {
// TODO: non-GUI file selector here // TODO: non-GUI file selector here
emsg(_("E338: Sorry, no file browser in console mode")); emsg(_(e_sorry_no_file_browser_in_console_mode));
fname = NULL; fname = NULL;
} }

View File

@ -520,7 +520,7 @@ vim_findfile_init(
wc_part = (char_u *)errpt; wc_part = (char_u *)errpt;
if (*wc_part != NUL && !vim_ispathsep(*wc_part)) if (*wc_part != NUL && !vim_ispathsep(*wc_part))
{ {
semsg(_("E343: Invalid path: '**[number]' must be at the end of the path or be followed by '%s'."), PATHSEPSTR); semsg(_(e_invalid_path_number_must_be_at_end_of_path_or_be_followed_by_str), PATHSEPSTR);
goto error_return; goto error_return;
} }
} }
@ -1905,19 +1905,19 @@ find_file_in_path_option(
if (first == TRUE) if (first == TRUE)
{ {
if (find_what == FINDFILE_DIR) if (find_what == FINDFILE_DIR)
semsg(_("E344: Can't find directory \"%s\" in cdpath"), semsg(_(e_cant_find_directory_str_in_cdpath),
ff_file_to_find); ff_file_to_find);
else else
semsg(_("E345: Can't find file \"%s\" in path"), semsg(_(e_cant_find_file_str_in_path),
ff_file_to_find); ff_file_to_find);
} }
else else
{ {
if (find_what == FINDFILE_DIR) if (find_what == FINDFILE_DIR)
semsg(_("E346: No more directory \"%s\" found in cdpath"), semsg(_(e_no_more_directory_str_found_in_cdpath),
ff_file_to_find); ff_file_to_find);
else else
semsg(_("E347: No more file \"%s\" found in path"), semsg(_(e_no_more_file_str_found_in_path),
ff_file_to_find); ff_file_to_find);
} }
} }

View File

@ -2641,7 +2641,7 @@ mch_print_init(
} }
if (prt_ps_fd == NULL) if (prt_ps_fd == NULL)
{ {
emsg(_("E324: Can't open PostScript output file")); emsg(_(e_cant_open_postscript_output_file));
mch_print_cleanup(); mch_print_cleanup();
return FAIL; return FAIL;
} }

View File

@ -1264,7 +1264,7 @@ mf_do_open(
if ((flags & O_CREAT) && mch_lstat((char *)mfp->mf_fname, &sb) >= 0) if ((flags & O_CREAT) && mch_lstat((char *)mfp->mf_fname, &sb) >= 0)
{ {
mfp->mf_fd = -1; mfp->mf_fd = -1;
emsg(_("E300: Swap file already exists (symlink attack?)")); emsg(_(e_swap_file_already_exists_symlink_attack));
} }
else else
#endif #endif

View File

@ -719,7 +719,7 @@ ml_setname(buf_T *buf)
if (mfp->mf_fd < 0) if (mfp->mf_fd < 0)
{ {
// could not (re)open the swap file, what can we do???? // could not (re)open the swap file, what can we do????
emsg(_("E301: Oops, lost the swap file!!!")); emsg(_(e_oops_lost_the_swap_file));
return; return;
} }
#ifdef HAVE_FD_CLOEXEC #ifdef HAVE_FD_CLOEXEC
@ -731,7 +731,7 @@ ml_setname(buf_T *buf)
#endif #endif
} }
if (!success) if (!success)
emsg(_("E302: Could not rename swap file")); emsg(_(e_could_not_rename_swap_file));
} }
/* /*
@ -823,7 +823,7 @@ ml_open_file(buf_T *buf)
{ {
need_wait_return = TRUE; // call wait_return later need_wait_return = TRUE; // call wait_return later
++no_wait_return; ++no_wait_return;
(void)semsg(_("E303: Unable to open swap file for \"%s\", recovery impossible"), (void)semsg(_(e_unable_to_open_swap_file_for_str_recovery_impossible),
buf_spname(buf) != NULL ? buf_spname(buf) : buf->b_fname); buf_spname(buf) != NULL ? buf_spname(buf) : buf->b_fname);
--no_wait_return; --no_wait_return;
} }
@ -959,7 +959,7 @@ ml_upd_block0(buf_T *buf, upd_block0_T what)
b0p = (ZERO_BL *)(hp->bh_data); b0p = (ZERO_BL *)(hp->bh_data);
if (ml_check_b0_id(b0p) == FAIL) if (ml_check_b0_id(b0p) == FAIL)
iemsg(_("E304: ml_upd_block0(): Didn't get block 0??")); iemsg(_(e_ml_upd_block0_didnt_get_block_zero));
else else
{ {
if (what == UB_FNAME) if (what == UB_FNAME)
@ -1209,7 +1209,7 @@ ml_recover(int checkext)
len = recover_names(fname, FALSE, 0, NULL); len = recover_names(fname, FALSE, 0, NULL);
if (len == 0) // no swap files found if (len == 0) // no swap files found
{ {
semsg(_("E305: No swap file found for %s"), fname); semsg(_(e_no_swap_file_found_for_str), fname);
goto theend; goto theend;
} }
if (len == 1) // one swap file found, use it if (len == 1) // one swap file found, use it
@ -1266,7 +1266,7 @@ ml_recover(int checkext)
if (mfp == NULL || mfp->mf_fd < 0) if (mfp == NULL || mfp->mf_fd < 0)
{ {
if (fname_used != NULL) if (fname_used != NULL)
semsg(_("E306: Cannot open %s"), fname_used); semsg(_(e_cannot_open_str), fname_used);
goto theend; goto theend;
} }
buf->b_ml.ml_mfp = mfp; buf->b_ml.ml_mfp = mfp;
@ -1308,7 +1308,7 @@ ml_recover(int checkext)
} }
if (ml_check_b0_id(b0p) == FAIL) if (ml_check_b0_id(b0p) == FAIL)
{ {
semsg(_("E307: %s does not look like a Vim swap file"), mfp->mf_fname); semsg(_(e_str_does_not_look_like_vim_swap_file), mfp->mf_fname);
goto theend; goto theend;
} }
if (b0_magic_wrong(b0p)) if (b0_magic_wrong(b0p))
@ -1410,7 +1410,7 @@ ml_recover(int checkext)
&& ((mch_stat((char *)mfp->mf_fname, &swp_stat) != -1 && ((mch_stat((char *)mfp->mf_fname, &swp_stat) != -1
&& org_stat.st_mtime > swp_stat.st_mtime) && org_stat.st_mtime > swp_stat.st_mtime)
|| org_stat.st_mtime != mtime)) || org_stat.st_mtime != mtime))
emsg(_("E308: Warning: Original file may have been changed")); emsg(_(e_warning_original_file_may_have_been_changed));
out_flush(); out_flush();
// Get the 'fileformat' and 'fileencoding' from block zero. // Get the 'fileformat' and 'fileencoding' from block zero.
@ -1514,7 +1514,7 @@ ml_recover(int checkext)
{ {
if (bnum == 1) if (bnum == 1)
{ {
semsg(_("E309: Unable to read block 1 from %s"), mfp->mf_fname); semsg(_(e_unable_to_read_block_one_from_str), mfp->mf_fname);
goto theend; goto theend;
} }
++error; ++error;
@ -1600,7 +1600,7 @@ ml_recover(int checkext)
{ {
if (bnum == 1) if (bnum == 1)
{ {
semsg(_("E310: Block 1 ID wrong (%s not a .swp file?)"), semsg(_(e_block_one_id_wrong_str_not_swp_file),
mfp->mf_fname); mfp->mf_fname);
goto theend; goto theend;
} }
@ -1721,12 +1721,12 @@ ml_recover(int checkext)
recoverymode = FALSE; recoverymode = FALSE;
if (got_int) if (got_int)
emsg(_("E311: Recovery Interrupted")); emsg(_(e_recovery_interrupted));
else if (error) else if (error)
{ {
++no_wait_return; ++no_wait_return;
msg(">>>>>>>>>>>>>"); msg(">>>>>>>>>>>>>");
emsg(_("E312: Errors detected while recovering; look for lines starting with ???")); emsg(_(e_errors_detected_while_recovering_look_for_lines_starting_with_questions));
--no_wait_return; --no_wait_return;
msg(_("See \":help E312\" for more information.")); msg(_("See \":help E312\" for more information."));
msg(">>>>>>>>>>>>>"); msg(">>>>>>>>>>>>>");
@ -2485,7 +2485,7 @@ ml_preserve(buf_T *buf, int message)
if (mfp == NULL || mfp->mf_fname == NULL) if (mfp == NULL || mfp->mf_fname == NULL)
{ {
if (message) if (message)
emsg(_("E313: Cannot preserve, there is no swap file")); emsg(_(e_cannot_preserve_there_is_no_swap_file));
return; return;
} }
@ -2540,7 +2540,7 @@ theend:
if (status == OK) if (status == OK)
msg(_("File preserved")); msg(_("File preserved"));
else else
emsg(_("E314: Preserve failed")); emsg(_(e_preserve_failed));
} }
} }
@ -2615,7 +2615,7 @@ ml_get_buf(
// Avoid giving this message for a recursive call, may happen when // Avoid giving this message for a recursive call, may happen when
// the GUI redraws part of the text. // the GUI redraws part of the text.
++recursive; ++recursive;
siemsg(_("E315: ml_get: invalid lnum: %ld"), lnum); siemsg(_(e_ml_get_invalid_lnum_nr), lnum);
--recursive; --recursive;
} }
errorret: errorret:
@ -2660,7 +2660,7 @@ errorret:
++recursive; ++recursive;
get_trans_bufname(buf); get_trans_bufname(buf);
shorten_dir(NameBuff); shorten_dir(NameBuff);
siemsg(_("E316: ml_get: cannot find line %ld in buffer %d %s"), siemsg(_(e_ml_get_cannot_find_line_nr_in_buffer_nr_str),
lnum, buf->b_fnum, NameBuff); lnum, buf->b_fnum, NameBuff);
--recursive; --recursive;
} }
@ -3114,7 +3114,7 @@ ml_append_int(
pp = (PTR_BL *)(hp->bh_data); // must be pointer block pp = (PTR_BL *)(hp->bh_data); // must be pointer block
if (pp->pb_id != PTR_ID) if (pp->pb_id != PTR_ID)
{ {
iemsg(_("E317: pointer block id wrong 3")); iemsg(_(e_pointer_block_id_wrong_three));
mf_put(mfp, hp, FALSE, FALSE); mf_put(mfp, hp, FALSE, FALSE);
goto theend; goto theend;
} }
@ -3256,7 +3256,7 @@ ml_append_int(
*/ */
if (stack_idx < 0) if (stack_idx < 0)
{ {
iemsg(_("E318: Updated too many blocks?")); iemsg(_(e_updated_too_many_blocks));
buf->b_ml.ml_stack_top = 0; // invalidate stack buf->b_ml.ml_stack_top = 0; // invalidate stack
} }
} }
@ -3713,7 +3713,7 @@ ml_delete_int(buf_T *buf, linenr_T lnum, int flags)
pp = (PTR_BL *)(hp->bh_data); // must be pointer block pp = (PTR_BL *)(hp->bh_data); // must be pointer block
if (pp->pb_id != PTR_ID) if (pp->pb_id != PTR_ID)
{ {
iemsg(_("E317: pointer block id wrong 4")); iemsg(_(e_pointer_block_id_wrong_four));
mf_put(mfp, hp, FALSE, FALSE); mf_put(mfp, hp, FALSE, FALSE);
goto theend; goto theend;
} }
@ -3978,7 +3978,7 @@ ml_flush_line(buf_T *buf)
hp = ml_find_line(buf, lnum, ML_FIND); hp = ml_find_line(buf, lnum, ML_FIND);
if (hp == NULL) if (hp == NULL)
siemsg(_("E320: Cannot find line %ld"), lnum); siemsg(_(e_cannot_find_line_nr), lnum);
else else
{ {
dp = (DATA_BL *)(hp->bh_data); dp = (DATA_BL *)(hp->bh_data);
@ -4238,7 +4238,7 @@ ml_find_line(buf_T *buf, linenr_T lnum, int action)
pp = (PTR_BL *)(dp); // must be pointer block pp = (PTR_BL *)(dp); // must be pointer block
if (pp->pb_id != PTR_ID) if (pp->pb_id != PTR_ID)
{ {
iemsg(_("E317: pointer block id wrong")); iemsg(_(e_pointer_block_id_wrong));
goto error_block; goto error_block;
} }
@ -4283,11 +4283,11 @@ ml_find_line(buf_T *buf, linenr_T lnum, int action)
if (idx >= (int)pp->pb_count) // past the end: something wrong! if (idx >= (int)pp->pb_count) // past the end: something wrong!
{ {
if (lnum > buf->b_ml.ml_line_count) if (lnum > buf->b_ml.ml_line_count)
siemsg(_("E322: line number out of range: %ld past the end"), siemsg(_(e_line_number_out_of_range_nr_past_the_end),
lnum - buf->b_ml.ml_line_count); lnum - buf->b_ml.ml_line_count);
else else
siemsg(_("E323: line count wrong in block %ld"), bnum); siemsg(_(e_line_count_wrong_in_block_nr), bnum);
goto error_block; goto error_block;
} }
if (action == ML_DELETE) if (action == ML_DELETE)
@ -4380,7 +4380,7 @@ ml_lineadd(buf_T *buf, int count)
if (pp->pb_id != PTR_ID) if (pp->pb_id != PTR_ID)
{ {
mf_put(mfp, hp, FALSE, FALSE); mf_put(mfp, hp, FALSE, FALSE);
iemsg(_("E317: pointer block id wrong 2")); iemsg(_(e_pointer_block_id_wrong_two));
break; break;
} }
pp->pb_pointer[ip->ip_index].pe_line_count += count; pp->pb_pointer[ip->ip_index].pe_line_count += count;
@ -4594,7 +4594,7 @@ attention_message(
time_t swap_mtime; time_t swap_mtime;
++no_wait_return; ++no_wait_return;
(void)emsg(_("E325: ATTENTION")); (void)emsg(_(e_attention));
msg_puts(_("\nFound a swap file by the name \"")); msg_puts(_("\nFound a swap file by the name \""));
msg_home_replace(fname); msg_home_replace(fname);
msg_puts("\"\n"); msg_puts("\"\n");
@ -5141,7 +5141,7 @@ findswapname(
{ {
if (fname[n - 2] == 'a') // ".saa": tried enough, give up if (fname[n - 2] == 'a') // ".saa": tried enough, give up
{ {
emsg(_("E326: Too many swap files found")); emsg(_(e_too_many_swap_files_found));
VIM_CLEAR(fname); VIM_CLEAR(fname);
break; break;
} }

View File

@ -59,9 +59,6 @@ static char_u *menu_translate_tab_and_shift(char_u *arg_start);
// The character for each menu mode // The character for each menu mode
static char *menu_mode_chars[] = {"n", "v", "s", "o", "i", "c", "tl", "t"}; static char *menu_mode_chars[] = {"n", "v", "s", "o", "i", "c", "tl", "t"};
static char_u e_notsubmenu[] = N_("E327: Part of menu-item path is not sub-menu");
static char_u e_nomenu[] = N_("E329: No menu \"%s\"");
#ifdef FEAT_TOOLBAR #ifdef FEAT_TOOLBAR
static const char *toolbar_names[] = static const char *toolbar_names[] =
{ {
@ -533,7 +530,7 @@ add_menu_path(
if (*next_name == NUL && menu->children != NULL) if (*next_name == NUL && menu->children != NULL)
{ {
if (!sys_menu) if (!sys_menu)
emsg(_("E330: Menu path must not lead to a sub-menu")); emsg(_(e_menu_path_must_not_loead_to_sub_menu));
goto erret; goto erret;
} }
if (*next_name != NUL && menu->children == NULL if (*next_name != NUL && menu->children == NULL
@ -543,7 +540,7 @@ add_menu_path(
) )
{ {
if (!sys_menu) if (!sys_menu)
emsg(_(e_notsubmenu)); emsg(_(e_part_of_menu_item_path_is_not_sub_menu));
goto erret; goto erret;
} }
break; break;
@ -572,13 +569,13 @@ add_menu_path(
{ {
if (*next_name == NUL && parent == NULL) if (*next_name == NUL && parent == NULL)
{ {
emsg(_("E331: Must not add menu items directly to menu bar")); emsg(_(e_must_not_add_menu_items_directly_to_menu_bar));
goto erret; goto erret;
} }
if (menu_is_separator(dname) && *next_name != NUL) if (menu_is_separator(dname) && *next_name != NUL)
{ {
emsg(_("E332: Separator cannot be part of a menu path")); emsg(_(e_separator_cannot_be_part_of_menu_path));
goto erret; goto erret;
} }
@ -871,7 +868,7 @@ menu_nable_recurse(
{ {
if (menu->children == NULL) if (menu->children == NULL)
{ {
emsg(_(e_notsubmenu)); emsg(_(e_part_of_menu_item_path_is_not_sub_menu));
return FAIL; return FAIL;
} }
if (menu_nable_recurse(menu->children, p, modes, enable) if (menu_nable_recurse(menu->children, p, modes, enable)
@ -896,7 +893,7 @@ menu_nable_recurse(
} }
if (*name != NUL && *name != '*' && menu == NULL) if (*name != NUL && *name != '*' && menu == NULL)
{ {
semsg(_(e_nomenu), name); semsg(_(e_no_menu_str), name);
return FAIL; return FAIL;
} }
@ -937,7 +934,7 @@ remove_menu(
if (*p != NUL && menu->children == NULL) if (*p != NUL && menu->children == NULL)
{ {
if (!silent) if (!silent)
emsg(_(e_notsubmenu)); emsg(_(e_part_of_menu_item_path_is_not_sub_menu));
return FAIL; return FAIL;
} }
if ((menu->modes & modes) != 0x0) if ((menu->modes & modes) != 0x0)
@ -989,7 +986,7 @@ remove_menu(
if (menu == NULL) if (menu == NULL)
{ {
if (!silent) if (!silent)
semsg(_(e_nomenu), name); semsg(_(e_no_menu_str), name);
return FAIL; return FAIL;
} }
@ -1127,7 +1124,7 @@ show_menus(char_u *path_name, int modes)
// Found menu // Found menu
if (*p != NUL && menu->children == NULL) if (*p != NUL && menu->children == NULL)
{ {
emsg(_(e_notsubmenu)); emsg(_(e_part_of_menu_item_path_is_not_sub_menu));
vim_free(path_name); vim_free(path_name);
return FAIL; return FAIL;
} }
@ -1143,7 +1140,7 @@ show_menus(char_u *path_name, int modes)
} }
if (menu == NULL) if (menu == NULL)
{ {
semsg(_(e_nomenu), name); semsg(_(e_no_menu_str), name);
vim_free(path_name); vim_free(path_name);
return FAIL; return FAIL;
} }
@ -2423,7 +2420,7 @@ execute_menu(exarg_T *eap, vimmenu_T *menu, int mode_idx)
default: default:
mode = (char_u *)"Normal"; mode = (char_u *)"Normal";
} }
semsg(_("E335: Menu not defined for %s mode"), mode); semsg(_(e_menu_not_defined_for_str_mode), mode);
} }
} }
@ -2457,13 +2454,13 @@ menu_getbyname(char_u *name_arg)
{ {
if (*p == NUL && menu->children != NULL) if (*p == NUL && menu->children != NULL)
{ {
emsg(_("E333: Menu path must lead to a menu item")); emsg(_(e_menu_path_must_lead_to_menu_item));
gave_emsg = TRUE; gave_emsg = TRUE;
menu = NULL; menu = NULL;
} }
else if (*p != NUL && menu->children == NULL) else if (*p != NUL && menu->children == NULL)
{ {
emsg(_(e_notsubmenu)); emsg(_(e_part_of_menu_item_path_is_not_sub_menu));
menu = NULL; menu = NULL;
} }
break; break;
@ -2479,7 +2476,7 @@ menu_getbyname(char_u *name_arg)
if (menu == NULL) if (menu == NULL)
{ {
if (!gave_emsg) if (!gave_emsg)
semsg(_("E334: Menu not found: %s"), name_arg); semsg(_(e_menu_not_found_str), name_arg);
return NULL; return NULL;
} }
@ -2609,9 +2606,9 @@ gui_find_menu(char_u *path_name)
{ {
// found a menu item instead of a sub-menu // found a menu item instead of a sub-menu
if (*p == NUL) if (*p == NUL)
emsg(_("E336: Menu path must lead to a sub-menu")); emsg(_(e_menu_path_must_lead_to_sub_menu));
else else
emsg(_(e_notsubmenu)); emsg(_(e_part_of_menu_item_path_is_not_sub_menu));
menu = NULL; menu = NULL;
goto theend; goto theend;
} }
@ -2630,7 +2627,7 @@ gui_find_menu(char_u *path_name)
} }
if (menu == NULL) if (menu == NULL)
emsg(_("E337: Menu not found - check menu names")); emsg(_(e_menu_not_found_check_menu_names));
theend: theend:
vim_free(saved_name); vim_free(saved_name);
return menu; return menu;

View File

@ -128,8 +128,6 @@ static void nv_drop(cmdarg_T *cap);
#endif #endif
static void nv_cursorhold(cmdarg_T *cap); static void nv_cursorhold(cmdarg_T *cap);
static char *e_noident = N_("E349: No identifier under cursor");
/* /*
* Function to be called for a Normal or Visual mode command. * Function to be called for a Normal or Visual mode command.
* The argument is a cmdarg_T. * The argument is a cmdarg_T.
@ -1645,9 +1643,9 @@ find_ident_at_pos(
if ((find_type & FIND_NOERROR) == 0) if ((find_type & FIND_NOERROR) == 0)
{ {
if (find_type & FIND_STRING) if (find_type & FIND_STRING)
emsg(_("E348: No string under cursor")); emsg(_(e_no_string_under_cursor));
else else
emsg(_(e_noident)); emsg(_(e_no_identifier_under_cursor));
} }
return 0; return 0;
} }
@ -3683,7 +3681,7 @@ nv_ident(cmdarg_T *cap)
|| STRCMP(kp, ":help") == 0); || STRCMP(kp, ":help") == 0);
if (kp_help && *skipwhite(ptr) == NUL) if (kp_help && *skipwhite(ptr) == NUL)
{ {
emsg(_(e_noident)); // found white space only emsg(_(e_no_identifier_under_cursor)); // found white space only
return; return;
} }
kp_ex = (*kp == ':'); kp_ex = (*kp == ':');
@ -3734,7 +3732,8 @@ nv_ident(cmdarg_T *cap)
} }
if (n == 0) if (n == 0)
{ {
emsg(_(e_noident)); // found dashes only // found dashes only
emsg(_(e_no_identifier_under_cursor));
vim_free(buf); vim_free(buf);
return; return;
} }

View File

@ -2517,7 +2517,7 @@ bt_regcomp(char_u *expr, int re_flags)
{ {
vim_free(r); vim_free(r);
if (reg_toolong) if (reg_toolong)
EMSG_RET_NULL(_("E339: Pattern too long")); EMSG_RET_NULL(_(e_pattern_too_long));
return NULL; return NULL;
} }

View File

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