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

Lists: pgsql-committers
From: dennis(at)svr1(dot)postgresql(dot)org (Dennis Bjorklund)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql-server: Added a call to gettext() to fix broken translated error
Date: 2004-09-09 06:56:48
Message-ID: 20040909065648.F12A5329EB4@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

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)


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: dennis(at)svr1(dot)postgresql(dot)org (Dennis Bjorklund)
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql-server: Added a call to gettext() to fix broken translated error
Date: 2004-09-09 07:42:39
Message-ID: 2791.1094715759@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

dennis(at)svr1(dot)postgresql(dot)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


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dennis Björklund <db(at)zigo(dot)dhs(dot)org>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql-server: Added a call to gettext() to fix broken translated error
Date: 2004-09-10 14:51:56
Message-ID: 200409101651.56394.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

Tom Lane wrote:
> dennis(at)svr1(dot)postgresql(dot)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/


From: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql-server: Added a call to gettext() to fix
Date: 2004-09-10 15:44:47
Message-ID: Pine.LNX.4.44.0409101720110.9559-100000@zigo.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

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