pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: add more NLS to bin
Date: Mon, 7 Nov 2016 08:57:43 -0500
Message-ID: <4bec41c2-4d7b-677e-6f13-ac54d2fdfb1f@2ndquadrant.com> (raw)
In-Reply-To: <CAB7nPqQtQ8VVnjXGSFdtckcLfwFChnYYfXDkaQLJ_2d7tDTBSQ@mail.gmail.com>
References: <bd794aca-572a-ac22-293c-3ea548881b76@2ndquadrant.com>
	<CAB7nPqQTCkVhmf2u5Tu65To_MidUJhD_+WfNe31jueuH74vH_w@mail.gmail.com>
	<cfb0f746-ee20-226d-ff7c-a1e1b8d13445@2ndquadrant.com>
	<CAB7nPqRptETxcaGqj4MEe0Lr==5OgpaCDckeCX2-PH3b8ZRLLA@mail.gmail.com>
	<e5b5970a-611e-41a2-9365-235ca6bf7025@2ndquadrant.com>
	<CAB7nPqQtQ8VVnjXGSFdtckcLfwFChnYYfXDkaQLJ_2d7tDTBSQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 11/5/16 8:03 AM, Michael Paquier wrote:
>> > Yeah that was wrong anyway.  The previously existing translation markers
>> > were wrong.  We want to translate the fmt, not the formatted message.
> Does using one way or the other actually change something? Because
> pg_rewind/logging.c is not marking fmt but the message, the opposite
> of your v2 patch. One way or the other, having consistency for both
> would be nice.

Consider the following for example:

    pg_log(PG_DEBUG, "fetched file \"%s\", length %d\n", filename, len);

If you pass fmt to gettext(), then it will look up the string that you
see in the code.  If you pass the formatted message to gettext(), then
it will look up something like

    "fetched file \"foo\", length 12\n"

which it will not find, unless you provide translations for all
combinations of file names and lengths.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (12+ messages)  latest in thread

Message-ID: <4bec41c2-4d7b-677e-6f13-ac54d2fdfb1f@2ndquadrant.com>
Permalink:  ../4bec41c2-4d7b-677e-6f13-ac54d2fdfb1f@2ndquadrant.com/
Also on:    postgresql.org/message-id/4bec41c2-4d7b-677e-6f13-ac54d2fdfb1f@2ndquadrant.com

 · 

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: peter.eisentraut@2ndquadrant.com, michael.paquier@gmail.com
  Subject: Re: add more NLS to bin
  In-Reply-To: <4bec41c2-4d7b-677e-6f13-ac54d2fdfb1f@2ndquadrant.com>

* 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