Tom Lane a ├ęcrit :
> I proposed here:
> that we change the way that psql deals with localization of column
> names and other fixed strings in the output of \d and related commands
> (basically, anything that calls printQuery()).  Specifically, we should
> avoid shipping already-translated strings to the server, because they
> might not be in the expected encoding and also might contain quote
> marks, which the existing code doesn't guard against.  We can instead
> apply the gettext() conversion when the query results come back from
> the server.
> The attached patch does this, and seems to resolve Guillaume Lelarge's
> original complaint.

It does resolve it. I applied your patch on my CVS HEAD checkout and it
works just great.

> I found just one place where the proposed new method doesn't work quite
> as nicely as the old.  In \dC (describe casts), the Function column
> contains either a function name or '(binary compatible)' to indicate
> a cast WITHOUT FUNCTION.  The existing code is able to localize '(binary
> compatible)', but this patch does not, because applying gettext to every
> value in the column seems to pose an unacceptably high risk of
> "translating" some function name that happens to match a string in
> psql's .PO database.
> I'm inclined to just live with that, since it seems a relatively minor
> deficiency, but I wonder if anyone has a better idea how to do it?

I have no problem with this. Other strings are not available for
translation (for example RECORD # when using the \x command) and that's
not really a big deal.




---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to