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 @@ ...@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * 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) ...@@ -185,11 +185,13 @@ err_out(void)
static void static void
usage(void) usage(void)
{ {
fprintf(stderr, "Usage:\n postgres -boot [-d] [-D datadir] [-F] [-x num] dbname\n"); fprintf(stderr,
fprintf(stderr, " -d debug mode\n"); gettext("Usage:\n"
fprintf(stderr, " -D datadir data directory\n"); " postgres -boot [-d] [-D datadir] [-F] [-x num] dbname\n"
fprintf(stderr, " -F turn off fsync\n"); " -d debug mode\n"
fprintf(stderr, " -x num internal use\n"); " -D datadir data directory\n"
" -F turn off fsync\n"
" -x num internal use\n"));
proc_exit(1); proc_exit(1);
} }
...@@ -286,10 +288,11 @@ BootstrapMain(int argc, char *argv[]) ...@@ -286,10 +288,11 @@ BootstrapMain(int argc, char *argv[])
{ {
if (!potential_DataDir) if (!potential_DataDir)
{ {
fprintf(stderr, "%s does not know where to find the database system " fprintf(stderr,
"data. You must specify the directory that contains the " gettext("%s does not know where to find the database system data.\n"
"database system either by specifying the -D invocation " "You must specify the directory that contains the database system\n"
"option or by setting the PGDATA environment variable.\n\n", "either by specifying the -D invocation option or by setting the\n"
"PGDATA environment variable.\n\n"),
argv[0]); argv[0]);
proc_exit(1); proc_exit(1);
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* *
* *
* IDENTIFICATION * 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 @@ ...@@ -41,12 +41,6 @@
#include "tcop/tcopprot.h" #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 int
main(int argc, char *argv[]) main(int argc, char *argv[])
...@@ -87,7 +81,7 @@ main(int argc, char *argv[]) ...@@ -87,7 +81,7 @@ main(int argc, char *argv[])
#if defined(__alpha) #if defined(__alpha)
if (setsysinfo(SSI_NVPAIRS, buffer, 1, (caddr_t) NULL, if (setsysinfo(SSI_NVPAIRS, buffer, 1, (caddr_t) NULL,
(unsigned long) NULL) < 0) (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
#endif /* NOFIXADE || NOPRINTADE */ #endif /* NOFIXADE || NOPRINTADE */
...@@ -129,7 +123,12 @@ main(int argc, char *argv[]) ...@@ -129,7 +123,12 @@ main(int argc, char *argv[])
#ifndef __BEOS__ #ifndef __BEOS__
if (geteuid() == 0) 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); exit(1);
} }
#endif /* __BEOS__ */ #endif /* __BEOS__ */
...@@ -145,7 +144,7 @@ main(int argc, char *argv[]) ...@@ -145,7 +144,7 @@ main(int argc, char *argv[])
*/ */
if (getuid() != geteuid()) 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]); argv[0]);
exit(1); exit(1);
} }
...@@ -194,7 +193,7 @@ main(int argc, char *argv[]) ...@@ -194,7 +193,7 @@ main(int argc, char *argv[])
pw = getpwuid(geteuid()); pw = getpwuid(geteuid());
if (pw == NULL) if (pw == NULL)
{ {
fprintf(stderr, "%s: invalid current euid %d\n", fprintf(stderr, gettext("%s: invalid current euid %d\n"),
argv[0], (int) geteuid()); argv[0], (int) geteuid());
exit(1); exit(1);
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * 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) ...@@ -217,24 +217,22 @@ geqo(Query *root, int number_of_rels, List *initial_rels)
#if defined(ERX) && defined(GEQO_DEBUG) #if defined(ERX) && defined(GEQO_DEBUG)
if (edge_failures != 0) 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 else
fprintf(stdout, "No edge failures detected.\n"); elog(DEBUG, "[GEQO] No edge failures detected.");
#endif #endif
#if defined(CX) && defined(GEQO_DEBUG) #if defined(CX) && defined(GEQO_DEBUG)
if (mutations != 0) if (mutations != 0)
fprintf(stdout, "\nMutations: %d Generations: %d\n", mutations, generation); elog(DEBUG, "[GEQO] mutations: %d, generations: %d", mutations, generation);
else else
fprintf(stdout, "No mutations processed.\n"); elog(DEBUG, "[GEQO] No mutations processed.");
#endif #endif
#ifdef GEQO_DEBUG #ifdef GEQO_DEBUG
fprintf(stdout, "\n");
print_pool(stdout, pool, 0, pool_size - 1); print_pool(stdout, pool, 0, pool_size - 1);
#endif #endif
......
This diff is collapsed.
CATALOG_NAME := postgres CATALOG_NAME := postgres
AVAIL_LANGUAGES := de AVAIL_LANGUAGES := de
GETTEXT_FILES := + gettext-files GETTEXT_FILES := + gettext-files
GETTEXT_TRIGGERS:= elog:2 GETTEXT_TRIGGERS:= elog:2 postmaster_error
This diff is collapsed.
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * 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 @@ ...@@ -122,6 +122,9 @@
#define dummyret char #define dummyret char
#endif #endif
#ifndef __GNUC__
#define __attribute__(x)
#endif
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* Section 2: bool, true, false, TRUE, FALSE, NULL * 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