From 2532c54d82b4925fd882a2bf119a7cc01b804d48 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Thu, 9 Oct 2008 17:24:05 +0000 Subject: Improve translatability of error messages for external modules by tweaking the ereport macro. Included in this commit are enough files for starting plpgsql, plpython, plperl and pltcl translations. --- src/pl/plpython/plpython.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/pl/plpython/plpython.c') diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c index c4d6803fcf4..ae17289cd26 100644 --- a/src/pl/plpython/plpython.c +++ b/src/pl/plpython/plpython.c @@ -1,7 +1,7 @@ /********************************************************************** * plpython.c - python as a procedural language for PostgreSQL * - * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.112 2008/07/18 03:32:53 tgl Exp $ + * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.113 2008/10/09 17:24:05 alvherre Exp $ * ********************************************************************* */ @@ -63,6 +63,10 @@ typedef int Py_ssize_t; #include "utils/syscache.h" #include "utils/typcache.h" +/* define our text domain for translations */ +#undef TEXTDOMAIN +#define TEXTDOMAIN "plpython" + #include #include @@ -2745,6 +2749,8 @@ _PG_init(void) if (inited) return; + set_text_domain(TEXTDOMAIN); + Py_Initialize(); PLy_init_interp(); PLy_init_plpy(); -- cgit v1.2.3