Add a regression test to verify that NLS translation works.
Tom Lane <tgl@sss.pgh.pa.us>
Add a regression test to verify that NLS translation works. We've never actually had a formal test for this facility. It seems worth adding one now, mainly because we are starting to depend on gettext() being able to handle the PRI* macros from <inttypes.h>, and it's not all that certain that that works everywhere. So the test goes to a bit of effort to check all the PRI* macros we are likely to use. (This effort has indeed found one problem already, now fixed in commit f8715ec86.) Discussion: https://postgr.es/m/3098752.1765221796@sss.pgh.pa.us Discussion: https://postgr.es/m/292844.1765315339@sss.pgh.pa.us
Files
| Path | Change | +/− |
|---|---|---|
| src/test/regress/expected/nls_1.out | added | +20 −0 |
| src/test/regress/expected/nls.out | added | +35 −0 |
| src/test/regress/meson.build | modified | +2 −0 |
| src/test/regress/nls.mk | added | +5 −0 |
| src/test/regress/parallel_schedule | modified | +1 −1 |
| src/test/regress/po/es.po | added | +159 −0 |
| src/test/regress/po/LINGUAS | added | +1 −0 |
| src/test/regress/po/meson.build | added | +3 −0 |
| src/test/regress/regress.c | modified | +77 −0 |
| src/test/regress/sql/nls.sql | added | +19 −0 |
Discussion
- Let's add a test for NLS translation of PRI* macros 6 messages · 2025-12-08 → 2025-12-09
- Solaris versus our NLS files 25 messages · 2025-12-09 → 2025-12-12