aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/ecpglib/misc.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2009-01-15 11:52:55 +0000
committerPeter Eisentraut <peter_e@gmx.net>2009-01-15 11:52:55 +0000
commitcb05ab81a857582161dd74cbfa91d4468e496cd1 (patch)
treed9808e4df13a70e2cb6f68fd09a059fa54170a7d /src/interfaces/ecpg/ecpglib/misc.c
parentcbb1358b18c88216a56de8847428d1bbcc51f280 (diff)
downloadpostgresql-cb05ab81a857582161dd74cbfa91d4468e496cd1.tar.gz
postgresql-cb05ab81a857582161dd74cbfa91d4468e496cd1.zip
NLS cleanup in ecpglib
Replace leftover instances of _() by ecpg_gettext(), the latter being the correct way to refer to the library's message catalog, instead of the one of the program using the library. Drop NLS support for ecpg_log(), which is a debugging instrument similar to elog() in the backend. We cannot support NLS in the ecpg compatlib, because that requires ecpg_gettext, which is in ecpglib, which is not a dependency of compatlib. It doesn't seem worthwhile to worry about this, since the only translatable string is "out of memory", and gettext probably won't be able to do much without memory either. Adjust messages to project style.
Diffstat (limited to 'src/interfaces/ecpg/ecpglib/misc.c')
-rw-r--r--src/interfaces/ecpg/ecpglib/misc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c
index 242ab0a7d65..47c343f7d42 100644
--- a/src/interfaces/ecpg/ecpglib/misc.c
+++ b/src/interfaces/ecpg/ecpglib/misc.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.47 2009/01/02 13:26:54 petere Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.48 2009/01/15 11:52:55 petere Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
@@ -110,7 +110,7 @@ ecpg_init(const struct connection * con, const char *connection_name, const int
if (con == NULL)
{
ecpg_raise(lineno, ECPG_NO_CONN, ECPG_SQLSTATE_CONNECTION_DOES_NOT_EXIST,
- connection_name ? connection_name : _("NULL"));
+ connection_name ? connection_name : ecpg_gettext("NULL"));
return (false);
}
@@ -179,7 +179,7 @@ ECPGtrans(int lineno, const char *connection_name, const char *transaction)
if (!ecpg_init(con, connection_name, lineno))
return (false);
- ecpg_log("ECPGtrans on line %d: action \"%s\"; connection \"%s\"\n", lineno, transaction, con ? con->name : _("null"));
+ ecpg_log("ECPGtrans on line %d: action \"%s\"; connection \"%s\"\n", lineno, transaction, con ? con->name : "null");
/* if we have no connection we just simulate the command */
if (con && con->connection)