Alvaro Herrera wrote:
Alvaro Herrera wrote:
Tom Lane wrote:
No, you could have TEXTDOMAIN be defined as NULL by default, and let
modules redefine it as "foo".
Doh, right.
So this'd seem to be the version ready to be applied (plus the needed
nls.mk files).
Perhaps repeated code like the following should be refactored to a
common function offered by the backend?
> diff -c -p -r1.40 pl_handler.c
*** src/pl/plpgsql/src/pl_handler.c 29 Aug 2008 13:02:33 -0000 1.40
--- src/pl/plpgsql/src/pl_handler.c 9 Oct 2008 00:51:22 -0000
*************** _PG_init(void)
*** 42,47 ****
--- 42,57 ----
if (inited)
return;
+ #ifdef ENABLE_NLS
+ if (my_exec_path[0] != '\0')
+ {
+ char locale_path[MAXPGPATH];
+
+ get_locale_path(my_exec_path, locale_path);
+ bindtextdomain(TEXTDOMAIN, locale_path);
+ }
+ #endif
+
plpgsql_HashTableInit();
RegisterXactCallback(plpgsql_xact_cb, NULL);
RegisterSubXactCallback(plpgsql_subxact_cb, NULL);
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers