@@ -718,7 +718,7 @@ tar_write_compressed_data(TarMethodData *tar_data, void *buf, size_t count,
718718 r = deflate (tar_data -> zp , flush ? Z_FINISH : Z_NO_FLUSH );
719719 if (r == Z_STREAM_ERROR )
720720 {
721- tar_data -> base .lasterrstring = "could not compress data" ;
721+ tar_data -> base .lasterrstring = _ ( "could not compress data" ) ;
722722 return false;
723723 }
724724
@@ -747,7 +747,7 @@ tar_write_compressed_data(TarMethodData *tar_data, void *buf, size_t count,
747747 /* Reset the stream for writing */
748748 if (deflateReset (tar_data -> zp ) != Z_OK )
749749 {
750- tar_data -> base .lasterrstring = "could not reset compression stream" ;
750+ tar_data -> base .lasterrstring = _ ( "could not reset compression stream" ) ;
751751 return false;
752752 }
753753 }
@@ -873,7 +873,7 @@ tar_open_for_write(WalWriteMethod *wwmethod, const char *pathname,
873873 pg_free (tar_data -> zp );
874874 tar_data -> zp = NULL ;
875875 wwmethod -> lasterrstring =
876- "could not initialize compression library" ;
876+ _ ( "could not initialize compression library" ) ;
877877 return NULL ;
878878 }
879879 }
@@ -885,7 +885,7 @@ tar_open_for_write(WalWriteMethod *wwmethod, const char *pathname,
885885 if (tar_data -> currentfile != NULL )
886886 {
887887 wwmethod -> lasterrstring =
888- "implementation error: tar files can't have more than one open file" ;
888+ _ ( "implementation error: tar files can't have more than one open file" ) ;
889889 return NULL ;
890890 }
891891
@@ -900,7 +900,7 @@ tar_open_for_write(WalWriteMethod *wwmethod, const char *pathname,
900900 pg_free (tar_data -> currentfile );
901901 pg_free (tmppath );
902902 tar_data -> currentfile = NULL ;
903- wwmethod -> lasterrstring = "could not create tar header" ;
903+ wwmethod -> lasterrstring = _ ( "could not create tar header" ) ;
904904 return NULL ;
905905 }
906906
@@ -917,7 +917,7 @@ tar_open_for_write(WalWriteMethod *wwmethod, const char *pathname,
917917 if (deflateParams (tar_data -> zp , 0 , Z_DEFAULT_STRATEGY ) != Z_OK )
918918 {
919919 wwmethod -> lasterrstring =
920- "could not change compression parameters" ;
920+ _ ( "could not change compression parameters" ) ;
921921 return NULL ;
922922 }
923923 }
@@ -958,7 +958,7 @@ tar_open_for_write(WalWriteMethod *wwmethod, const char *pathname,
958958 if (deflateParams (tar_data -> zp , wwmethod -> compression_level ,
959959 Z_DEFAULT_STRATEGY ) != Z_OK )
960960 {
961- wwmethod -> lasterrstring = "could not change compression parameters" ;
961+ wwmethod -> lasterrstring = _ ( "could not change compression parameters" ) ;
962962 return NULL ;
963963 }
964964 }
@@ -1049,7 +1049,7 @@ tar_close(Walfile *f, WalCloseMethod method)
10491049 {
10501050 if (f -> wwmethod -> compression_algorithm != PG_COMPRESSION_NONE )
10511051 {
1052- f -> wwmethod -> lasterrstring = "unlink not supported with compression" ;
1052+ f -> wwmethod -> lasterrstring = _ ( "unlink not supported with compression" ) ;
10531053 return -1 ;
10541054 }
10551055
@@ -1163,7 +1163,7 @@ tar_close(Walfile *f, WalCloseMethod method)
11631163 /* Turn off compression */
11641164 if (deflateParams (tar_data -> zp , 0 , Z_DEFAULT_STRATEGY ) != Z_OK )
11651165 {
1166- f -> wwmethod -> lasterrstring = "could not change compression parameters" ;
1166+ f -> wwmethod -> lasterrstring = _ ( "could not change compression parameters" ) ;
11671167 return -1 ;
11681168 }
11691169
@@ -1176,7 +1176,7 @@ tar_close(Walfile *f, WalCloseMethod method)
11761176 if (deflateParams (tar_data -> zp , f -> wwmethod -> compression_level ,
11771177 Z_DEFAULT_STRATEGY ) != Z_OK )
11781178 {
1179- f -> wwmethod -> lasterrstring = "could not change compression parameters" ;
1179+ f -> wwmethod -> lasterrstring = _ ( "could not change compression parameters" ) ;
11801180 return -1 ;
11811181 }
11821182 }
@@ -1261,7 +1261,7 @@ tar_finish(WalWriteMethod *wwmethod)
12611261
12621262 if (r == Z_STREAM_ERROR )
12631263 {
1264- wwmethod -> lasterrstring = "could not compress data" ;
1264+ wwmethod -> lasterrstring = _ ( "could not compress data" ) ;
12651265 return false;
12661266 }
12671267 if (tar_data -> zp -> avail_out < ZLIB_OUT_SIZE )
@@ -1285,7 +1285,7 @@ tar_finish(WalWriteMethod *wwmethod)
12851285
12861286 if (deflateEnd (tar_data -> zp ) != Z_OK )
12871287 {
1288- wwmethod -> lasterrstring = "could not close compression stream" ;
1288+ wwmethod -> lasterrstring = _ ( "could not close compression stream" ) ;
12891289 return false;
12901290 }
12911291 }
0 commit comments