pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nikolay Shaplov <dhyan@nataraj.su>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Nikita Glukhov <n.gluhov@postgrespro.ru>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH][PROPOSAL] Add enum releation option type
Date: Thu, 01 Nov 2018 18:26:20 +0300
Message-ID: <1772537.zFQtMGATT1@x200m> (raw)
In-Reply-To: <8871.1541085014@sss.pgh.pa.us>
References: <20180301174735.yyu6i5y66u3xp3jc@alvherre.pgsql>
	<CA+Tgmoa9axjx4WkiFp+70E5rSsAwHE377O73jMZXCw1MRj3gNg@mail.gmail.com>
	<8871.1541085014@sss.pgh.pa.us>

В письме от 1 ноября 2018 11:10:14 пользователь Tom Lane написал:

> >>> I see you lost the Oxford comma:
> >>> 
> >>> -DETAIL:  Valid values are "on", "off", and "auto".
> >>> +DETAIL:  Valid values are "auto", "on" and "off".
> >>> 
> >>> Please put these back.
> >> 
> >> Actually that's me who have lost it. The code with  oxford comma would be
> >> a
> >> bit more complicated. We should put such coma when we have 3+ items and
> >> do not put it when we have 2.
> >> 
> >> Does it worth it?
> > 
> > In my opinion, it is worth it.
> 
> Uh ... I've not been paying attention to this thread, but this exchange
> seems to be about somebody constructing a message like that piece-by-piece
> in code.  This has got to be a complete failure from the translatability
> standpoint.  See
> 
> https://www.postgresql.org/docs/devel/static/nls-programmer.html#NLS-GUIDELI
> NES

It's a very good reason...

In this case the only solution I can see is 

DETAIL:  Valid values are: "value1", "value2", "value3".

Where list '"value1", "value2", "value3"' is built in runtime but have no any 
bindnings to any specific language. And the rest of the message is
'DETAIL:  Valid values are: %s' which can be properly translated.


-- 
Do code for fun.

Attachments:

  [application/pgp-signature] signature.asc (472B, ../1772537.zFQtMGATT1@x200m/2-signature.asc)
  download

view thread (40+ messages)  latest in thread

Message-ID: <1772537.zFQtMGATT1@x200m>
Permalink:  ../1772537.zFQtMGATT1@x200m/
Also on:    postgresql.org/message-id/1772537.zFQtMGATT1@x200m

 · 

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: pgsql-hackers@postgresql.org
  Cc: dhyan@nataraj.su, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, pgsql-hackers@lists.postgresql.org, alvherre@alvh.no-ip.org, n.gluhov@postgrespro.ru
  Subject: Re: [PATCH][PROPOSAL] Add enum releation option type
  In-Reply-To: <1772537.zFQtMGATT1@x200m>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox