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
- v2-0001-libpq-Add-missing-OAuth-translations.patch (application/x-patch) patch v2-0001
- v2-0002-libpq-oauth-Don-t-translate-internal-mux-failures.patch (application/octet-stream) patch v2-0002
- v2-0003-libpq-Align-oauth_json_set_error-with-other-NLS-p.patch (application/octet-stream) patch v2-0003
- v2-0004-DO-NOT-MERGE-squash-libpq-Add-missing-OAuth-trans.patch (application/octet-stream) patch v2-0004
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 →
-
libpq: Align oauth_json_set_error() with other NLS patterns
- 7a15cff1f111 18.2 landed
- f7fbd02d32c4 19 (unreleased) landed
-
libpq-oauth: Don't translate internal errors
- aac25567fec1 18.2 landed
- 301a1dcf00c8 19 (unreleased) landed
-
libpq: Add missing OAuth translations
- 169ff4ca930b 18.2 landed
- ea3370b18ebe 19 (unreleased) landed