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

patch 9.0.1133: error message names do not match the items

Problem:    Error message names do not match the items.
Solution:   Add "_str" when the text contains "%s".
This commit is contained in:
Bram Moolenaar
2023-01-02 18:10:04 +00:00
parent dc4daa3a39
commit a9fa8c58fb
16 changed files with 62 additions and 59 deletions

View File

@@ -1314,15 +1314,15 @@ vim9_declare_error(char_u *name)
case 'w': scope = _("window"); break;
case 't': scope = _("tab"); break;
case 'v': scope = "v:"; break;
case '$': semsg(_(e_cannot_declare_an_environment_variable), name);
case '$': semsg(_(e_cannot_declare_an_environment_variable_str), name);
return;
case '&': semsg(_(e_cannot_declare_an_option), name);
case '&': semsg(_(e_cannot_declare_an_option_str), name);
return;
case '@': semsg(_(e_cannot_declare_a_register_str), name);
return;
default: return;
}
semsg(_(e_cannot_declare_a_scope_variable), scope, name);
semsg(_(e_cannot_declare_a_scope_variable_str), scope, name);
}
/*
@@ -1578,7 +1578,7 @@ compile_lhs(
{
if (is_decl)
{
semsg(_(e_variable_already_declared), lhs->lhs_name);
semsg(_(e_variable_already_declared_str), lhs->lhs_name);
return FAIL;
}
}
@@ -1748,7 +1748,7 @@ compile_lhs(
if (oplen > 1 && !heredoc)
{
// +=, /=, etc. require an existing variable
semsg(_(e_cannot_use_operator_on_new_variable), lhs->lhs_name);
semsg(_(e_cannot_use_operator_on_new_variable_str), lhs->lhs_name);
return FAIL;
}
if (!is_decl || (lhs->lhs_has_index && !has_cmd
@@ -1851,14 +1851,14 @@ compile_assign_lhs(
if (!lhs->lhs_has_index && lhs->lhs_lvar == &lhs->lhs_arg_lvar)
{
semsg(_(e_cannot_assign_to_argument), lhs->lhs_name);
semsg(_(e_cannot_assign_to_argument_str), lhs->lhs_name);
return FAIL;
}
if (!is_decl && lhs->lhs_lvar != NULL
&& lhs->lhs_lvar->lv_const != ASSIGN_VAR
&& !lhs->lhs_has_index)
{
semsg(_(e_cannot_assign_to_constant), lhs->lhs_name);
semsg(_(e_cannot_assign_to_constant_str), lhs->lhs_name);
return FAIL;
}
return OK;