Re: [WIP] plpgsql is not translate-aware
От | Peter Eisentraut |
---|---|
Тема | Re: [WIP] plpgsql is not translate-aware |
Дата | |
Msg-id | 48EE0CA8.4000301@gmx.net обсуждение исходный текст |
Ответ на | Re: [WIP] plpgsql is not translate-aware (Alvaro Herrera <alvherre@commandprompt.com>) |
Ответы |
Re: [WIP] plpgsql is not translate-aware
|
Список | 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);
В списке pgsql-hackers по дате отправления: