Re: Internationalized error messages - Mailing list pgsql-hackers

From ncm@zembu.com (Nathan Myers)
Subject Re: Internationalized error messages
Date
Msg-id 20010309114920.D624@store.zembu.com
Whole thread Raw
In response to Re: Internationalized error messages  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Mar 09, 2001 at 12:05:22PM -0500, Tom Lane wrote:
> > Gettext takes care of this.  In the source you'd write
> 
> > elog(ERROR, "2200G", gettext("type mismatch in CASE expression (%s vs %s)"),
> >             string, string);
> 
> Duh.  For some reason I was envisioning the localization substitution as
> occurring on the client side, but of course we'd want to do it on the
> server side, and before parameters are substituted into the message.
> Sorry for the noise.
> 
> I am not sure we can/should use gettext (possible license problems?),
> but certainly something like this could be cooked up.

I've been assuming that PG's needs are specialized enough that the
project wouldn't use gettext directly, but instead something inspired 
by it.  

If you look at my last posting on the subject, by the way, you will see 
that it could work without a catalog underneath; integrating a catalog 
would just require changes in a header file (and the programs to generate 
the catalog, of course).  That quality seems to me essential to allow the 
changeover to be phased in gradually, and to allow different underlying 
catalog implementations to be tried out.

Nathan
ncm


pgsql-hackers by date:

Previous
From: Andrew Evans
Date:
Subject: Re: Internationalized error messages
Next
From: Mark Bixby
Date:
Subject: Re: porting question: funky uid names?