Re: VACUUM (PARALLEL) option processing not using DefElem the way it was intended - Mailing list pgsql-hackers

From Álvaro Herrera
Subject Re: VACUUM (PARALLEL) option processing not using DefElem the way it was intended
Date
Msg-id 202510081356.voszl6spgjjg@alvherre.pgsql
Whole thread Raw
In response to Re: VACUUM (PARALLEL) option processing not using DefElem the way it was intended  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: VACUUM (PARALLEL) option processing not using DefElem the way it was intended
List pgsql-hackers
On 2025-Oct-09, David Rowley wrote:

> On Thu, 9 Oct 2025 at 00:36, Álvaro Herrera <alvherre@kurilemu.de> wrote:
> > Yeah, that change makes sense to me.  With an eye towards not forcing
> > the translators to understand the message context or forced to translate
> > the word "parallel", I would suggest to take the option name out of the
> > sentence, maybe something like
> >
> >   value for VACUUM option \"%s\" must be between 0 and %d
> 
> Just looking at the other error messages. They all seems to put the
> option in upper case but not in quotes. Following along with those,
> we'd end up with:
> 
> PARALLEL option must be between 0 and %d
> 
> Would that be enough to help the translator understand not to
> translate the option name?

This works for me, yeah.  Though I'd still do "%s option must be between
0 and %d" (ie. make the option a separate string) and then they don't
need to understand that -- and also if there's another option elsewhere
whose value needs to be "between 0 and %d", then this string can be
reused.  I don't see any such places right now though.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"All rings of power are equal,
But some rings of power are more equal than others."
                                 (George Orwell's The Lord of the Rings)



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: src/include/utils/float.h comment one link stable
Next
From: Aleksander Alekseev
Date:
Subject: [PATCH] Little refactoring of portalcmds.c