pgsql-server: Added a call to gettext() to fix broken translated error

Started by Nonamealmost 22 years ago4 messagescomitters
Jump to latest
#1Noname
dennis@svr1.postgresql.org

Log Message:
-----------
Added a call to gettext() to fix broken translated error messages.

Modified Files:
--------------
pgsql-server/src/backend/parser:
scan.l (r1.117 -> r1.118)
(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/parser/scan.l.diff?r1=1.117&r2=1.118)

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Noname (#1)
Re: pgsql-server: Added a call to gettext() to fix broken translated error

dennis@svr1.postgresql.org (Dennis Bjorklund) writes:

Log Message:
-----------
Added a call to gettext() to fix broken translated error messages.

This seems wrong to me. Why isn't the argument to yyerror already
translated? Certainly the gettext infrastructure will not be able
to extract any new translatable strings from what you did.

regards, tom lane

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Tom Lane (#2)
Re: pgsql-server: Added a call to gettext() to fix broken translated error

Tom Lane wrote:

dennis@svr1.postgresql.org (Dennis Bjorklund) writes:

Log Message:
-----------
Added a call to gettext() to fix broken translated error messages.

This seems wrong to me. Why isn't the argument to yyerror already
translated? Certainly the gettext infrastructure will not be able
to extract any new translatable strings from what you did.

The yyerror strings are pasted together by bison in the worst possible
fashion. But I doubt this patch fixes that.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#4Dennis Bjorklund
db@zigo.dhs.org
In reply to: Peter Eisentraut (#3)
Re: pgsql-server: Added a call to gettext() to fix

On Fri, 10 Sep 2004, Peter Eisentraut wrote:

The yyerror strings are pasted together by bison in the worst possible
fashion. But I doubt this patch fixes that.

True, if that happens in the bison-generated code then we either have to
live with it or fix bison. Now we at least get the whole strings used by
bison translated, and the other strings (if any) will not hurt at all.

This is the best we can do until bison learns about gettext and the end
result is not bad at all.

--
/Dennis Bj�rklund