Re: A couple of gripes about the gettext plurals patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: A couple of gripes about the gettext plurals patch
Date: 2009-05-25 19:02:47
Message-ID: 6442.1243278167@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-05-25 19:41:10 Re: No sanity checking performed on binary TIME parameters.
Previous Message Tom Lane 2009-05-25 18:41:17 Re: BUG #4822: xmlattributes encodes '&' twice