To: vim_dev@googlegroups.com Subject: Patch 8.2.4003 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4003 Problem: Error messages are spread out. Solution: Move more error messages to errors.h. Files: src/errors.h, src/channel.c, src/ex_docmd.c, src/ex_eval.c, src/gui_at_fs.c, src/hardcopy.c, src/if_cscope.c, src/menu.c, src/netbeans.c, src/optionstr.c, src/os_mswin.c, src/sign.c, src/typval.c *** ../vim-8.2.4002/src/errors.h 2022-01-02 21:46:25.313652743 +0000 --- src/errors.h 2022-01-04 19:53:08.967534219 +0000 *************** *** 773,779 **** #endif EXTERN char_u e_no_menu_str[] INIT(= N_("E329: No menu \"%s\"")); ! EXTERN char e_menu_path_must_not_loead_to_sub_menu[] INIT(= N_("E330: Menu path must not lead to a sub-menu")); EXTERN char e_must_not_add_menu_items_directly_to_menu_bar[] INIT(= N_("E331: Must not add menu items directly to menu bar")); --- 773,779 ---- #endif EXTERN char_u e_no_menu_str[] INIT(= N_("E329: No menu \"%s\"")); ! EXTERN char e_menu_path_must_not_lead_to_sub_menu[] INIT(= N_("E330: Menu path must not lead to a sub-menu")); EXTERN char e_must_not_add_menu_items_directly_to_menu_bar[] INIT(= N_("E331: Must not add menu items directly to menu bar")); *************** *** 1388,1406 **** #ifdef FEAT_EVAL EXTERN char e_missing_endtry[] INIT(= N_("E600: Missing :endtry")); ! EXTERN char e_endtry_without_try[] INIT(= N_("E602: :endtry without :try")); EXTERN char e_catch_without_try[] INIT(= N_("E603: :catch without :try")); EXTERN char e_finally_without_try[] INIT(= N_("E606: :finally without :try")); EXTERN char e_multiple_finally[] INIT(= N_("E607: multiple :finally")); #endif - EXTERN char e_no_argument_to_delete[] INIT(= N_("E610: No argument to delete")); #ifdef FEAT_NETBEANS_INTG // E656 EXTERN char e_netbeans_disallows_writes_of_unmodified_buffers[] --- 1388,1523 ---- #ifdef FEAT_EVAL EXTERN char e_missing_endtry[] INIT(= N_("E600: Missing :endtry")); ! EXTERN char e_try_nesting_too_deep[] ! INIT(= N_("E601: :try nesting too deep")); EXTERN char e_endtry_without_try[] INIT(= N_("E602: :endtry without :try")); EXTERN char e_catch_without_try[] INIT(= N_("E603: :catch without :try")); + EXTERN char e_catch_after_finally[] + INIT(= N_("E604: :catch after :finally")); + EXTERN char e_exception_not_caught_str[] + INIT(= N_("E605: Exception not caught: %s")); EXTERN char e_finally_without_try[] INIT(= N_("E606: :finally without :try")); EXTERN char e_multiple_finally[] INIT(= N_("E607: multiple :finally")); + EXTERN char e_cannot_throw_exceptions_with_vim_prefix[] + INIT(= N_("E608: Cannot :throw exceptions with 'Vim' prefix")); + #endif + #ifdef FEAT_CSCOPE + EXTERN char e_cscope_error_str[] + INIT(= N_("E609: Cscope error: %s")); #endif EXTERN char e_no_argument_to_delete[] INIT(= N_("E610: No argument to delete")); + #ifdef FEAT_EVAL + EXTERN char e_using_special_as_number[] + INIT(= N_("E611: Using a Special as a Number")); + #endif + #ifdef FEAT_SIGNS + EXTERN char e_too_many_signs_defined[] + INIT(= N_("E612: Too many signs defined")); + #endif + #ifdef FEAT_PRINTER + EXTERN char e_unknown_printer_font_str[] + INIT(= N_("E613: Unknown printer font: %s")); + #endif + #ifdef FEAT_BROWSE + EXTERN char e_vim_selfile_cant_return_to_current_directory[] + INIT(= N_("E614: vim_SelFile: can't return to current directory")); + EXTERN char e_vim_selfile_cant_get_current_directory[] + INIT(= N_("E615: vim_SelFile: can't get current directory")); + EXTERN char e_vim_selfile_cant_get_font_str[] + INIT(= N_("E616: vim_SelFile: can't get font %s")); + #endif + #ifdef FEAT_GUI_GTK + EXTERN char e_cannot_be_changed_in_gtk_GUI[] + INIT(= N_("E617: Cannot be changed in the GTK GUI")); + #endif + #ifdef FEAT_POSTSCRIPT + EXTERN char e_file_str_is_not_postscript_resource_file[] + INIT(= N_("E618: file \"%s\" is not a PostScript resource file")); + EXTERN char e_file_str_is_not_supported_postscript_resource_file[] + INIT(= N_("E619: file \"%s\" is not a supported PostScript resource file")); + EXTERN char e_unable_to_convert_to_print_encoding_str[] + INIT(= N_("E620: Unable to convert to print encoding \"%s\"")); + EXTERN char e_str_resource_file_has_wrong_version[] + INIT(= N_("E621: \"%s\" resource file has wrong version")); + #endif + #ifdef FEAT_CSCOPE + EXTERN char e_could_not_fork_for_cscope[] + INIT(= N_("E622: Could not fork for cscope")); + EXTERN char e_could_not_spawn_cscope_process[] + INIT(= N_("E623: Could not spawn cscope process")); + #endif + EXTERN char e_cant_open_file_str_3[] + INIT(= N_("E624: Can't open file \"%s\"")); + #ifdef FEAT_CSCOPE + EXTERN char e_cannot_open_cscope_database_str[] + INIT(= N_("E625: cannot open cscope database: %s")); + EXTERN char e_cannot_get_cscope_database_information[] + INIT(= N_("E626: cannot get cscope database information")); + #endif + #ifdef FEAT_NETBEANS_INTG + EXTERN char e_missing_colon_str[] + INIT(= "E627: missing colon: %s"); + EXTERN char e_missing_bang_or_slash_in_str[] + INIT(= "E628: missing ! or / in: %s"); + EXTERN char e_bad_return_from_nb_do_cmd[] + INIT(= "E629: bad return from nb_do_cmd"); + #endif + #ifdef FEAT_JOB_CHANNEL + EXTERN char e_str_write_while_not_connected[] + INIT(= N_("E630: %s(): write while not connected")); + EXTERN char e_str_write_failed[] + INIT(= N_("E631: %s(): write failed")); + #endif + #ifdef FEAT_NETBEANS_INTG + EXTERN char e_invalid_buffer_identifier_in_getlength[] + INIT(= "E632: invalid buffer identifier in getLength"); + EXTERN char e_invalid_buffer_identifier_in_gettext[] + INIT(= "E633: invalid buffer identifier in getText"); + EXTERN char e_invalid_buffer_identifier_in_remove[] + INIT(= "E634: invalid buffer identifier in remove"); + EXTERN char e_invalid_buffer_identifier_in_insert[] + INIT(= "E635: invalid buffer identifier in insert"); + EXTERN char e_invalid_buffer_identifier_in_create[] + INIT(= "E636: invalid buffer identifier in create"); + EXTERN char e_invalid_buffer_identifier_in_startdocumentlisten[] + INIT(= "E637: invalid buffer identifier in startDocumentListen"); + EXTERN char e_invalid_buffer_identifier_in_stopdocumentlisten[] + INIT(= "E638: invalid buffer identifier in stopDocumentListen"); + EXTERN char e_invalid_buffer_identifier_in_settitle[] + INIT(= "E639: invalid buffer identifier in setTitle"); + EXTERN char e_invalid_buffer_identifier_in_initdone[] + INIT(= "E640: invalid buffer identifier in initDone"); + EXTERN char e_invalid_buffer_identifier_in_setbuffernumber[] + INIT(= "E641: invalid buffer identifier in setBufferNumber"); + EXTERN char e_file_str_not_found_in_setbuffernumber[] + INIT(= "E642: File %s not found in setBufferNumber"); + EXTERN char e_invalid_buffer_identifier_in_setfullname[] + INIT(= "E643: invalid buffer identifier in setFullName"); + EXTERN char e_invalid_buffer_identifier_in_editfile[] + INIT(= "E644: invalid buffer identifier in editFile"); + EXTERN char e_invalid_buffer_identifier_in_setvisible[] + INIT(= "E645: invalid buffer identifier in setVisible"); + EXTERN char e_invalid_buffer_identifier_in_setmodified[] + INIT(= "E646: invalid buffer identifier in setModified"); + EXTERN char e_invalid_buffer_identifier_in_setdot[] + INIT(= "E647: invalid buffer identifier in setDot"); + EXTERN char e_invalid_buffer_identifier_in_close[] + INIT(= "E648: invalid buffer identifier in close"); + EXTERN char e_invalid_buffer_identifier_in_close_2[] + INIT(= "E649: invalid buffer identifier in close"); + EXTERN char e_invalid_buffer_identifier_in_defineannotype[] + INIT(= "E650: invalid buffer identifier in defineAnnoType"); + EXTERN char e_invalid_buffer_identifier_in_addanno[] + INIT(= "E651: invalid buffer identifier in addAnno"); + EXTERN char e_invalid_buffer_identifier_in_getanno[] + INIT(= "E652: Invalid buffer identifier in getAnno"); + #endif + #ifdef FEAT_NETBEANS_INTG // E656 EXTERN char e_netbeans_disallows_writes_of_unmodified_buffers[] *************** *** 1408,1418 **** --- 1525,1543 ---- // E657 EXTERN char e_partial_writes_disallowed_for_netbeans_buffers[] INIT(= N_("Partial writes disallowed for NetBeans buffers")); + EXTERN char e_netbeans_connection_lost_for_buffer_nr[] + INIT(= N_("E658: NetBeans connection lost for buffer %d")); + EXTERN char e_cannot_open_netbeans_connection_info_file[] + INIT(= "E660: Cannot open NetBeans connection info file"); #endif #ifdef HAVE_FSYNC EXTERN char e_fsync_failed[] INIT(= N_("E667: Fsync failed")); #endif + #ifdef FEAT_NETBEANS_INTG + EXTERN char e_wrong_access_mode_for_netbeans_connection_info_file_str[] + INIT(= N_("E668: Wrong access mode for NetBeans connection info file: \"%s\"")); + #endif EXTERN char e_no_matching_autocommands_for_acwrite_buffer[] INIT(= N_("E676: No matching autocommands for acwrite buffer")); EXTERN char e_buffer_nr_invalid_buffer_number[] *************** *** 1532,1537 **** --- 1657,1666 ---- INIT(= N_("E834: Conflicts with value of 'listchars'")); EXTERN char e_conflicts_with_value_of_fillchars[] INIT(= N_("E835: Conflicts with value of 'fillchars'")); + #ifdef FEAT_NETBEANS_INTG + EXTERN char e_netbeans_is_not_supported_with_this_GUI[] + INIT(= N_("E838: netbeans is not supported with this GUI")); + #endif // E839 unused #ifndef FEAT_CLIPBOARD EXTERN char e_invalid_register_name[] *** ../vim-8.2.4002/src/channel.c 2022-01-01 14:19:44.032353878 +0000 --- src/channel.c 2022-01-04 19:13:54.013318501 +0000 *************** *** 4051,4057 **** if (!channel->ch_error && fun != NULL) { ch_error(channel, "%s(): write while not connected", fun); ! semsg(_("E630: %s(): write while not connected"), fun); } channel->ch_error = TRUE; return FAIL; --- 4051,4057 ---- if (!channel->ch_error && fun != NULL) { ch_error(channel, "%s(): write while not connected", fun); ! semsg(_(e_str_write_while_not_connected), fun); } channel->ch_error = TRUE; return FAIL; *************** *** 4197,4203 **** if (!channel->ch_error && fun != NULL) { ch_error(channel, "%s(): write failed", fun); ! semsg(_("E631: %s(): write failed"), fun); } channel->ch_error = TRUE; return FAIL; --- 4197,4203 ---- if (!channel->ch_error && fun != NULL) { ch_error(channel, "%s(): write failed", fun); ! semsg(_(e_str_write_failed), fun); } channel->ch_error = TRUE; return FAIL; *** ../vim-8.2.4002/src/ex_docmd.c 2022-01-04 16:22:48.925897553 +0000 --- src/ex_docmd.c 2022-01-04 18:40:49.577052566 +0000 *************** *** 1401,1407 **** { case ET_USER: vim_snprintf((char *)IObuff, IOSIZE, ! _("E605: Exception not caught: %s"), current_exception->value); p = (char *)vim_strsave(IObuff); break; --- 1401,1407 ---- { case ET_USER: vim_snprintf((char *)IObuff, IOSIZE, ! _(e_exception_not_caught_str), current_exception->value); p = (char *)vim_strsave(IObuff); break; *** ../vim-8.2.4002/src/ex_eval.c 2022-01-02 21:26:12.315264334 +0000 --- src/ex_eval.c 2022-01-04 18:42:25.268889361 +0000 *************** *** 521,527 **** && (((char_u *)value)[3] == NUL || ((char_u *)value)[3] == ':' || ((char_u *)value)[3] == '(')) { ! emsg(_("E608: Cannot :throw exceptions with 'Vim' prefix")); goto fail; } } --- 521,527 ---- && (((char_u *)value)[3] == NUL || ((char_u *)value)[3] == ':' || ((char_u *)value)[3] == '(')) { ! emsg(_(e_cannot_throw_exceptions_with_vim_prefix)); goto fail; } } *************** *** 1624,1630 **** return; if (cstack->cs_idx == CSTACK_LEN - 1) ! eap->errmsg = _("E601: :try nesting too deep"); else { enter_block(cstack); --- 1624,1630 ---- return; if (cstack->cs_idx == CSTACK_LEN - 1) ! eap->errmsg = _(e_try_nesting_too_deep); else { enter_block(cstack); *************** *** 1727,1733 **** { // Give up for a ":catch" after ":finally" and ignore it. // Just parse. ! eap->errmsg = _("E604: :catch after :finally"); give_up = TRUE; } else --- 1727,1733 ---- { // Give up for a ":catch" after ":finally" and ignore it. // Just parse. ! eap->errmsg = _(e_catch_after_finally); give_up = TRUE; } else *** ../vim-8.2.4002/src/gui_at_fs.c 2020-11-01 12:33:44.496700978 +0000 --- src/gui_at_fs.c 2022-01-04 18:51:26.267981031 +0000 *************** *** 1066,1072 **** #endif if (!SFfont) { ! semsg(_("E616: vim_SelFile: can't get font %s"), SF_DEFAULT_FONT); SFstatus = SEL_FILE_CANCEL; return; } --- 1066,1072 ---- #endif if (!SFfont) { ! semsg(_(e_vim_selfile_cant_get_font_str), SF_DEFAULT_FONT); SFstatus = SEL_FILE_CANCEL; return; } *************** *** 2648,2654 **** XtRemoveTimeOut(SFdirModTimerId); if (SFchdir(SFstartDir)) { ! emsg(_("E614: vim_SelFile: can't return to current directory")); SFstatus = SEL_FILE_CANCEL; } } --- 2648,2654 ---- XtRemoveTimeOut(SFdirModTimerId); if (SFchdir(SFstartDir)) { ! emsg(_(e_vim_selfile_cant_return_to_current_directory)); SFstatus = SEL_FILE_CANCEL; } } *************** *** 2677,2683 **** if (mch_dirname((char_u *)SFstartDir, MAXPATHL) == FAIL) { ! emsg(_("E615: vim_SelFile: can't get current directory")); return NULL; } --- 2677,2683 ---- if (mch_dirname((char_u *)SFstartDir, MAXPATHL) == FAIL) { ! emsg(_(e_vim_selfile_cant_get_current_directory)); return NULL; } *** ../vim-8.2.4002/src/hardcopy.c 2022-01-02 21:26:12.315264334 +0000 --- src/hardcopy.c 2022-01-04 19:08:50.837881675 +0000 *************** *** 1839,1845 **** fd_resource = mch_fopen((char *)resource->filename, READBIN); if (fd_resource == NULL) { ! semsg(_("E624: Can't open file \"%s\""), resource->filename); return FALSE; } CLEAR_FIELD(prt_resfile.buffer); --- 1839,1845 ---- fd_resource = mch_fopen((char *)resource->filename, READBIN); if (fd_resource == NULL) { ! semsg(_(e_cant_open_file_str_3), resource->filename); return FALSE; } CLEAR_FIELD(prt_resfile.buffer); *************** *** 1866,1873 **** if (prt_resfile_strncmp(offset, PRT_RESOURCE_HEADER, (int)STRLEN(PRT_RESOURCE_HEADER)) != 0) { ! semsg(_("E618: file \"%s\" is not a PostScript resource file"), ! resource->filename); return FALSE; } --- 1866,1873 ---- if (prt_resfile_strncmp(offset, PRT_RESOURCE_HEADER, (int)STRLEN(PRT_RESOURCE_HEADER)) != 0) { ! semsg(_(e_file_str_is_not_postscript_resource_file), ! resource->filename); return FALSE; } *************** *** 1883,1890 **** if (prt_resfile_strncmp(offset, PRT_RESOURCE_RESOURCE, (int)STRLEN(PRT_RESOURCE_RESOURCE)) != 0) { ! semsg(_("E619: file \"%s\" is not a supported PostScript resource file"), ! resource->filename); return FALSE; } offset += (int)STRLEN(PRT_RESOURCE_RESOURCE); --- 1883,1890 ---- if (prt_resfile_strncmp(offset, PRT_RESOURCE_RESOURCE, (int)STRLEN(PRT_RESOURCE_RESOURCE)) != 0) { ! semsg(_(e_file_str_is_not_supported_postscript_resource_file), ! resource->filename); return FALSE; } offset += (int)STRLEN(PRT_RESOURCE_RESOURCE); *************** *** 1901,1908 **** resource->type = PRT_RESOURCE_TYPE_CMAP; else { ! semsg(_("E619: file \"%s\" is not a supported PostScript resource file"), ! resource->filename); return FALSE; } --- 1901,1908 ---- resource->type = PRT_RESOURCE_TYPE_CMAP; else { ! semsg(_(e_file_str_is_not_supported_postscript_resource_file), ! resource->filename); return FALSE; } *************** *** 1943,1950 **** if (!seen_title || !seen_version) { ! semsg(_("E619: file \"%s\" is not a supported PostScript resource file"), ! resource->filename); return FALSE; } --- 1943,1950 ---- if (!seen_title || !seen_version) { ! semsg(_(e_file_str_is_not_supported_postscript_resource_file), ! resource->filename); return FALSE; } *************** *** 1957,1963 **** // Version number m.n should match, the revision number does not matter if (STRNCMP(resource->version, version, STRLEN(version))) { ! semsg(_("E621: \"%s\" resource file has wrong version"), resource->name); return FALSE; } --- 1957,1963 ---- // Version number m.n should match, the revision number does not matter if (STRNCMP(resource->version, version, STRLEN(version))) { ! semsg(_(e_str_resource_file_has_wrong_version), resource->name); return FALSE; } *************** *** 2882,2893 **** } prt_conv.vc_type = CONV_NONE; ! if (!(enc_canon_props(p_enc) & enc_canon_props(p_encoding) & ENC_8BIT)) { // Set up encoding conversion if required if (FAIL == convert_setup(&prt_conv, p_enc, p_encoding)) { ! semsg(_("E620: Unable to convert to print encoding \"%s\""), ! p_encoding); goto theend; } prt_do_conv = TRUE; --- 2882,2893 ---- } prt_conv.vc_type = CONV_NONE; ! if (!(enc_canon_props(p_enc) & enc_canon_props(p_encoding) & ENC_8BIT)) ! { // Set up encoding conversion if required if (FAIL == convert_setup(&prt_conv, p_enc, p_encoding)) { ! semsg(_(e_unable_to_convert_to_print_encoding_str), p_encoding); goto theend; } prt_do_conv = TRUE; *** ../vim-8.2.4002/src/if_cscope.c 2022-01-02 21:26:12.315264334 +0000 --- src/if_cscope.c 2022-01-04 19:09:34.329799496 +0000 *************** *** 814,820 **** switch (csinfo[i].pid = fork()) { case -1: ! (void)emsg(_("E622: Could not fork for cscope")); goto err_closing; case 0: // child: run cscope. if (dup2(to_cs[0], STDIN_FILENO) == -1) --- 814,820 ---- switch (csinfo[i].pid = fork()) { case -1: ! (void)emsg(_(e_could_not_fork_for_cscope)); goto err_closing; case 0: // child: run cscope. if (dup2(to_cs[0], STDIN_FILENO) == -1) *************** *** 971,977 **** if (!created) { PERROR(_("cs_create_connection exec failed")); ! (void)emsg(_("E623: Could not spawn cscope process")); goto err_closing; } // else --- 971,977 ---- if (!created) { PERROR(_("cs_create_connection exec failed")); ! (void)emsg(_(e_could_not_spawn_cscope_process)); goto err_closing; } // else *************** *** 1316,1322 **** case FILEINFO_READ_FAIL: // CreateFile() failed if (p_csverbose) { ! char *cant_msg = _("E625: cannot open cscope database: %s"); char *winmsg = GetWin32Error(); if (winmsg != NULL) --- 1316,1322 ---- case FILEINFO_READ_FAIL: // CreateFile() failed if (p_csverbose) { ! char *cant_msg = _(e_cannot_open_cscope_database_str); char *winmsg = GetWin32Error(); if (winmsg != NULL) *************** *** 1332,1338 **** case FILEINFO_INFO_FAIL: // GetFileInformationByHandle() failed if (p_csverbose) ! (void)emsg(_("E626: cannot get cscope database information")); return -1; } #endif --- 1332,1338 ---- case FILEINFO_INFO_FAIL: // GetFileInformationByHandle() failed if (p_csverbose) ! (void)emsg(_(e_cannot_get_cscope_database_information)); return -1; } #endif *************** *** 2061,2067 **** int epromptlen = (int)strlen(eprompt); int n; ! cs_emsg = _("E609: Cscope error: %s"); // compute maximum allowed len for Cscope error message maxlen = (int)(IOSIZE - strlen(cs_emsg)); --- 2061,2067 ---- int epromptlen = (int)strlen(eprompt); int n; ! cs_emsg = _(e_cscope_error_str); // compute maximum allowed len for Cscope error message maxlen = (int)(IOSIZE - strlen(cs_emsg)); *** ../vim-8.2.4002/src/menu.c 2022-01-02 17:00:37.002093302 +0000 --- src/menu.c 2022-01-03 10:44:56.917900604 +0000 *************** *** 530,536 **** if (*next_name == NUL && menu->children != NULL) { if (!sys_menu) ! emsg(_(e_menu_path_must_not_loead_to_sub_menu)); goto erret; } if (*next_name != NUL && menu->children == NULL --- 530,536 ---- if (*next_name == NUL && menu->children != NULL) { if (!sys_menu) ! emsg(_(e_menu_path_must_not_lead_to_sub_menu)); goto erret; } if (*next_name != NUL && menu->children == NULL *** ../vim-8.2.4002/src/netbeans.c 2022-01-02 21:26:12.319264330 +0000 --- src/netbeans.c 2022-01-04 19:39:23.733560338 +0000 *************** *** 257,263 **** { nbdebug(("Wrong access mode for NetBeans connection info file: \"%s\"\n", file)); ! semsg(_("E668: Wrong access mode for NetBeans connection info file: \"%s\""), file); return FAIL; } --- 257,263 ---- { nbdebug(("Wrong access mode for NetBeans connection info file: \"%s\"\n", file)); ! semsg(_(e_wrong_access_mode_for_netbeans_connection_info_file_str), file); return FAIL; } *************** *** 267,273 **** if (fp == NULL) { nbdebug(("Cannot open NetBeans connection info file\n")); ! PERROR("E660: Cannot open NetBeans connection info file"); return FAIL; } --- 267,273 ---- if (fp == NULL) { nbdebug(("Cannot open NetBeans connection info file\n")); ! PERROR(e_cannot_open_netbeans_connection_info_file); return FAIL; } *************** *** 477,483 **** if (*verb != ':') { nbdebug((" missing colon: %s\n", cmd)); ! semsg("E627: missing colon: %s", cmd); return; } ++verb; // skip colon --- 477,483 ---- if (*verb != ':') { nbdebug((" missing colon: %s\n", cmd)); ! semsg(e_missing_colon_str, cmd); return; } ++verb; // skip colon *************** *** 501,507 **** if (isfunc < 0) { nbdebug((" missing ! or / in: %s\n", cmd)); ! semsg("E628: missing ! or / in: %s", cmd); return; } --- 501,507 ---- if (isfunc < 0) { nbdebug((" missing ! or / in: %s\n", cmd)); ! semsg(e_missing_bang_or_slash_in_str, cmd); return; } *************** *** 518,524 **** * so I'm disabling it except for debugging. */ nbdebug(("nb_parse_cmd: Command error for \"%s\"\n", cmd)); ! emsg("E629: bad return from nb_do_cmd"); #endif } } --- 518,524 ---- * so I'm disabling it except for debugging. */ nbdebug(("nb_parse_cmd: Command error for \"%s\"\n", cmd)); ! emsg(e_bad_return_from_nb_do_cmd); #endif } } *************** *** 1040,1046 **** if (buf == NULL || buf->bufp == NULL) { nbdebug((" Invalid buffer identifier in getAnno\n")); ! emsg("E652: Invalid buffer identifier in getAnno"); retval = FAIL; } else --- 1040,1046 ---- if (buf == NULL || buf->bufp == NULL) { nbdebug((" Invalid buffer identifier in getAnno\n")); ! emsg(e_invalid_buffer_identifier_in_getanno); retval = FAIL; } else *************** *** 1063,1069 **** if (buf == NULL || buf->bufp == NULL) { nbdebug((" invalid buffer identifier in getLength\n")); ! emsg("E632: invalid buffer identifier in getLength"); retval = FAIL; } else --- 1063,1069 ---- if (buf == NULL || buf->bufp == NULL) { nbdebug((" invalid buffer identifier in getLength\n")); ! emsg(e_invalid_buffer_identifier_in_getlength); retval = FAIL; } else *************** *** 1085,1091 **** if (buf == NULL || buf->bufp == NULL) { nbdebug((" invalid buffer identifier in getText\n")); ! emsg("E633: invalid buffer identifier in getText"); retval = FAIL; } else --- 1085,1091 ---- if (buf == NULL || buf->bufp == NULL) { nbdebug((" invalid buffer identifier in getText\n")); ! emsg(e_invalid_buffer_identifier_in_gettext); retval = FAIL; } else *************** *** 1148,1154 **** if (buf == NULL || buf->bufp == NULL) { nbdebug((" invalid buffer identifier in remove\n")); ! emsg("E634: invalid buffer identifier in remove"); retval = FAIL; } else --- 1148,1154 ---- if (buf == NULL || buf->bufp == NULL) { nbdebug((" invalid buffer identifier in remove\n")); ! emsg(e_invalid_buffer_identifier_in_remove); retval = FAIL; } else *************** *** 1318,1324 **** if (buf == NULL || buf->bufp == NULL) { nbdebug((" invalid buffer identifier in insert\n")); ! emsg("E635: invalid buffer identifier in insert"); retval = FAIL; } else if (args != NULL) --- 1318,1324 ---- if (buf == NULL || buf->bufp == NULL) { nbdebug((" invalid buffer identifier in insert\n")); ! emsg(e_invalid_buffer_identifier_in_insert); retval = FAIL; } else if (args != NULL) *************** *** 1478,1484 **** if (buf == NULL) { nbdebug((" invalid buffer identifier in create\n")); ! emsg("E636: invalid buffer identifier in create"); return FAIL; } VIM_CLEAR(buf->displayname); --- 1478,1484 ---- if (buf == NULL) { nbdebug((" invalid buffer identifier in create\n")); ! emsg(e_invalid_buffer_identifier_in_create); return FAIL; } VIM_CLEAR(buf->displayname); *************** *** 1526,1532 **** if (buf == NULL) { nbdebug((" invalid buffer identifier in startDocumentListen\n")); ! emsg("E637: invalid buffer identifier in startDocumentListen"); return FAIL; } buf->fireChanges = 1; --- 1526,1532 ---- if (buf == NULL) { nbdebug((" invalid buffer identifier in startDocumentListen\n")); ! emsg(e_invalid_buffer_identifier_in_startdocumentlisten); return FAIL; } buf->fireChanges = 1; *************** *** 1537,1543 **** if (buf == NULL) { nbdebug((" invalid buffer identifier in stopDocumentListen\n")); ! emsg("E638: invalid buffer identifier in stopDocumentListen"); return FAIL; } buf->fireChanges = 0; --- 1537,1543 ---- if (buf == NULL) { nbdebug((" invalid buffer identifier in stopDocumentListen\n")); ! emsg(e_invalid_buffer_identifier_in_stopdocumentlisten); return FAIL; } buf->fireChanges = 0; *************** *** 1545,1552 **** { if (!buf->bufp->b_netbeans_file) { ! nbdebug(("E658: NetBeans connection lost for buffer %d\n", buf->bufp->b_fnum)); ! semsg(_("E658: NetBeans connection lost for buffer %d"), buf->bufp->b_fnum); } else --- 1545,1553 ---- { if (!buf->bufp->b_netbeans_file) { ! nbdebug((e_netbeans_connection_lost_for_buffer_nr, ! buf->bufp->b_fnum)); ! semsg(_(e_netbeans_connection_lost_for_buffer_nr), buf->bufp->b_fnum); } else *************** *** 1566,1572 **** if (buf == NULL) { nbdebug((" invalid buffer identifier in setTitle\n")); ! emsg("E639: invalid buffer identifier in setTitle"); return FAIL; } vim_free(buf->displayname); --- 1567,1573 ---- if (buf == NULL) { nbdebug((" invalid buffer identifier in setTitle\n")); ! emsg(e_invalid_buffer_identifier_in_settitle); return FAIL; } vim_free(buf->displayname); *************** *** 1578,1584 **** if (buf == NULL || buf->bufp == NULL) { nbdebug((" invalid buffer identifier in initDone\n")); ! emsg("E640: invalid buffer identifier in initDone"); return FAIL; } do_update = 1; --- 1579,1585 ---- if (buf == NULL || buf->bufp == NULL) { nbdebug((" invalid buffer identifier in initDone\n")); ! emsg(e_invalid_buffer_identifier_in_initdone); return FAIL; } do_update = 1; *************** *** 1599,1605 **** if (buf == NULL) { nbdebug((" invalid buffer identifier in setBufferNumber\n")); ! emsg("E641: invalid buffer identifier in setBufferNumber"); return FAIL; } path = (char_u *)nb_unquote(args, NULL); --- 1600,1606 ---- if (buf == NULL) { nbdebug((" invalid buffer identifier in setBufferNumber\n")); ! emsg(e_invalid_buffer_identifier_in_setbuffernumber); return FAIL; } path = (char_u *)nb_unquote(args, NULL); *************** *** 1610,1616 **** if (bufp == NULL) { nbdebug((" File %s not found in setBufferNumber\n", args)); ! semsg("E642: File %s not found in setBufferNumber", args); return FAIL; } buf->bufp = bufp; --- 1611,1617 ---- if (bufp == NULL) { nbdebug((" File %s not found in setBufferNumber\n", args)); ! semsg(e_file_str_not_found_in_setbuffernumber, args); return FAIL; } buf->bufp = bufp; *************** *** 1635,1641 **** if (buf == NULL) { nbdebug((" invalid buffer identifier in setFullName\n")); ! emsg("E643: invalid buffer identifier in setFullName"); return FAIL; } vim_free(buf->displayname); --- 1636,1642 ---- if (buf == NULL) { nbdebug((" invalid buffer identifier in setFullName\n")); ! emsg(e_invalid_buffer_identifier_in_setfullname); return FAIL; } vim_free(buf->displayname); *************** *** 1658,1664 **** if (buf == NULL) { nbdebug((" invalid buffer identifier in editFile\n")); ! emsg("E644: invalid buffer identifier in editFile"); return FAIL; } // Edit a file: like create + setFullName + read the file. --- 1659,1665 ---- if (buf == NULL) { nbdebug((" invalid buffer identifier in editFile\n")); ! emsg(e_invalid_buffer_identifier_in_editfile); return FAIL; } // Edit a file: like create + setFullName + read the file. *************** *** 1684,1690 **** // This message was commented out, probably because it can // happen when shutting down. if (p_verbose > 0) ! emsg("E645: invalid buffer identifier in setVisible"); return FAIL; } if (streq((char *)args, "T") && buf->bufp != curbuf) --- 1685,1691 ---- // This message was commented out, probably because it can // happen when shutting down. if (p_verbose > 0) ! emsg(e_invalid_buffer_identifier_in_setvisible); return FAIL; } if (streq((char *)args, "T") && buf->bufp != curbuf) *************** *** 1724,1730 **** // This message was commented out, probably because it can // happen when shutting down. if (p_verbose > 0) ! emsg("E646: invalid buffer identifier in setModified"); return FAIL; } prev_b_changed = buf->bufp->b_changed; --- 1725,1731 ---- // This message was commented out, probably because it can // happen when shutting down. if (p_verbose > 0) ! emsg(e_invalid_buffer_identifier_in_setmodified); return FAIL; } prev_b_changed = buf->bufp->b_changed; *************** *** 1807,1813 **** if (buf == NULL || buf->bufp == NULL) { nbdebug((" invalid buffer identifier in setDot\n")); ! emsg("E647: invalid buffer identifier in setDot"); return FAIL; } --- 1808,1814 ---- if (buf == NULL || buf->bufp == NULL) { nbdebug((" invalid buffer identifier in setDot\n")); ! emsg(e_invalid_buffer_identifier_in_setdot); return FAIL; } *************** *** 1860,1866 **** if (buf == NULL) { nbdebug((" invalid buffer identifier in close\n")); ! emsg("E648: invalid buffer identifier in close"); return FAIL; } --- 1861,1867 ---- if (buf == NULL) { nbdebug((" invalid buffer identifier in close\n")); ! emsg(e_invalid_buffer_identifier_in_close); return FAIL; } *************** *** 1874,1880 **** // This message was commented out, probably because it can // happen when shutting down. if (p_verbose > 0) ! emsg("E649: invalid buffer identifier in close"); } nbdebug((" CLOSE %d: %s\n", bufno, name)); #ifdef FEAT_GUI --- 1875,1881 ---- // This message was commented out, probably because it can // happen when shutting down. if (p_verbose > 0) ! emsg(e_invalid_buffer_identifier_in_close_2); } nbdebug((" CLOSE %d: %s\n", bufno, name)); #ifdef FEAT_GUI *************** *** 1913,1919 **** if (buf == NULL) { nbdebug((" invalid buffer identifier in defineAnnoType\n")); ! emsg("E650: invalid buffer identifier in defineAnnoType"); return FAIL; } --- 1914,1920 ---- if (buf == NULL) { nbdebug((" invalid buffer identifier in defineAnnoType\n")); ! emsg(e_invalid_buffer_identifier_in_defineannotype); return FAIL; } *************** *** 1970,1976 **** if (buf == NULL || buf->bufp == NULL) { nbdebug((" invalid buffer identifier in addAnno\n")); ! emsg("E651: invalid buffer identifier in addAnno"); return FAIL; } --- 1971,1977 ---- if (buf == NULL || buf->bufp == NULL) { nbdebug((" invalid buffer identifier in addAnno\n")); ! emsg(e_invalid_buffer_identifier_in_addanno); return FAIL; } *************** *** 2350,2356 **** && !defined(FEAT_GUI_MSWIN) if (gui.in_use) { ! emsg(_("E838: netbeans is not supported with this GUI")); return; } # endif --- 2351,2357 ---- && !defined(FEAT_GUI_MSWIN) if (gui.in_use) { ! emsg(_(e_netbeans_is_not_supported_with_this_GUI)); return; } # endif *** ../vim-8.2.4002/src/optionstr.c 2022-01-02 21:26:12.319264330 +0000 --- src/optionstr.c 2022-01-04 18:56:20.795454083 +0000 *************** *** 1003,1011 **** #if defined(FEAT_GUI_GTK) if (errmsg == NULL && varp == &p_tenc && gui.in_use) { ! // GTK+ 2 uses only a single encoding, and that is UTF-8. if (STRCMP(p_tenc, "utf-8") != 0) ! errmsg = N_("E617: Cannot be changed in the GTK+ 2 GUI"); } #endif --- 1003,1011 ---- #if defined(FEAT_GUI_GTK) if (errmsg == NULL && varp == &p_tenc && gui.in_use) { ! // GTK uses only a single encoding, and that is UTF-8. if (STRCMP(p_tenc, "utf-8") != 0) ! errmsg = e_cannot_be_changed_in_gtk_GUI; } #endif *** ../vim-8.2.4002/src/os_mswin.c 2022-01-01 19:33:46.773076795 +0000 --- src/os_mswin.c 2022-01-04 18:57:17.359319223 +0000 *************** *** 1458,1464 **** CLEAR_FIELD(fLogFont); if (get_logfont(&fLogFont, p_pfn, prt_dlg.hDC, TRUE) == FAIL) { ! semsg(_("E613: Unknown printer font: %s"), p_pfn); mch_print_cleanup(); return FALSE; } --- 1458,1464 ---- CLEAR_FIELD(fLogFont); if (get_logfont(&fLogFont, p_pfn, prt_dlg.hDC, TRUE) == FAIL) { ! semsg(_(e_unknown_printer_font_str), p_pfn); mch_print_cleanup(); return FALSE; } *** ../vim-8.2.4002/src/sign.c 2022-01-01 19:33:46.773076795 +0000 --- src/sign.c 2022-01-04 18:57:56.899227266 +0000 *************** *** 933,939 **** if (next_sign_typenr == start) { vim_free(sp); ! emsg(_("E612: Too many signs defined")); return NULL; } lp = first_sign; // start all over --- 933,939 ---- if (next_sign_typenr == start) { vim_free(sp); ! emsg(_(e_too_many_signs_defined)); return NULL; } lp = first_sign; // start all over *** ../vim-8.2.4002/src/typval.c 2022-01-02 19:25:22.854078479 +0000 --- src/typval.c 2022-01-04 19:03:23.742522492 +0000 *************** *** 221,227 **** if (varp->v_type == VAR_BOOL) emsg(_(e_using_bool_as_number)); else ! emsg(_("E611: Using a Special as a Number")); break; } return varp->vval.v_number == VVAL_TRUE ? 1 : 0; --- 221,227 ---- if (varp->v_type == VAR_BOOL) emsg(_(e_using_bool_as_number)); else ! emsg(_(e_using_special_as_number)); break; } return varp->vval.v_number == VVAL_TRUE ? 1 : 0; *** ../vim-8.2.4002/src/version.c 2022-01-04 18:01:17.889123524 +0000 --- src/version.c 2022-01-04 19:57:12.391002948 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4003, /**/ -- How do I set the laser printer to stun? /// 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 ///