patch 8.2.3069: error messages are spread out
Problem: Error messages are spread out.
Solution: Move some error messages to errors.h. Use clearer names.
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index d8c5a12..7e0bd64 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -2120,7 +2120,7 @@
// with UNIX it is possible to open a directory
if (mch_isdir(ffname))
{
- semsg(_(e_isadir2), ffname);
+ semsg(_(e_src_is_directory), ffname);
return FAIL;
}
#endif
@@ -2137,7 +2137,7 @@
else
#endif
{
- emsg(_(e_exists));
+ emsg(_(e_file_exists));
return FAIL;
}
}
@@ -3586,7 +3586,7 @@
if (secure)
{
secure = 2;
- emsg(_(e_curdir));
+ emsg(_(e_command_not_allowed_from_vimrc_in_current_dir_or_tag_search));
return TRUE;
}
#ifdef HAVE_SANDBOX
@@ -3729,7 +3729,7 @@
++cmd;
if (vim_strchr((char_u *)"/?&", *cmd) == NULL)
{
- emsg(_(e_backslash));
+ emsg(_(e_backslash_should_be_followed_by));
return;
}
if (*cmd != '&')
@@ -3944,7 +3944,7 @@
if (!subflags.do_count && !curbuf->b_p_ma)
{
// Substitution is not allowed in non-'modifiable' buffer
- emsg(_(e_modifiable));
+ emsg(_(e_cannot_make_changes_modifiable_is_off));
return;
}
@@ -4903,7 +4903,7 @@
++cmd;
if (vim_strchr((char_u *)"/?&", *cmd) == NULL)
{
- emsg(_(e_backslash));
+ emsg(_(e_backslash_should_be_followed_by));
return;
}
if (*cmd == '&')