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-13T23:08:44Z
Lists: pgsql-hackers
On Thu, Nov 13, 2025 at 8:23 AM Jacob Champion
<jacob.champion@enterprisedb.com> wrote:
> On Thu, Nov 13, 2025 at 4:49 AM Daniel Gustafsson <daniel@yesql.se> wrote:
> > If so, should that be extended to oauth_json_set_error as well? (and possibly others?)
>
> That should be covered already by nls.mk, unless I messed that up
> too... I'll do a deeper dive.

I misread your email, sorry. We trigger on oauth_parse_set_error(),
but not oauth_json_set_error(). I'll see how easy that is to change.

There's more to fix here, after talking with Alvaro offlist. I got
gettext to tell me [1] what else was missing and found that
- fe-auth-oauth.c is not in GETTEXT_FILES at all
- I didn't give jsonapi.c the same handling as in 3ddbac368 when I
ported it to libpq, so it's not translated either

I'm writing up a patch that combines all of that.

Thanks,
--Jacob

[1] https://www.gnu.org/software/gettext/manual/html_node/Prioritizing-messages.html



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