1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

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.
This commit is contained in:
Peter Eisentraut
2001-06-02 18:25:18 +00:00
parent 58193c5f37
commit e542036461
27 changed files with 13814 additions and 600 deletions

View File

@ -1,5 +1,5 @@
# -*-makefile-*-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.128 2001/05/25 14:28:58 momjian Exp $
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.129 2001/06/02 18:25:16 petere Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
@ -18,7 +18,7 @@
#
# Meta configuration
.PHONY: all install installdirs uninstall clean distclean maintainer-clean distprep check installcheck
.PHONY: all install installdirs uninstall clean distclean maintainer-clean distprep check installcheck maintainer-check
.SILENT: installdirs
# make `all' the default target
@ -100,6 +100,7 @@ endif
odbcinst_ini_dir = @odbcinst_ini_dir@
javadir := $(DESTDIR)$(datadir)/java
localedir := @localedir@
##########################################################################
@ -119,6 +120,7 @@ enable_odbc = @enable_odbc@
MULTIBYTE = @MULTIBYTE@
enable_shared = @enable_shared@
enable_rpath = @enable_rpath@
enable_nls = @enable_nls@
python_version = @python_version@
python_includedir = @python_includedir@
@ -186,10 +188,13 @@ X = @EXEEXT@
ANT = @ANT@
AWK = @AWK@
LN_S = @LN_S@
MSGFMT = @MSGFMT@
MSGMERGE = @MSGMERGE@
PERL = @PERL@
PYTHON = @PYTHON@
TAR = @TAR@
WISH = @WISH@
XGETTEXT = @XGETTEXT@
# Installation.
@ -214,6 +219,7 @@ SGMLSPL = @SGMLSPL@
# Feature settings
DEF_PGPORT = @default_port@
WANTED_LANGUAGES = @WANTED_LANGUAGES@
##########################################################################
@ -411,3 +417,16 @@ clean-deps:
@rm -rf $(DEPDIR) *.d
endif # autodepend
##########################################################################
#
# Native language support
ifeq ($(enable_nls), yes)
ifneq (,$(wildcard $(srcdir)/nls.mk))
include $(top_srcdir)/src/nls-global.mk
endif # nls.mk
endif # enable_nls

View File

@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.72 2001/05/24 15:53:32 momjian Exp $
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.73 2001/06/02 18:25:17 petere Exp $
#
#-------------------------------------------------------------------------
@ -34,6 +34,9 @@ endif
##########################################################################
all: postgres $(POSTGRES_IMP)
ifeq ($(enable_nls), yes)
$(MAKE) -C po all
endif
ifneq ($(PORTNAME), win)
@ -113,7 +116,9 @@ distprep:
$(MAKE) -C parser gram.c parse.h scan.c
$(MAKE) -C bootstrap bootparse.c bootstrap_tokens.h bootscanner.c
$(MAKE) -C utils/misc guc-file.c
ifeq ($(enable_nls), yes)
$(MAKE) -C po $@
endif
##########################################################################
@ -127,9 +132,15 @@ endif
$(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample $(DESTDIR)$(datadir)/pg_hba.conf.sample
$(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample $(DESTDIR)$(datadir)/pg_ident.conf.sample
$(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample $(DESTDIR)$(datadir)/postgresql.conf.sample
ifeq ($(enable_nls), yes)
$(MAKE) -C po $@
endif
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(datadir)
ifeq ($(enable_nls), yes)
$(MAKE) -C po $@
endif
install-bin: postgres $(POSTGRES_IMP) installdirs
$(INSTALL_PROGRAM) postgres$(X) $(DESTDIR)$(bindir)/postgres$(X)
@ -157,6 +168,9 @@ endif
rm -f $(DESTDIR)$(datadir)/pg_hba.conf.sample \
$(DESTDIR)$(datadir)/pg_ident.conf.sample \
$(DESTDIR)$(datadir)/postgresql.conf.sample
ifeq ($(enable_nls), yes)
$(MAKE) -C po $@
endif
##########################################################################
@ -171,6 +185,9 @@ ifeq ($(MAKE_DLL), true)
endif
endif
for i in $(DIRS); do $(MAKE) -C $$i clean || exit; done
ifeq ($(enable_nls), yes)
$(MAKE) -C po $@
endif
distclean: clean
rm -f port/Makefile port/tas.s port/dynloader.c
@ -183,6 +200,7 @@ maintainer-clean: distclean
$(srcdir)/parser/scan.c \
$(srcdir)/parser/parse.h \
$(srcdir)/utils/misc/guc-file.c
$(MAKE) -C po maintainer-clean
##########################################################################

View File

@ -13,7 +13,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.43 2001/04/21 18:29:29 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.44 2001/06/02 18:25:17 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -21,7 +21,7 @@
#include <pwd.h>
#include <unistd.h>
#ifdef USE_LOCALE
#if defined(USE_LOCALE) || defined(ENABLE_NLS)
#include <locale.h>
#endif
@ -97,6 +97,14 @@ main(int argc, char *argv[])
beos_startup(argc, argv);
#endif
#ifdef ENABLE_NLS
#ifdef LC_MESSAGES
setlocale(LC_MESSAGES, "");
#endif
bindtextdomain("postgres", LOCALEDIR);
textdomain("postgres");
#endif
/*
* Not-quite-so-platform-specific startup environment checks. Still
* best to minimize these.

12
src/backend/po/Makefile Normal file
View File

@ -0,0 +1,12 @@
# $Header: /cvsroot/pgsql/src/backend/po/Attic/Makefile,v 1.1 2001/06/02 18:25:17 petere Exp $
subdir = src/backend/po
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
gettext-files:
find $(srcdir)/.. -name '*.c' >$@
maintainer-clean:
rm -f gettext-files

11339
src/backend/po/de.po Normal file

File diff suppressed because it is too large Load Diff

4
src/backend/po/nls.mk Normal file
View File

@ -0,0 +1,4 @@
CATALOG_NAME := postgres
AVAIL_LANGUAGES := de
GETTEXT_FILES := + gettext-files
GETTEXT_TRIGGERS:= elog:2

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.84 2001/05/30 14:15:26 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.85 2001/06/02 18:25:17 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -207,6 +207,7 @@ elog(int lev, const char *fmt,...)
if (Log_pid)
timestamp_size += PID_SIZE;
fmt = gettext(fmt);
/*
* Set up the expanded format, consisting of the prefix string plus
* input format, with any %m replaced by strerror() string (since

View File

@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.54 2001/05/12 19:44:46 petere Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.55 2001/06/02 18:25:17 petere Exp $
*/
#include "postgres_fe.h"
#include "command.h"
@ -156,7 +156,7 @@ HandleSlashCmds(const char *line,
if (status == CMD_UNKNOWN)
{
if (pset.cur_cmd_interactive)
fprintf(stderr, "Invalid command \\%s. Try \\? for help.\n", my_line);
fprintf(stderr, gettext("Invalid command \\%s. Try \\? for help.\n"), my_line);
else
psql_error("invalid command \\%s\n", my_line);
status = CMD_ERROR;
@ -582,7 +582,7 @@ exec_command(const char *cmd,
if (query_buf && query_buf->len > 0)
puts(query_buf->data);
else if (!quiet)
puts("Query buffer is empty.");
puts(gettext("Query buffer is empty."));
fflush(stdout);
}
@ -613,7 +613,7 @@ exec_command(const char *cmd,
{
resetPQExpBuffer(query_buf);
if (!quiet)
puts("Query buffer reset (cleared).");
puts(gettext("Query buffer reset (cleared)."));
}
/* \s save history in a file or show it on the screen */
@ -624,7 +624,7 @@ exec_command(const char *cmd,
success = saveHistory(fname ? fname : "/dev/tty");
if (success && !quiet && fname)
printf("Wrote history to %s.\n", fname);
printf(gettext("Wrote history to %s.\n"), fname);
free(fname);
}
@ -1314,7 +1314,7 @@ do_connect(const char *new_dbname, const char *new_user)
PQfinish(pset.db);
if (oldconn)
{
fputs("Previous connection kept\n", stderr);
fputs(gettext("Previous connection kept\n"), stderr);
pset.db = oldconn;
}
else
@ -1339,12 +1339,12 @@ do_connect(const char *new_dbname, const char *new_user)
if (!QUIET())
{
if (userparam != new_user) /* no new user */
printf("You are now connected to database %s.\n", dbparam);
printf(gettext("You are now connected to database %s.\n"), dbparam);
else if (dbparam != new_dbname) /* no new db */
printf("You are now connected as new user %s.\n", new_user);
printf(gettext("You are now connected as new user %s.\n"), new_user);
else
/* both new */
printf("You are now connected to database %s as user %s.\n",
printf(gettext("You are now connected to database %s as user %s.\n"),
PQdb(pset.db), PQuser(pset.db));
}
@ -1672,7 +1672,7 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
}
if (!quiet)
printf("Output format is %s.\n", _align2string(popt->topt.format));
printf(gettext("Output format is %s.\n"), _align2string(popt->topt.format));
}
/* set border style/width */
@ -1682,7 +1682,7 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
popt->topt.border = atoi(value);
if (!quiet)
printf("Border style is %d.\n", popt->topt.border);
printf(gettext("Border style is %d.\n"), popt->topt.border);
}
/* set expanded/vertical mode */
@ -1690,7 +1690,9 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
{
popt->topt.expanded = !popt->topt.expanded;
if (!quiet)
printf("Expanded display is %s.\n", popt->topt.expanded ? "on" : "off");
printf(popt->topt.expanded
? gettext("Expanded display is on.\n")
: gettext("Expanded display is off.\n"));
}
/* null display */
@ -1702,7 +1704,7 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
popt->nullPrint = xstrdup(value);
}
if (!quiet)
printf("Null display is '%s'.\n", popt->nullPrint ? popt->nullPrint : "");
printf(gettext("Null display is '%s'.\n"), popt->nullPrint ? popt->nullPrint : "");
}
/* field separator for unaligned text */
@ -1714,7 +1716,7 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
popt->topt.fieldSep = xstrdup(value);
}
if (!quiet)
printf("Field separator is '%s'.\n", popt->topt.fieldSep);
printf(gettext("Field separator is '%s'.\n"), popt->topt.fieldSep);
}
/* record separator for unaligned text */
@ -1728,9 +1730,9 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
if (!quiet)
{
if (strcmp(popt->topt.recordSep, "\n") == 0)
printf("Record separator is <newline>.");
printf(gettext("Record separator is <newline>."));
else
printf("Record separator is '%s'.\n", popt->topt.recordSep);
printf(gettext("Record separator is '%s'.\n"), popt->topt.recordSep);
}
}
@ -1741,9 +1743,9 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
if (!quiet)
{
if (popt->topt.tuples_only)
puts("Showing only tuples.");
puts(gettext("Showing only tuples."));
else
puts("Tuples only is off.");
puts(gettext("Tuples only is off."));
}
}
@ -1759,9 +1761,9 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
if (!quiet)
{
if (popt->title)
printf("Title is \"%s\".\n", popt->title);
printf(gettext("Title is \"%s\".\n"), popt->title);
else
printf("Title is unset.\n");
printf(gettext("Title is unset.\n"));
}
}
@ -1777,9 +1779,9 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
if (!quiet)
{
if (popt->topt.tableAttr)
printf("Table attribute is \"%s\".\n", popt->topt.tableAttr);
printf(gettext("Table attribute is \"%s\".\n"), popt->topt.tableAttr);
else
printf("Table attributes unset.\n");
printf(gettext("Table attributes unset.\n"));
}
}
@ -1790,9 +1792,9 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
if (!quiet)
{
if (popt->topt.pager)
puts("Using pager is on.");
puts(gettext("Using pager is on."));
else
puts("Using pager is off.");
puts(gettext("Using pager is off."));
}
}
@ -1803,9 +1805,9 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
if (!quiet)
{
if (popt->default_footer)
puts("Default footer is on.");
puts(gettext("Default footer is on."));
else
puts("Default footer is off.");
puts(gettext("Default footer is off."));
}
}

View File

@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.32 2001/04/15 00:43:37 petere Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.33 2001/06/02 18:25:18 petere Exp $
*/
#include "postgres_fe.h"
@ -47,7 +47,7 @@ xstrdup(const char *string)
if (!string)
{
fprintf(stderr, "%s: xstrdup: cannot duplicate null pointer (internal error)\n",
fprintf(stderr, gettext("%s: xstrdup: cannot duplicate null pointer (internal error)\n"),
pset.progname);
exit(EXIT_FAILURE);
}
@ -139,7 +139,7 @@ psql_error(const char *fmt,...)
if (pset.inputfile)
fprintf(stderr, "%s:%s:%u: ", pset.progname, pset.inputfile, pset.lineno);
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
vfprintf(stderr, gettext(fmt), ap);
va_end(ap);
}
@ -187,7 +187,7 @@ simple_prompt(const char *prompt, int maxlen, bool echo)
if (!destination)
return NULL;
if (prompt)
fputs(prompt, stderr);
fputs(gettext(prompt), stderr);
prompt_state = true;
@ -303,7 +303,9 @@ PSQLexec(const char *query)
var = GetVariable(pset.vars, "ECHO_HIDDEN");
if (var)
{
printf("********* QUERY *********\n%s\n*************************\n\n", query);
printf("********* QUERY **********\n"
"%s\n"
"**************************\n\n", query);
fflush(stdout);
}
@ -336,11 +338,11 @@ PSQLexec(const char *query)
psql_error("connection to server was lost\n");
exit(EXIT_BADCONN);
}
fputs("The connection to the server was lost. Attempting reset: ", stderr);
fputs(gettext("The connection to the server was lost. Attempting reset: "), stderr);
PQreset(pset.db);
if (PQstatus(pset.db) == CONNECTION_BAD)
{
fputs("Failed.\n", stderr);
fputs(gettext("Failed.\n"), stderr);
PQfinish(pset.db);
pset.db = NULL;
SetVariable(pset.vars, "DBNAME", NULL);
@ -350,7 +352,7 @@ PSQLexec(const char *query)
SetVariable(pset.vars, "ENCODING", NULL);
}
else
fputs("Succeeded.\n", stderr);
fputs(gettext("Succeeded.\n"), stderr);
}
return NULL;
@ -388,9 +390,9 @@ SendQuery(const char *query)
{
char buf[3];
printf("***(Single step mode: Verify query)*********************************************\n"
"%s\n"
"***(press return to proceed or enter x and return to cancel)********************\n",
printf(gettext("***(Single step mode: Verify query)*********************************************\n"
"%s\n"
"***(press return to proceed or enter x and return to cancel)********************\n"),
query);
fflush(stdout);
if (fgets(buf, sizeof(buf), stdin) != NULL)
@ -480,8 +482,8 @@ SendQuery(const char *query)
case PGRES_COPY_IN:
if (pset.cur_cmd_interactive && !QUIET())
puts("Enter data to be copied followed by a newline.\n"
"End with a backslash and a period on a line by itself.");
puts(gettext("Enter data to be copied followed by a newline.\n"
"End with a backslash and a period on a line by itself."));
success = handleCopyIn(pset.db, pset.cur_cmd_source,
pset.cur_cmd_interactive ? get_prompt(PROMPT_COPY) : NULL);
@ -504,11 +506,11 @@ SendQuery(const char *query)
psql_error("connection to server was lost\n");
exit(EXIT_BADCONN);
}
fputs("The connection to the server was lost. Attempting reset: ", stderr);
fputs(gettext("The connection to the server was lost. Attempting reset: "), stderr);
PQreset(pset.db);
if (PQstatus(pset.db) == CONNECTION_BAD)
{
fputs("Failed.\n", stderr);
fputs(gettext("Failed.\n"), stderr);
PQfinish(pset.db);
PQclear(results);
pset.db = NULL;
@ -520,13 +522,13 @@ SendQuery(const char *query)
return false;
}
else
fputs("Succeeded.\n", stderr);
fputs(gettext("Succeeded.\n"), stderr);
}
/* check for asynchronous notification returns */
while ((notify = PQnotifies(pset.db)) != NULL)
{
fprintf(pset.queryFout, "Asynchronous NOTIFY '%s' from backend with pid '%d' received.\n",
fprintf(pset.queryFout, gettext("Asynchronous NOTIFY '%s' from backend with pid '%d' received.\n"),
notify->relname, notify->be_pid);
free(notify);
fflush(pset.queryFout);

View File

@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/copy.c,v 1.18 2001/03/22 04:00:19 momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/copy.c,v 1.19 2001/06/02 18:25:18 petere Exp $
*/
#include "postgres_fe.h"
#include "copy.h"
@ -207,10 +207,10 @@ parse_slash_copy(const char *args)
if (error)
{
psql_error("\\copy: parse error at %s%s%s\n",
token ? "'" : "",
token ? token : "end of line",
token ? "'" : "");
if (token)
psql_error("\\copy: parse error at '%s'\n", token);
else
psql_error("\\copy: parse error at end of line\n");
free_copy_options(result);
return NULL;
}

827
src/bin/psql/de.po Normal file
View File

@ -0,0 +1,827 @@
# $Header: /cvsroot/pgsql/src/bin/psql/Attic/de.po,v 1.1 2001/06/02 18:25:18 petere Exp $
#
msgid ""
msgstr ""
"Project-Id-Version: PostgreSQL 7.2\n"
"POT-Creation-Date: 2001-06-02 18:26+0200\n"
"PO-Revision-Date: 2001-06-02 15:52+0200\n"
"Last-Translator: Peter Eisentraut <peter_e@gmx.net>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
#: command.c:152
msgid "Warning: this syntax is deprecated\n"
msgstr "Warnung: Dieser Syntax is veraltet.\n"
#: command.c:159
#, c-format
msgid "Invalid command \\%s. Try \\? for help.\n"
msgstr "Ung<6E>ltiges Kommando \\%s. Versuchen Sie \\? f<>r Hilfe.\n"
#: command.c:161
#, c-format
msgid "invalid command \\%s\n"
msgstr "ung<6E>ltiges Kommando \\%s\n"
#: command.c:278
#, c-format
msgid "could not get home directory: %s\n"
msgstr "konnte Home-Verzeichnis nicht ermitteln: %s\n"
#: command.c:292
#, c-format
msgid "\\%s: could not change directory to '%s': %s\n"
msgstr "\\%s: konnte nicht in Verzeichnis <20>%s<> wechseln: %s\n"
#: command.c:380 command.c:726
msgid "no query buffer\n"
msgstr "kein Abfragepuffer\n"
#: command.c:436
#, c-format
msgid "%s: invalid encoding name\n"
msgstr ""
#: command.c:445
#, c-format
msgid "\\%s: multi-byte support is not enabled\n"
msgstr ""
#: command.c:499 command.c:530 command.c:541 command.c:555 command.c:597
#: command.c:706 command.c:735
#, c-format
msgid "\\%s: missing required argument\n"
msgstr "\\%s: notwendiges Argument fehlt\n"
#: command.c:585
msgid "Query buffer is empty."
msgstr "Abfragepuffer ist leer."
#: command.c:616
msgid "Query buffer reset (cleared)."
msgstr "Abfragepuffer wurde gel<65>scht."
#: command.c:627
#, c-format
msgid "Wrote history to %s.\n"
msgstr "History nach %s geschrieben.\n"
#: command.c:668 command.c:900 command.c:1114 command.c:1160 command.c:1844
#: common.c:57 copy.c:87 mainloop.c:80 mainloop.c:384
msgid "out of memory\n"
msgstr "Speicher aufgebraucht\n"
#: command.c:677 command.c:711
#, c-format
msgid "\\%s: error\n"
msgstr "\\%s: Fehler\n"
#: command.c:750 command.c:770 command.c:1005 command.c:1018 command.c:1028
#: command.c:1501 command.c:1514 command.c:1526 command.c:1539 command.c:1553
#: command.c:1567 command.c:1597 common.c:106 copy.c:290
#, c-format
msgid "%s: %s\n"
msgstr "%s: %s\n"
#: command.c:835
#, c-format
msgid "\\%s: extra argument '%s' ignored\n"
msgstr "\\%s: <20>berfl<66>ssiges Argument <20>%s<> ignoriert\n"
#: command.c:892 command.c:966 command.c:994
msgid "parse error at end of line\n"
msgstr "Parse-Fehler am Zeilenende\n"
#: command.c:1275 command.c:1299 startup.c:183 startup.c:201
msgid "Password: "
msgstr "Pa<50>wort: "
#: command.c:1313 common.c:155 common.c:331 common.c:496
#, c-format
msgid "%s"
msgstr "%s"
#: command.c:1317
msgid "Previous connection kept\n"
msgstr "Vorherige Verbindung wurde behalten\n"
#: command.c:1330
#, c-format
msgid "\\connect: %s"
msgstr "\\connect: %s"
#: command.c:1342
#, c-format
msgid "You are now connected to database %s.\n"
msgstr "Sie sind jetzt mit der Datenbank %s verbunden.\n"
#: command.c:1344
#, c-format
msgid "You are now connected as new user %s.\n"
msgstr "Sie sind jetzt als neuer Benutzer %s verbunden.\n"
#: command.c:1347
#, c-format
msgid "You are now connected to database %s as user %s.\n"
msgstr "Sie sind jetzt mit der Datenbank %s als Benutzer %s verbunden.\n"
#: command.c:1438
#, c-format
msgid "could not start editor %s\n"
msgstr "konnte Editor %s nicht starten\n"
#: command.c:1440
msgid "could not start /bin/sh\n"
msgstr "konnte /bin/sh nicht starten\n"
#: command.c:1486
#, c-format
msgid "couldn't open temp file %s: %s\n"
msgstr ""
#: command.c:1670
msgid "\\pset: allowed formats are unaligned, aligned, html, latex\n"
msgstr "\\pset: zul<75>ssige Formate sind unaligned, aligned, html, latex\n"
#: command.c:1675
#, c-format
msgid "Output format is %s.\n"
msgstr "Ausgabeformat ist <20>%s<>.\n"
#: command.c:1685
#, c-format
msgid "Border style is %d.\n"
msgstr "Rahmenstil ist %d.\n"
#: command.c:1694
msgid "Expanded display is on.\n"
msgstr "Erweiterte Anzeige ist an.\n"
#: command.c:1695
msgid "Expanded display is off.\n"
msgstr "Erweiterte Anzeige ist aus.\n"
#: command.c:1707
#, c-format
msgid "Null display is '%s'.\n"
msgstr "Null-Anzeige ist <20>%s<>.\n"
#: command.c:1719
#, c-format
msgid "Field separator is '%s'.\n"
msgstr ""
#: command.c:1733
msgid "Record separator is <newline>."
msgstr ""
#: command.c:1735
#, c-format
msgid "Record separator is '%s'.\n"
msgstr ""
#: command.c:1746
msgid "Showing only tuples."
msgstr ""
#: command.c:1748
msgid "Tuples only is off."
msgstr ""
#: command.c:1764
#, c-format
msgid "Title is \"%s\".\n"
msgstr "Titel ist <20>%s<>.\n"
#: command.c:1766
msgid "Title is unset.\n"
msgstr "Titel ist nicht gesetzt.\n"
#: command.c:1782
#, c-format
msgid "Table attribute is \"%s\".\n"
msgstr "Tabellenattribut ist <20>%s<>.\n"
#: command.c:1784
msgid "Table attributes unset.\n"
msgstr "Tabellenattribute sind nicht gesetzt.\n"
#: command.c:1795
msgid "Using pager is on."
msgstr "Pager-Verwendung is an."
#: command.c:1797
msgid "Using pager is off."
msgstr "Pager-Verwendung ist aus."
#: command.c:1808
msgid "Default footer is on."
msgstr "Standardfu<66>zeile ist an."
#: command.c:1810
msgid "Default footer is off."
msgstr "Standardfu<66>zeile ist aus."
#: command.c:1816
#, c-format
msgid "\\pset: unknown option: %s\n"
msgstr "\\pset: unbekannte Option: %s\n"
#: command.c:1859
msgid "\\!: failed\n"
msgstr "\\!: fehlgeschlagen\n"
#: common.c:50
#, c-format
msgid "%s: xstrdup: cannot duplicate null pointer (internal error)\n"
msgstr ""
#: common.c:299 common.c:385
msgid "You are currently not connected to a database.\n"
msgstr "Sie sind gegenw<6E>rtig nicht mit einer Datenbank verbunden.\n"
#: common.c:338 common.c:506
msgid "connection to server was lost\n"
msgstr "Verbindung zum Server wurde verloren\n"
#: common.c:341 common.c:509
msgid "The connection to the server was lost. Attempting reset: "
msgstr "Die Verbindung zum Server wurde verloren. Versuche Reset: "
#: common.c:345 common.c:513
msgid "Failed.\n"
msgstr "Fehlgeschlagen.\n"
#: common.c:355 common.c:525
msgid "Succeeded.\n"
msgstr "Erfolgreich.\n"
#: common.c:393
#, c-format
msgid ""
"***(Single step mode: Verify query)"
"*********************************************\n"
"%s\n"
"***(press return to proceed or enter x and return to cancel)"
"********************\n"
msgstr ""
"***(Einzelschrittmodus: Abfrage best<73>tigen)"
"*************************************\n"
"%s\n"
"***(Dr<44>cken Sie die Eingabetaste um fortzufahren oder <20>x<EFBFBD> um abzubrechen)"
"*******\n"
#: common.c:485
msgid ""
"Enter data to be copied followed by a newline.\n"
"End with a backslash and a period on a line by itself."
msgstr ""
#: common.c:531
#, c-format
msgid "Asynchronous NOTIFY '%s' from backend with pid '%d' received.\n"
msgstr ""
#: copy.c:81
msgid "\\copy: arguments required\n"
msgstr "\\copy: ben<65>tigt Argumente\n"
#: copy.c:211
#, c-format
msgid "\\copy: parse error at '%s'\n"
msgstr "\\copy: Parse-Fehler bei '%s'\n"
#: copy.c:213
msgid "\\copy: parse error at end of line\n"
msgstr "\\copy: Parse-Fehler am Zeilenende\n"
#: copy.c:310
#, c-format
msgid "\\copy: %s"
msgstr "\\copy: %s"
#: copy.c:314
#, c-format
msgid "\\copy: unexpected response (%d)\n"
msgstr "\\copy: unerwartete Antwort (%d)\n"
#: help.c:47
msgid "on"
msgstr "an"
#: help.c:47
msgid "off"
msgstr "aus"
#: help.c:70
#, c-format
msgid "could not get current user name: %s\n"
msgstr "konnte aktuellen Benutzernamen nicht ermitteln: %s\n"
#: help.c:79
msgid "This is psql, the PostgreSQL interactive terminal.\n"
msgstr "Dies ist psql, das interaktive PostgreSQL-Terminal.\n"
#: help.c:80
msgid "Usage:"
msgstr "Benutzung:"
#: help.c:81
msgid " psql [options] [dbname [username]]\n"
msgstr " psql [Optionen] [DB-Name [Benutzername]]\n"
#: help.c:82
msgid "Options:"
msgstr "Optionen:"
#: help.c:83
msgid " -a Echo all input from script"
msgstr " -a Gib Skript-Inhalt wieder"
#: help.c:84
msgid " -A Unaligned table output mode (-P format=unaligned)"
msgstr ""
#: help.c:85
msgid " -c <query> Run only single query (or slash command) and exit"
msgstr " -c <Kommando> F<>hre einzelnes Kommando aus und beende"
#: help.c:91
#, c-format
msgid " -d <dbname> Specify database name to connect to (default: %s)\n"
msgstr ""
" -d <Dbname> Datenbank, zu der verbunden werden soll (Standard: %s)\n"
#: help.c:93
msgid " -e Echo queries sent to backend"
msgstr " -e Zeige Abfragen an den Server"
#: help.c:94
msgid " -E Display queries that internal commands generate"
msgstr ""
" -E Zeige Abfragen, die von internen Kommandos erzeugt werden"
#: help.c:95
msgid " -f <filename> Execute queries from file, then exit"
msgstr " -f <Dateiname> F<>hre Abfragen von Datei aus und beende danach"
#: help.c:96
#, c-format
msgid ""
" -F <string> Set field separator (default: \"%s\") (-P fieldsep=)\n"
msgstr ""
#: help.c:101
#, c-format
msgid " -h <host> Specify database server host (default: %s)\n"
msgstr " -h <Host> Hostname des Datenbankservers (Standard: %s)\n"
#: help.c:102
msgid "local socket"
msgstr "lokales Socket"
#: help.c:104
msgid " -H HTML table output mode (-P format=html)"
msgstr ""
#: help.c:105
msgid " -l List available databases, then exit"
msgstr " -l Zeige verf<72>gbare Datenbanken und beende"
#: help.c:106
msgid " -n Disable readline"
msgstr " -n Schalte Readline aus"
#: help.c:107
msgid " -o <filename> Send query output to filename (or |pipe)"
msgstr ""
#: help.c:111
#, c-format
msgid " -p <port> Specify database server port (default: %s)\n"
msgstr ""
#: help.c:114
msgid ""
" -P var[=arg] Set printing option 'var' to 'arg' (see \\pset command)"
msgstr ""
#: help.c:115
msgid " -q Run quietly (no messages, only query output)"
msgstr ""
#: help.c:116
msgid ""
" -R <string> Set record separator (default: newline) (-P recordsep=)"
msgstr ""
#: help.c:117
msgid " -s Single step mode (confirm each query)"
msgstr ""
#: help.c:118
msgid " -S Single line mode (newline terminates query)"
msgstr ""
#: help.c:119
msgid " -t Print rows only (-P tuples_only)"
msgstr ""
#: help.c:120
msgid ""
" -T text Set HTML table tag options (width, border) (-P tableattr=)"
msgstr ""
#: help.c:126
#, c-format
msgid " -U <username> Specify database username (default: %s)\n"
msgstr " -U <Benutzer> Datenbank-Benutzername (Standard: %s)\n"
#: help.c:128
msgid " -v name=val Set psql variable 'name' to 'value'"
msgstr " -v Name=Wert Setze psql-Variable <20>Name<6D> auf <20>Wert<72>"
#: help.c:129
msgid " -V Show version information and exit"
msgstr " -V Zeige Versionsinformationen und beende"
#: help.c:130
msgid " -W Prompt for password (should happen automatically)"
msgstr " -W Frage nach Pa<50>wort (sollte automatisch passieren)"
#: help.c:131
msgid " -x Turn on expanded table output (-P expanded)"
msgstr " -x Schalte erweiterte Tabellenausgabe ein (-P expanded)"
#: help.c:132
msgid " -X Do not read startup file (~/.psqlrc)"
msgstr " -X Lese die Startdatei nicht (~/.psqlrc)"
# XXX Da fehlt noch was.
#: help.c:135
msgid ""
"\n"
"For more information, type \"\\?\" (for internal commands) or \"\\help\"\n"
"(for SQL commands) from within psql, or consult the psql section in\n"
"the PostgreSQL manual, which accompanies the distribution and is also\n"
"available at <http://www.postgresql.org>.\n"
"\n"
"Report bugs to <pgsql-bugs@postgresql.org>."
msgstr ""
"\n"
"F<>r mehr Informationen, geben Sie <20>\\?<3F> (f<>r interne Kommandos) oder\n"
"<22>\\help<6C> (f<>r SQL-Kommandos) in psql ein oder schauen Sie in den psql-\n"
"Abschnitt der PostgreSQL-Dokumentation.\n"
"\n"
"Berichten Sie Fehler an <pgsql-bugs@postgresql.org>."
#: help.c:195
msgid " \\a toggle between unaligned and aligned mode\n"
msgstr ""
#: help.c:196
#, c-format
msgid ""
" \\c[onnect] [dbname|- [user]]\n"
" connect to new database (currently '%s')\n"
msgstr ""
#: help.c:199
msgid " \\C <title> table title\n"
msgstr ""
#: help.c:200
msgid " \\cd [<dir>] change the current working directory\n"
msgstr ""
#: help.c:201
msgid ""
" \\copy ... perform SQL COPY with data stream to the client machine\n"
msgstr ""
#: help.c:202
msgid " \\copyright show PostgreSQL usage and distribution terms\n"
msgstr ""
#: help.c:203
msgid " \\d <table> describe table (or view, index, sequence)\n"
msgstr ""
#: help.c:204
msgid " \\d{t|i|s|v} list tables/indices/sequences/views\n"
msgstr ""
#: help.c:205
msgid " \\d{p|S|l} list permissions/system tables/lobjects\n"
msgstr ""
#: help.c:206
msgid " \\da list aggregates\n"
msgstr ""
#: help.c:207
msgid " \\dd [object] list comment for table, type, function, or operator\n"
msgstr ""
#: help.c:208
msgid " \\df list functions\n"
msgstr ""
#: help.c:209
msgid " \\do list operators\n"
msgstr ""
#: help.c:210
msgid " \\dT list data types\n"
msgstr ""
#: help.c:211
msgid ""
" \\e [file] edit the current query buffer or [file] with external "
"editor\n"
msgstr ""
#: help.c:212
msgid " \\echo <text> write text to stdout\n"
msgstr ""
#: help.c:213
msgid " \\encoding <encoding> set client encoding\n"
msgstr ""
#: help.c:214
msgid " \\f <sep> change field separator\n"
msgstr ""
#: help.c:215
msgid ""
" \\g [file] send query to backend (and results in [file] or |pipe)\n"
msgstr ""
#: help.c:216
msgid " \\h [cmd] help on syntax of sql commands, * for all commands\n"
msgstr ""
#: help.c:217
#, c-format
msgid " \\H toggle HTML mode (currently %s)\n"
msgstr ""
#: help.c:219
msgid " \\i <file> read and execute queries from <file>\n"
msgstr ""
#: help.c:220
msgid " \\l list all databases\n"
msgstr ""
#: help.c:221
msgid ""
" \\lo_export, \\lo_import, \\lo_list, \\lo_unlink\n"
" large object operations\n"
msgstr ""
#: help.c:223
msgid " \\o [file] send all query results to [file], or |pipe\n"
msgstr ""
#: help.c:224
msgid " \\p show the content of the current query buffer\n"
msgstr ""
#: help.c:225
msgid ""
" \\pset <opt> set table output <opt> = {format|border|expanded|"
"fieldsep|\n"
" null|recordsep|tuples_only|title|tableattr|pager}\n"
msgstr ""
#: help.c:227
msgid " \\q quit psql\n"
msgstr ""
#: help.c:228
msgid " \\qecho <text> write text to query output stream (see \\o)\n"
msgstr ""
#: help.c:229
msgid " \\r reset (clear) the query buffer\n"
msgstr ""
#: help.c:230
msgid " \\s [file] print history or save it in [file]\n"
msgstr ""
#: help.c:231
msgid " \\set <var> <value> set internal variable\n"
msgstr ""
#: help.c:232
#, c-format
msgid " \\t show only rows (currently %s)\n"
msgstr ""
#: help.c:234
msgid " \\T <tags> HTML table tags\n"
msgstr ""
#: help.c:235
msgid " \\unset <var> unset (delete) internal variable\n"
msgstr ""
#: help.c:236
msgid " \\w <file> write current query buffer to a <file>\n"
msgstr ""
#: help.c:237
#, c-format
msgid " \\x toggle expanded output (currently %s)\n"
msgstr ""
#: help.c:239
msgid " \\z list table access permissions\n"
msgstr ""
#: help.c:240
msgid " \\! [cmd] shell escape or command\n"
msgstr ""
#: help.c:267
msgid "Available help:"
msgstr "Verf<72>gbare Hilfe:"
#: help.c:298
#, c-format
msgid ""
"Command: %s\n"
"Description: %s\n"
"Syntax:\n"
"%s\n"
"\n"
msgstr ""
#: help.c:309
#, c-format
msgid ""
"No help available for '%-.*s'.\n"
"Try \\h with no arguments to see available help.\n"
msgstr ""
"Keine Hilfe verf<72>gbar f<>r <20>%-.*s<>.\n"
"Versuchen Sie \\h ohne Argumente, um die verf<72>gbare Hilfe zu sehen.\n"
#: input.c:171
#, c-format
msgid "could not save history to %s: %s\n"
msgstr "konnte History nicht in %s speichern: %s\n"
#: large_obj.c:66
msgid "Warning: Your transaction in progress has been committed."
msgstr "Warnung: Die angefangene Transaktion wurde beendet (COMMIT)."
#: large_obj.c:68
msgid "Warning: Your transaction in progress has been rolled back."
msgstr "Warnung: Die angefangene Transaktion wurde abgebrochen."
#: large_obj.c:95
msgid "\\lo_export: not connected to a database\n"
msgstr "\\lo_export: nicht mit einer Datenbank verbunden\n"
#: large_obj.c:162
msgid "\\lo_import: not connected to a database\n"
msgstr "\\lo_import: nicht mit einer Datenbank verbunden\n"
#: large_obj.c:253
msgid "\\lo_unlink: not connected to a database\n"
msgstr "\\lo_unlink: nicht mit einer Datenbank verbunden\n"
#: large_obj.c:328
msgid "Description"
msgstr "Beschreibung"
#: large_obj.c:336
msgid "Large objects"
msgstr ""
#: mainloop.c:242
#, c-format
msgid "Use \"\\q\" to leave %s.\n"
msgstr "Verwenden Sie <20>\\q<>, um %s zu verlassen.\n"
#: print.c:367
msgid "(No rows)\n"
msgstr "(Keine Zeilen)\n"
#: print.c:1072
msgid "(1 row)"
msgstr "(1 Zeile)"
#: print.c:1074
#, c-format
msgid "(%d rows)"
msgstr "(%d Zeilen)"
#: startup.c:141 startup.c:615
#, c-format
msgid "%s: out of memory\n"
msgstr "%s: Speicher aufgebraucht\n"
#: startup.c:177
msgid "Username: "
msgstr "Benutzername: "
#: startup.c:286
#, c-format
msgid ""
"Welcome to %s, the PostgreSQL interactive terminal.\n"
"\n"
"Type: \\copyright for distribution terms\n"
" \\h for help with SQL commands\n"
" \\? for help on internal slash commands\n"
" \\g or terminate with semicolon to execute query\n"
" \\q to quit\n"
"\n"
msgstr ""
"Willkommen bei %s, dem interaktiven PostgreSQL-Terminal.\n"
"\n"
"Geben Sie ein: \\copyright f<>r Urheberrechtsinformationen\n"
" \\h f<>r Hilfe <20>ber SQL-Kommandos\n"
" \\? f<>r Hilfe <20>ber interne Kommandos\n"
" \\g oder Semikolon, um eine Abfrage auszuf<75>hren\n"
" \\q um zu beenden\n"
"\n"
#: startup.c:461
#, c-format
msgid "%s: couldn't set printing parameter %s\n"
msgstr "%s: konnte Ausgabeparameter %s nicht setzen\n"
#: startup.c:507
#, c-format
msgid "%s: could not delete variable %s\n"
msgstr "%s: konnte Variable %s nicht l<>schen\n"
#: startup.c:517
#, c-format
msgid "%s: could not set variable %s\n"
msgstr "%s: konnte Variable %s nicht setzen\n"
#: startup.c:548 startup.c:563
#, c-format
msgid "Try '%s --help' for more information.\n"
msgstr "Versuchen sie <20>%s --help<6C> f<>r weitere Informationen.\n"
#: startup.c:556
#, c-format
msgid ""
"%s was compiled without support for long options.\n"
"Use --help for help on invocation options.\n"
msgstr ""
#: startup.c:581
#, c-format
msgid "%s: warning: extra option %s ignored\n"
msgstr "%s: Warnung: <20>berfl<66>ssige Option %s ignoriert\n"
#: startup.c:588
#, c-format
msgid "%s: Warning: The -u option is deprecated. Use -U.\n"
msgstr "%s: Warnung: The Option -u is veraltet. Verwenden Sie -U.\n"
#: startup.c:644
msgid "contains support for: "
msgstr "enth<74>lt Unterst<73>tzung f<>r: "
#: startup.c:647
msgid "readline"
msgstr "readline"
#: startup.c:657
msgid "history"
msgstr "history"
#: startup.c:666
msgid "multibyte"
msgstr "multibyte"
#: startup.c:674
msgid ""
"Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group\n"
"Portions Copyright (c) 1996, Regents of the University of California\n"
"Read the file COPYRIGHT or use the command \\copyright to see the\n"
"usage and distribution terms."
msgstr ""
"Teile Copyright (c) 1996-2001, PostgreSQL Global Development Group\n"
"Teile Copyright (c) 1996, Regents of the University of California\n"
"Lesen Sie die Datei COPYRIGHT oder verwenden Sie das Kommando \\copyright\n"
"um Urheberrechtsinformationen zu sehen."
#: startup.c:699
#, c-format
msgid ""
"SSL connection (cipher: %s, bits: %i)\n"
"\n"
msgstr ""
"SSL-Verbindung (Verschl<68>sslungsmethode: %s, Bits: %i)\n"
"\n"

View File

@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.38 2001/05/07 19:31:33 petere Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.39 2001/06/02 18:25:18 petere Exp $
*/
#include "postgres_fe.h"
#include "help.h"
@ -29,6 +29,8 @@
#include "common.h"
#include "sql_help.h"
#define _(x) gettext((x))
/*
* PLEASE:
* If you change something in this file, also make the same changes
@ -42,7 +44,7 @@
*
* print out command line arguments
*/
#define ON(var) (var ? "on" : "off")
#define ON(var) (var ? _("on") : _("off"))
void
usage(void)
@ -74,69 +76,67 @@ usage(void)
}
/* If this " is the start of the string then it ought to end there to fit in 80 columns >> " */
puts("This is psql, the PostgreSQL interactive terminal.\n");
puts("Usage:");
puts(" psql [options] [dbname [username]]\n");
puts("Options:");
puts(" -a Echo all input from script");
puts(" -A Unaligned table output mode (-P format=unaligned)");
puts(" -c <query> Run only single query (or slash command) and exit");
puts(_("This is psql, the PostgreSQL interactive terminal.\n"));
puts(_("Usage:"));
puts(_(" psql [options] [dbname [username]]\n"));
puts(_("Options:"));
puts(_(" -a Echo all input from script"));
puts(_(" -A Unaligned table output mode (-P format=unaligned)"));
puts(_(" -c <query> Run only single query (or slash command) and exit"));
/* Display default database */
env = getenv("PGDATABASE");
if (!env)
env = user;
printf(" -d <dbname> Specify database name to connect to (default: %s)\n", env);
printf(_(" -d <dbname> Specify database name to connect to (default: %s)\n"), env);
puts(" -e Echo queries sent to backend");
puts(" -E Display queries that internal commands generate");
puts(" -f <filename> Execute queries from file, then exit");
puts(" -F <string> Set field separator (default: \"" DEFAULT_FIELD_SEP "\") (-P fieldsep=)");
puts(_(" -e Echo queries sent to backend"));
puts(_(" -E Display queries that internal commands generate"));
puts(_(" -f <filename> Execute queries from file, then exit"));
printf(_(" -F <string> Set field separator (default: \"%s\") (-P fieldsep=)\n"),
DEFAULT_FIELD_SEP);
/* Display default host */
env = getenv("PGHOST");
printf(" -h <host> Specify database server host (default: ");
if (env)
fputs(env, stdout);
else
fputs("domain socket", stdout);
puts(")");
printf(_(" -h <host> Specify database server host (default: %s)\n"),
env ? env : _("local socket"));
puts(" -H HTML table output mode (-P format=html)");
puts(" -l List available databases, then exit");
puts(" -n Disable readline");
puts(" -o <filename> Send query output to filename (or |pipe)");
puts(_(" -H HTML table output mode (-P format=html)"));
puts(_(" -l List available databases, then exit"));
puts(_(" -n Disable readline"));
puts(_(" -o <filename> Send query output to filename (or |pipe)"));
/* Display default port */
env = getenv("PGPORT");
printf(" -p <port> Specify database server port (default: %s)\n",
env ? env : "hardwired");
printf(_(" -p <port> Specify database server port (default: %s)\n"),
env ? env : DEF_PGPORT_STR);
puts(" -P var[=arg] Set printing option 'var' to 'arg' (see \\pset command)");
puts(" -q Run quietly (no messages, only query output)");
puts(" -R <string> Set record separator (default: newline) (-P recordsep=)");
puts(" -s Single step mode (confirm each query)");
puts(" -S Single line mode (newline terminates query)");
puts(" -t Print rows only (-P tuples_only)");
puts(" -T text Set HTML table tag options (width, border) (-P tableattr=)");
puts(_(" -P var[=arg] Set printing option 'var' to 'arg' (see \\pset command)"));
puts(_(" -q Run quietly (no messages, only query output)"));
puts(_(" -R <string> Set record separator (default: newline) (-P recordsep=)"));
puts(_(" -s Single step mode (confirm each query)"));
puts(_(" -S Single line mode (newline terminates query)"));
puts(_(" -t Print rows only (-P tuples_only)"));
puts(_(" -T text Set HTML table tag options (width, border) (-P tableattr=)"));
/* Display default user */
env = getenv("PGUSER");
if (!env)
env = user;
printf(" -U <username> Specify database username (default: %s)\n", env);
printf(_(" -U <username> Specify database username (default: %s)\n"), env);
puts(" -v name=val Set psql variable 'name' to 'value'");
puts(" -V Show version information and exit");
puts(" -W Prompt for password (should happen automatically)");
puts(" -x Turn on expanded table output (-P expanded)");
puts(" -X Do not read startup file (~/.psqlrc)");
puts(_(" -v name=val Set psql variable 'name' to 'value'"));
puts(_(" -V Show version information and exit"));
puts(_(" -W Prompt for password (should happen automatically)"));
puts(_(" -x Turn on expanded table output (-P expanded)"));
puts(_(" -X Do not read startup file (~/.psqlrc)"));
puts("\nFor more information, type \"\\?\" (for internal commands) or \"\\help\"");
puts("(for SQL commands) from within psql, or consult the psql section in");
puts("the PostgreSQL manual, which accompanies the distribution and is also");
puts("available at <http://www.postgresql.org>.");
puts("Report bugs to <pgsql-bugs@postgresql.org>.");
puts(_(
"\nFor more information, type \"\\?\" (for internal commands) or \"\\help\"\n"
"(for SQL commands) from within psql, or consult the psql section in\n"
"the PostgreSQL manual, which accompanies the distribution and is also\n"
"available at <http://www.postgresql.org>.\n\n"
"Report bugs to <pgsql-bugs@postgresql.org>."));
}
@ -192,49 +192,52 @@ slashUsage(void)
fout = stdout;
/* if you add/remove a line here, change the row test above */
fprintf(fout, " \\a toggle between unaligned and aligned mode\n");
fprintf(fout, " \\c[onnect] [dbname|- [user]]\n"
" connect to new database (currently '%s')\n", PQdb(pset.db));
fprintf(fout, " \\C <title> table title\n");
fprintf(fout, " \\cd [<dir>] change the current working directory\n");
fprintf(fout, " \\copy ... perform SQL COPY with data stream to the client machine\n");
fprintf(fout, " \\copyright show PostgreSQL usage and distribution terms\n");
fprintf(fout, " \\d <table> describe table (or view, index, sequence)\n");
fprintf(fout, " \\d{t|i|s|v} list tables/indices/sequences/views\n");
fprintf(fout, " \\d{p|S|l} list permissions/system tables/lobjects\n");
fprintf(fout, " \\da list aggregates\n");
fprintf(fout, " \\dd [object] list comment for table, type, function, or operator\n");
fprintf(fout, " \\df list functions\n");
fprintf(fout, " \\do list operators\n");
fprintf(fout, " \\dT list data types\n");
fprintf(fout, " \\e [file] edit the current query buffer or [file] with external editor\n");
fprintf(fout, " \\echo <text> write text to stdout\n");
fprintf(fout, " \\encoding <encoding> set client encoding\n");
fprintf(fout, " \\f <sep> change field separator\n");
fprintf(fout, " \\g [file] send query to backend (and results in [file] or |pipe)\n");
fprintf(fout, " \\h [cmd] help on syntax of sql commands, * for all commands\n");
fprintf(fout, " \\H toggle HTML mode (currently %s)\n",
fprintf(fout, _(" \\a toggle between unaligned and aligned mode\n"));
fprintf(fout, _(" \\c[onnect] [dbname|- [user]]\n"
" connect to new database (currently '%s')\n"),
PQdb(pset.db));
fprintf(fout, _(" \\C <title> table title\n"));
fprintf(fout, _(" \\cd [<dir>] change the current working directory\n"));
fprintf(fout, _(" \\copy ... perform SQL COPY with data stream to the client machine\n"));
fprintf(fout, _(" \\copyright show PostgreSQL usage and distribution terms\n"));
fprintf(fout, _(" \\d <table> describe table (or view, index, sequence)\n"));
fprintf(fout, _(" \\d{t|i|s|v} list tables/indices/sequences/views\n"));
fprintf(fout, _(" \\d{p|S|l} list permissions/system tables/lobjects\n"));
fprintf(fout, _(" \\da list aggregates\n"));
fprintf(fout, _(" \\dd [object] list comment for table, type, function, or operator\n"));
fprintf(fout, _(" \\df list functions\n"));
fprintf(fout, _(" \\do list operators\n"));
fprintf(fout, _(" \\dT list data types\n"));
fprintf(fout, _(" \\e [file] edit the current query buffer or [file] with external editor\n"));
fprintf(fout, _(" \\echo <text> write text to stdout\n"));
fprintf(fout, _(" \\encoding <encoding> set client encoding\n"));
fprintf(fout, _(" \\f <sep> change field separator\n"));
fprintf(fout, _(" \\g [file] send query to backend (and results in [file] or |pipe)\n"));
fprintf(fout, _(" \\h [cmd] help on syntax of sql commands, * for all commands\n"));
fprintf(fout, _(" \\H toggle HTML mode (currently %s)\n"),
ON(pset.popt.topt.format == PRINT_HTML));
fprintf(fout, " \\i <file> read and execute queries from <file>\n");
fprintf(fout, " \\l list all databases\n");
fprintf(fout, " \\lo_export, \\lo_import, \\lo_list, \\lo_unlink\n"
" large object operations\n");
fprintf(fout, " \\o [file] send all query results to [file], or |pipe\n");
fprintf(fout, " \\p show the content of the current query buffer\n");
fprintf(fout, " \\pset <opt> set table output <opt> = {format|border|expanded|fieldsep|\n"
" null|recordsep|tuples_only|title|tableattr|pager}\n");
fprintf(fout, " \\q quit psql\n");
fprintf(fout, " \\qecho <text> write text to query output stream (see \\o)\n");
fprintf(fout, " \\r reset (clear) the query buffer\n");
fprintf(fout, " \\s [file] print history or save it in [file]\n");
fprintf(fout, " \\set <var> <value> set internal variable\n");
fprintf(fout, " \\t show only rows (currently %s)\n", ON(pset.popt.topt.tuples_only));
fprintf(fout, " \\T <tags> HTML table tags\n");
fprintf(fout, " \\unset <var> unset (delete) internal variable\n");
fprintf(fout, " \\w <file> write current query buffer to a <file>\n");
fprintf(fout, " \\x toggle expanded output (currently %s)\n", ON(pset.popt.topt.expanded));
fprintf(fout, " \\z list table access permissions\n");
fprintf(fout, " \\! [cmd] shell escape or command\n");
fprintf(fout, _(" \\i <file> read and execute queries from <file>\n"));
fprintf(fout, _(" \\l list all databases\n"));
fprintf(fout, _(" \\lo_export, \\lo_import, \\lo_list, \\lo_unlink\n"
" large object operations\n"));
fprintf(fout, _(" \\o [file] send all query results to [file], or |pipe\n"));
fprintf(fout, _(" \\p show the content of the current query buffer\n"));
fprintf(fout, _(" \\pset <opt> set table output <opt> = {format|border|expanded|fieldsep|\n"
" null|recordsep|tuples_only|title|tableattr|pager}\n"));
fprintf(fout, _(" \\q quit psql\n"));
fprintf(fout, _(" \\qecho <text> write text to query output stream (see \\o)\n"));
fprintf(fout, _(" \\r reset (clear) the query buffer\n"));
fprintf(fout, _(" \\s [file] print history or save it in [file]\n"));
fprintf(fout, _(" \\set <var> <value> set internal variable\n"));
fprintf(fout, _(" \\t show only rows (currently %s)\n"),
ON(pset.popt.topt.tuples_only));
fprintf(fout, _(" \\T <tags> HTML table tags\n"));
fprintf(fout, _(" \\unset <var> unset (delete) internal variable\n"));
fprintf(fout, _(" \\w <file> write current query buffer to a <file>\n"));
fprintf(fout, _(" \\x toggle expanded output (currently %s)\n"),
ON(pset.popt.topt.expanded));
fprintf(fout, _(" \\z list table access permissions\n"));
fprintf(fout, _(" \\! [cmd] shell escape or command\n"));
if (usePipe)
{
@ -261,7 +264,7 @@ helpSQL(const char *topic)
int i;
int items_per_column = (QL_HELP_COUNT + 2) / 3;
puts("Available help:");
puts(_("Available help:"));
for (i = 0; i < items_per_column; i++)
{
@ -292,9 +295,9 @@ helpSQL(const char *topic)
strcmp(topic, "*") == 0)
{
help_found = true;
printf("Command: %s\n"
"Description: %s\n"
"Syntax:\n%s\n\n",
printf(_("Command: %s\n"
"Description: %s\n"
"Syntax:\n%s\n\n"),
QL_HELP[i].cmd, QL_HELP[i].help, QL_HELP[i].syntax);
/* If we have an exact match, exit. Fixes \h SELECT */
if (strcasecmp(topic, QL_HELP[i].cmd) == 0)
@ -303,7 +306,7 @@ helpSQL(const char *topic)
}
if (!help_found)
printf("No help available for '%-.*s'.\nTry \\h with no arguments to see available help.\n", (int) len, topic);
printf(_("No help available for '%-.*s'.\nTry \\h with no arguments to see available help.\n"), (int) len, topic);
}
}

View File

@ -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);

View File

@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.39 2001/03/26 15:18:51 tgl Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.40 2001/06/02 18:25:18 petere Exp $
*/
#include "postgres_fe.h"
#include "mainloop.h"
@ -19,7 +19,6 @@
#ifndef WIN32
#include <setjmp.h>
sigjmp_buf main_loop_jmp;
#endif
@ -240,7 +239,7 @@ MainLoop(FILE *source)
else
{
if (!QUIET())
printf("Use \"\\q\" to leave %s.\n", pset.progname);
printf(gettext("Use \"\\q\" to leave %s.\n"), pset.progname);
continue;
}
}

7
src/bin/psql/nls.mk Normal file
View File

@ -0,0 +1,7 @@
# $Header: /cvsroot/pgsql/src/bin/psql/nls.mk,v 1.1 2001/06/02 18:25:18 petere Exp $
CATALOG_NAME := psql
AVAIL_LANGUAGES := de
GETTEXT_FILES := command.c common.c copy.c help.c input.c large_obj.c \
mainloop.c print.c startup.c
# describe.c needs work
GETTEXT_TRIGGERS:= _ psql_error simple_prompt

View File

@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.19 2001/05/12 19:44:46 petere Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.20 2001/06/02 18:25:18 petere Exp $
*/
#include "postgres_fe.h"
#include "print.h"
@ -364,7 +364,7 @@ print_aligned_vertical(const char *title, const char *const * headers,
if (cells[0] == NULL)
{
puts("(No rows)\n");
puts(gettext("(No rows)\n"));
return;
}
@ -1069,9 +1069,9 @@ printQuery(const PGresult *result, const printQueryOpt *opt, FILE *fout)
footers[0] = malloc(100);
if (PQntuples(result) == 1)
strcpy(footers[0], "(1 row)");
snprintf(footers[0], 100, gettext("(1 row)"));
else
sprintf(footers[0], "(%d rows)", PQntuples(result));
snprintf(footers[0], 100, gettext("(%d rows)"), PQntuples(result));
}
else
footers = NULL;

