Commit 12c15520 authored by Peter Eisentraut's avatar Peter Eisentraut

Mark many strings in backend not covered by elog for translation. Also,

make strings in xlog.c look more like English and less like binary noise.
parent 277a47ad
This diff is collapsed.
......@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.107 2001/05/12 01:48:49 petere Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.108 2001/06/03 14:53:56 petere Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -185,11 +185,13 @@ err_out(void)
static void
usage(void)
{
fprintf(stderr, "Usage:\n postgres -boot [-d] [-D datadir] [-F] [-x num] dbname\n");
fprintf(stderr, " -d debug mode\n");
fprintf(stderr, " -D datadir data directory\n");
fprintf(stderr, " -F turn off fsync\n");
fprintf(stderr, " -x num internal use\n");
fprintf(stderr,
gettext("Usage:\n"
" postgres -boot [-d] [-D datadir] [-F] [-x num] dbname\n"
" -d debug mode\n"
" -D datadir data directory\n"
" -F turn off fsync\n"
" -x num internal use\n"));
proc_exit(1);
}
......@@ -286,10 +288,11 @@ BootstrapMain(int argc, char *argv[])
{
if (!potential_DataDir)
{
fprintf(stderr, "%s does not know where to find the database system "
"data. You must specify the directory that contains the "
"database system either by specifying the -D invocation "
"option or by setting the PGDATA environment variable.\n\n",
fprintf(stderr,
gettext("%s does not know where to find the database system data.\n"
"You must specify the directory that contains the database system\n"
"either by specifying the -D invocation option or by setting the\n"
"PGDATA environment variable.\n\n"),
argv[0]);
proc_exit(1);
}
......
......@@ -13,7 +13,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.44 2001/06/02 18:25:17 petere Exp $
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.45 2001/06/03 14:53:56 petere Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -41,12 +41,6 @@
#include "tcop/tcopprot.h"
#define NOROOTEXEC "\
\n\"root\" execution of the PostgreSQL server is not permitted.\n\n\
The server must be started under an unprivileged userid to prevent\n\
a possible system security compromise. See the INSTALL file for\n\
more information on how to properly start the server.\n\n"
int
main(int argc, char *argv[])
......@@ -87,7 +81,7 @@ main(int argc, char *argv[])
#if defined(__alpha)
if (setsysinfo(SSI_NVPAIRS, buffer, 1, (caddr_t) NULL,
(unsigned long) NULL) < 0)
fprintf(stderr, "setsysinfo failed: %d\n", errno);
fprintf(stderr, gettext("%s: setsysinfo failed: %s\n"), argv[0], strerror(errno));
#endif
#endif /* NOFIXADE || NOPRINTADE */
......@@ -129,7 +123,12 @@ main(int argc, char *argv[])
#ifndef __BEOS__
if (geteuid() == 0)
{
fprintf(stderr, "%s", NOROOTEXEC);
fprintf(stderr, gettext(
"\"root\" execution of the PostgreSQL server is not permitted.\n\n"
"The server must be started under an unprivileged user id to prevent\n"
"a possible system security compromise. See the documentation for\n"
"more information on how to properly start the server.\n\n"
));
exit(1);
}
#endif /* __BEOS__ */
......@@ -145,7 +144,7 @@ main(int argc, char *argv[])
*/
if (getuid() != geteuid())
{
fprintf(stderr, "%s: real and effective userids must match\n",
fprintf(stderr, gettext("%s: real and effective user ids must match\n"),
argv[0]);
exit(1);
}
......@@ -194,7 +193,7 @@ main(int argc, char *argv[])
pw = getpwuid(geteuid());
if (pw == NULL)
{
fprintf(stderr, "%s: invalid current euid %d\n",
fprintf(stderr, gettext("%s: invalid current euid %d\n"),
argv[0], (int) geteuid());
exit(1);
}
......
......@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo_main.c,v 1.27 2001/03/22 03:59:33 momjian Exp $
* $Id: geqo_main.c,v 1.28 2001/06/03 14:53:56 petere Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -217,24 +217,22 @@ geqo(Query *root, int number_of_rels, List *initial_rels)
#if defined(ERX) && defined(GEQO_DEBUG)
if (edge_failures != 0)
fprintf(stdout, "\nFailures: %d Avg: %d\n", edge_failures, (int) generation / edge_failures);
elog(DEBUG, "[GEQO] failures: %d, average: %d",
edge_failures, (int) generation / edge_failures);
else
fprintf(stdout, "No edge failures detected.\n");
elog(DEBUG, "[GEQO] No edge failures detected.");
#endif
#if defined(CX) && defined(GEQO_DEBUG)
if (mutations != 0)
fprintf(stdout, "\nMutations: %d Generations: %d\n", mutations, generation);
elog(DEBUG, "[GEQO] mutations: %d, generations: %d", mutations, generation);
else
fprintf(stdout, "No mutations processed.\n");
elog(DEBUG, "[GEQO] No mutations processed.");
#endif
#ifdef GEQO_DEBUG
fprintf(stdout, "\n");
print_pool(stdout, pool, 0, pool_size - 1);
#endif
......
This diff is collapsed.
CATALOG_NAME := postgres
AVAIL_LANGUAGES := de
GETTEXT_FILES := + gettext-files
GETTEXT_TRIGGERS:= elog:2
GETTEXT_TRIGGERS:= elog:2 postmaster_error
This diff is collapsed.
......@@ -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.94 2001/06/02 18:25:18 petere Exp $
* $Id: c.h,v 1.95 2001/06/03 14:53:56 petere Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -122,6 +122,9 @@
#define dummyret char
#endif
#ifndef __GNUC__
#define __attribute__(x)
#endif
/* ----------------------------------------------------------------
* Section 2: bool, true, false, TRUE, FALSE, NULL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment