Re: Few untranslated error messages in OAuth

From: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Álvaro Herrera <alvherre(at)kurilemu(dot)de>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Few untranslated error messages in OAuth
Date: 2025-11-14 00:58:36
Message-ID: CAOYmi+kQQ8vpRcoSrA5EQ98Wa3G6jFj1yRHs6mh1V7ohkTC7JA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 13, 2025 at 3:08 PM Jacob Champion
<jacob(dot)champion(at)enterprisedb(dot)com> wrote:
> I'm writing up a patch that combines all of that.

And here's what I have so far. I could use help double-checking the
.po result; I'm not entirely sure my usage of update-po is correct.

I took this opportunity to address a complaint from Alvaro and Peter E
a little while back, that some of the more internal-facing error
messages are very difficult to translate (and wouldn't help users even
if translation were easy). I can pull that (v2-0002) into its own
thread if necessary.

- v2-0001: combines Zhijie Hou's patch with the gettext_noop()
suggestion from Alvaro and fixes the nls.mk omission
- v2-0002: removes translation of multiplexer failures by adding an
_internal macro
- v2-0003: aligns oauth_json_set_error() with the prior commits
- v2-0004: tries to get jsonapi.c translated too

Unfortunately v2-0004 doesn't work. It puts the messages into the
translation files, but we use the _() macro throughout jsonapi.c,
which isn't helpful for libpq because libpq uses its own text domain.
This was an oversight in the work done for 0785d1b8b, I think, and it
may need its own patchset unless someone has a really quick fix.

Please let me know if I forgot to address something already said
above. I assume translation changes such as these are generally
backportable?

Thanks,
--Jacob

Attachment Content-Type Size
v2-0001-libpq-Add-missing-OAuth-translations.patch application/x-patch 7.1 KB
v2-0002-libpq-oauth-Don-t-translate-internal-mux-failures.patch application/octet-stream 6.8 KB
v2-0003-libpq-Align-oauth_json_set_error-with-other-NLS-p.patch application/octet-stream 5.2 KB
v2-0004-DO-NOT-MERGE-squash-libpq-Add-missing-OAuth-trans.patch application/octet-stream 1.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Paul A Jungwirth 2025-11-14 00:59:20 Fix GetOperatorFromCompareType
Previous Message Masahiko Sawada 2025-11-14 00:47:34 Re: Use streaming read I/O in BRIN vacuuming