From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: add more NLS to bin |
Date: | 2016-11-07 13:57:43 |
Message-ID: | 4bec41c2-4d7b-677e-6f13-ac54d2fdfb1f@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-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
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2016-11-07 14:07:28 | Re: Streaming basebackups vs pg_stat_tmp |
Previous Message | Amit Kapila | 2016-11-07 13:55:04 | Re: Remove the comment on the countereffectiveness of large shared_buffers on Windows |