View File

@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.49 2001/05/30 14:15:27 momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.50 2001/06/02 18:25:18 petere Exp $
*/
#include "postgres_fe.h"
@ -21,6 +21,10 @@
#include <getopt.h>
#endif
#ifdef ENABLE_NLS
#include <locale.h>
#endif
#include "libpq-fe.h"
#include "command.h"
@ -102,6 +106,12 @@ main(int argc, char *argv[])
char *password = NULL;
bool need_pass;
#ifdef ENABLE_NLS
setlocale(LC_ALL, "");
bindtextdomain("psql", LOCALEDIR);
textdomain("psql");
#endif
if (!strrchr(argv[0], '/'))
pset.progname = argv[0];
else
@ -128,7 +138,7 @@ main(int argc, char *argv[])
pset.vars = CreateVariableSpace();
if (!pset.vars)
{
fprintf(stderr, "%s: out of memory\n", pset.progname);
fprintf(stderr, gettext("%s: out of memory\n"), pset.progname);
exit(EXIT_FAILURE);
}
pset.popt.topt.format = PRINT_ALIGNED;
@ -273,12 +283,13 @@ main(int argc, char *argv[])
pset.issuper = test_superuser(PQuser(pset.db));
if (!QUIET() && !pset.notty)
{
printf("Welcome to %s, the PostgreSQL interactive terminal.\n\n"
"Type: \\copyright for distribution terms\n"
" \\h for help with SQL commands\n"
" \\? for help on internal slash commands\n"
" \\g or terminate with semicolon to execute query\n"
" \\q to quit\n\n", pset.progname);
printf(gettext("Welcome to %s, the PostgreSQL interactive terminal.\n\n"
"Type: \\copyright for distribution terms\n"
" \\h for help with SQL commands\n"
" \\? for help on internal slash commands\n"
" \\g or terminate with semicolon to execute query\n"
" \\q to quit\n\n"),
pset.progname);
#ifdef USE_SSL
printSSLInfo();
#endif
@ -447,7 +458,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
if (!result)
{
fprintf(stderr, "%s: couldn't set printing parameter %s\n", pset.progname, value);
fprintf(stderr, gettext("%s: couldn't set printing parameter %s\n"), pset.progname, value);
exit(EXIT_FAILURE);
}
@ -493,7 +504,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
{
if (!DeleteVariable(pset.vars, value))
{
fprintf(stderr, "%s: could not delete variable %s\n",
fprintf(stderr, gettext("%s: could not delete variable %s\n"),
pset.progname, value);
exit(EXIT_FAILURE);
}
@ -503,7 +514,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
*equal_loc = '\0';
if (!SetVariable(pset.vars, value, equal_loc + 1))
{
fprintf(stderr, "%s: could not set variable %s\n",
fprintf(stderr, gettext("%s: could not set variable %s\n"),
pset.progname, value);
exit(EXIT_FAILURE);
}
@ -534,20 +545,22 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
/* unknown option reported by getopt */
else
{
fprintf(stderr, "Try '%s --help' for more information.\n",
fprintf(stderr, gettext("Try '%s --help' for more information.\n"),
pset.progname);
exit(EXIT_FAILURE);
}
break;
#ifndef HAVE_GETOPT_LONG
case '-':
fprintf(stderr, "%s was compiled without support for long options.\n"
"Use --help for help on invocation options.\n", pset.progname);
fprintf(stderr,
gettext("%s was compiled without support for long options.\n"
"Use --help for help on invocation options.\n"),
pset.progname);
exit(EXIT_FAILURE);
break;
#endif
default:
fprintf(stderr, "Try '%s --help' for more information.\n",
fprintf(stderr, gettext("Try '%s --help' for more information.\n"),
pset.progname);
exit(EXIT_FAILURE);
break;
@ -565,14 +578,14 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
else if (!options->username)
options->username = argv[optind];
else if (!QUIET())
fprintf(stderr, "%s: warning: extra option %s ignored\n",
fprintf(stderr, gettext("%s: warning: extra option %s ignored\n"),
pset.progname, argv[optind]);
optind++;
}
if (used_old_u_option && !QUIET())
fprintf(stderr, "%s: Warning: The -u option is deprecated. Use -U.\n", pset.progname);
fprintf(stderr, gettext("%s: Warning: The -u option is deprecated. Use -U.\n"), pset.progname);
}
@ -599,7 +612,7 @@ process_psqlrc(void)
psqlrc = malloc(strlen(home) + 20);
if (!psqlrc)
{
fprintf(stderr, "%s: out of memory\n", pset.progname);
fprintf(stderr, gettext("%s: out of memory\n"), pset.progname);
exit(EXIT_FAILURE);
}
@ -628,10 +641,10 @@ showVersion(void)
puts("psql (PostgreSQL) " PG_VERSION);
#if defined(USE_READLINE) || defined (USE_HISTORY) || defined(MULTIBYTE)
fputs("contains ", stdout);
fputs(gettext("contains support for: "), stdout);
#ifdef USE_READLINE
fputs("readline", stdout);
fputs(gettext("readline"), stdout);
#define _Feature
#endif
@ -641,7 +654,7 @@ showVersion(void)
#else
#define _Feature
#endif
fputs("history", stdout);
fputs(gettext("history"), stdout);
#endif
#ifdef MULTIBYTE
@ -650,18 +663,18 @@ showVersion(void)
#else
#define _Feature
#endif
fputs("multibyte", stdout);
fputs(gettext("multibyte"), stdout);
#endif
#undef _Feature
puts(" support");
puts("");
#endif
puts("Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group");
puts("Portions Copyright (c) 1996 Regents of the University of California");
puts("Read the file COPYRIGHT or use the command \\copyright to see the");
puts("usage and distribution terms.");
puts(gettext("Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group\n"
"Portions Copyright (c) 1996, Regents of the University of California\n"
"Read the file COPYRIGHT or use the command \\copyright to see the\n"
"usage and distribution terms."));
}
@ -683,7 +696,7 @@ printSSLInfo(void)
return; /* no SSL */
SSL_get_cipher_bits(ssl, &sslbits);
printf("SSL enabled connection. Chiper: %s, bits: %i\n\n",
printf(gettext("SSL connection (cipher: %s, bits: %i)\n\n"),
SSL_get_cipher(ssl), sslbits);
}

View File

@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: c.h,v 1.93 2001/05/30 14:15:27 momjian Exp $
* $Id: c.h,v 1.94 2001/06/02 18:25:18 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -68,6 +68,11 @@
#include <SupportDefs.h>
#endif
#ifdef ENABLE_NLS
#include <libintl.h>
#else
#define gettext(x) (x)
#endif
/* ----------------------------------------------------------------
* Section 1: hacks to cope with non-ANSI C compilers

View File

@ -8,7 +8,7 @@
* or in config.h afterwards. Of course, if you edit config.h, then your
* changes will be overwritten the next time you run configure.
*
* $Id: config.h.in,v 1.164 2001/05/11 23:38:06 petere Exp $
* $Id: config.h.in,v 1.165 2001/06/02 18:25:18 petere Exp $
*/
#ifndef CONFIG_H
@ -84,6 +84,11 @@
/* --enable-pltcl-unknown */
#undef ENABLE_PLTCL_UNKNOWN
/* --enable-nls */
#undef ENABLE_NLS
/* location of locale files */
#undef LOCALEDIR
/*
*------------------------------------------------------------------------

119
src/nls-global.mk Normal file
View File

@ -0,0 +1,119 @@
# $Header: /cvsroot/pgsql/src/nls-global.mk,v 1.1 2001/06/02 18:25:17 petere Exp $
# Common rules for Native Language Support (NLS)
#
# If some subdirectory of the source tree wants to provide NLS, it
# needs to contain a file 'nls.mk' with the following make variable
# assignments:
#
# CATALOG_NAME -- name of the message catalog (xxx.po); probably
# name of the program
# AVAIL_LANGUAGES -- list of languages that are provided/supported
# GETTEXT_FILES -- list of source files that contain message strings
# GETTEXT_TRIGGERS -- (optional) list of functions that contain
# translatable strings
#
# That's all, the rest is done here, if --enable-nls was specified.
#
# The only user-visible targets here are 'init-po', to make an initial
# "blank" catalog from program sources, and 'update-po', which is to
# be called if the messages in the program source have changed, in
# order to merge the changes into the existing .po files.
# existence checked by Makefile.global; otherwise we won't get here
include $(srcdir)/nls.mk
# If user specified the languages he wants in --enable-nls=LANGUAGES,
# filter out the rest. Else use all available ones.
ifdef WANTED_LANGUAGES
LANGUAGES = $(filter $(WANTED_LANGUAGES), $(AVAIL_LANGUAGES))
else
LANGUAGES = $(AVAIL_LANGUAGES)
endif
PO_FILES = $(addsuffix .po, $(LANGUAGES))
MO_FILES = $(addsuffix .mo, $(LANGUAGES))
XGETTEXT += --foreign-user
all-po: $(MO_FILES)
distprep: $(srcdir)/$(CATALOG_NAME).pot
%.mo: %.po
$(MSGFMT) -o $@ $<
ifdef XGETTEXT
ifeq ($(word 1,$(GETTEXT_FILES)),+)
$(srcdir)/$(CATALOG_NAME).pot: $(word 2, $(GETTEXT_FILES))
$(XGETTEXT) -D $(srcdir) -ctranslator -n $(addprefix -k, $(GETTEXT_TRIGGERS)) -f $<
else
$(srcdir)/$(CATALOG_NAME).pot: $(GETTEXT_FILES)
$(XGETTEXT) -ctranslator -n $(addprefix -k, $(GETTEXT_TRIGGERS)) $^
endif
mv messages.po $@
else # not XGETTEXT
@echo "You don't have 'xgettext'."; exit 1
endif # not XGETTEXT
install-po: all-po installdirs-po
for lang in $(LANGUAGES); do \
$(INSTALL_DATA) $$lang.mo $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(CATALOG_NAME).mo || exit 1; \
done
installdirs-po:
$(mkinstalldirs) $(foreach lang, $(LANGUAGES), $(DESTDIR)$(localedir)/$(lang)/LC_MESSAGES)
uninstall-po:
rm -f $(foreach lang, $(LANGUAGES), $(DESTDIR)$(localedir)/$(lang)/LC_MESSAGES/$(CATALOG_NAME).mo)
clean-po:
rm -f $(MO_FILES)
@rm -f $(addsuffix .po.old, $(AVAIL_LANGUAGES))
maintainer-clean-po:
rm -f $(srcdir)/$(CATALOG_NAME).pot
maintainer-check-po: $(PO_FILES)
for file in $^; do \
$(MSGFMT) -v -o /dev/null $$file || exit 1; \
done
init-po: $(srcdir)/$(CATALOG_NAME).pot
update-po: $(srcdir)/$(CATALOG_NAME).pot
ifdef MSGMERGE
# XXX should be $(LANGUAGES)?
@for lang in $(AVAIL_LANGUAGES); do \
echo "merging $$lang:"; \
if $(MSGMERGE) $(srcdir)/$$lang.po $< -o $$lang.po.new; \
then \
mv $(srcdir)/$$lang.po $$lang.po.old; \
mv $$lang.po.new $(srcdir)/$$lang.po; \
else \
echo "msgmerge for $$lang failed"; \
rm -f $$lang.po.new; \
fi; \
done
else
@echo "You don't have 'msgmerge'." ; exit 1
endif
all: all-po
install: install-po
installdirs: installdirs-po
uninstall: uninstall-po
clean distclean: clean-po
maintainer-clean: maintainer-clean-po
maintainer-check: maintainer-check-po
.PHONY: all-po install-po installdirs-po uninstall-po clean-po \
maintainer-clean-po maintainer-check-po init-po update-po