@@ -718,7 +718,7 @@ tar_write_compressed_data(TarMethodData *tar_data, void *buf, size_t count,
718
718
r = deflate (tar_data -> zp , flush ? Z_FINISH : Z_NO_FLUSH );
719
719
if (r == Z_STREAM_ERROR )
720
720
{
721
- tar_data -> base .lasterrstring = "could not compress data" ;
721
+ tar_data -> base .lasterrstring = _ ( "could not compress data" ) ;
722
722
return false;
723
723
}
724
724
@@ -747,7 +747,7 @@ tar_write_compressed_data(TarMethodData *tar_data, void *buf, size_t count,
747
747
/* Reset the stream for writing */
748
748
if (deflateReset (tar_data -> zp ) != Z_OK )
749
749
{
750
- tar_data -> base .lasterrstring = "could not reset compression stream" ;
750
+ tar_data -> base .lasterrstring = _ ( "could not reset compression stream" ) ;
751
751
return false;
752
752
}
753
753
}
@@ -873,7 +873,7 @@ tar_open_for_write(WalWriteMethod *wwmethod, const char *pathname,
873
873
pg_free (tar_data -> zp );
874
874
tar_data -> zp = NULL ;
875
875
wwmethod -> lasterrstring =
876
- "could not initialize compression library" ;
876
+ _ ( "could not initialize compression library" ) ;
877
877
return NULL ;
878
878
}
879
879
}
@@ -885,7 +885,7 @@ tar_open_for_write(WalWriteMethod *wwmethod, const char *pathname,
885
885
if (tar_data -> currentfile != NULL )
886
886
{
887
887
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" ) ;
889
889
return NULL ;
890
890
}
891
891
@@ -900,7 +900,7 @@ tar_open_for_write(WalWriteMethod *wwmethod, const char *pathname,
900
900
pg_free (tar_data -> currentfile );
901
901
pg_free (tmppath );
902
902
tar_data -> currentfile = NULL ;
903
- wwmethod -> lasterrstring = "could not create tar header" ;
903
+ wwmethod -> lasterrstring = _ ( "could not create tar header" ) ;
904
904
return NULL ;
905
905
}
906
906
@@ -917,7 +917,7 @@ tar_open_for_write(WalWriteMethod *wwmethod, const char *pathname,
917
917
if (deflateParams (tar_data -> zp , 0 , Z_DEFAULT_STRATEGY ) != Z_OK )
918
918
{
919
919
wwmethod -> lasterrstring =
920
- "could not change compression parameters" ;
920
+ _ ( "could not change compression parameters" ) ;
921
921
return NULL ;
922
922
}
923
923
}
@@ -958,7 +958,7 @@ tar_open_for_write(WalWriteMethod *wwmethod, const char *pathname,
958
958
if (deflateParams (tar_data -> zp , wwmethod -> compression_level ,
959
959
Z_DEFAULT_STRATEGY ) != Z_OK )
960
960
{
961
- wwmethod -> lasterrstring = "could not change compression parameters" ;
961
+ wwmethod -> lasterrstring = _ ( "could not change compression parameters" ) ;
962
962
return NULL ;
963
963
}
964
964
}
@@ -1049,7 +1049,7 @@ tar_close(Walfile *f, WalCloseMethod method)
1049
1049
{
1050
1050
if (f -> wwmethod -> compression_algorithm != PG_COMPRESSION_NONE )
1051
1051
{
1052
- f -> wwmethod -> lasterrstring = "unlink not supported with compression" ;
1052
+ f -> wwmethod -> lasterrstring = _ ( "unlink not supported with compression" ) ;
1053
1053
return -1 ;
1054
1054
}
1055
1055
@@ -1163,7 +1163,7 @@ tar_close(Walfile *f, WalCloseMethod method)
1163
1163
/* Turn off compression */
1164
1164
if (deflateParams (tar_data -> zp , 0 , Z_DEFAULT_STRATEGY ) != Z_OK )
1165
1165
{
1166
- f -> wwmethod -> lasterrstring = "could not change compression parameters" ;
1166
+ f -> wwmethod -> lasterrstring = _ ( "could not change compression parameters" ) ;
1167
1167
return -1 ;
1168
1168
}
1169
1169
@@ -1176,7 +1176,7 @@ tar_close(Walfile *f, WalCloseMethod method)
1176
1176
if (deflateParams (tar_data -> zp , f -> wwmethod -> compression_level ,
1177
1177
Z_DEFAULT_STRATEGY ) != Z_OK )
1178
1178
{
1179
- f -> wwmethod -> lasterrstring = "could not change compression parameters" ;
1179
+ f -> wwmethod -> lasterrstring = _ ( "could not change compression parameters" ) ;
1180
1180
return -1 ;
1181
1181
}
1182
1182
}
@@ -1261,7 +1261,7 @@ tar_finish(WalWriteMethod *wwmethod)
1261
1261
1262
1262
if (r == Z_STREAM_ERROR )
1263
1263
{
1264
- wwmethod -> lasterrstring = "could not compress data" ;
1264
+ wwmethod -> lasterrstring = _ ( "could not compress data" ) ;
1265
1265
return false;
1266
1266
}
1267
1267
if (tar_data -> zp -> avail_out < ZLIB_OUT_SIZE )
@@ -1285,7 +1285,7 @@ tar_finish(WalWriteMethod *wwmethod)
1285
1285
1286
1286
if (deflateEnd (tar_data -> zp ) != Z_OK )
1287
1287
{
1288
- wwmethod -> lasterrstring = "could not close compression stream" ;
1288
+ wwmethod -> lasterrstring = _ ( "could not close compression stream" ) ;
1289
1289
return false;
1290
1290
}
1291
1291
}
0 commit comments