To: vim_dev@googlegroups.com Subject: Patch 9.0.1133 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.1133 Problem: Error message names do not match the items. Solution: Add "_str" when the text contains "%s". Files: src/dict.c, src/errors.h, src/eval.c, src/evalfunc.c, src/evalvars.c, src/highlight.c, src/syntax.c, src/textprop.c, src/undo.c, src/userfunc.c, src/vim9cmds.c, src/vim9compile.c, src/vim9execute.c, src/vim9expr.c, src/vim9script.c *** ../vim-9.0.1132/src/dict.c 2022-12-27 19:54:48.118194735 +0000 --- src/dict.c 2023-01-02 18:03:18.975353489 +0000 *************** *** 982,988 **** if (*skipwhite(*arg) == ':') semsg(_(e_no_white_space_allowed_before_str_str), ":", *arg); else ! semsg(_(e_missing_colon_in_dictionary), *arg); clear_tv(&tvkey); goto failret; } --- 982,988 ---- if (*skipwhite(*arg) == ':') semsg(_(e_no_white_space_allowed_before_str_str), ":", *arg); else ! semsg(_(e_missing_colon_in_dictionary_str), *arg); clear_tv(&tvkey); goto failret; } *************** *** 1020,1026 **** item = dict_find(d, key, -1); if (item != NULL) { ! semsg(_(e_duplicate_key_in_dictionary), key); clear_tv(&tvkey); clear_tv(&tv); goto failret; --- 1020,1026 ---- item = dict_find(d, key, -1); if (item != NULL) { ! semsg(_(e_duplicate_key_in_dictionary_str), key); clear_tv(&tvkey); clear_tv(&tv); goto failret; *************** *** 1060,1066 **** if (**arg == ',') semsg(_(e_no_white_space_allowed_before_str_str), ",", *arg); else ! semsg(_(e_missing_comma_in_dictionary), *arg); goto failret; } } --- 1060,1066 ---- if (**arg == ',') semsg(_(e_no_white_space_allowed_before_str_str), ",", *arg); else ! semsg(_(e_missing_comma_in_dictionary_str), *arg); goto failret; } } *************** *** 1068,1074 **** if (**arg != '}') { if (evalarg != NULL) ! semsg(_(e_missing_dict_end), *arg); failret: if (d != NULL) dict_free(d); --- 1068,1074 ---- if (**arg != '}') { if (evalarg != NULL) ! semsg(_(e_missing_dict_end_str), *arg); failret: if (d != NULL) dict_free(d); *************** *** 1456,1462 **** di = dict_find(d, key, -1); if (di == NULL) { ! semsg(_(e_key_not_present_in_dictionary), key); return; } --- 1456,1462 ---- di = dict_find(d, key, -1); if (di == NULL) { ! semsg(_(e_key_not_present_in_dictionary_str), key); return; } *** ../vim-9.0.1132/src/errors.h 2023-01-01 20:31:26.677588486 +0000 --- src/errors.h 2023-01-02 18:07:06.935310970 +0000 *************** *** 968,976 **** #ifdef FEAT_SYN_HL EXTERN char e_illegal_argument_str_2[] INIT(= N_("E390: Illegal argument: %s")); ! EXTERN char e_no_such_syntax_cluster_1[] INIT(= N_("E391: No such syntax cluster: %s")); ! EXTERN char e_no_such_syntax_cluster_2[] INIT(= N_("E392: No such syntax cluster: %s")); EXTERN char e_groupthere_not_accepted_here[] INIT(= N_("E393: group[t]here not accepted here")); --- 968,976 ---- #ifdef FEAT_SYN_HL EXTERN char e_illegal_argument_str_2[] INIT(= N_("E390: Illegal argument: %s")); ! EXTERN char e_no_such_syntax_cluster_str_1[] INIT(= N_("E391: No such syntax cluster: %s")); ! EXTERN char e_no_such_syntax_cluster_str_2[] INIT(= N_("E392: No such syntax cluster: %s")); EXTERN char e_groupthere_not_accepted_here[] INIT(= N_("E393: group[t]here not accepted here")); *************** *** 1028,1034 **** INIT(= N_("E419: FG color unknown")); EXTERN char e_bg_color_unknown[] INIT(= N_("E420: BG color unknown")); ! EXTERN char e_color_name_or_number_not_recognized[] INIT(= N_("E421: Color name or number not recognized: %s")); EXTERN char e_terminal_code_too_long_str[] INIT(= N_("E422: Terminal code too long: %s")); --- 1028,1034 ---- INIT(= N_("E419: FG color unknown")); EXTERN char e_bg_color_unknown[] INIT(= N_("E420: BG color unknown")); ! EXTERN char e_color_name_or_number_not_recognized_str[] INIT(= N_("E421: Color name or number not recognized: %s")); EXTERN char e_terminal_code_too_long_str[] INIT(= N_("E422: Terminal code too long: %s")); *************** *** 1796,1802 **** INIT(= N_("E714: List required")); EXTERN char e_dictionary_required[] INIT(= N_("E715: Dictionary required")); ! EXTERN char e_key_not_present_in_dictionary[] INIT(= N_("E716: Key not present in Dictionary: \"%s\"")); EXTERN char e_dictionary_entry_already_exists[] INIT(= N_("E717: Dictionary entry already exists")); --- 1796,1802 ---- INIT(= N_("E714: List required")); EXTERN char e_dictionary_required[] INIT(= N_("E715: Dictionary required")); ! EXTERN char e_key_not_present_in_dictionary_str[] INIT(= N_("E716: Key not present in Dictionary: \"%s\"")); EXTERN char e_dictionary_entry_already_exists[] INIT(= N_("E717: Dictionary entry already exists")); *************** *** 1804,1816 **** INIT(= N_("E718: Funcref required")); EXTERN char e_cannot_slice_dictionary[] INIT(= N_("E719: Cannot slice a Dictionary")); ! EXTERN char e_missing_colon_in_dictionary[] INIT(= N_("E720: Missing colon in Dictionary: %s")); ! EXTERN char e_duplicate_key_in_dictionary[] INIT(= N_("E721: Duplicate key in Dictionary: \"%s\"")); ! EXTERN char e_missing_comma_in_dictionary[] INIT(= N_("E722: Missing comma in Dictionary: %s")); ! EXTERN char e_missing_dict_end[] INIT(= N_("E723: Missing end of Dictionary '}': %s")); EXTERN char e_variable_nested_too_deep_for_displaying[] INIT(= N_("E724: Variable nested too deep for displaying")); --- 1804,1816 ---- INIT(= N_("E718: Funcref required")); EXTERN char e_cannot_slice_dictionary[] INIT(= N_("E719: Cannot slice a Dictionary")); ! EXTERN char e_missing_colon_in_dictionary_str[] INIT(= N_("E720: Missing colon in Dictionary: %s")); ! EXTERN char e_duplicate_key_in_dictionary_str[] INIT(= N_("E721: Duplicate key in Dictionary: \"%s\"")); ! EXTERN char e_missing_comma_in_dictionary_str[] INIT(= N_("E722: Missing comma in Dictionary: %s")); ! EXTERN char e_missing_dict_end_str[] INIT(= N_("E723: Missing end of Dictionary '}': %s")); EXTERN char e_variable_nested_too_deep_for_displaying[] INIT(= N_("E724: Variable nested too deep for displaying")); *************** *** 2111,2117 **** EXTERN char e_bf_key_init_called_with_empty_password[] INIT(= N_("E831: bf_key_init() called with empty password")); # ifdef FEAT_PERSISTENT_UNDO ! EXTERN char e_non_encrypted_file_has_encrypted_undo_file[] INIT(= N_("E832: Non-encrypted file has encrypted undo file: %s")); # endif #else --- 2111,2117 ---- EXTERN char e_bf_key_init_called_with_empty_password[] INIT(= N_("E831: bf_key_init() called with empty password")); # ifdef FEAT_PERSISTENT_UNDO ! EXTERN char e_non_encrypted_file_has_encrypted_undo_file_str[] INIT(= N_("E832: Non-encrypted file has encrypted undo file: %s")); # endif #else *************** *** 2397,2403 **** EXTERN char e_buffer_cannot_be_registered[] INIT(= N_("E931: Buffer cannot be registered")); #ifdef FEAT_EVAL ! EXTERN char e_closure_function_should_not_be_at_top_level[] INIT(= N_("E932: Closure function should not be at top level: %s")); EXTERN char e_function_was_deleted_str[] INIT(= N_("E933: Function was deleted: %s")); --- 2397,2403 ---- EXTERN char e_buffer_cannot_be_registered[] INIT(= N_("E931: Buffer cannot be registered")); #ifdef FEAT_EVAL ! EXTERN char e_closure_function_should_not_be_at_top_level_str[] INIT(= N_("E932: Closure function should not be at top level: %s")); EXTERN char e_function_was_deleted_str[] INIT(= N_("E933: Function was deleted: %s")); *************** *** 2513,2519 **** INIT(= N_("E969: Property type %s already defined")); EXTERN char e_unknown_highlight_group_name_str[] INIT(= N_("E970: Unknown highlight group name: '%s'")); ! EXTERN char e_type_not_exist[] INIT(= N_("E971: Property type %s does not exist")); #endif #ifdef FEAT_EVAL --- 2513,2519 ---- INIT(= N_("E969: Property type %s already defined")); EXTERN char e_unknown_highlight_group_name_str[] INIT(= N_("E970: Unknown highlight group name: '%s'")); ! EXTERN char e_property_type_str_does_not_exist[] INIT(= N_("E971: Property type %s does not exist")); #endif #ifdef FEAT_EVAL *************** *** 2634,2650 **** INIT(= N_("E1014: Invalid key: %s")); EXTERN char e_name_expected_str[] INIT(= N_("E1015: Name expected: %s")); ! EXTERN char e_cannot_declare_a_scope_variable[] INIT(= N_("E1016: Cannot declare a %s variable: %s")); ! EXTERN char e_cannot_declare_an_environment_variable[] INIT(= N_("E1016: Cannot declare an environment variable: %s")); ! EXTERN char e_variable_already_declared[] INIT(= N_("E1017: Variable already declared: %s")); ! EXTERN char e_cannot_assign_to_constant[] INIT(= N_("E1018: Cannot assign to a constant: %s")); EXTERN char e_can_only_concatenate_to_string[] INIT(= N_("E1019: Can only concatenate to string")); ! EXTERN char e_cannot_use_operator_on_new_variable[] INIT(= N_("E1020: Cannot use an operator on a new variable: %s")); EXTERN char e_const_requires_a_value[] INIT(= N_("E1021: Const requires a value")); --- 2634,2650 ---- INIT(= N_("E1014: Invalid key: %s")); EXTERN char e_name_expected_str[] INIT(= N_("E1015: Name expected: %s")); ! EXTERN char e_cannot_declare_a_scope_variable_str[] INIT(= N_("E1016: Cannot declare a %s variable: %s")); ! EXTERN char e_cannot_declare_an_environment_variable_str[] INIT(= N_("E1016: Cannot declare an environment variable: %s")); ! EXTERN char e_variable_already_declared_str[] INIT(= N_("E1017: Variable already declared: %s")); ! EXTERN char e_cannot_assign_to_constant_str[] INIT(= N_("E1018: Cannot assign to a constant: %s")); EXTERN char e_can_only_concatenate_to_string[] INIT(= N_("E1019: Can only concatenate to string")); ! EXTERN char e_cannot_use_operator_on_new_variable_str[] INIT(= N_("E1020: Cannot use an operator on a new variable: %s")); EXTERN char e_const_requires_a_value[] INIT(= N_("E1021: Const requires a value")); *************** *** 2674,2680 **** INIT(= N_("E1032: Missing :catch or :finally")); EXTERN char e_catch_unreachable_after_catch_all[] INIT(= N_("E1033: Catch unreachable after catch-all")); ! EXTERN char e_cannot_use_reserved_name[] INIT(= N_("E1034: Cannot use reserved name %s")); EXTERN char e_percent_requires_number_arguments[] // xgettext:no-c-format --- 2674,2680 ---- INIT(= N_("E1032: Missing :catch or :finally")); EXTERN char e_catch_unreachable_after_catch_all[] INIT(= N_("E1033: Catch unreachable after catch-all")); ! EXTERN char e_cannot_use_reserved_name_str[] INIT(= N_("E1034: Cannot use reserved name %s")); EXTERN char e_percent_requires_number_arguments[] // xgettext:no-c-format *************** *** 2713,2719 **** #ifdef FEAT_EVAL EXTERN char e_wrong_argument_type_for_plus[] INIT(= N_("E1051: Wrong argument type for +")); ! EXTERN char e_cannot_declare_an_option[] INIT(= N_("E1052: Cannot declare an option: %s")); EXTERN char e_could_not_import_str[] INIT(= N_("E1053: Could not import \"%s\"")); --- 2713,2719 ---- #ifdef FEAT_EVAL EXTERN char e_wrong_argument_type_for_plus[] INIT(= N_("E1051: Wrong argument type for +")); ! EXTERN char e_cannot_declare_an_option_str[] INIT(= N_("E1052: Cannot declare an option: %s")); EXTERN char e_could_not_import_str[] INIT(= N_("E1053: Could not import \"%s\"")); *************** *** 2791,2797 **** INIT(= N_("E1088: Script cannot import itself")); EXTERN char e_unknown_variable_str[] INIT(= N_("E1089: Unknown variable: %s")); ! EXTERN char e_cannot_assign_to_argument[] INIT(= N_("E1090: Cannot assign to argument %s")); EXTERN char e_function_is_not_compiled_str[] INIT(= N_("E1091: Function is not compiled: %s")); --- 2791,2797 ---- INIT(= N_("E1088: Script cannot import itself")); EXTERN char e_unknown_variable_str[] INIT(= N_("E1089: Unknown variable: %s")); ! EXTERN char e_cannot_assign_to_argument_str[] INIT(= N_("E1090: Cannot assign to argument %s")); EXTERN char e_function_is_not_compiled_str[] INIT(= N_("E1091: Function is not compiled: %s")); *** ../vim-9.0.1132/src/eval.c 2022-12-27 19:54:48.118194735 +0000 --- src/eval.c 2023-01-02 17:59:31.155379074 +0000 *************** *** 1183,1189 **** if (vim9script && (flags & GLV_NO_DECL) == 0) { if (!quiet) ! semsg(_(e_variable_already_declared), lp->ll_name); return NULL; } --- 1183,1189 ---- if (vim9script && (flags & GLV_NO_DECL) == 0) { if (!quiet) ! semsg(_(e_variable_already_declared_str), lp->ll_name); return NULL; } *************** *** 1413,1419 **** if (*p == '[' || *p == '.' || unlet) { if (!quiet) ! semsg(_(e_key_not_present_in_dictionary), key); clear_tv(&var1); return NULL; } --- 1413,1419 ---- if (*p == '[' || *p == '.' || unlet) { if (!quiet) ! semsg(_(e_key_not_present_in_dictionary_str), key); clear_tv(&var1); return NULL; } *************** *** 1717,1723 **** { if (op != NULL && *op != '=') { ! semsg(_(e_key_not_present_in_dictionary), lp->ll_newkey); return; } if (dict_wrong_func_name(lp->ll_tv->vval.v_dict, rettv, --- 1717,1723 ---- { if (op != NULL && *op != '=') { ! semsg(_(e_key_not_present_in_dictionary_str), lp->ll_newkey); return; } if (dict_wrong_func_name(lp->ll_tv->vval.v_dict, rettv, *************** *** 4968,4974 **** { if (keylen > 0) key[keylen] = NUL; ! semsg(_(e_key_not_present_in_dictionary), key); } return FAIL; } --- 4968,4974 ---- { if (keylen > 0) key[keylen] = NUL; ! semsg(_(e_key_not_present_in_dictionary_str), key); } return FAIL; } *** ../vim-9.0.1132/src/evalfunc.c 2023-01-02 16:54:48.932860868 +0000 --- src/evalfunc.c 2023-01-02 17:59:45.171378127 +0000 *************** *** 7200,7206 **** else if (lv.ll_range) emsg(_(e_range_not_allowed)); else if (lv.ll_newkey != NULL) ! semsg(_(e_key_not_present_in_dictionary), lv.ll_newkey); else if (lv.ll_list != NULL) // List item. rettv->vval.v_number = tv_islocked(&lv.ll_li->li_tv); --- 7200,7206 ---- else if (lv.ll_range) emsg(_(e_range_not_allowed)); else if (lv.ll_newkey != NULL) ! semsg(_(e_key_not_present_in_dictionary_str), lv.ll_newkey); else if (lv.ll_list != NULL) // List item. rettv->vval.v_number = tv_islocked(&lv.ll_li->li_tv); *** ../vim-9.0.1132/src/evalvars.c 2023-01-02 16:54:48.932860868 +0000 --- src/evalvars.c 2023-01-02 17:40:34.231108288 +0000 *************** *** 1111,1117 **** if (vim9script && (flags & ASSIGN_NO_DECL) == 0) { // +=, /=, etc. require an existing variable ! semsg(_(e_cannot_use_operator_on_new_variable), eap->arg); } else if (vim_strchr((char_u *)"+-*/%.", *expr) != NULL) { --- 1111,1118 ---- if (vim9script && (flags & ASSIGN_NO_DECL) == 0) { // +=, /=, etc. require an existing variable ! semsg(_(e_cannot_use_operator_on_new_variable_str), ! eap->arg); } else if (vim_strchr((char_u *)"+-*/%.", *expr) != NULL) { *** ../vim-9.0.1132/src/highlight.c 2022-11-02 13:30:37.534314540 +0000 --- src/highlight.c 2023-01-02 17:54:51.687372722 +0000 *************** *** 1091,1097 **** break; if (i < 0) { ! semsg(_(e_color_name_or_number_not_recognized), key_start); return FALSE; } --- 1091,1097 ---- break; if (i < 0) { ! semsg(_(e_color_name_or_number_not_recognized_str), key_start); return FALSE; } *** ../vim-9.0.1132/src/syntax.c 2022-11-25 16:31:46.968606662 +0000 --- src/syntax.c 2023-01-02 17:53:56.999364550 +0000 *************** *** 3670,3676 **** id = syn_scl_namen2id(arg + 1, (int)(arg_end - arg - 1)); if (id == 0) { ! semsg(_(e_no_such_syntax_cluster_1), arg); break; } else --- 3670,3676 ---- id = syn_scl_namen2id(arg + 1, (int)(arg_end - arg - 1)); if (id == 0) { ! semsg(_(e_no_such_syntax_cluster_str_1), arg); break; } else *************** *** 3880,3886 **** { id = syn_scl_namen2id(arg + 1, (int)(arg_end - arg - 1)); if (id == 0) ! semsg(_(e_no_such_syntax_cluster_2), arg); else syn_list_cluster(id - SYNID_CLUSTER); } --- 3880,3886 ---- { id = syn_scl_namen2id(arg + 1, (int)(arg_end - arg - 1)); if (id == 0) ! semsg(_(e_no_such_syntax_cluster_str_2), arg); else syn_list_cluster(id - SYNID_CLUSTER); } *** ../vim-9.0.1132/src/textprop.c 2022-12-19 13:30:34.315772238 +0000 --- src/textprop.c 2023-01-02 18:06:51.071314328 +0000 *************** *** 98,104 **** if (type == NULL) type = find_prop_type(name, NULL); if (type == NULL) ! semsg(_(e_type_not_exist), name); return type; } --- 98,104 ---- if (type == NULL) type = find_prop_type(name, NULL); if (type == NULL) ! semsg(_(e_property_type_str_does_not_exist), name); return type; } *************** *** 1825,1831 **** { if (prop == NULL) { ! semsg(_(e_type_not_exist), name); return; } } --- 1825,1831 ---- { if (prop == NULL) { ! semsg(_(e_property_type_str_does_not_exist), name); return; } } *** ../vim-9.0.1132/src/undo.c 2022-09-27 16:27:56.100237745 +0100 --- src/undo.c 2023-01-02 18:04:33.903341008 +0000 *************** *** 1923,1929 **** #ifdef FEAT_CRYPT if (*curbuf->b_p_key == NUL) { ! semsg(_(e_non_encrypted_file_has_encrypted_undo_file), file_name); goto error; } bi.bi_state = crypt_create_from_file(fp, curbuf->b_p_key); --- 1923,1930 ---- #ifdef FEAT_CRYPT if (*curbuf->b_p_key == NUL) { ! semsg(_(e_non_encrypted_file_has_encrypted_undo_file_str), ! file_name); goto error; } bi.bi_state = crypt_create_from_file(fp, curbuf->b_p_key); *** ../vim-9.0.1132/src/userfunc.c 2022-12-13 18:42:19.749879633 +0000 --- src/userfunc.c 2023-01-02 18:05:35.239329634 +0000 *************** *** 4599,4605 **** if (!aborting()) { if (!eap->skip && fudi.fd_newkey != NULL) ! semsg(_(e_key_not_present_in_dictionary), fudi.fd_newkey); vim_free(fudi.fd_newkey); return NULL; } --- 4599,4606 ---- if (!aborting()) { if (!eap->skip && fudi.fd_newkey != NULL) ! semsg(_(e_key_not_present_in_dictionary_str), ! fudi.fd_newkey); vim_free(fudi.fd_newkey); return NULL; } *************** *** 4847,4853 **** p += 7; if (current_funccal == NULL) { ! emsg_funcname(e_closure_function_should_not_be_at_top_level, name == NULL ? (char_u *)"" : name); goto erret; } --- 4848,4854 ---- p += 7; if (current_funccal == NULL) { ! emsg_funcname(e_closure_function_should_not_be_at_top_level_str, name == NULL ? (char_u *)"" : name); goto erret; } *************** *** 6058,6064 **** if (fudi.fd_newkey != NULL) { // Still need to give an error message for missing key. ! semsg(_(e_key_not_present_in_dictionary), fudi.fd_newkey); vim_free(fudi.fd_newkey); } if (tofree == NULL) --- 6059,6065 ---- if (fudi.fd_newkey != NULL) { // Still need to give an error message for missing key. ! semsg(_(e_key_not_present_in_dictionary_str), fudi.fd_newkey); vim_free(fudi.fd_newkey); } if (tofree == NULL) *** ../vim-9.0.1132/src/vim9cmds.c 2022-12-29 20:56:20.021538298 +0000 --- src/vim9cmds.c 2023-01-02 17:38:36.123171866 +0000 *************** *** 1035,1041 **** goto failed; if (lookup_local(arg, varlen, NULL, cctx) == OK) { ! semsg(_(e_variable_already_declared), arg); goto failed; } --- 1035,1041 ---- goto failed; if (lookup_local(arg, varlen, NULL, cctx) == OK) { ! semsg(_(e_variable_already_declared_str), arg); goto failed; } *** ../vim-9.0.1132/src/vim9compile.c 2023-01-02 13:06:22.825633043 +0000 --- src/vim9compile.c 2023-01-02 17:45:18.507087146 +0000 *************** *** 1314,1328 **** case 'w': scope = _("window"); break; case 't': scope = _("tab"); break; case 'v': scope = "v:"; break; ! case '$': semsg(_(e_cannot_declare_an_environment_variable), name); return; ! case '&': semsg(_(e_cannot_declare_an_option), name); return; case '@': semsg(_(e_cannot_declare_a_register_str), name); return; default: return; } ! semsg(_(e_cannot_declare_a_scope_variable), scope, name); } /* --- 1314,1328 ---- case 'w': scope = _("window"); break; case 't': scope = _("tab"); break; case 'v': scope = "v:"; break; ! case '$': semsg(_(e_cannot_declare_an_environment_variable_str), name); return; ! 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_str), scope, name); } /* *************** *** 1578,1584 **** { if (is_decl) { ! semsg(_(e_variable_already_declared), lhs->lhs_name); return FAIL; } } --- 1578,1584 ---- { if (is_decl) { ! semsg(_(e_variable_already_declared_str), lhs->lhs_name); return FAIL; } } *************** *** 1748,1754 **** if (oplen > 1 && !heredoc) { // +=, /=, etc. require an existing variable ! semsg(_(e_cannot_use_operator_on_new_variable), lhs->lhs_name); return FAIL; } if (!is_decl || (lhs->lhs_has_index && !has_cmd --- 1748,1754 ---- if (oplen > 1 && !heredoc) { // +=, /=, etc. require an existing variable ! semsg(_(e_cannot_use_operator_on_new_variable_str), lhs->lhs_name); return FAIL; } if (!is_decl || (lhs->lhs_has_index && !has_cmd *************** *** 1851,1864 **** if (!lhs->lhs_has_index && lhs->lhs_lvar == &lhs->lhs_arg_lvar) { ! semsg(_(e_cannot_assign_to_argument), 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); return FAIL; } return OK; --- 1851,1864 ---- if (!lhs->lhs_has_index && lhs->lhs_lvar == &lhs->lhs_arg_lvar) { ! 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_str), lhs->lhs_name); return FAIL; } return OK; *** ../vim-9.0.1132/src/vim9execute.c 2022-12-31 14:01:20.830671637 +0000 --- src/vim9execute.c 2023-01-02 18:02:28.727360846 +0000 *************** *** 229,240 **** // have already checked key type is VAR_STRING tv = STACK_TV_BOT(2 * (idx - count)); // check key is unique ! key = tv->vval.v_string == NULL ! ? (char_u *)"" : tv->vval.v_string; item = dict_find(dict, key, -1); if (item != NULL) { ! semsg(_(e_duplicate_key_in_dictionary), key); dict_unref(dict); return MAYBE; } --- 229,239 ---- // have already checked key type is VAR_STRING tv = STACK_TV_BOT(2 * (idx - count)); // check key is unique ! key = tv->vval.v_string == NULL ? (char_u *)"" : tv->vval.v_string; item = dict_find(dict, key, -1); if (item != NULL) { ! semsg(_(e_duplicate_key_in_dictionary_str), key); dict_unref(dict); return MAYBE; } *************** *** 2386,2393 **** if (di == NULL) { // NULL dict is equivalent to empty dict ! semsg(_(e_key_not_present_in_dictionary), ! key); status = FAIL; } else if (var_check_fixed(di->di_flags, --- 2385,2391 ---- if (di == NULL) { // NULL dict is equivalent to empty dict ! semsg(_(e_key_not_present_in_dictionary_str), key); status = FAIL; } else if (var_check_fixed(di->di_flags, *************** *** 5103,5109 **** if ((di = dict_find(dict, key, -1)) == NULL) { SOURCING_LNUM = iptr->isn_lnum; ! semsg(_(e_key_not_present_in_dictionary), key); // If :silent! is used we will continue, make sure the // stack contents makes sense and the dict stack is --- 5101,5107 ---- if ((di = dict_find(dict, key, -1)) == NULL) { SOURCING_LNUM = iptr->isn_lnum; ! semsg(_(e_key_not_present_in_dictionary_str), key); // If :silent! is used we will continue, make sure the // stack contents makes sense and the dict stack is *************** *** 5146,5152 **** == NULL) { SOURCING_LNUM = iptr->isn_lnum; ! semsg(_(e_key_not_present_in_dictionary), iptr->isn_arg.string); goto on_error; } --- 5144,5150 ---- == NULL) { SOURCING_LNUM = iptr->isn_lnum; ! semsg(_(e_key_not_present_in_dictionary_str), iptr->isn_arg.string); goto on_error; } *** ../vim-9.0.1132/src/vim9expr.c 2023-01-01 19:53:26.582445815 +0000 --- src/vim9expr.c 2023-01-02 18:03:25.851352403 +0000 *************** *** 1317,1323 **** item = dict_find(d, key, -1); if (item != NULL) { ! semsg(_(e_duplicate_key_in_dictionary), key); goto failret; } item = dictitem_alloc(key); --- 1317,1323 ---- item = dict_find(d, key, -1); if (item != NULL) { ! semsg(_(e_duplicate_key_in_dictionary_str), key); goto failret; } item = dictitem_alloc(key); *************** *** 1335,1341 **** if (*skipwhite(*arg) == ':') semsg(_(e_no_white_space_allowed_before_str_str), ":", *arg); else ! semsg(_(e_missing_colon_in_dictionary), *arg); return FAIL; } whitep = *arg + 1; --- 1335,1341 ---- if (*skipwhite(*arg) == ':') semsg(_(e_no_white_space_allowed_before_str_str), ":", *arg); else ! semsg(_(e_missing_colon_in_dictionary_str), *arg); return FAIL; } whitep = *arg + 1; *************** *** 1367,1373 **** break; if (**arg != ',') { ! semsg(_(e_missing_comma_in_dictionary), *arg); goto failret; } if (IS_WHITE_OR_NUL(*whitep)) --- 1367,1373 ---- break; if (**arg != ',') { ! semsg(_(e_missing_comma_in_dictionary_str), *arg); goto failret; } if (IS_WHITE_OR_NUL(*whitep)) *************** *** 1398,1404 **** failret: if (*arg == NULL) { ! semsg(_(e_missing_dict_end), _("[end of lines]")); *arg = (char_u *)""; } dict_unref(d); --- 1398,1404 ---- failret: if (*arg == NULL) { ! semsg(_(e_missing_dict_end_str), _("[end of lines]")); *arg = (char_u *)""; } dict_unref(d); *** ../vim-9.0.1132/src/vim9script.c 2022-12-08 15:32:11.087034211 +0000 --- src/vim9script.c 2023-01-02 17:42:45.931037986 +0000 *************** *** 1138,1144 **** && cctx->ctx_ufunc != NULL && (cctx->ctx_ufunc->uf_flags & FC_OBJECT))) { ! semsg(_(e_cannot_use_reserved_name), name); return FAIL; } return OK; --- 1138,1144 ---- && cctx->ctx_ufunc != NULL && (cctx->ctx_ufunc->uf_flags & FC_OBJECT))) { ! semsg(_(e_cannot_use_reserved_name_str), name); return FAIL; } return OK; *** ../vim-9.0.1132/src/version.c 2023-01-02 16:54:48.932860868 +0000 --- src/version.c 2023-01-02 18:09:00.239285538 +0000 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 1133, /**/ -- An SQL statement walks into a bar. He approaches two tables and says, "Mind if I join you?" /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///