Re: Redundant/mis-use of _(x) gettext macro?

Chao Li <li.evan.chao@gmail.com>

From: Chao Li <li.evan.chao@gmail.com>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Peter Smith <smithpb2250@gmail.com>
Date: 2026-04-02T03:11:04Z
Lists: pgsql-hackers

> On Apr 2, 2026, at 10:55, Peter Smith <smithpb2250@gmail.com> wrote:
> 
> On Wed, Apr 1, 2026 at 10:52 PM Álvaro Herrera <alvherre@kurilemu.de> wrote:
>> 
>> On 2026-Apr-01, Peter Smith wrote:
>> 
>>> Hi.
>>> 
>>> As originally reported [1] in the EXCEPT (TABLE ...) thread, I felt
>>> the _() gettext macro is mis-used when it contains nothing but a
>>> quoted format string.
>> 
>> No, you feel wrong -- this is necessary so that the translator has
>> control over the quoting style of a list of items.  Not all translations
>> use double quoting.  Some examples from different language files:
>> 
>> msgstr "unbekannte Komprimierungsoption: »%s«"
>> msgstr "opción de compresión no reconocida: «%s»"
>> msgstr "option de compression inconnue : « %s »"
>> msgstr "tidak dapat menentukan encoding untuk lokal « %s » : codesetnya adalah « %s »"
>> 
> 
> OK. Thanks for your explanation.
> 

Yep, good to learn. Noted.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/







Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix translatable string construction in psql

  2. Fix translatable string construction