patch 8.2.3977: error messages are spread out
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
diff --git a/src/if_ruby.c b/src/if_ruby.c
index ef332ee..fcbbf33 100644
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -978,7 +978,7 @@
{
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 @@
}
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 @@
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 @@
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 @@
#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;
}