Re: A couple of gripes about the gettext plurals patch
| От | Peter Eisentraut |
|---|---|
| Тема | Re: A couple of gripes about the gettext plurals patch |
| Дата | |
| Msg-id | 200905210246.26376.peter_e@gmx.net обсуждение исходный текст |
| Ответ на | A couple of gripes about the gettext plurals patch (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: A couple of gripes about the gettext plurals patch
|
| Список | pgsql-hackers |
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.
В списке pgsql-hackers по дате отправления: