Re: PRI?64 vs Visual Studio (2022)

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Peter Eisentraut <peter@eisentraut.org>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2025-11-19T21:02:17Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Test PRI* macros even when we can't test NLS translation.

  2. Avoid requiring Spanish locale to test NLS infrastructure.

  3. Drop support for MSVCRT's float formatting quirk.

  4. Drop support for MSVCRT's %I64 format strings.

  5. Use PRI?64 instead of "ll?" in format strings (continued).

  6. Use <stdint.h> and <inttypes.h> for c.h integers.

  7. Make float exponent output on Windows look the same as elsewhere.

On Thu, Nov 20, 2025 at 6:07 AM Álvaro Herrera <alvherre@kurilemu.de> wrote:
> You could feed the message catalog a translated string that differs from
> the original in some simple way, say, by adding a constant prefix
> "[translated]" or something like that.

Oh, that's probably better than my nearby en.po + es.po suggestion.
Combining the ideas, you could have just an en.po translation, but
expected files to match "hello ..." and "[translated] hello ...".
Though, hmm, I suppose that fails to fail if it didn't translate when
it should have, so maybe a TAP test or a test_nls() function that
internally checks the translation rather than using error() and
expected files...