Re: Get rid of translation strings that only contain punctuation

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>
Subject: Re: Get rid of translation strings that only contain punctuation
Date: 2026-04-23 09:38:27
Message-ID: aenmpCqhKzTDOsxO@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2026-Apr-22, David Rowley wrote:

> We've got a few parts of the code that translate strings that contain
> only a single punctuation character. I'm not a translator, but I
> suspect that these would be tricky to deal with as such short strings
> could be used for various different things, and if the required
> translation was to differ between requirements, then you're out of
> luck.

Yeah.

> I looked at: git grep -A 1 "msgid \", \"" and I see French is the only
> translation to do anything different with the ", " string, and only in
> psql.

Japanese also uses different punctuation characters, so I don't think we
should get rid of translating these characters.

Instead we should do what Tom says and integrate these characters into a
larger string. I showed one example in a nearby thread from Peter Smith
[1], and I think a couple of the spots you're patching can be easily
done in the same way.

As for the one in guc.c, I think what we should do is change
config_enum_get_options() to have an API similar to GetPublicationsStr:
instead of receiving prefix, suffix and separator, we should tell that
function that we're constructing a list to be used in as an SQL value
(GetConfigOptionValues), or one to be displayed to the user
(parse_and_validate_value); and have the function add the separators and
other decoration as needed, using the same technique. (The other prefix
"Available values: " can be added by the caller, I think, and maybe the
braces also, not sure.)

[1] https://postgr.es/m/aeniYoOwCQmtWtQW@alvherre.pgsql

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Yura Sokolov 2026-04-23 09:52:10 Re: PoC: Add condition variable support to WaitEventSetWait()
Previous Message Ashutosh Bapat 2026-04-23 09:29:49 Re: [Patch] Block ALTER TABLE RENAME COLUMN when column is used by property graph