Re: PRI?64 vs Visual Studio (2022) - Mailing list pgsql-hackers

From Jacob Champion
Subject Re: PRI?64 vs Visual Studio (2022)
Date
Msg-id CAOYmi+=8Y=if0ZWEc7PZNySV3W-3qk_eGGAjSrcxkXSt7jQ_BQ@mail.gmail.com
Whole thread Raw
In response to Re: PRI?64 vs Visual Studio (2022)  (Álvaro Herrera <alvherre@kurilemu.de>)
List pgsql-hackers
On Wed, Nov 19, 2025 at 9: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.

`xgettext -m` can do that. (But I wish I'd known about msgen earlier...)

We could additionally use preloadable_libintl.so, in combination with
GETTEXT_LOG_UNTRANSLATED, and check if the log contains entries from
our domains. I was doing that just last week. But beware that the log
file can grow very quickly. And we'd probably have to differentiate
the "no domain" text belonging to other software from accidental
no-domain strings in our own code, like what I described in [1].

--Jacob

[1] https://postgr.es/m/CAOYmi+kQQ8vpRcoSrA5EQ98Wa3G6jFj1yRHs6mh1V7ohkTC7JA@mail.gmail.com



pgsql-hackers by date:

Previous
From: Greg Burd
Date:
Subject: Re: Expanding HOT updates for expression and partial indexes
Next
From: Greg Burd
Date:
Subject: Re: Expanding HOT updates for expression and partial indexes