pgsql: libpq: Align oauth_json_set_error() with other NLS patterns

From: Jacob Champion <jchampion(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: libpq: Align oauth_json_set_error() with other NLS patterns
Date: 2025-12-15 22:28:44
Message-ID: E1vVH3b-000yaR-20@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

libpq: Align oauth_json_set_error() with other NLS patterns

Now that the prior commits have fixed missing OAuth translations, pull
the bespoke usage of libpq_gettext() for OAUTHBEARER parsing into
oauth_json_set_error() itself, and make that a gettext trigger as well,
to better match what the other sites are doing. Add an _internal()
variant to handle the existing untranslated case.

Suggested-by: Daniel Gustafsson <daniel(at)yesql(dot)se>
Reviewed-by: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Discussion: https://postgr.es/m/0EEBCAA8-A5AC-4E3B-BABA-0BA7A08C361B%40yesql.se
Backpatch-through: 18

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f7fbd02d32c46ee1cada6c3faf94414657b7a19a

Modified Files
--------------
src/interfaces/libpq/fe-auth-oauth.c | 31 +++++++++++++++++++------------
src/interfaces/libpq/nls.mk | 2 ++
2 files changed, 21 insertions(+), 12 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2025-12-15 23:38:01 pgsql: Revert "Avoid requiring Spanish locale to test NLS infrastructur
Previous Message Nathan Bossart 2025-12-15 20:28:19 pgsql: Allow passing a pointer to GetNamedDSMSegment()'s init callback.