summaryrefslogtreecommitdiff
path: root/src/bin/psql/large_obj.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2001-06-02 18:25:18 +0000
committerPeter Eisentraut <peter_e@gmx.net>2001-06-02 18:25:18 +0000
commite54203646176167271dc50a7b8f7bbe0d3ea6e75 (patch)
tree06e6275b18f1d14afeda777f12f31a75d3c8b527 /src/bin/psql/large_obj.c
parent58193c5f37838b49043925437e3c99711ca66407 (diff)
Native Language Support (NLS)
Use --enable-nls to turn it on; see installation instructions for details. See developer's guide how to make use of it in programs and how to add translations. psql sources have been almost fully prepared and an incomplete German translation has been provided. In the backend, only elog() calls are currently translatable, and the provided German translation file is more of a placeholder.
Diffstat (limited to 'src/bin/psql/large_obj.c')
-rw-r--r--src/bin/psql/large_obj.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/src/bin/psql/large_obj.c b/src/bin/psql/large_obj.c
index 03004ef8d70..fe6a9cc4ec1 100644
--- a/src/bin/psql/large_obj.c
+++ b/src/bin/psql/large_obj.c
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/large_obj.c,v 1.14 2001/03/22 04:00:20 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/large_obj.c,v 1.15 2001/06/02 18:25:18 petere Exp $
*/
#include "postgres_fe.h"
#include "large_obj.h"
@@ -63,9 +63,9 @@ handle_transaction(void)
else if (!QUIET())
{
if (commit)
- puts("Warning: Your transaction in progress has been committed.");
+ puts(gettext("Warning: Your transaction in progress has been committed."));
else
- puts("Warning: Your transaction in progress has been rolled back.");
+ puts(gettext("Warning: Your transaction in progress has been rolled back."));
}
PQsetNoticeProcessor(pset.db, old_notice_hook, NULL);
@@ -92,9 +92,7 @@ do_lo_export(const char *loid_arg, const char *filename_arg)
if (!pset.db)
{
- if (!pset.cur_cmd_interactive)
- fprintf(stderr, "%s: ", pset.progname);
- fputs("\\lo_export: not connected to a database\n", stderr);
+ psql_error("\\lo_export: not connected to a database\n");
return false;
}
@@ -161,9 +159,7 @@ do_lo_import(const char *filename_arg, const char *comment_arg)
if (!pset.db)
{
- if (!pset.cur_cmd_interactive)
- fprintf(stderr, "%s: ", pset.progname);
- fputs("\\lo_import: not connected to a database\n", stderr);
+ psql_error("\\lo_import: not connected to a database\n");
return false;
}
@@ -254,9 +250,7 @@ do_lo_unlink(const char *loid_arg)
if (!pset.db)
{
- if (!pset.cur_cmd_interactive)
- fprintf(stderr, "%s: ", pset.progname);
- fputs("\\lo_unlink: not connected to a database\n", stderr);
+ psql_error("\\lo_unlink: not connected to a database\n");
return false;
}
@@ -327,10 +321,11 @@ do_lo_list(void)
char buf[1024];
printQueryOpt myopt = pset.popt;
- strcpy(buf,
- "SELECT loid as \"ID\", obj_description(loid) as \"Description\"\n"
- "FROM (SELECT DISTINCT loid FROM pg_largeobject) x\n"
- "ORDER BY \"ID\"");
+ snprintf(buf, sizeof(buf),
+ "SELECT loid as \"ID\", obj_description(loid) as \"%s\"\n"
+ "FROM (SELECT DISTINCT loid FROM pg_largeobject) x\n"
+ "ORDER BY \"ID\"",
+ gettext("Description"));
res = PSQLexec(buf);
if (!res)
@@ -338,7 +333,7 @@ do_lo_list(void)
myopt.topt.tuples_only = false;
myopt.nullPrint = NULL;
- myopt.title = "Large objects";
+ myopt.title = gettext("Large objects");
printQuery(res, &myopt, pset.queryFout);