macro concatenation fools gettext

Started by Daniele Varrazzoover 8 years ago3 messagesbugs
Jump to latest
#1Daniele Varrazzo
daniele.varrazzo@gmail.com

The macro concatenation [1]https://github.com/postgres/postgres/blob/21d304df/src/bin/pg_rewind/libpq_fetch.c#L345:

pg_log(PG_DEBUG, "received chunk for file \"%s\", offset "
INT64_FORMAT ", size %d\n",

fools gettext which produces only [2]https://github.com/postgres/postgres/blob/21d304df/src/bin/pg_rewind/po/fr.po#L334:

msgid "received chunk for file \"%s\", offset "

the part after the macro is lost and I'm not sure if it will "work" by
returning an half-translated sentence, or not work at all and return
an English sentence, or return only the first part of the sentence, or
explode...

[1]: https://github.com/postgres/postgres/blob/21d304df/src/bin/pg_rewind/libpq_fetch.c#L345
[2]: https://github.com/postgres/postgres/blob/21d304df/src/bin/pg_rewind/po/fr.po#L334

-- Daniele

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

#2Michael Paquier
michael@paquier.xyz
In reply to: Daniele Varrazzo (#1)
Re: macro concatenation fools gettext

On Thu, Aug 31, 2017 at 9:41 AM, Daniele Varrazzo
<daniele.varrazzo@gmail.com> wrote:

the part after the macro is lost and I'm not sure if it will "work" by
returning an half-translated sentence, or not work at all and return
an English sentence, or return only the first part of the sentence, or
explode...

[1] https://github.com/postgres/postgres/blob/21d304df/src/bin/pg_rewind/libpq_fetch.c#L345
[2] https://github.com/postgres/postgres/blob/21d304df/src/bin/pg_rewind/po/fr.po#L334

This has been already reported a couple of days ago. I have produced a
patch here:
/messages/by-id/CAB7nPqSSq2_e4DjyR4sKgOoNGxewueF82np4EPHG8cF1tt4yLw@mail.gmail.com
--
Michael

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

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Michael Paquier (#2)
Re: macro concatenation fools gettext

Michael Paquier <michael.paquier@gmail.com> writes:

On Thu, Aug 31, 2017 at 9:41 AM, Daniele Varrazzo
<daniele.varrazzo@gmail.com> wrote:

the part after the macro is lost and I'm not sure if it will "work" by
returning an half-translated sentence, or not work at all and return
an English sentence, or return only the first part of the sentence, or
explode...

This has been already reported a couple of days ago. I have produced a
patch here:

Yeah, but this is just fixing the one occurrence. It'd be nice if we
could have some guarantee that the same thing hasn't been done elsewhere.
No idea whether gettext itself could be taught to complain.

regards, tom lane

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