public inbox for [email protected]
help / color / mirror / Atom feedFrom: Peter Smith <[email protected]>
To: Álvaro Herrera <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Redundant/mis-use of _(x) gettext macro?
Date: Mon, 18 May 2026 15:26:41 +1000
Message-ID: <CAHut+Pu21kz0P4gGvp=NfyBxso58q-=on3Y74owsxsiv8gNNNg@mail.gmail.com> (raw)
In-Reply-To: <CAHut+PtsPumPOLLK0UZS_VA84qf-9sw8mzfpHOxbSLt7UKt3WA@mail.gmail.com>
References: <CAHut+Pu7LWQB+m9HTf4nf3BQu8bC_-N5c=kuOf=EHHZE_Ctj9Q@mail.gmail.com>
<[email protected]>
<CAHut+PtsPumPOLLK0UZS_VA84qf-9sw8mzfpHOxbSLt7UKt3WA@mail.gmail.com>
On Tue, Apr 28, 2026 at 11:57 AM Peter Smith <[email protected]> wrote:
>
> On Fri, Apr 24, 2026 at 10:14 PM Álvaro Herrera <[email protected]> wrote:
> >
> > On 2026-Apr-24, Peter Smith wrote:
> >
> > > OK. Including the comma within a larger translated string seems like a
> > > better idea.
> > >
> > > Since you now have the list `length`, I wondered why not simplify
> > > further to use list_nth indexing? Then you can remove
> > > `foreach_current_index` and `lc`.
> >
> > WFM.
> >
> > > Also, why did you choose to implement `last` versus `first` logic?
> > > e.g. How about this?
> >
> > > {
> > > if (first)
> > > appendStringInfo(dest, _("\"%s\""), pubname);
> > > else
> > > appendStringInfo(dest, _(", \"%s\""), pubname);
> > > }
> >
> > I don't know, it just seemed more natural. The whole ", foo" style
> > simply feels weird to me. It seems a matter of choice only though, so
> > if you feel strongly about this, I'm not opposed.
> >
>
> Personally, I prefer `first` logic because
> a) The length of the list is not required up-front
> b) At each iteration, the built string makes sense instead of always
> having a dangling ',' until the final iteration
>
> But it is not a big deal. This thread is about the translation part,
> so whatever way makes the most sense for translators is fine with me.
>
This thread has been inactive for about 5 weeks. AFAIK, everybody was
happy with the patch, and we were only debating if the translated
format string should have a leading comma or a trailing comma. Either
way is OK with me -- whatever way you think makes the most sense to a
translator.
What can I do to help the patch proceed to get pushed?
======
Kind Regards,
Peter Smith.
Fujitsu Australia
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Redundant/mis-use of _(x) gettext macro?
In-Reply-To: <CAHut+Pu21kz0P4gGvp=NfyBxso58q-=on3Y74owsxsiv8gNNNg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox