Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gIErl-00087J-Kl for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Nov 2018 15:26:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gIErj-00073K-Le for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Nov 2018 15:26:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gIErj-00071W-DQ for pgsql-hackers@lists.postgresql.org; Thu, 01 Nov 2018 15:26:35 +0000 Received: from ssl.nataraj.su ([195.54.209.170]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gIErg-0002rO-RN for pgsql-hackers@postgresql.org; Thu, 01 Nov 2018 15:26:35 +0000 Received: from x200m.localnet (unknown [91.108.35.130]) by ssl.nataraj.su (Postfix) with ESMTPSA id 264C7511E15B; Thu, 1 Nov 2018 18:26:31 +0300 (MSK) From: Nikolay Shaplov To: Tom Lane Cc: Robert Haas , PostgreSQL Hackers , Alvaro Herrera , Nikita Glukhov , "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> User-Agent: KMail/4.14.1 (Linux/3.16.0-4-amd64; KDE/4.14.2; x86_64; ; ) In-Reply-To: <8871.1541085014@sss.pgh.pa.us> References: <20180301174735.yyu6i5y66u3xp3jc@alvherre.pgsql> <8871.1541085014@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3077153.6Xf7R9ZcL6"; micalg="pgp-sha256"; protocol="application/pgp-signature" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --nextPart3077153.6Xf7R9ZcL6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" =D0=92 =D0=BF=D0=B8=D1=81=D1=8C=D0=BC=D0=B5 =D0=BE=D1=82 1 =D0=BD=D0=BE= =D1=8F=D0=B1=D1=80=D1=8F 2018 11:10:14 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0= =BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Tom Lane =D0=BD=D0=B0=D0=BF=D0=B8= =D1=81=D0=B0=D0=BB: > >>> I see you lost the Oxford comma: > >>>=20 > >>> -DETAIL: Valid values are "on", "off", and "auto". > >>> +DETAIL: Valid values are "auto", "on" and "off". > >>>=20 > >>> Please put these back. > >>=20 > >> Actually that's me who have lost it. The code with oxford comma w= ould be > >> a > >> bit more complicated. We should put such coma when we have 3+ item= s and > >> do not put it when we have 2. > >>=20 > >> Does it worth it? > >=20 > > In my opinion, it is worth it. >=20 > Uh ... I've not been paying attention to this thread, but this exchan= ge > 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 translatabil= ity > standpoint. See >=20 > 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=20 DETAIL: Valid values are: "value1", "value2", "value3". Where list '"value1", "value2", "value3"' is built in runtime but have = no any=20 bindnings to any specific language. And the rest of the message is 'DETAIL: Valid values are: %s' which can be properly translated. =2D-=20 Do code for fun. --nextPart3077153.6Xf7R9ZcL6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJb2xsdAAoJEKc13HowK+H4nzkH/RPTSbqcRcWpZbqJRA365K4A PXTVYiSb8H+ZJ7Q3AjqQfhHaYNev4bGXXd6SS6jmLINxK/LhB9xLnuoaYChNBuJa SVm+u752RmOWa4QgjftwpdRBb5Hp8nNAMtYcdPlZ4peQj6dLYVAGOcuXzsqG2sJx OhHNwaoNanmtfP2/JgWyf5ChDPX6JwIgMYevhQBO+De4tiJOVYZClQ/0rTRWnrYG 6uxOWk5YdHff5aiMyFcvHqu9PW20X1CyYsSwMZS1jbC1M1PKtBvifMDef7xCvUKN FFM8YKCT+Xv+epdsk4bSZCYi0qdUTOdLdKk7qM96fVt7tuyuKytji7TSwnSv+rA= =CTgs -----END PGP SIGNATURE----- --nextPart3077153.6Xf7R9ZcL6--