Re: Redundant/mis-use of _(x) gettext macro? - Mailing list pgsql-hackers

From David Rowley
Subject Re: Redundant/mis-use of _(x) gettext macro?
Date
Msg-id CAApHDvrMyX4dVfQa11shF8rQxC9EjAQJ0D77gP6LG+ptXnBHFg@mail.gmail.com
Whole thread
In response to Re: Redundant/mis-use of _(x) gettext macro?  (Álvaro Herrera <alvherre@kurilemu.de>)
List pgsql-hackers
On Sat, 25 Apr 2026 at 00:14, Álvaro Herrera <alvherre@kurilemu.de> 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.

Wouldn't it be simpler to put the comma on the other end of the name
and use that if (foreach_current_index(lc) > 0) ?

Or was this to reuse a translation and you didn't want to swap
"\"%s\", " for , "\"%s\" ?

David



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Property graph: fix error handling when dropping non-existent label property
Next
From: Fujii Masao
Date:
Subject: Re: [PATCH] Don't call ereport(ERROR) from recovery target GUC assign hooks