Re: add more NLS to bin

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: add more NLS to bin
Дата
Msg-id 4bec41c2-4d7b-677e-6f13-ac54d2fdfb1f@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: add more NLS to bin  (Michael Paquier <michael.paquier@gmail.com>)
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Remove the comment on the countereffectiveness of large shared_buffers on Windows
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Streaming basebackups vs pg_stat_tmp