Re: Few untranslated error messages in OAuth

Jacob Champion <jacob.champion@enterprisedb.com>

From: Jacob Champion <jacob.champion@enterprisedb.com>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Álvaro Herrera <alvherre@kurilemu.de>, "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-11-14T00:58:36Z
Lists: pgsql-hackers

Attachments

On Thu, Nov 13, 2025 at 3:08 PM Jacob Champion
<jacob.champion@enterprisedb.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

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. libpq: Align oauth_json_set_error() with other NLS patterns

  2. libpq-oauth: Don't translate internal errors

  3. libpq: Add missing OAuth translations