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

patch 8.2.3977: 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-01 21:59:18 +00:00
parent b34689010a
commit 9a846fbaa5
20 changed files with 147 additions and 43 deletions

View File

@@ -978,7 +978,7 @@ ex_rubydo(exarg_T *eap)
{
if (TYPE(line) != T_STRING)
{
emsg(_("E265: $_ must be an instance of String"));
emsg(_(e_dollar_must_be_an_instance_of_string));
return;
}
ml_replace(i, (char_u *) StringValuePtr(line), 1);
@@ -1077,7 +1077,7 @@ ensure_ruby_initialized(void)
}
else
{
emsg(_("E266: Sorry, this command is disabled, the Ruby library could not be loaded."));
emsg(_(e_sorry_this_command_is_disabled_the_ruby_library_could_not_be_loaded));
return 0;
}
#endif
@@ -1112,19 +1112,19 @@ error_print(int state)
switch (state)
{
case TAG_RETURN:
emsg(_("E267: unexpected return"));
emsg(_(e_unexpected_return));
break;
case TAG_NEXT:
emsg(_("E268: unexpected next"));
emsg(_(e_unexpected_next));
break;
case TAG_BREAK:
emsg(_("E269: unexpected break"));
emsg(_(e_unexpected_break));
break;
case TAG_REDO:
emsg(_("E270: unexpected redo"));
emsg(_(e_unexpected_redo));
break;
case TAG_RETRY:
emsg(_("E271: retry outside of rescue clause"));
emsg(_(e_retry_outside_of_rescue_clause));
break;
case TAG_RAISE:
case TAG_FATAL:
@@ -1137,7 +1137,7 @@ error_print(int state)
einfo = rb_obj_as_string(error);
if (eclass == rb_eRuntimeError && RSTRING_LEN(einfo) == 0)
{
emsg(_("E272: unhandled exception"));
emsg(_(e_unhandled_exception));
}
else
{
@@ -1164,7 +1164,7 @@ error_print(int state)
#endif
break;
default:
vim_snprintf(buff, BUFSIZ, _("E273: unknown longjmp status %d"), state);
vim_snprintf(buff, BUFSIZ, _(e_unknown_longjmp_status_nr), state);
emsg(buff);
break;
}