diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/errors.h | 191 | ||||
-rw-r--r-- | src/findfile.c | 4 | ||||
-rw-r--r-- | src/fold.c | 4 | ||||
-rw-r--r-- | src/hardcopy.c | 2 | ||||
-rw-r--r-- | src/highlight.c | 31 | ||||
-rw-r--r-- | src/map.c | 4 | ||||
-rw-r--r-- | src/message.c | 2 | ||||
-rw-r--r-- | src/normal.c | 2 | ||||
-rw-r--r-- | src/option.c | 4 | ||||
-rw-r--r-- | src/os_amiga.c | 2 | ||||
-rw-r--r-- | src/os_unix.c | 2 | ||||
-rw-r--r-- | src/os_win32.c | 2 | ||||
-rw-r--r-- | src/quickfix.c | 20 | ||||
-rw-r--r-- | src/regexp.c | 2 | ||||
-rw-r--r-- | src/register.c | 2 | ||||
-rw-r--r-- | src/search.c | 16 | ||||
-rw-r--r-- | src/syntax.c | 51 | ||||
-rw-r--r-- | src/tag.c | 22 | ||||
-rw-r--r-- | src/term.c | 4 | ||||
-rw-r--r-- | src/typval.c | 2 | ||||
-rw-r--r-- | src/undo.c | 6 | ||||
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/window.c | 12 |
23 files changed, 285 insertions, 104 deletions
diff --git a/src/errors.h b/src/errors.h index bd89ac1826..da3faba472 100644 --- a/src/errors.h +++ b/src/errors.h @@ -812,27 +812,213 @@ EXTERN char e_no_string_under_cursor[] INIT(= N_("E348: No string under cursor")); EXTERN char e_no_identifier_under_cursor[] INIT(= N_("E349: No identifier under cursor")); - +EXTERN char e_cannot_create_fold_with_current_foldmethod[] + INIT(= N_("E350: Cannot create fold with current 'foldmethod'")); +EXTERN char e_cannot_delete_fold_with_current_foldmethod[] + INIT(= N_("E351: Cannot delete fold with current 'foldmethod'")); +EXTERN char e_cannot_erase_folds_with_current_foldmethod[] + INIT(= N_("E352: Cannot erase folds with current 'foldmethod'")); +EXTERN char e_nothing_in_register_str[] + INIT(= N_("E353: Nothing in register %s")); +EXTERN char e_invalid_register_name_str[] + INIT(= N_("E354: Invalid register name: '%s'")); +EXTERN char e_unknown_option_str_2[] + INIT(= N_("E355: Unknown option: %s")); +EXTERN char e_get_varp_error[] + INIT(= N_("E356: get_varp ERROR")); +EXTERN char e_langmap_matching_character_missing_for_str[] + INIT(= N_("E357: 'langmap': Matching character missing for %s")); +EXTERN char e_langmap_extra_characters_after_semicolon_str[] + INIT(= N_("E358: 'langmap': Extra characters after semicolon: %s")); #if defined(AMIGA) || defined(MACOS_X) || defined(MSWIN) \ || defined(UNIX) || defined(VMS) EXTERN char e_screen_mode_setting_not_supported[] INIT(= N_("E359: Screen mode setting not supported")); #endif +EXTERN char e_cannot_execute_shell_with_f_option[] + INIT(= N_("E360: Cannot execute shell with -f option")); +// E361 unused +EXTERN char e_using_boolean_valud_as_float[] + INIT(= N_("E362: Using a boolean value as a Float")); EXTERN char e_pattern_uses_more_memory_than_maxmempattern[] INIT(= N_("E363: pattern uses more memory than 'maxmempattern'")); #ifdef FEAT_LIBCALL EXTERN char e_library_call_failed_for_str[] INIT(= N_("E364: Library call failed for \"%s()\"")); #endif +#ifdef FEAT_POSTSCRIPT +EXTERN char e_failed_to_print_postscript_file[] + INIT(= N_("E365: Failed to print PostScript file")); +#endif +EXTERN char e_not_allowed_to_enter_popup_window[] + INIT(= N_("E366: Not allowed to enter a popup window")); EXTERN char e_no_such_group_str[] INIT(= N_("E367: No such group: \"%s\"")); +#ifdef FEAT_LIBCALL +EXTERN char e_got_sig_str_in_libcall[] + INIT(= N_("E368: got SIG%s in libcall()")); +#endif +EXTERN char e_invalid_item_in_str_brackets[] + INIT(= N_("E369: invalid item in %s%%[]")); #ifdef USING_LOAD_LIBRARY EXTERN char e_could_not_load_library_str_str[] INIT(= N_("E370: Could not load library %s: %s")); #endif +#ifdef FEAT_GUI_MSWIN +EXTERN char e_command_not_found[] + INIT(= N_("E371: Command not found")); +#endif +EXTERN char e_too_many_chr_in_format_string[] + INIT(= N_("E372: Too many %%%c in format string")); +EXTERN char e_unexpected_chr_in_format_str[] + INIT(= N_("E373: Unexpected %%%c in format string")); +EXTERN char e_missing_rsb_in_format_string[] + INIT(= N_("E374: Missing ] in format string")); +EXTERN char e_unsupported_chr_in_format_string[] + INIT(= N_("E375: Unsupported %%%c in format string")); +EXTERN char e_invalid_chr_in_format_string_prefix[] + INIT(= N_("E376: Invalid %%%c in format string prefix")); +EXTERN char e_invalid_chr_in_format_string[] + INIT(= N_("E377: Invalid %%%c in format string")); +EXTERN char e_errorformat_contains_no_pattern[] + INIT(= N_("E378: 'errorformat' contains no pattern")); +EXTERN char e_missing_or_empty_directory_name[] + INIT(= N_("E379: Missing or empty directory name")); +EXTERN char e_at_bottom_of_quickfix_stack[] + INIT(= N_("E380: At bottom of quickfix stack")); +EXTERN char e_at_top_of_quickfix_stack[] + INIT(= N_("E381: At top of quickfix stack")); EXTERN char e_cannot_write_buftype_option_is_set[] INIT(= N_("E382: Cannot write, 'buftype' option is set")); - +EXTERN char e_invalid_search_string_str[] + INIT(= N_("E383: Invalid search string: %s")); +EXTERN char e_search_hit_top_without_match_for_str[] + INIT(= N_("E384: search hit TOP without match for: %s")); +EXTERN char e_search_hit_bottom_without_match_for_str[] + INIT(= N_("E385: search hit BOTTOM without match for: %s")); +EXTERN char e_expected_question_or_slash_after_semicolon[] + INIT(= N_("E386: Expected '?' or '/' after ';'")); +EXTERN char e_match_is_on_current_line[] + INIT(= N_("E387: Match is on current line")); +EXTERN char e_couldnt_find_definition[] + INIT(= N_("E388: Couldn't find definition")); +EXTERN char e_couldnt_find_pattern[] + INIT(= N_("E389: Couldn't find pattern")); +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")); +EXTERN char e_didnt_find_region_item_for_str[] + INIT(= N_("E394: Didn't find region item for %s")); +EXTERN char e_contains_argument_not_accepted_here[] + INIT(= N_("E395: contains argument not accepted here")); +// E396 unused +EXTERN char e_filename_required[] + INIT(= N_("E397: Filename required")); +EXTERN char e_missing_equal_str[] + INIT(= N_("E398: Missing '=': %s")); +EXTERN char e_not_enough_arguments_syntax_region_str[] + INIT(= N_("E399: Not enough arguments: syntax region %s")); +EXTERN char e_no_cluster_specified[] + INIT(= N_("E400: No cluster specified")); +EXTERN char e_pattern_delimiter_not_found_str[] + INIT(= N_("E401: Pattern delimiter not found: %s")); +EXTERN char e_garbage_after_pattern_str[] + INIT(= N_("E402: Garbage after pattern: %s")); +EXTERN char e_syntax_sync_line_continuations_pattern_specified_twice[] + INIT(= N_("E403: syntax sync: line continuations pattern specified twice")); +EXTERN char e_illegal_arguments_str[] + INIT(= N_("E404: Illegal arguments: %s")); +EXTERN char e_missing_equal_sign_str[] + INIT(= N_("E405: Missing equal sign: %s")); +EXTERN char e_empty_argument_str[] + INIT(= N_("E406: Empty argument: %s")); +EXTERN char e_str_not_allowed_here[] + INIT(= N_("E407: %s not allowed here")); +EXTERN char e_str_must_be_first_in_contains_list[] + INIT(= N_("E408: %s must be first in contains list")); +EXTERN char e_unknown_group_name_str[] + INIT(= N_("E409: Unknown group name: %s")); +EXTERN char e_invalid_syntax_subcommand_str[] + INIT(= N_("E410: Invalid :syntax subcommand: %s")); +EXTERN char e_highlight_group_name_not_found_str[] + INIT(= N_("E411: highlight group not found: %s")); +EXTERN char e_not_enough_arguments_highlight_link_str[] + INIT(= N_("E412: Not enough arguments: \":highlight link %s\"")); +EXTERN char e_too_many_arguments_highlight_link_str[] + INIT(= N_("E413: Too many arguments: \":highlight link %s\"")); +EXTERN char e_group_has_settings_highlight_link_ignored[] + INIT(= N_("E414: group has settings, highlight link ignored")); +EXTERN char e_unexpected_equal_sign_str[] + INIT(= N_("E415: unexpected equal sign: %s")); +EXTERN char e_missing_equal_sign_str_2[] + INIT(= N_("E416: missing equal sign: %s")); +EXTERN char e_missing_argument_str[] + INIT(= N_("E417: missing argument: %s")); +EXTERN char e_illegal_value_str[] + INIT(= N_("E418: Illegal value: %s")); +EXTERN char e_fg_color_unknown[] + 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")); +EXTERN char e_illegal_argument_str_3[] + INIT(= N_("E423: Illegal argument: %s")); +EXTERN char e_too_many_different_highlighting_attributes_in_use[] + INIT(= N_("E424: Too many different highlighting attributes in use")); +EXTERN char e_cannot_go_before_first_matching_tag[] + INIT(= N_("E425: Cannot go before first matching tag")); +EXTERN char e_tag_not_found_str[] + INIT(= N_("E426: tag not found: %s")); +EXTERN char e_there_is_only_one_matching_tag[] + INIT(= N_("E427: There is only one matching tag")); +EXTERN char e_cannot_go_beyond_last_matching_tag[] + INIT(= N_("E428: Cannot go beyond last matching tag")); +EXTERN char e_file_str_does_not_exist[] + INIT(= N_("E429: File \"%s\" does not exist")); +EXTERN char e_tag_file_path_truncated_for_str[] + INIT(= N_("E430: Tag file path truncated for %s\n")); +EXTERN char e_format_error_in_tags_file_str[] + INIT(= N_("E431: Format error in tags file \"%s\"")); +EXTERN char e_tags_file_not_sorted_str[] + INIT(= N_("E432: Tags file not sorted: %s")); +EXTERN char e_no_tags_file[] + INIT(= N_("E433: No tags file")); +EXTERN char e_canot_find_tag_pattern[] + INIT(= N_("E434: Can't find tag pattern")); +EXTERN char e_couldnt_find_tag_just_guessing[] + INIT(= N_("E435: Couldn't find tag, just guessing!")); +EXTERN char e_no_str_entry_in_termcap[] + INIT(= N_("E436: No \"%s\" entry in termcap")); +EXTERN char e_terminal_capability_cm_required[] + INIT(= N_("E437: terminal capability \"cm\" required")); +EXTERN char e_u_undo_line_numbers_wrong[] + INIT(= N_("E438: u_undo: line numbers wrong")); +EXTERN char e_undo_list_corrupt[] + INIT(= N_("E439: undo list corrupt")); +EXTERN char e_undo_line_missing[] + INIT(= N_("E440: undo line missing")); +EXTERN char e_there_is_no_preview_window[] + INIT(= N_("E441: There is no preview window")); +EXTERN char e_cant_split_topleft_and_botright_at_the_same_time[] + INIT(= N_("E442: Can't split topleft and botright at the same time")); +EXTERN char e_cannot_rotate_when_another_window_is_split[] + INIT(= N_("E443: Cannot rotate when another window is split")); +EXTERN char e_cannot_close_last_window[] + INIT(= N_("E444: Cannot close last window")); +EXTERN char e_other_window_contains_changes[] + INIT(= N_("E445: Other window contains changes")); +EXTERN char e_no_file_name_under_cursor[] + INIT(= N_("E446: No file name under cursor")); +EXTERN char e_cant_find_file_str_in_path_2[] + INIT(= N_("E447: Can't find file \"%s\" in path")); #ifdef USING_LOAD_LIBRARY EXTERN char e_could_not_load_library_function_str[] INIT(= N_("E448: Could not load library function %s")); @@ -841,6 +1027,7 @@ EXTERN char e_could_not_load_library_function_str[] EXTERN char e_invalid_expression_received[] INIT(= N_("E449: Invalid expression received")); #endif + #if defined(UNIX) || defined(FEAT_SESSION) EXTERN char e_cannot_go_back_to_previous_directory[] INIT(= N_("E459: Cannot go back to previous directory")); diff --git a/src/findfile.c b/src/findfile.c index ef9166b82a..cc0cc6e92e 100644 --- a/src/findfile.c +++ b/src/findfile.c @@ -2007,7 +2007,7 @@ file_name_in_line( if (*ptr == NUL) // nothing found { if (options & FNAME_MESS) - emsg(_("E446: No file name under cursor")); + emsg(_(e_no_file_name_under_cursor)); return NULL; } @@ -2165,7 +2165,7 @@ find_file_name_in_path( { c = ptr[len]; ptr[len] = NUL; - semsg(_("E447: Can't find file \"%s\" in path"), ptr); + semsg(_(e_cant_find_file_str_in_path_2), ptr); ptr[len] = c; } diff --git a/src/fold.c b/src/fold.c index 7d993f70fd..f8331be460 100644 --- a/src/fold.c +++ b/src/fold.c @@ -563,9 +563,9 @@ foldManualAllowed(int create) if (foldmethodIsManual(curwin) || foldmethodIsMarker(curwin)) return TRUE; if (create) - emsg(_("E350: Cannot create fold with current 'foldmethod'")); + emsg(_(e_cannot_create_fold_with_current_foldmethod)); else - emsg(_("E351: Cannot delete fold with current 'foldmethod'")); + emsg(_(e_cannot_delete_fold_with_current_foldmethod)); return FALSE; } diff --git a/src/hardcopy.c b/src/hardcopy.c index 3993f4d584..da64e1cf43 100644 --- a/src/hardcopy.c +++ b/src/hardcopy.c @@ -3135,7 +3135,7 @@ mch_print_end(prt_settings_T *psettings) // Not printing to a file: use 'printexpr' to print the file. if (eval_printexpr(prt_ps_file_name, psettings->arguments) == FAIL) - emsg(_("E365: Failed to print PostScript file")); + emsg(_(e_failed_to_print_postscript_file)); else prt_message((char_u *)_("Print job sent.")); } diff --git a/src/highlight.c b/src/highlight.c index 7349f4b4ab..d72fa83210 100644 --- a/src/highlight.c +++ b/src/highlight.c @@ -656,7 +656,7 @@ highlight_group_link( && hl_has_settings(from_id - 1, dodefault)) { if (SOURCING_NAME == NULL && !dodefault) - emsg(_("E414: group has settings, highlight link ignored")); + emsg(_(e_group_has_settings_highlight_link_ignored)); } else if (hlgroup->sg_link != to_id #ifdef FEAT_EVAL @@ -781,7 +781,7 @@ highlight_set_termgui_attr(int idx, char_u *key, char_u *arg, int init) } if (i < 0) { - semsg(_("E418: Illegal value: %s"), arg); + semsg(_(e_illegal_value_str), arg); return FALSE; } if (arg[off] == ',') // another one follows @@ -1033,7 +1033,7 @@ highlight_set_cterm_color( color = cterm_normal_fg_color - 1; else { - emsg(_("E419: FG color unknown")); + emsg(_(e_fg_color_unknown)); return FALSE; } } @@ -1043,7 +1043,7 @@ highlight_set_cterm_color( color = cterm_normal_bg_color - 1; else { - emsg(_("E420: BG color unknown")); + emsg(_(e_bg_color_unknown)); return FALSE; } } @@ -1069,8 +1069,7 @@ highlight_set_cterm_color( break; if (i < 0) { - semsg(_("E421: Color name or number not recognized: %s"), - key_start); + semsg(_(e_color_name_or_number_not_recognized), key_start); return FALSE; } @@ -1323,7 +1322,7 @@ highlight_set_startstop_termcode(int idx, char_u *key, char_u *arg, int init) // Append it to the already found stuff if ((int)(STRLEN(buf) + STRLEN(p)) >= 99) { - semsg(_("E422: terminal code too long: %s"), arg); + semsg(_(e_terminal_code_too_long_str), arg); return FALSE; } STRCAT(buf, p); @@ -1440,7 +1439,7 @@ do_highlight( { id = syn_namen2id(line, (int)(name_end - line)); if (id == 0) - semsg(_("E411: highlight group not found: %s"), line); + semsg(_(e_highlight_group_name_not_found_str), line); else highlight_list_one(id); return; @@ -1462,15 +1461,13 @@ do_highlight( if (ends_excmd2(line, from_start) || ends_excmd2(line, to_start)) { - semsg(_("E412: Not enough arguments: \":highlight link %s\""), - from_start); + semsg(_(e_not_enough_arguments_highlight_link_str), from_start); return; } if (!ends_excmd2(line, skipwhite(to_end))) { - semsg(_("E413: Too many arguments: \":highlight link %s\""), - from_start); + semsg(_(e_too_many_arguments_highlight_link_str), from_start); return; } @@ -1533,7 +1530,7 @@ do_highlight( key_start = linep; if (*linep == '=') { - semsg(_("E415: unexpected equal sign: %s"), key_start); + semsg(_(e_unexpected_equal_sign_str), key_start); error = TRUE; break; } @@ -1565,7 +1562,7 @@ do_highlight( // Check for the equal sign. if (*linep != '=') { - semsg(_("E416: missing equal sign: %s"), key_start); + semsg(_(e_missing_equal_sign_str_2), key_start); error = TRUE; break; } @@ -1591,7 +1588,7 @@ do_highlight( } if (linep == arg_start) { - semsg(_("E417: missing argument: %s"), key_start); + semsg(_(e_missing_argument_str), key_start); error = TRUE; break; } @@ -1671,7 +1668,7 @@ do_highlight( } else { - semsg(_("E423: Illegal argument: %s"), key_start); + semsg(_(e_illegal_argument_str_3), key_start); error = TRUE; break; } @@ -2529,7 +2526,7 @@ get_attr_entry(garray_T *table, attrentry_T *aep) // When called recursively, we are really out of numbers. if (recursive) { - emsg(_("E424: Too many different highlighting attributes in use")); + emsg(_(e_too_many_different_highlighting_attributes_in_use)); return 0; } recursive = TRUE; @@ -2706,7 +2706,7 @@ langmap_set(void) } if (to == NUL) { - semsg(_("E357: 'langmap': Matching character missing for %s"), + semsg(_(e_langmap_matching_character_missing_for_str), transchar(from)); return; } @@ -2728,7 +2728,7 @@ langmap_set(void) { if (p[0] != ',') { - semsg(_("E358: 'langmap': Extra characters after semicolon: %s"), p); + semsg(_(e_langmap_extra_characters_after_semicolon_str), p); return; } ++p; diff --git a/src/message.c b/src/message.c index a930a80638..81c0f47492 100644 --- a/src/message.c +++ b/src/message.c @@ -891,7 +891,7 @@ internal_error_no_abort(char *where) void emsg_invreg(int name) { - semsg(_("E354: Invalid register name: '%s'"), transchar(name)); + semsg(_(e_invalid_register_name_str), transchar(name)); } /* diff --git a/src/normal.c b/src/normal.c index 79e47a69a5..cd9b0a9322 100644 --- a/src/normal.c +++ b/src/normal.c @@ -3080,7 +3080,7 @@ dozet: deleteFold((linenr_T)1, curbuf->b_ml.ml_line_count, TRUE, FALSE); else - emsg(_("E352: Cannot erase folds with current 'foldmethod'")); + emsg(_(e_cannot_erase_folds_with_current_foldmethod)); break; // "zn": fold none: reset 'foldenable' diff --git a/src/option.c b/src/option.c index 96caa70acc..59e4862bad 100644 --- a/src/option.c +++ b/src/option.c @@ -4352,7 +4352,7 @@ set_option_value( return NULL; } - semsg(_("E355: Unknown option: %s"), name); + semsg(_(e_unknown_option_str_2), name); } else { @@ -5520,7 +5520,7 @@ get_varp(struct vimoption *p) case PV_VSTS: return (char_u *)&(curbuf->b_p_vsts); case PV_VTS: return (char_u *)&(curbuf->b_p_vts); #endif - default: iemsg(_("E356: get_varp ERROR")); + default: iemsg(_(e_get_varp_error)); } // always return a valid pointer to avoid a crash! return (char_u *)&(curbuf->b_p_wm); diff --git a/src/os_amiga.c b/src/os_amiga.c index 5bf088b961..e9d6221414 100644 --- a/src/os_amiga.c +++ b/src/os_amiga.c @@ -1256,7 +1256,7 @@ mch_call_shell( if (close_win) { // if Vim opened a window: Executing a shell may cause crashes - emsg(_("E360: Cannot execute shell with -f option")); + emsg(_(e_cannot_execute_shell_with_f_option)); return -1; } diff --git a/src/os_unix.c b/src/os_unix.c index e22f14670d..9930680429 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -7575,7 +7575,7 @@ mch_libcall( for (i = 0; signal_info[i].sig != -1; i++) if (lc_signal == signal_info[i].sig) break; - semsg("E368: got SIG%s in libcall()", signal_info[i].name); + semsg(e_got_sig_str_in_libcall, signal_info[i].name); } # endif # endif diff --git a/src/os_win32.c b/src/os_win32.c index e4ebc0c6d9..fb1b29d71a 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -4954,7 +4954,7 @@ mch_call_shell( # ifdef VIMDLL if (gui.in_use) # endif - emsg(_("E371: Command not found")); + emsg(_(e_command_not_found)); #endif } diff --git a/src/quickfix.c b/src/quickfix.c index 690c3ffa84..101240a448 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -268,7 +268,7 @@ efmpat_to_regpat( if (efminfo->addr[idx]) { // Each errorformat pattern can occur only once - semsg(_("E372: Too many %%%c in format string"), *efmpat); + semsg(_(e_too_many_chr_in_format_string), *efmpat); return NULL; } if ((idx && idx < 6 @@ -276,7 +276,7 @@ efmpat_to_regpat( || (idx == 6 && vim_strchr((char_u *)"OPQ", efminfo->prefix) == NULL)) { - semsg(_("E373: Unexpected %%%c in format string"), *efmpat); + semsg(_(e_unexpected_chr_in_format_str), *efmpat); return NULL; } efminfo->addr[idx] = (char_u)++round; @@ -351,7 +351,7 @@ scanf_fmt_to_regpat( // skip ; if (efmp == efm + len) { - emsg(_("E374: Missing ] in format string")); + emsg(_(e_missing_rsb_in_format_string)); return NULL; } } @@ -364,7 +364,7 @@ scanf_fmt_to_regpat( else { // TODO: scanf()-like: %*ud, %*3c, %*f, ... ? - semsg(_("E375: Unsupported %%%c in format string"), *efmp); + semsg(_(e_unsupported_chr_in_format_string), *efmp); return NULL; } @@ -385,7 +385,7 @@ efm_analyze_prefix(char_u *efmp, efm_T *efminfo) efminfo->prefix = *efmp; else { - semsg(_("E376: Invalid %%%c in format string prefix"), *efmp); + semsg(_(e_invalid_chr_in_format_string_prefix), *efmp); return NULL; } @@ -452,7 +452,7 @@ efm_to_regpat( } else { - semsg(_("E377: Invalid %%%c in format string"), *efmp); + semsg(_(e_invalid_chr_in_format_string), *efmp); return FAIL; } } @@ -573,7 +573,7 @@ parse_efm_option(char_u *efm) } if (fmt_first == NULL) // nothing found - emsg(_("E378: 'errorformat' contains no pattern")); + emsg(_(e_errorformat_contains_no_pattern)); goto parse_efm_end; @@ -1273,7 +1273,7 @@ qf_parse_dir_pfx(int idx, qffields_T *fields, qf_list_T *qfl) { if (*fields->namebuf == NUL) { - emsg(_("E379: Missing or empty directory name")); + emsg(_(e_missing_or_empty_directory_name)); return QF_FAIL; } qfl->qf_directory = @@ -3787,7 +3787,7 @@ qf_age(exarg_T *eap) { if (qi->qf_curlist == 0) { - emsg(_("E380: At bottom of quickfix stack")); + emsg(_(e_at_bottom_of_quickfix_stack)); break; } --qi->qf_curlist; @@ -3796,7 +3796,7 @@ qf_age(exarg_T *eap) { if (qi->qf_curlist >= qi->qf_listcount - 1) { - emsg(_("E381: At top of quickfix stack")); + emsg(_(e_at_top_of_quickfix_stack)); break; } ++qi->qf_curlist; diff --git a/src/regexp.c b/src/regexp.c index 9e3d218fb9..fdcd6d10e0 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -66,7 +66,7 @@ toggle_Magic(int x) #define EMSG2_RET_NULL(m, c) return (semsg((const char *)(m), (c) ? "" : "\\"), rc_did_emsg = TRUE, (void *)NULL) #define EMSG3_RET_NULL(m, c, a) return (semsg((const char *)(m), (c) ? "" : "\\", (a)), rc_did_emsg = TRUE, (void *)NULL) #define EMSG2_RET_FAIL(m, c) return (semsg((const char *)(m), (c) ? "" : "\\"), rc_did_emsg = TRUE, FAIL) -#define EMSG_ONE_RET_NULL EMSG2_RET_NULL(_("E369: invalid item in %s%%[]"), reg_magic == MAGIC_ALL) +#define EMSG_ONE_RET_NULL EMSG2_RET_NULL(_(e_invalid_item_in_str_brackets), reg_magic == MAGIC_ALL) #define MAX_LIMIT (32767L << 16L) diff --git a/src/register.c b/src/register.c index 2a5f1196a9..36fe954c10 100644 --- a/src/register.c +++ b/src/register.c @@ -1691,7 +1691,7 @@ do_put( if (y_size == 0 || y_array == NULL) { - semsg(_("E353: Nothing in register %s"), + semsg(_(e_nothing_in_register_str), regname == 0 ? (char_u *)"\"" : transchar(regname)); goto end; } diff --git a/src/search.c b/src/search.c index c3597e6579..719599e15a 100644 --- a/src/search.c +++ b/src/search.c @@ -655,7 +655,7 @@ searchit( (options & (SEARCH_HIS + SEARCH_KEEP)), ®match) == FAIL) { if ((options & SEARCH_MSG) && !rc_did_emsg) - semsg(_("E383: Invalid search string: %s"), mr_pattern); + semsg(_(e_invalid_search_string_str), mr_pattern); return FAIL; } @@ -1126,11 +1126,9 @@ searchit( if (p_ws) semsg(_(e_pattern_not_found_str), mr_pattern); else if (lnum == 0) - semsg(_("E384: search hit TOP without match for: %s"), - mr_pattern); + semsg(_(e_search_hit_top_without_match_for_str), mr_pattern); else - semsg(_("E385: search hit BOTTOM without match for: %s"), - mr_pattern); + semsg(_(e_search_hit_bottom_without_match_for_str), mr_pattern); } return FAIL; } @@ -1646,7 +1644,7 @@ do_search( if (dirc != '?' && dirc != '/') { retval = 0; - emsg(_("E386: Expected '?' or '/' after ';'")); + emsg(_(e_expected_question_or_slash_after_semicolon)); goto end_do_search; } ++pat; @@ -3832,7 +3830,7 @@ search_line: && g_do_tagpreview == 0 #endif ) - emsg(_("E387: Match is on current line")); + emsg(_(e_match_is_on_current_line)); else if (action == ACTION_SHOW) { show_pat_in_path(line, type, did_show, action, @@ -3992,9 +3990,9 @@ exit_matched: if (got_int || ins_compl_interrupted()) emsg(_(e_interrupted)); else if (type == FIND_DEFINE) - emsg(_("E388: Couldn't find definition")); + emsg(_(e_couldnt_find_definition)); else - emsg(_("E389: Couldn't find pattern")); + emsg(_(e_couldnt_find_pattern)); } if (action == ACTION_SHOW || action == ACTION_SHOW_ALL) msg_end(); diff --git a/src/syntax.c b/src/syntax.c index d5d916c5a6..6e1feb5c66 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -30,8 +30,6 @@ static char *(spo_name_tab[SPO_COUNT]) = {"ms=", "me=", "hs=", "he=", "rs=", "re=", "lc="}; -static char e_illegal_arg[] = N_("E390: Illegal argument: %s"); - /* * The patterns that are being searched for are stored in a syn_pattern. * A match item consists of one pattern. @@ -3340,7 +3338,7 @@ syn_cmd_conceal(exarg_T *eap UNUSED, int syncing UNUSED) else if (STRNICMP(arg, "off", 3) == 0 && next - arg == 3) curwin->w_s->b_syn_conceal = FALSE; else - semsg(_(e_illegal_arg), arg); + semsg(_(e_illegal_argument_str_2), arg); #endif } @@ -3370,7 +3368,7 @@ syn_cmd_case(exarg_T *eap, int syncing UNUSED) else if (STRNICMP(arg, "ignore", 6) == 0 && next - arg == 6) curwin->w_s->b_syn_ic = TRUE; else - semsg(_(e_illegal_arg), arg); + semsg(_(e_illegal_argument_str_2), arg); } /* @@ -3404,14 +3402,14 @@ syn_cmd_foldlevel(exarg_T *eap, int syncing UNUSED) curwin->w_s->b_syn_foldlevel = SYNFLD_MINIMUM; else { - semsg(_(e_illegal_arg), arg); + semsg(_(e_illegal_argument_str_2), arg); return; } arg = skipwhite(arg_end); if (*arg != NUL) { - semsg(_(e_illegal_arg), arg); + semsg(_(e_illegal_argument_str_2), arg); } } @@ -3446,7 +3444,7 @@ syn_cmd_spell(exarg_T *eap, int syncing UNUSED) curwin->w_s->b_syn_spell = SYNSPL_DEFAULT; else { - semsg(_(e_illegal_arg), arg); + semsg(_(e_illegal_argument_str_2), arg); return; } @@ -3703,7 +3701,7 @@ syn_cmd_clear(exarg_T *eap, int syncing) id = syn_scl_namen2id(arg + 1, (int)(arg_end - arg - 1)); if (id == 0) { - semsg(_("E391: No such syntax cluster: %s"), arg); + semsg(_(e_no_such_syntax_cluster_1), arg); break; } else @@ -3913,7 +3911,7 @@ syn_cmd_list( { id = syn_scl_namen2id(arg + 1, (int)(arg_end - arg - 1)); if (id == 0) - semsg(_("E392: No such syntax cluster: %s"), arg); + semsg(_(e_no_such_syntax_cluster_2), arg); else syn_list_cluster(id - SYNID_CLUSTER); } @@ -4600,7 +4598,7 @@ get_syn_options( { if (!opt->has_cont_list) { - emsg(_("E395: contains argument not accepted here")); + emsg(_(e_contains_argument_not_accepted_here)); return NULL; } if (get_id_list(&arg, 8, &opt->cont_list, skip) == FAIL) @@ -4653,7 +4651,7 @@ get_syn_options( { if (opt->sync_idx == NULL) { - emsg(_("E393: group[t]here not accepted here")); + emsg(_(e_groupthere_not_accepted_here)); return NULL; } gname_start = arg; @@ -4678,7 +4676,7 @@ get_syn_options( } if (i < 0) { - semsg(_("E394: Didn't find region item for %s"), gname); + semsg(_(e_didnt_find_region_item_for_str), gname); vim_free(gname); return NULL; } @@ -4751,7 +4749,7 @@ syn_cmd_include(exarg_T *eap, int syncing UNUSED) rest = get_group_name(arg, &group_name_end); if (rest == NULL) { - emsg(_("E397: Filename required")); + emsg(_(e_filename_required)); return; } sgl_id = syn_check_cluster(arg, (int)(group_name_end - arg)); @@ -5133,7 +5131,7 @@ syn_cmd_region( if (*rest != '=') { rest = NULL; - semsg(_("E398: Missing '=': %s"), arg); + semsg(_(e_missing_equal_str), arg); break; } rest = skipwhite(rest + 1); @@ -5296,7 +5294,7 @@ syn_cmd_region( vim_free(syn_opt_arg.cont_in_list); vim_free(syn_opt_arg.next_list); if (not_enough) - semsg(_("E399: Not enough arguments: syntax region %s"), arg); + semsg(_(e_not_enough_arguments_syntax_region_str), arg); else if (illegal || rest == NULL) semsg(_(e_invalid_argument_str), arg); } @@ -5626,7 +5624,7 @@ syn_cmd_cluster(exarg_T *eap, int syncing UNUSED) } if (!got_clstr) - emsg(_("E400: No cluster specified")); + emsg(_(e_no_cluster_specified)); if (rest == NULL || !ends_excmd2(eap->cmd, rest)) semsg(_(e_invalid_argument_str), arg); } @@ -5661,7 +5659,7 @@ get_syn_pattern(char_u *arg, synpat_T *ci) end = skip_regexp(arg + 1, *arg, TRUE); if (*end != *arg) // end delimiter not found { - semsg(_("E401: Pattern delimiter not found: %s"), arg); + semsg(_(e_pattern_delimiter_not_found_str), arg); return NULL; |