From 90f0d2881445a266038d349073e571f06def656b Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 8 May 2023 06:15:26 +0200 Subject: pg_basebackup: Restore lost translation markers The refactoring in ebfb814f7c lost some translation markers. --- src/bin/pg_basebackup/nls.mk | 2 +- src/bin/pg_basebackup/walmethods.c | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/bin/pg_basebackup/nls.mk b/src/bin/pg_basebackup/nls.mk index 8d28e249de..fc475003e8 100644 --- a/src/bin/pg_basebackup/nls.mk +++ b/src/bin/pg_basebackup/nls.mk @@ -18,5 +18,5 @@ GETTEXT_FILES = $(FRONTEND_COMMON_GETTEXT_FILES) \ ../../common/file_utils.c \ ../../fe_utils/option_utils.c \ ../../fe_utils/recovery_gen.c -GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS) simple_prompt tar_set_error +GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS) simple_prompt GETTEXT_FLAGS = $(FRONTEND_COMMON_GETTEXT_FLAGS) diff --git a/src/bin/pg_basebackup/walmethods.c b/src/bin/pg_basebackup/walmethods.c index 6d14b988cb..1934b7dd46 100644 --- a/src/bin/pg_basebackup/walmethods.c +++ b/src/bin/pg_basebackup/walmethods.c @@ -718,7 +718,7 @@ tar_write_compressed_data(TarMethodData *tar_data, void *buf, size_t count, r = deflate(tar_data->zp, flush ? Z_FINISH : Z_NO_FLUSH); if (r == Z_STREAM_ERROR) { - tar_data->base.lasterrstring = "could not compress data"; + tar_data->base.lasterrstring = _("could not compress data"); return false; } @@ -747,7 +747,7 @@ tar_write_compressed_data(TarMethodData *tar_data, void *buf, size_t count, /* Reset the stream for writing */ if (deflateReset(tar_data->zp) != Z_OK) { - tar_data->base.lasterrstring = "could not reset compression stream"; + tar_data->base.lasterrstring = _("could not reset compression stream"); return false; } } @@ -873,7 +873,7 @@ tar_open_for_write(WalWriteMethod *wwmethod, const char *pathname, pg_free(tar_data->zp); tar_data->zp = NULL; wwmethod->lasterrstring = - "could not initialize compression library"; + _("could not initialize compression library"); return NULL; } } @@ -885,7 +885,7 @@ tar_open_for_write(WalWriteMethod *wwmethod, const char *pathname, if (tar_data->currentfile != NULL) { wwmethod->lasterrstring = - "implementation error: tar files can't have more than one open file"; + _("implementation error: tar files can't have more than one open file"); return NULL; } @@ -900,7 +900,7 @@ tar_open_for_write(WalWriteMethod *wwmethod, const char *pathname, pg_free(tar_data->currentfile); pg_free(tmppath); tar_data->currentfile = NULL; - wwmethod->lasterrstring = "could not create tar header"; + wwmethod->lasterrstring = _("could not create tar header"); return NULL; } @@ -917,7 +917,7 @@ tar_open_for_write(WalWriteMethod *wwmethod, const char *pathname, if (deflateParams(tar_data->zp, 0, Z_DEFAULT_STRATEGY) != Z_OK) { wwmethod->lasterrstring = - "could not change compression parameters"; + _("could not change compression parameters"); return NULL; } } @@ -958,7 +958,7 @@ tar_open_for_write(WalWriteMethod *wwmethod, const char *pathname, if (deflateParams(tar_data->zp, wwmethod->compression_level, Z_DEFAULT_STRATEGY) != Z_OK) { - wwmethod->lasterrstring = "could not change compression parameters"; + wwmethod->lasterrstring = _("could not change compression parameters"); return NULL; } } @@ -1049,7 +1049,7 @@ tar_close(Walfile *f, WalCloseMethod method) { if (f->wwmethod->compression_algorithm != PG_COMPRESSION_NONE) { - f->wwmethod->lasterrstring = "unlink not supported with compression"; + f->wwmethod->lasterrstring = _("unlink not supported with compression"); return -1; } @@ -1163,7 +1163,7 @@ tar_close(Walfile *f, WalCloseMethod method) /* Turn off compression */ if (deflateParams(tar_data->zp, 0, Z_DEFAULT_STRATEGY) != Z_OK) { - f->wwmethod->lasterrstring = "could not change compression parameters"; + f->wwmethod->lasterrstring = _("could not change compression parameters"); return -1; } @@ -1176,7 +1176,7 @@ tar_close(Walfile *f, WalCloseMethod method) if (deflateParams(tar_data->zp, f->wwmethod->compression_level, Z_DEFAULT_STRATEGY) != Z_OK) { - f->wwmethod->lasterrstring = "could not change compression parameters"; + f->wwmethod->lasterrstring = _("could not change compression parameters"); return -1; } } @@ -1261,7 +1261,7 @@ tar_finish(WalWriteMethod *wwmethod) if (r == Z_STREAM_ERROR) { - wwmethod->lasterrstring = "could not compress data"; + wwmethod->lasterrstring = _("could not compress data"); return false; } if (tar_data->zp->avail_out < ZLIB_OUT_SIZE) @@ -1285,7 +1285,7 @@ tar_finish(WalWriteMethod *wwmethod) if (deflateEnd(tar_data->zp) != Z_OK) { - wwmethod->lasterrstring = "could not close compression stream"; + wwmethod->lasterrstring = _("could not close compression stream"); return false; } } -- cgit v1.2.1