On Sunday 26 April 2009 21:29:20 Tom Lane wrote: > ereport(msglevel, > /* translator: %d always has a value larger than 1 */ > (errmsg(ngettext("drop cascades to %d other object", > "drop cascades to %d other objects", > numReportedClient + numNotReportedClient), > numReportedClient + numNotReportedClient), > > 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. But I think this is not something we always avoid completely. > I'm also wondering whether PGAC_CHECK_GETTEXT() should be made to > check for ngettext() instead of bind_textdomain_codeset(). Which > one was added later? I checked this in the gettext changelog, and bind_textdomain_code() came (slightly) later, so we're OK. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers