Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vLpkm-00BjgU-1l for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Nov 2025 21:30:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vLpkk-00Fbzf-0Y for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Nov 2025 21:30:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vLpkj-00FbzX-2p for pgsql-hackers@lists.postgresql.org; Wed, 19 Nov 2025 21:30:14 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vLpki-000QhC-0x for pgsql-hackers@lists.postgresql.org; Wed, 19 Nov 2025 21:30:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 5AJLU7PE1654113; Wed, 19 Nov 2025 16:30:07 -0500 From: Tom Lane To: Thomas Munro cc: =?UTF-8?Q?=C3=81lvaro_Herrera?= , Peter Eisentraut , Kyotaro Horiguchi , pgsql-hackers@lists.postgresql.org Subject: Re: PRI?64 vs Visual Studio (2022) In-reply-to: References: <1462038.1763567038@sss.pgh.pa.us> <202511191705.fxfewzkxoj27@alvherre.pgsql> Comments: In-reply-to Thomas Munro message dated "Thu, 20 Nov 2025 10:02:17 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1654111.1763587807.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 19 Nov 2025 16:30:07 -0500 Message-ID: <1654112.1763587807@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thomas Munro writes: > On Thu, Nov 20, 2025 at 6:07=E2=80=AFAM =C3=81lvaro Herrera wrote: >> You could feed the message catalog a translated string that differs fro= m >> 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, Yeah. I think it's critical that the test be set up so that failure-to-translate cannot look like a success. I agree with the idea of just using a single test message that checks all the PRI* macros we care about. I don't think we need to invent a whole new translation for this. I'd be inclined to just get the desired translated string pushed into one or two .po files in HEAD, then we can start testing with those specific languages, and we're good. Over time the translators would presumably get translations into other .po files, and then maybe we'd want to expand the set of tested languages, or maybe that wouldn't really buy much. (Managing the encoding of the expected-file might be tricky if you got too ambitious about that.) regards, tom lane