From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [WIP] plpgsql is not translate-aware |
Date: | 2008-10-09 13:52:40 |
Message-ID: | 48EE0CA8.4000301@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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);
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Sullivan | 2008-10-09 14:01:34 | Re: Updates of SE-PostgreSQL 8.4devel patches |
Previous Message | Jim Cox | 2008-10-09 13:37:37 | TODO item: adding VERBOSE option to CLUSTER |