Avoid requiring Spanish locale to test NLS infrastructure. I had supposed that the majority of machines with gettext installed would have most language locales installed, but at least in the buildfarm it turns out less than half have es_ES installed. So depending on that to run the test now seems like a bad idea. But it turns out that gettext can be persuaded to "translate" even in the C locale, as long as you fake out its short-circuit logic by spelling the locale name like "C.UTF-8" or similar. (Many thanks to Bryan Green for correcting my misconceptions about that.) Quick testing suggests that that spelling is accepted by most platforms, though again the buildfarm may show that "most" isn't "all".
Hence, remove the es_ES dependency and instead create a "C" message catalog. I've made the test unconditionally set lc_messages to 'C.UTF-8'. That approach might need adjustment depending on what the buildfarm shows, but let's keep it simple until proven wrong. While at it, tweak the test so that we run the various ereport's even when !ENABLE_NLS. This is useful to verify that the macros provided by <inttypes.h> are compatible with snprintf.c, as we now know is worth questioning. Discussion: https://postgr.es/m/[email protected] Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/7db6809ced4406257a80766e4109c8be8e1ea744 Modified Files -------------- src/test/regress/expected/nls.out | 65 +++++---------- src/test/regress/expected/nls_1.out | 49 +++++------ src/test/regress/expected/nls_2.out | 35 -------- src/test/regress/po/C.po | 161 ++++++++++++++++++++++++++++++++++++ src/test/regress/po/LINGUAS | 2 +- src/test/regress/po/es.po | 159 ----------------------------------- src/test/regress/regress.c | 45 +++++----- src/test/regress/sql/nls.sql | 35 ++------ 8 files changed, 237 insertions(+), 314 deletions(-)
