diff src/hardcopy.c @ 26915:3631d2deb36c v8.2.3986

patch 8.2.3986: error messages are spread out Commit: https://github.com/vim/vim/commit/b09feaa86ecc53b9b953710082496951776dc5c6 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 2 20:20:45 2022 +0000 patch 8.2.3986: error messages are spread out Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
author Bram Moolenaar <Bram@vim.org>
date Sun, 02 Jan 2022 21:30:04 +0100
parents d4e61d61afd9
children d91aea2a612c
line wrap: on
line diff
--- a/src/hardcopy.c
+++ b/src/hardcopy.c
@@ -1405,7 +1405,7 @@ prt_write_file_raw_len(char_u *buffer, i
 	    && fwrite(buffer, sizeof(char_u), bytes, prt_ps_fd)
 							     != (size_t)bytes)
     {
-	emsg(_("E455: Error writing to PostScript output file"));
+	emsg(_(e_error_writing_to_postscript_output_file));
 	prt_file_error = TRUE;
     }
 }
@@ -1849,7 +1849,7 @@ prt_open_resource(struct prt_ps_resource
 					    PRT_FILE_BUFFER_LEN, fd_resource);
     if (ferror(fd_resource))
     {
-	semsg(_("E457: Can't read PostScript resource file \"%s\""),
+	semsg(_(e_cant_read_postscript_resource_file_str),
 		resource->filename);
 	fclose(fd_resource);
 	return FALSE;
@@ -2675,7 +2675,7 @@ prt_add_resource(struct prt_ps_resource_
     fd_resource = mch_fopen((char *)resource->filename, READBIN);
     if (fd_resource == NULL)
     {
-	semsg(_("E456: Can't open file \"%s\""), resource->filename);
+	semsg(_(e_cant_open_file_str_2), resource->filename);
 	return FALSE;
     }
     prt_dsc_resources("BeginResource", prt_resource_types[resource->type],
@@ -2689,7 +2689,7 @@ prt_add_resource(struct prt_ps_resource_
 			   sizeof(resource_buffer), fd_resource);
 	if (ferror(fd_resource))
 	{
-	    semsg(_("E457: Can't read PostScript resource file \"%s\""),
+	    semsg(_(e_cant_read_postscript_resource_file_str),
 							    resource->filename);
 	    fclose(fd_resource);
 	    return FALSE;
@@ -2805,7 +2805,7 @@ mch_print_begin(prt_settings_T *psetting
     // Search for external resources VIM supplies
     if (!prt_find_resource("prolog", res_prolog))
     {
-	emsg(_("E456: Can't find PostScript resource file \"prolog.ps\""));
+	semsg(_(e_cant_find_postscript_resource_file_str_ps), "prolog");
 	goto theend;
     }
     if (!prt_open_resource(res_prolog))
@@ -2817,7 +2817,7 @@ mch_print_begin(prt_settings_T *psetting
 	// Look for required version of multi-byte printing procset
 	if (!prt_find_resource("cidfont", res_cidfont))
 	{
-	    emsg(_("E456: Can't find PostScript resource file \"cidfont.ps\""));
+	    semsg(_(e_cant_find_postscript_resource_file_str_ps), "cidfont");
 	    goto theend;
 	}
 	if (!prt_open_resource(res_cidfont))
@@ -2849,7 +2849,7 @@ mch_print_begin(prt_settings_T *psetting
 		p_encoding = (char_u *)"latin1";
 		if (!prt_find_resource((char *)p_encoding, res_encoding))
 		{
-		    semsg(_("E456: Can't find PostScript resource file \"%s.ps\""),
+		    semsg(_(e_cant_find_postscript_resource_file_str_ps),
 			    p_encoding);
 		    goto theend;
 		}
@@ -2870,7 +2870,7 @@ mch_print_begin(prt_settings_T *psetting
 	    // Include ASCII range encoding vector
 	    if (!prt_find_resource(prt_ascii_encoding, res_encoding))
 	    {
-		semsg(_("E456: Can't find PostScript resource file \"%s.ps\""),
+		semsg(_(e_cant_find_postscript_resource_file_str_ps),
 							  prt_ascii_encoding);
 		goto theend;
 	    }
@@ -2899,8 +2899,7 @@ mch_print_begin(prt_settings_T *psetting
 	// Find user supplied CMap
 	if (!prt_find_resource(prt_cmap, res_cmap))
 	{
-	    semsg(_("E456: Can't find PostScript resource file \"%s.ps\""),
-								    prt_cmap);
+	    semsg(_(e_cant_find_postscript_resource_file_str_ps), prt_cmap);
 	    goto theend;
 	}
 	if (!prt_open_resource(res_cmap))