public inbox for [email protected]  
help / color / mirror / Atom feed
From: Álvaro Herrera <[email protected]>
To: David Rowley <[email protected]>
Cc: PostgreSQL Developers <[email protected]>
Cc: Amit Kapila <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Subject: Re: Get rid of translation strings that only contain punctuation
Date: Thu, 23 Apr 2026 11:38:27 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAApHDvoFSu5zLFvx96aZ5wvL7tcB9aR2hBPCaMPs8D_f0Z7eSw@mail.gmail.com>

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/[email protected]

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





view thread (9+ messages)

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], [email protected], [email protected]
  Subject: Re: Get rid of translation strings that only contain punctuation
  In-Reply-To: <[email protected]>

* 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