0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.3750: error messages are everywhere

Problem:    Error messages are everywhere.
Solution:   Move more error messages to errors.h and adjust the names.
This commit is contained in:
Bram Moolenaar
2021-12-05 22:19:27 +00:00
parent 4700398e38
commit 40bcec1bac
18 changed files with 65 additions and 36 deletions

View File

@@ -193,7 +193,7 @@ open_buffer(
// This is OK, since there are no changes to lose.
if (curbuf == NULL)
{
emsg(_("E82: Cannot allocate any buffer, exiting..."));
emsg(_(e_cannot_allocate_any_buffer_exiting));
// Don't try to do any saving, with "curbuf" NULL almost nothing
// will work.
@@ -201,7 +201,7 @@ open_buffer(
getout(2);
}
emsg(_("E83: Cannot allocate buffer, using other one..."));
emsg(_(e_cannot_allocate_buffer_using_other_one));
enter_buffer(curbuf);
#ifdef FEAT_SYN_HL
if (old_tw != curbuf->b_p_tw)
@@ -1182,7 +1182,7 @@ empty_curbuf(
if (action == DOBUF_UNLOAD)
{
emsg(_("E90: Cannot unload last buffer"));
emsg(_(e_cannot_unload_last_buffer));
return FAIL;
}
@@ -1255,7 +1255,7 @@ do_buffer_ext(
}
if (!bufIsChanged(buf))
{
emsg(_("E84: No modified buffer found"));
emsg(_(e_no_modified_buffer_found));
return FAIL;
}
}
@@ -1294,7 +1294,7 @@ do_buffer_ext(
if (bp == buf)
{
// back where we started, didn't find anything.
emsg(_("E85: There is no listed buffer"));
emsg(_(e_there_is_no_listed_buffer));
return FAIL;
}
}
@@ -1306,12 +1306,12 @@ do_buffer_ext(
{
// don't warn when deleting
if (!unload)
semsg(_(e_nobufnr), count);
semsg(_(e_buffer_nr_does_not_exist), count);
}
else if (dir == FORWARD)
emsg(_("E87: Cannot go beyond last buffer"));
emsg(_(e_cannot_go_beyond_last_buffer));
else
emsg(_("E88: Cannot go before first buffer"));
emsg(_(e_cannot_go_before_first_buffer));
return FAIL;
}
#ifdef FEAT_PROP_POPUP
@@ -1364,7 +1364,7 @@ do_buffer_ext(
else
#endif
{
semsg(_("E89: No write since last change for buffer %d (add ! to override)"),
semsg(_(e_no_write_since_last_change_for_buffer_nr_add_bang_to_override),
buf->b_fnum);
return FAIL;
}