diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2008-10-09 17:24:05 +0000 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2008-10-09 17:24:05 +0000 |
commit | 2532c54d82b4925fd882a2bf119a7cc01b804d48 (patch) | |
tree | ad5f209495866b53baf85d3c388462434fa471e1 /src/pl/plpython/plpython.c | |
parent | b15531033e8bcff1e0a436d6bd18b5a09e477a20 (diff) | |
download | postgresql-2532c54d82b4925fd882a2bf119a7cc01b804d48.tar.gz postgresql-2532c54d82b4925fd882a2bf119a7cc01b804d48.zip |
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.
Diffstat (limited to 'src/pl/plpython/plpython.c')
-rw-r--r-- | src/pl/plpython/plpython.c | 8 |
1 files changed, 7 insertions, 1 deletions
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 <compile.h> #include <eval.h> @@ -2745,6 +2749,8 @@ _PG_init(void) if (inited) return; + set_text_domain(TEXTDOMAIN); + Py_Initialize(); PLy_init_interp(); PLy_init_plpy(); |