Re: A couple of gripes about the gettext plurals patch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: A couple of gripes about the gettext plurals patch
Date
Msg-id 6442.1243278167@sss.pgh.pa.us
Whole thread Raw
In response to Re: A couple of gripes about the gettext plurals patch  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: A couple of gripes about the gettext plurals patch  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> On Sunday 26 April 2009 21:29:20 Tom Lane wrote:
>> This is bogus: errmsg expects that it should itself feed its first
>> argument through gettext(), not receive an argument that is already
>> translated.  That's at the least a waste of cycles, and it's not
>> entirely impossible that double translation could end up with a just
>> plain wrong result.

> I think we can live with this for now, and we have lived with this sort of 
> issue in other places for a while.  We should consider reshuffling the 
> interfaces a bit as you describe to reduce the problem.

The issue of double translation is really a minor point; what is
bothering me is that we've got such an ad-hoc,
non-compile-time-checkable approach here.  Zdenek's discovery
today that some of the format strings are flat-out wrong
http://archives.postgresql.org/pgsql-hackers/2009-05/msg00946.php
surprises me not in the least.

I think that we need to have a more carefully designed interface
before we allow any more plural translations to be put in place,
not after.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Joshua Tolley
Date:
Subject: Re: generic options for explain
Next
From: Tom Lane
Date:
Subject: Re: No sanity checking performed on binary TIME parameters.