Make more consistent some translated strings related to compression

This commit changes some of the bbstreamer files and pg_dump to use the
same style as a few other places (like common/compression.c), where the
name of the compression method is not part of the string, but an
argument of it.  This reduces a bit the translation work with less
string patterns.

Discussion: https://postgr.es/m/Y5/5tdK+4n3clvtU@paquier.xyz
This commit is contained in:
Michael Paquier 2022-12-21 10:39:06 +09:00
parent 22e3b55805
commit f450695e88
4 changed files with 11 additions and 11 deletions

View File

@ -113,7 +113,7 @@ bbstreamer_gzip_writer_new(char *pathname, FILE *file,
return &streamer->base;
#else
pg_fatal("this build does not support gzip compression");
pg_fatal("this build does not support compression with %s", "gzip");
return NULL; /* keep compiler quiet */
#endif
}
@ -246,7 +246,7 @@ bbstreamer_gzip_decompressor_new(bbstreamer *next)
return &streamer->base;
#else
pg_fatal("this build does not support gzip compression");
pg_fatal("this build does not support compression with %s", "gzip");
return NULL; /* keep compiler quiet */
#endif
}

View File

@ -97,7 +97,7 @@ bbstreamer_lz4_compressor_new(bbstreamer *next, pg_compress_specification *compr
return &streamer->base;
#else
pg_fatal("this build does not support lz4 compression");
pg_fatal("this build does not support compression with %s", "LZ4");
return NULL; /* keep compiler quiet */
#endif
}
@ -295,7 +295,7 @@ bbstreamer_lz4_decompressor_new(bbstreamer *next)
return &streamer->base;
#else
pg_fatal("this build does not support lz4 compression");
pg_fatal("this build does not support compression with %s", "LZ4");
return NULL; /* keep compiler quiet */
#endif
}

View File

@ -113,7 +113,7 @@ bbstreamer_zstd_compressor_new(bbstreamer *next, pg_compress_specification *comp
return &streamer->base;
#else
pg_fatal("this build does not support zstd compression");
pg_fatal("this build does not support compression with %s", "ZSTD");
return NULL; /* keep compiler quiet */
#endif
}
@ -268,7 +268,7 @@ bbstreamer_zstd_decompressor_new(bbstreamer *next)
return &streamer->base;
#else
pg_fatal("this build does not support zstd compression");
pg_fatal("this build does not support compression with %s", "ZSTD");
return NULL; /* keep compiler quiet */
#endif
}

View File

@ -101,7 +101,7 @@ AllocateCompressor(const pg_compress_specification compression_spec,
#ifndef HAVE_LIBZ
if (compression_spec.algorithm == PG_COMPRESSION_GZIP)
pg_fatal("not built with zlib support");
pg_fatal("this build does not support compression with %s", "gzip");
#endif
cs = (CompressorState *) pg_malloc0(sizeof(CompressorState));
@ -135,7 +135,7 @@ ReadDataFromArchive(ArchiveHandle *AH,
#ifdef HAVE_LIBZ
ReadDataFromArchiveZlib(AH, readF);
#else
pg_fatal("not built with zlib support");
pg_fatal("this build does not support compression with %s", "gzip");
#endif
}
}
@ -153,7 +153,7 @@ WriteDataToArchive(ArchiveHandle *AH, CompressorState *cs,
#ifdef HAVE_LIBZ
WriteDataToArchiveZlib(AH, cs, data, dLen);
#else
pg_fatal("not built with zlib support");
pg_fatal("this build does not support compression with %s", "gzip");
#endif
break;
case PG_COMPRESSION_NONE:
@ -482,7 +482,7 @@ cfopen_write(const char *path, const char *mode,
fp = cfopen(fname, mode, compression_spec);
free_keep_errno(fname);
#else
pg_fatal("not built with zlib support");
pg_fatal("this build does not support compression with %s", "gzip");
fp = NULL; /* keep compiler quiet */
#endif
}
@ -526,7 +526,7 @@ cfopen(const char *path, const char *mode,
fp = NULL;
}
#else
pg_fatal("not built with zlib support");
pg_fatal("this build does not support compression with %s", "gzip");
#endif
}
else