libpq: Align oauth_json_set_error() with other NLS patterns

Jacob Champion <jchampion@postgresql.org>

Commit: 7a15cff1f11193467898da1c1fabf06fd2caee04
Author: Jacob Champion <jchampion@postgresql.org>
Date: 2025-12-15T21:30:48Z
Releases: 18.2
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@yesql.se>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Discussion: https://postgr.es/m/0EEBCAA8-A5AC-4E3B-BABA-0BA7A08C361B%40yesql.se
Backpatch-through: 18

Files

PathChange+/−
src/interfaces/libpq/fe-auth-oauth.c modified +19 −12
src/interfaces/libpq/nls.mk modified +2 −0

Discussion