mirror of
https://github.com/postgres/postgres.git
synced 2025-04-21 12:05:57 +03:00
Use _() macro consistently rather than gettext(). Add translation
macros around strings that were missing them.
This commit is contained in:
parent
64011b4dce
commit
0542b1e2fe
@ -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
|
||||||
* $PostgreSQL: pgsql/src/backend/catalog/dependency.c,v 1.41 2004/12/31 21:59:38 pgsql Exp $
|
* $PostgreSQL: pgsql/src/backend/catalog/dependency.c,v 1.42 2005/02/22 04:35:34 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1424,18 +1424,18 @@ getObjectDescription(const ObjectAddress *object)
|
|||||||
case OCLASS_CLASS:
|
case OCLASS_CLASS:
|
||||||
getRelationDescription(&buffer, object->objectId);
|
getRelationDescription(&buffer, object->objectId);
|
||||||
if (object->objectSubId != 0)
|
if (object->objectSubId != 0)
|
||||||
appendStringInfo(&buffer, gettext(" column %s"),
|
appendStringInfo(&buffer, _(" column %s"),
|
||||||
get_relid_attribute_name(object->objectId,
|
get_relid_attribute_name(object->objectId,
|
||||||
object->objectSubId));
|
object->objectSubId));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OCLASS_PROC:
|
case OCLASS_PROC:
|
||||||
appendStringInfo(&buffer, gettext("function %s"),
|
appendStringInfo(&buffer, _("function %s"),
|
||||||
format_procedure(object->objectId));
|
format_procedure(object->objectId));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OCLASS_TYPE:
|
case OCLASS_TYPE:
|
||||||
appendStringInfo(&buffer, gettext("type %s"),
|
appendStringInfo(&buffer, _("type %s"),
|
||||||
format_type_be(object->objectId));
|
format_type_be(object->objectId));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1465,7 +1465,7 @@ getObjectDescription(const ObjectAddress *object)
|
|||||||
|
|
||||||
castForm = (Form_pg_cast) GETSTRUCT(tup);
|
castForm = (Form_pg_cast) GETSTRUCT(tup);
|
||||||
|
|
||||||
appendStringInfo(&buffer, gettext("cast from %s to %s"),
|
appendStringInfo(&buffer, _("cast from %s to %s"),
|
||||||
format_type_be(castForm->castsource),
|
format_type_be(castForm->castsource),
|
||||||
format_type_be(castForm->casttarget));
|
format_type_be(castForm->casttarget));
|
||||||
|
|
||||||
@ -1502,13 +1502,13 @@ getObjectDescription(const ObjectAddress *object)
|
|||||||
|
|
||||||
if (OidIsValid(con->conrelid))
|
if (OidIsValid(con->conrelid))
|
||||||
{
|
{
|
||||||
appendStringInfo(&buffer, gettext("constraint %s on "),
|
appendStringInfo(&buffer, _("constraint %s on "),
|
||||||
NameStr(con->conname));
|
NameStr(con->conname));
|
||||||
getRelationDescription(&buffer, con->conrelid);
|
getRelationDescription(&buffer, con->conrelid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
appendStringInfo(&buffer, gettext("constraint %s"),
|
appendStringInfo(&buffer, _("constraint %s"),
|
||||||
NameStr(con->conname));
|
NameStr(con->conname));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1527,7 +1527,7 @@ getObjectDescription(const ObjectAddress *object)
|
|||||||
if (!HeapTupleIsValid(conTup))
|
if (!HeapTupleIsValid(conTup))
|
||||||
elog(ERROR, "cache lookup failed for conversion %u",
|
elog(ERROR, "cache lookup failed for conversion %u",
|
||||||
object->objectId);
|
object->objectId);
|
||||||
appendStringInfo(&buffer, gettext("conversion %s"),
|
appendStringInfo(&buffer, _("conversion %s"),
|
||||||
NameStr(((Form_pg_conversion) GETSTRUCT(conTup))->conname));
|
NameStr(((Form_pg_conversion) GETSTRUCT(conTup))->conname));
|
||||||
ReleaseSysCache(conTup);
|
ReleaseSysCache(conTup);
|
||||||
break;
|
break;
|
||||||
@ -1564,7 +1564,7 @@ getObjectDescription(const ObjectAddress *object)
|
|||||||
colobject.objectId = attrdef->adrelid;
|
colobject.objectId = attrdef->adrelid;
|
||||||
colobject.objectSubId = attrdef->adnum;
|
colobject.objectSubId = attrdef->adnum;
|
||||||
|
|
||||||
appendStringInfo(&buffer, gettext("default for %s"),
|
appendStringInfo(&buffer, _("default for %s"),
|
||||||
getObjectDescription(&colobject));
|
getObjectDescription(&colobject));
|
||||||
|
|
||||||
systable_endscan(adscan);
|
systable_endscan(adscan);
|
||||||
@ -1582,14 +1582,14 @@ getObjectDescription(const ObjectAddress *object)
|
|||||||
if (!HeapTupleIsValid(langTup))
|
if (!HeapTupleIsValid(langTup))
|
||||||
elog(ERROR, "cache lookup failed for language %u",
|
elog(ERROR, "cache lookup failed for language %u",
|
||||||
object->objectId);
|
object->objectId);
|
||||||
appendStringInfo(&buffer, gettext("language %s"),
|
appendStringInfo(&buffer, _("language %s"),
|
||||||
NameStr(((Form_pg_language) GETSTRUCT(langTup))->lanname));
|
NameStr(((Form_pg_language) GETSTRUCT(langTup))->lanname));
|
||||||
ReleaseSysCache(langTup);
|
ReleaseSysCache(langTup);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case OCLASS_OPERATOR:
|
case OCLASS_OPERATOR:
|
||||||
appendStringInfo(&buffer, gettext("operator %s"),
|
appendStringInfo(&buffer, _("operator %s"),
|
||||||
format_operator(object->objectId));
|
format_operator(object->objectId));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1623,7 +1623,7 @@ getObjectDescription(const ObjectAddress *object)
|
|||||||
else
|
else
|
||||||
nspname = get_namespace_name(opcForm->opcnamespace);
|
nspname = get_namespace_name(opcForm->opcnamespace);
|
||||||
|
|
||||||
appendStringInfo(&buffer, gettext("operator class %s for access method %s"),
|
appendStringInfo(&buffer, _("operator class %s for access method %s"),
|
||||||
quote_qualified_identifier(nspname,
|
quote_qualified_identifier(nspname,
|
||||||
NameStr(opcForm->opcname)),
|
NameStr(opcForm->opcname)),
|
||||||
NameStr(amForm->amname));
|
NameStr(amForm->amname));
|
||||||
@ -1659,7 +1659,7 @@ getObjectDescription(const ObjectAddress *object)
|
|||||||
|
|
||||||
rule = (Form_pg_rewrite) GETSTRUCT(tup);
|
rule = (Form_pg_rewrite) GETSTRUCT(tup);
|
||||||
|
|
||||||
appendStringInfo(&buffer, gettext("rule %s on "),
|
appendStringInfo(&buffer, _("rule %s on "),
|
||||||
NameStr(rule->rulename));
|
NameStr(rule->rulename));
|
||||||
getRelationDescription(&buffer, rule->ev_class);
|
getRelationDescription(&buffer, rule->ev_class);
|
||||||
|
|
||||||
@ -1694,7 +1694,7 @@ getObjectDescription(const ObjectAddress *object)
|
|||||||
|
|
||||||
trig = (Form_pg_trigger) GETSTRUCT(tup);
|
trig = (Form_pg_trigger) GETSTRUCT(tup);
|
||||||
|
|
||||||
appendStringInfo(&buffer, gettext("trigger %s on "),
|
appendStringInfo(&buffer, _("trigger %s on "),
|
||||||
NameStr(trig->tgname));
|
NameStr(trig->tgname));
|
||||||
getRelationDescription(&buffer, trig->tgrelid);
|
getRelationDescription(&buffer, trig->tgrelid);
|
||||||
|
|
||||||
@ -1711,7 +1711,7 @@ getObjectDescription(const ObjectAddress *object)
|
|||||||
if (!nspname)
|
if (!nspname)
|
||||||
elog(ERROR, "cache lookup failed for namespace %u",
|
elog(ERROR, "cache lookup failed for namespace %u",
|
||||||
object->objectId);
|
object->objectId);
|
||||||
appendStringInfo(&buffer, gettext("schema %s"), nspname);
|
appendStringInfo(&buffer, _("schema %s"), nspname);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1755,40 +1755,40 @@ getRelationDescription(StringInfo buffer, Oid relid)
|
|||||||
switch (relForm->relkind)
|
switch (relForm->relkind)
|
||||||
{
|
{
|
||||||
case RELKIND_RELATION:
|
case RELKIND_RELATION:
|
||||||
appendStringInfo(buffer, gettext("table %s"),
|
appendStringInfo(buffer, _("table %s"),
|
||||||
relname);
|
relname);
|
||||||
break;
|
break;
|
||||||
case RELKIND_INDEX:
|
case RELKIND_INDEX:
|
||||||
appendStringInfo(buffer, gettext("index %s"),
|
appendStringInfo(buffer, _("index %s"),
|
||||||
relname);
|
relname);
|
||||||
break;
|
break;
|
||||||
case RELKIND_SPECIAL:
|
case RELKIND_SPECIAL:
|
||||||
appendStringInfo(buffer, gettext("special system relation %s"),
|
appendStringInfo(buffer, _("special system relation %s"),
|
||||||
relname);
|
relname);
|
||||||
break;
|
break;
|
||||||
case RELKIND_SEQUENCE:
|
case RELKIND_SEQUENCE:
|
||||||
appendStringInfo(buffer, gettext("sequence %s"),
|
appendStringInfo(buffer, _("sequence %s"),
|
||||||
relname);
|
relname);
|
||||||
break;
|
break;
|
||||||
case RELKIND_UNCATALOGED:
|
case RELKIND_UNCATALOGED:
|
||||||
appendStringInfo(buffer, gettext("uncataloged table %s"),
|
appendStringInfo(buffer, _("uncataloged table %s"),
|
||||||
relname);
|
relname);
|
||||||
break;
|
break;
|
||||||
case RELKIND_TOASTVALUE:
|
case RELKIND_TOASTVALUE:
|
||||||
appendStringInfo(buffer, gettext("toast table %s"),
|
appendStringInfo(buffer, _("toast table %s"),
|
||||||
relname);
|
relname);
|
||||||
break;
|
break;
|
||||||
case RELKIND_VIEW:
|
case RELKIND_VIEW:
|
||||||
appendStringInfo(buffer, gettext("view %s"),
|
appendStringInfo(buffer, _("view %s"),
|
||||||
relname);
|
relname);
|
||||||
break;
|
break;
|
||||||
case RELKIND_COMPOSITE_TYPE:
|
case RELKIND_COMPOSITE_TYPE:
|
||||||
appendStringInfo(buffer, gettext("composite type %s"),
|
appendStringInfo(buffer, _("composite type %s"),
|
||||||
relname);
|
relname);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* shouldn't get here */
|
/* shouldn't get here */
|
||||||
appendStringInfo(buffer, gettext("relation %s"),
|
appendStringInfo(buffer, _("relation %s"),
|
||||||
relname);
|
relname);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.122 2005/01/12 21:37:53 tgl Exp $
|
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.123 2005/02/22 04:35:57 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -449,7 +449,7 @@ ClientAuthentication(Port *port)
|
|||||||
(errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION),
|
(errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION),
|
||||||
errmsg("no pg_hba.conf entry for host \"%s\", user \"%s\", database \"%s\", %s",
|
errmsg("no pg_hba.conf entry for host \"%s\", user \"%s\", database \"%s\", %s",
|
||||||
hostinfo, port->user_name, port->database_name,
|
hostinfo, port->user_name, port->database_name,
|
||||||
port->ssl ? gettext("SSL on") : gettext("SSL off"))));
|
port->ssl ? _("SSL on") : _("SSL off"))));
|
||||||
#else
|
#else
|
||||||
ereport(FATAL,
|
ereport(FATAL,
|
||||||
(errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION),
|
(errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION),
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.175 2005/01/12 16:38:17 tgl Exp $
|
* $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.176 2005/02/22 04:35:57 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -308,21 +308,21 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber,
|
|||||||
switch (addr->ai_family)
|
switch (addr->ai_family)
|
||||||
{
|
{
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
familyDesc = gettext("IPv4");
|
familyDesc = _("IPv4");
|
||||||
break;
|
break;
|
||||||
#ifdef HAVE_IPV6
|
#ifdef HAVE_IPV6
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
familyDesc = gettext("IPv6");
|
familyDesc = _("IPv6");
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_UNIX_SOCKETS
|
#ifdef HAVE_UNIX_SOCKETS
|
||||||
case AF_UNIX:
|
case AF_UNIX:
|
||||||
familyDesc = gettext("Unix");
|
familyDesc = _("Unix");
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
snprintf(familyDescBuf, sizeof(familyDescBuf),
|
snprintf(familyDescBuf, sizeof(familyDescBuf),
|
||||||
gettext("unrecognized address family %d"),
|
_("unrecognized address family %d"),
|
||||||
addr->ai_family);
|
addr->ai_family);
|
||||||
familyDesc = familyDescBuf;
|
familyDesc = familyDescBuf;
|
||||||
break;
|
break;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.119 2004/12/31 22:00:27 pgsql Exp $
|
* $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.120 2005/02/22 04:36:22 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -618,7 +618,7 @@ yyerror(const char *message)
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||||
/* translator: %s is typically "syntax error" */
|
/* translator: %s is typically "syntax error" */
|
||||||
errmsg("%s at end of input", gettext(message)),
|
errmsg("%s at end of input", _(message)),
|
||||||
errposition(cursorpos)));
|
errposition(cursorpos)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -626,7 +626,7 @@ yyerror(const char *message)
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||||
/* translator: first %s is typically "syntax error" */
|
/* translator: first %s is typically "syntax error" */
|
||||||
errmsg("%s at or near \"%s\"", gettext(message), loc),
|
errmsg("%s at or near \"%s\"", _(message), loc),
|
||||||
errposition(cursorpos)));
|
errposition(cursorpos)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.444 2005/02/20 02:21:54 tgl Exp $
|
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.445 2005/02/22 04:36:36 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
*
|
*
|
||||||
@ -1065,35 +1065,35 @@ pmdaemonize(void)
|
|||||||
static void
|
static void
|
||||||
usage(const char *progname)
|
usage(const char *progname)
|
||||||
{
|
{
|
||||||
printf(gettext("%s is the PostgreSQL server.\n\n"), progname);
|
printf(_("%s is the PostgreSQL server.\n\n"), progname);
|
||||||
printf(gettext("Usage:\n %s [OPTION]...\n\n"), progname);
|
printf(_("Usage:\n %s [OPTION]...\n\n"), progname);
|
||||||
printf(gettext("Options:\n"));
|
printf(_("Options:\n"));
|
||||||
#ifdef USE_ASSERT_CHECKING
|
#ifdef USE_ASSERT_CHECKING
|
||||||
printf(gettext(" -A 1|0 enable/disable run-time assert checking\n"));
|
printf(_(" -A 1|0 enable/disable run-time assert checking\n"));
|
||||||
#endif
|
#endif
|
||||||
printf(gettext(" -B NBUFFERS number of shared buffers\n"));
|
printf(_(" -B NBUFFERS number of shared buffers\n"));
|
||||||
printf(gettext(" -c NAME=VALUE set run-time parameter\n"));
|
printf(_(" -c NAME=VALUE set run-time parameter\n"));
|
||||||
printf(gettext(" -d 1-5 debugging level\n"));
|
printf(_(" -d 1-5 debugging level\n"));
|
||||||
printf(gettext(" -D DATADIR database directory\n"));
|
printf(_(" -D DATADIR database directory\n"));
|
||||||
printf(gettext(" -F turn fsync off\n"));
|
printf(_(" -F turn fsync off\n"));
|
||||||
printf(gettext(" -h HOSTNAME host name or IP address to listen on\n"));
|
printf(_(" -h HOSTNAME host name or IP address to listen on\n"));
|
||||||
printf(gettext(" -i enable TCP/IP connections\n"));
|
printf(_(" -i enable TCP/IP connections\n"));
|
||||||
printf(gettext(" -k DIRECTORY Unix-domain socket location\n"));
|
printf(_(" -k DIRECTORY Unix-domain socket location\n"));
|
||||||
#ifdef USE_SSL
|
#ifdef USE_SSL
|
||||||
printf(gettext(" -l enable SSL connections\n"));
|
printf(_(" -l enable SSL connections\n"));
|
||||||
#endif
|
#endif
|
||||||
printf(gettext(" -N MAX-CONNECT maximum number of allowed connections\n"));
|
printf(_(" -N MAX-CONNECT maximum number of allowed connections\n"));
|
||||||
printf(gettext(" -o OPTIONS pass \"OPTIONS\" to each server process\n"));
|
printf(_(" -o OPTIONS pass \"OPTIONS\" to each server process\n"));
|
||||||
printf(gettext(" -p PORT port number to listen on\n"));
|
printf(_(" -p PORT port number to listen on\n"));
|
||||||
printf(gettext(" -S silent mode (start in background without logging output)\n"));
|
printf(_(" -S silent mode (start in background without logging output)\n"));
|
||||||
printf(gettext(" --help show this help, then exit\n"));
|
printf(_(" --help show this help, then exit\n"));
|
||||||
printf(gettext(" --version output version information, then exit\n"));
|
printf(_(" --version output version information, then exit\n"));
|
||||||
|
|
||||||
printf(gettext("\nDeveloper options:\n"));
|
printf(_("\nDeveloper options:\n"));
|
||||||
printf(gettext(" -n do not reinitialize shared memory after abnormal exit\n"));
|
printf(_(" -n do not reinitialize shared memory after abnormal exit\n"));
|
||||||
printf(gettext(" -s send SIGSTOP to all backend servers if one dies\n"));
|
printf(_(" -s send SIGSTOP to all backend servers if one dies\n"));
|
||||||
|
|
||||||
printf(gettext("\nPlease read the documentation for the complete list of run-time\n"
|
printf(_("\nPlease read the documentation for the complete list of run-time\n"
|
||||||
"configuration settings and how to set them on the command line or in\n"
|
"configuration settings and how to set them on the command line or in\n"
|
||||||
"the configuration file.\n\n"
|
"the configuration file.\n\n"
|
||||||
"Report bugs to <pgsql-bugs@postgresql.org>.\n"));
|
"Report bugs to <pgsql-bugs@postgresql.org>.\n"));
|
||||||
@ -1993,7 +1993,7 @@ reaper(SIGNAL_ARGS)
|
|||||||
StartupPID = 0;
|
StartupPID = 0;
|
||||||
if (exitstatus != 0)
|
if (exitstatus != 0)
|
||||||
{
|
{
|
||||||
LogChildExit(LOG, gettext("startup process"),
|
LogChildExit(LOG, _("startup process"),
|
||||||
pid, exitstatus);
|
pid, exitstatus);
|
||||||
ereport(LOG,
|
ereport(LOG,
|
||||||
(errmsg("aborting startup due to startup process failure")));
|
(errmsg("aborting startup due to startup process failure")));
|
||||||
@ -2067,7 +2067,7 @@ reaper(SIGNAL_ARGS)
|
|||||||
* Any unexpected exit of the bgwriter is treated as a crash.
|
* Any unexpected exit of the bgwriter is treated as a crash.
|
||||||
*/
|
*/
|
||||||
HandleChildCrash(pid, exitstatus,
|
HandleChildCrash(pid, exitstatus,
|
||||||
gettext("background writer process"));
|
_("background writer process"));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2080,7 +2080,7 @@ reaper(SIGNAL_ARGS)
|
|||||||
{
|
{
|
||||||
PgArchPID = 0;
|
PgArchPID = 0;
|
||||||
if (exitstatus != 0)
|
if (exitstatus != 0)
|
||||||
LogChildExit(LOG, gettext("archiver process"),
|
LogChildExit(LOG, _("archiver process"),
|
||||||
pid, exitstatus);
|
pid, exitstatus);
|
||||||
if (XLogArchivingActive() &&
|
if (XLogArchivingActive() &&
|
||||||
StartupPID == 0 && !FatalError && Shutdown == NoShutdown)
|
StartupPID == 0 && !FatalError && Shutdown == NoShutdown)
|
||||||
@ -2097,7 +2097,7 @@ reaper(SIGNAL_ARGS)
|
|||||||
{
|
{
|
||||||
PgStatPID = 0;
|
PgStatPID = 0;
|
||||||
if (exitstatus != 0)
|
if (exitstatus != 0)
|
||||||
LogChildExit(LOG, gettext("statistics collector process"),
|
LogChildExit(LOG, _("statistics collector process"),
|
||||||
pid, exitstatus);
|
pid, exitstatus);
|
||||||
if (StartupPID == 0 && !FatalError && Shutdown == NoShutdown)
|
if (StartupPID == 0 && !FatalError && Shutdown == NoShutdown)
|
||||||
PgStatPID = pgstat_start();
|
PgStatPID = pgstat_start();
|
||||||
@ -2111,7 +2111,7 @@ reaper(SIGNAL_ARGS)
|
|||||||
/* for safety's sake, launch new logger *first* */
|
/* for safety's sake, launch new logger *first* */
|
||||||
SysLoggerPID = SysLogger_Start();
|
SysLoggerPID = SysLogger_Start();
|
||||||
if (exitstatus != 0)
|
if (exitstatus != 0)
|
||||||
LogChildExit(LOG, gettext("system logger process"),
|
LogChildExit(LOG, _("system logger process"),
|
||||||
pid, exitstatus);
|
pid, exitstatus);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -2178,7 +2178,7 @@ CleanupBackend(int pid,
|
|||||||
{
|
{
|
||||||
Dlelem *curr;
|
Dlelem *curr;
|
||||||
|
|
||||||
LogChildExit(DEBUG2, gettext("server process"), pid, exitstatus);
|
LogChildExit(DEBUG2, _("server process"), pid, exitstatus);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If a backend dies in an ugly way (i.e. exit status not 0) then we
|
* If a backend dies in an ugly way (i.e. exit status not 0) then we
|
||||||
@ -2188,7 +2188,7 @@ CleanupBackend(int pid,
|
|||||||
*/
|
*/
|
||||||
if (exitstatus != 0)
|
if (exitstatus != 0)
|
||||||
{
|
{
|
||||||
HandleChildCrash(pid, exitstatus, gettext("server process"));
|
HandleChildCrash(pid, exitstatus, _("server process"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2512,7 +2512,7 @@ report_fork_failure_to_client(Port *port, int errnum)
|
|||||||
|
|
||||||
/* Format the error message packet (always V2 protocol) */
|
/* Format the error message packet (always V2 protocol) */
|
||||||
snprintf(buffer, sizeof(buffer), "E%s%s\n",
|
snprintf(buffer, sizeof(buffer), "E%s%s\n",
|
||||||
gettext("could not fork new process for connection: "),
|
_("could not fork new process for connection: "),
|
||||||
strerror(errnum));
|
strerror(errnum));
|
||||||
|
|
||||||
/* Set port to non-blocking. Don't do send() if this fails */
|
/* Set port to non-blocking. Don't do send() if this fails */
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/storage/lmgr/deadlock.c,v 1.32 2004/12/31 22:01:05 pgsql Exp $
|
* $PostgreSQL: pgsql/src/backend/storage/lmgr/deadlock.c,v 1.33 2005/02/22 04:36:49 momjian Exp $
|
||||||
*
|
*
|
||||||
* Interface:
|
* Interface:
|
||||||
*
|
*
|
||||||
@ -864,7 +864,7 @@ DeadLockReport(void)
|
|||||||
{
|
{
|
||||||
/* Lock is for transaction ID */
|
/* Lock is for transaction ID */
|
||||||
appendStringInfo(&buf,
|
appendStringInfo(&buf,
|
||||||
gettext("Process %d waits for %s on transaction %u; blocked by process %d."),
|
_("Process %d waits for %s on transaction %u; blocked by process %d."),
|
||||||
info->pid,
|
info->pid,
|
||||||
GetLockmodeName(info->lockmode),
|
GetLockmodeName(info->lockmode),
|
||||||
info->locktag.objId.xid,
|
info->locktag.objId.xid,
|
||||||
@ -874,7 +874,7 @@ DeadLockReport(void)
|
|||||||
{
|
{
|
||||||
/* Lock is for a relation */
|
/* Lock is for a relation */
|
||||||
appendStringInfo(&buf,
|
appendStringInfo(&buf,
|
||||||
gettext("Process %d waits for %s on relation %u of database %u; blocked by process %d."),
|
_("Process %d waits for %s on relation %u of database %u; blocked by process %d."),
|
||||||
info->pid,
|
info->pid,
|
||||||
GetLockmodeName(info->lockmode),
|
GetLockmodeName(info->lockmode),
|
||||||
info->locktag.relId,
|
info->locktag.relId,
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.441 2005/02/20 02:21:57 tgl Exp $
|
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.442 2005/02/22 04:37:17 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* this is the "main" module of the postgres backend and
|
* this is the "main" module of the postgres backend and
|
||||||
@ -2120,35 +2120,35 @@ assign_max_stack_depth(int newval, bool doit, GucSource source)
|
|||||||
static void
|
static void
|
||||||
usage(const char *progname)
|
usage(const char *progname)
|
||||||
{
|
{
|
||||||
printf(gettext("%s is the PostgreSQL stand-alone backend. It is not\nintended to be used by normal users.\n\n"), progname);
|
printf(_("%s is the PostgreSQL stand-alone backend. It is not\nintended to be used by normal users.\n\n"), progname);
|
||||||
|
|
||||||
printf(gettext("Usage:\n %s [OPTION]... [DBNAME]\n\n"), progname);
|
printf(_("Usage:\n %s [OPTION]... [DBNAME]\n\n"), progname);
|
||||||
printf(gettext("Options:\n"));
|
printf(_("Options:\n"));
|
||||||
#ifdef USE_ASSERT_CHECKING
|
#ifdef USE_ASSERT_CHECKING
|
||||||
printf(gettext(" -A 1|0 enable/disable run-time assert checking\n"));
|
printf(_(" -A 1|0 enable/disable run-time assert checking\n"));
|
||||||
#endif
|
#endif
|
||||||
printf(gettext(" -B NBUFFERS number of shared buffers\n"));
|
printf(_(" -B NBUFFERS number of shared buffers\n"));
|
||||||
printf(gettext(" -c NAME=VALUE set run-time parameter\n"));
|
printf(_(" -c NAME=VALUE set run-time parameter\n"));
|
||||||
printf(gettext(" -d 0-5 debugging level (0 is off)\n"));
|
printf(_(" -d 0-5 debugging level (0 is off)\n"));
|
||||||
printf(gettext(" -D DATADIR database directory\n"));
|
printf(_(" -D DATADIR database directory\n"));
|
||||||
printf(gettext(" -e use European date input format (DMY)\n"));
|
printf(_(" -e use European date input format (DMY)\n"));
|
||||||
printf(gettext(" -E echo query before execution\n"));
|
printf(_(" -E echo query before execution\n"));
|
||||||
printf(gettext(" -F turn fsync off\n"));
|
printf(_(" -F turn fsync off\n"));
|
||||||
printf(gettext(" -N do not use newline as interactive query delimiter\n"));
|
printf(_(" -N do not use newline as interactive query delimiter\n"));
|
||||||
printf(gettext(" -o FILENAME send stdout and stderr to given file\n"));
|
printf(_(" -o FILENAME send stdout and stderr to given file\n"));
|
||||||
printf(gettext(" -P disable system indexes\n"));
|
printf(_(" -P disable system indexes\n"));
|
||||||
printf(gettext(" -s show statistics after each query\n"));
|
printf(_(" -s show statistics after each query\n"));
|
||||||
printf(gettext(" -S WORK-MEM set amount of memory for sorts (in kB)\n"));
|
printf(_(" -S WORK-MEM set amount of memory for sorts (in kB)\n"));
|
||||||
printf(gettext(" --describe-config describe configuration parameters, then exit\n"));
|
printf(_(" --describe-config describe configuration parameters, then exit\n"));
|
||||||
printf(gettext(" --help show this help, then exit\n"));
|
printf(_(" --help show this help, then exit\n"));
|
||||||
printf(gettext(" --version output version information, then exit\n"));
|
printf(_(" --version output version information, then exit\n"));
|
||||||
printf(gettext("\nDeveloper options:\n"));
|
printf(_("\nDeveloper options:\n"));
|
||||||
printf(gettext(" -f s|i|n|m|h forbid use of some plan types\n"));
|
printf(_(" -f s|i|n|m|h forbid use of some plan types\n"));
|
||||||
printf(gettext(" -i do not execute queries\n"));
|
printf(_(" -i do not execute queries\n"));
|
||||||
printf(gettext(" -O allow system table structure changes\n"));
|
printf(_(" -O allow system table structure changes\n"));
|
||||||
printf(gettext(" -t pa|pl|ex show timings after each query\n"));
|
printf(_(" -t pa|pl|ex show timings after each query\n"));
|
||||||
printf(gettext(" -W NUM wait NUM seconds to allow attach from a debugger\n"));
|
printf(_(" -W NUM wait NUM seconds to allow attach from a debugger\n"));
|
||||||
printf(gettext("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"));
|
printf(_("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.155 2004/12/31 22:01:27 pgsql Exp $
|
* $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.156 2005/02/22 04:37:38 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -598,7 +598,7 @@ errcode_for_socket_access(void)
|
|||||||
char *fmtbuf; \
|
char *fmtbuf; \
|
||||||
StringInfoData buf; \
|
StringInfoData buf; \
|
||||||
/* Internationalize the error format string */ \
|
/* Internationalize the error format string */ \
|
||||||
fmt = gettext(fmt); \
|
fmt = _(fmt); \
|
||||||
/* Expand %m in format string */ \
|
/* Expand %m in format string */ \
|
||||||
fmtbuf = expand_fmt_string(fmt, edata); \
|
fmtbuf = expand_fmt_string(fmt, edata); \
|
||||||
initStringInfo(&buf); \
|
initStringInfo(&buf); \
|
||||||
@ -1347,7 +1347,7 @@ log_line_prefix(StringInfo buf)
|
|||||||
const char *username = MyProcPort->user_name;
|
const char *username = MyProcPort->user_name;
|
||||||
|
|
||||||
if (username == NULL || *username == '\0')
|
if (username == NULL || *username == '\0')
|
||||||
username = gettext("[unknown]");
|
username = _("[unknown]");
|
||||||
appendStringInfo(buf, "%s", username);
|
appendStringInfo(buf, "%s", username);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1357,7 +1357,7 @@ log_line_prefix(StringInfo buf)
|
|||||||
const char *dbname = MyProcPort->database_name;
|
const char *dbname = MyProcPort->database_name;
|
||||||
|
|
||||||
if (dbname == NULL || *dbname == '\0')
|
if (dbname == NULL || *dbname == '\0')
|
||||||
dbname = gettext("[unknown]");
|
dbname = _("[unknown]");
|
||||||
appendStringInfo(buf, "%s", dbname);
|
appendStringInfo(buf, "%s", dbname);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1485,13 +1485,13 @@ send_message_to_server_log(ErrorData *edata)
|
|||||||
if (edata->message)
|
if (edata->message)
|
||||||
append_with_tabs(&buf, edata->message);
|
append_with_tabs(&buf, edata->message);
|
||||||
else
|
else
|
||||||
append_with_tabs(&buf, gettext("missing error text"));
|
append_with_tabs(&buf, _("missing error text"));
|
||||||
|
|
||||||
if (edata->cursorpos > 0)
|
if (edata->cursorpos > 0)
|
||||||
appendStringInfo(&buf, gettext(" at character %d"),
|
appendStringInfo(&buf, _(" at character %d"),
|
||||||
edata->cursorpos);
|
edata->cursorpos);
|
||||||
else if (edata->internalpos > 0)
|
else if (edata->internalpos > 0)
|
||||||
appendStringInfo(&buf, gettext(" at character %d"),
|
appendStringInfo(&buf, _(" at character %d"),
|
||||||
edata->internalpos);
|
edata->internalpos);
|
||||||
|
|
||||||
appendStringInfoChar(&buf, '\n');
|
appendStringInfoChar(&buf, '\n');
|
||||||
@ -1501,28 +1501,28 @@ send_message_to_server_log(ErrorData *edata)
|
|||||||
if (edata->detail)
|
if (edata->detail)
|
||||||
{
|
{
|
||||||
log_line_prefix(&buf);
|
log_line_prefix(&buf);
|
||||||
appendStringInfoString(&buf, gettext("DETAIL: "));
|
appendStringInfoString(&buf, _("DETAIL: "));
|
||||||
append_with_tabs(&buf, edata->detail);
|
append_with_tabs(&buf, edata->detail);
|
||||||
appendStringInfoChar(&buf, '\n');
|
appendStringInfoChar(&buf, '\n');
|
||||||
}
|
}
|
||||||
if (edata->hint)
|
if (edata->hint)
|
||||||
{
|
{
|
||||||
log_line_prefix(&buf);
|
log_line_prefix(&buf);
|
||||||
appendStringInfoString(&buf, gettext("HINT: "));
|
appendStringInfoString(&buf, _("HINT: "));
|
||||||
append_with_tabs(&buf, edata->hint);
|
append_with_tabs(&buf, edata->hint);
|
||||||
appendStringInfoChar(&buf, '\n');
|
appendStringInfoChar(&buf, '\n');
|
||||||
}
|
}
|
||||||
if (edata->internalquery)
|
if (edata->internalquery)
|
||||||
{
|
{
|
||||||
log_line_prefix(&buf);
|
log_line_prefix(&buf);
|
||||||
appendStringInfoString(&buf, gettext("QUERY: "));
|
appendStringInfoString(&buf, _("QUERY: "));
|
||||||
append_with_tabs(&buf, edata->internalquery);
|
append_with_tabs(&buf, edata->internalquery);
|
||||||
appendStringInfoChar(&buf, '\n');
|
appendStringInfoChar(&buf, '\n');
|
||||||
}
|
}
|
||||||
if (edata->context)
|
if (edata->context)
|
||||||
{
|
{
|
||||||
log_line_prefix(&buf);
|
log_line_prefix(&buf);
|
||||||
appendStringInfoString(&buf, gettext("CONTEXT: "));
|
appendStringInfoString(&buf, _("CONTEXT: "));
|
||||||
append_with_tabs(&buf, edata->context);
|
append_with_tabs(&buf, edata->context);
|
||||||
appendStringInfoChar(&buf, '\n');
|
appendStringInfoChar(&buf, '\n');
|
||||||
}
|
}
|
||||||
@ -1532,14 +1532,14 @@ send_message_to_server_log(ErrorData *edata)
|
|||||||
if (edata->funcname && edata->filename)
|
if (edata->funcname && edata->filename)
|
||||||
{
|
{
|
||||||
log_line_prefix(&buf);
|
log_line_prefix(&buf);
|
||||||
appendStringInfo(&buf, gettext("LOCATION: %s, %s:%d\n"),
|
appendStringInfo(&buf, _("LOCATION: %s, %s:%d\n"),
|
||||||
edata->funcname, edata->filename,
|
edata->funcname, edata->filename,
|
||||||
edata->lineno);
|
edata->lineno);
|
||||||
}
|
}
|
||||||
else if (edata->filename)
|
else if (edata->filename)
|
||||||
{
|
{
|
||||||
log_line_prefix(&buf);
|
log_line_prefix(&buf);
|
||||||
appendStringInfo(&buf, gettext("LOCATION: %s:%d\n"),
|
appendStringInfo(&buf, _("LOCATION: %s:%d\n"),
|
||||||
edata->filename, edata->lineno);
|
edata->filename, edata->lineno);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1552,7 +1552,7 @@ send_message_to_server_log(ErrorData *edata)
|
|||||||
if (edata->elevel >= log_min_error_statement && debug_query_string != NULL)
|
if (edata->elevel >= log_min_error_statement && debug_query_string != NULL)
|
||||||
{
|
{
|
||||||
log_line_prefix(&buf);
|
log_line_prefix(&buf);
|
||||||
appendStringInfoString(&buf, gettext("STATEMENT: "));
|
appendStringInfoString(&buf, _("STATEMENT: "));
|
||||||
append_with_tabs(&buf, debug_query_string);
|
append_with_tabs(&buf, debug_query_string);
|
||||||
appendStringInfoChar(&buf, '\n');
|
appendStringInfoChar(&buf, '\n');
|
||||||
}
|
}
|
||||||
@ -1678,7 +1678,7 @@ send_message_to_frontend(ErrorData *edata)
|
|||||||
if (edata->message)
|
if (edata->message)
|
||||||
pq_sendstring(&msgbuf, edata->message);
|
pq_sendstring(&msgbuf, edata->message);
|
||||||
else
|
else
|
||||||
pq_sendstring(&msgbuf, gettext("missing error text"));
|
pq_sendstring(&msgbuf, _("missing error text"));
|
||||||
|
|
||||||
if (edata->detail)
|
if (edata->detail)
|
||||||
{
|
{
|
||||||
@ -1754,13 +1754,13 @@ send_message_to_frontend(ErrorData *edata)
|
|||||||
if (edata->message)
|
if (edata->message)
|
||||||
appendStringInfoString(&buf, edata->message);
|
appendStringInfoString(&buf, edata->message);
|
||||||
else
|
else
|
||||||
appendStringInfoString(&buf, gettext("missing error text"));
|
appendStringInfoString(&buf, _("missing error text"));
|
||||||
|
|
||||||
if (edata->cursorpos > 0)
|
if (edata->cursorpos > 0)
|
||||||
appendStringInfo(&buf, gettext(" at character %d"),
|
appendStringInfo(&buf, _(" at character %d"),
|
||||||
edata->cursorpos);
|
edata->cursorpos);
|
||||||
else if (edata->internalpos > 0)
|
else if (edata->internalpos > 0)
|
||||||
appendStringInfo(&buf, gettext(" at character %d"),
|
appendStringInfo(&buf, _(" at character %d"),
|
||||||
edata->internalpos);
|
edata->internalpos);
|
||||||
|
|
||||||
appendStringInfoChar(&buf, '\n');
|
appendStringInfoChar(&buf, '\n');
|
||||||
@ -1870,7 +1870,7 @@ useful_strerror(int errnum)
|
|||||||
* expanded.
|
* expanded.
|
||||||
*/
|
*/
|
||||||
snprintf(errorstr_buf, sizeof(errorstr_buf),
|
snprintf(errorstr_buf, sizeof(errorstr_buf),
|
||||||
gettext("operating system error %d"), errnum);
|
_("operating system error %d"), errnum);
|
||||||
str = errorstr_buf;
|
str = errorstr_buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1893,29 +1893,29 @@ error_severity(int elevel)
|
|||||||
case DEBUG3:
|
case DEBUG3:
|
||||||
case DEBUG4:
|
case DEBUG4:
|
||||||
case DEBUG5:
|
case DEBUG5:
|
||||||
prefix = gettext("DEBUG");
|
prefix = _("DEBUG");
|
||||||
break;
|
break;
|
||||||
case LOG:
|
case LOG:
|
||||||
case COMMERROR:
|
case COMMERROR:
|
||||||
prefix = gettext("LOG");
|
prefix = _("LOG");
|
||||||
break;
|
break;
|
||||||
case INFO:
|
case INFO:
|
||||||
prefix = gettext("INFO");
|
prefix = _("INFO");
|
||||||
break;
|
break;
|
||||||
case NOTICE:
|
case NOTICE:
|
||||||
prefix = gettext("NOTICE");
|
prefix = _("NOTICE");
|
||||||
break;
|
break;
|
||||||
case WARNING:
|
case WARNING:
|
||||||
prefix = gettext("WARNING");
|
prefix = _("WARNING");
|
||||||
break;
|
break;
|
||||||
case ERROR:
|
case ERROR:
|
||||||
prefix = gettext("ERROR");
|
prefix = _("ERROR");
|
||||||
break;
|
break;
|
||||||
case FATAL:
|
case FATAL:
|
||||||
prefix = gettext("FATAL");
|
prefix = _("FATAL");
|
||||||
break;
|
break;
|
||||||
case PANIC:
|
case PANIC:
|
||||||
prefix = gettext("PANIC");
|
prefix = _("PANIC");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
prefix = "???";
|
prefix = "???";
|
||||||
@ -1956,7 +1956,7 @@ write_stderr(const char *fmt,...)
|
|||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
fmt = gettext(fmt);
|
fmt = _(fmt);
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/utils/misc/help_config.c,v 1.14 2004/12/31 22:02:45 pgsql Exp $
|
* $PostgreSQL: pgsql/src/backend/utils/misc/help_config.c,v 1.15 2005/02/22 04:38:05 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -91,7 +91,7 @@ printMixedStruct(mixedStruct *structToPrint)
|
|||||||
printf("%s\t%s\t%s\t",
|
printf("%s\t%s\t%s\t",
|
||||||
structToPrint->generic.name,
|
structToPrint->generic.name,
|
||||||
GucContext_Names[structToPrint->generic.context],
|
GucContext_Names[structToPrint->generic.context],
|
||||||
gettext(config_group_names[structToPrint->generic.group]));
|
_(config_group_names[structToPrint->generic.group]));
|
||||||
|
|
||||||
switch (structToPrint->generic.vartype)
|
switch (structToPrint->generic.vartype)
|
||||||
{
|
{
|
||||||
@ -127,6 +127,6 @@ printMixedStruct(mixedStruct *structToPrint)
|
|||||||
}
|
}
|
||||||
|
|
||||||
printf("%s\t%s\n",
|
printf("%s\t%s\n",
|
||||||
(structToPrint->generic.short_desc == NULL) ? "" : gettext(structToPrint->generic.short_desc),
|
(structToPrint->generic.short_desc == NULL) ? "" : _(structToPrint->generic.short_desc),
|
||||||
(structToPrint->generic.long_desc == NULL) ? "" : gettext(structToPrint->generic.long_desc));
|
(structToPrint->generic.long_desc == NULL) ? "" : _(structToPrint->generic.long_desc));
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
* Portions taken from FreeBSD.
|
* Portions taken from FreeBSD.
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.74 2005/01/28 00:34:32 tgl Exp $
|
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.75 2005/02/22 04:38:22 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -65,8 +65,6 @@ int optreset;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define _(x) gettext((x))
|
|
||||||
|
|
||||||
/* version string we expect back from postgres */
|
/* version string we expect back from postgres */
|
||||||
#define PG_VERSIONSTR "postgres (PostgreSQL) " PG_VERSION "\n"
|
#define PG_VERSIONSTR "postgres (PostgreSQL) " PG_VERSION "\n"
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
*
|
*
|
||||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.10 2004/12/31 22:03:03 pgsql Exp $
|
* $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.11 2005/02/22 04:38:40 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -26,8 +26,6 @@
|
|||||||
#include "port.h"
|
#include "port.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#define _(x) gettext((x))
|
|
||||||
|
|
||||||
static const char *progname;
|
static const char *progname;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001;
|
* copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001;
|
||||||
* licence: BSD
|
* licence: BSD
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.20 2004/09/23 00:47:44 neilc Exp $
|
* $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.21 2005/02/22 04:39:00 momjian Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
|
||||||
@ -17,8 +17,6 @@
|
|||||||
|
|
||||||
#include "catalog/pg_control.h"
|
#include "catalog/pg_control.h"
|
||||||
|
|
||||||
#define _(x) gettext((x))
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
usage(const char *progname)
|
usage(const char *progname)
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.53 2004/12/31 22:03:05 pgsql Exp $
|
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.54 2005/02/22 04:39:22 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -35,7 +35,6 @@ int optreset;
|
|||||||
/* PID can be negative for standalone backend */
|
/* PID can be negative for standalone backend */
|
||||||
typedef long pgpid_t;
|
typedef long pgpid_t;
|
||||||
|
|
||||||
#define _(x) gettext((x))
|
|
||||||
|
|
||||||
#define WHITESPACE "\f\n\r\t\v" /* as defined by isspace() */
|
#define WHITESPACE "\f\n\r\t\v" /* as defined by isspace() */
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.104 2005/01/26 19:44:43 tgl Exp $
|
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.105 2005/02/22 04:39:34 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1187,10 +1187,10 @@ static void
|
|||||||
_write_msg(const char *modulename, const char *fmt, va_list ap)
|
_write_msg(const char *modulename, const char *fmt, va_list ap)
|
||||||
{
|
{
|
||||||
if (modulename)
|
if (modulename)
|
||||||
fprintf(stderr, "%s: [%s] ", progname, gettext(modulename));
|
fprintf(stderr, "%s: [%s] ", progname, _(modulename));
|
||||||
else
|
else
|
||||||
fprintf(stderr, "%s: ", progname);
|
fprintf(stderr, "%s: ", progname);
|
||||||
vfprintf(stderr, gettext(fmt), ap);
|
vfprintf(stderr, _(fmt), ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
* by PostgreSQL
|
* by PostgreSQL
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.402 2005/01/26 21:24:12 tgl Exp $
|
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.403 2005/02/22 04:39:35 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -61,8 +61,6 @@ int optreset;
|
|||||||
#include "pg_backup_archiver.h"
|
#include "pg_backup_archiver.h"
|
||||||
#include "dumputils.h"
|
#include "dumputils.h"
|
||||||
|
|
||||||
#define _(x) gettext((x))
|
|
||||||
|
|
||||||
extern char *optarg;
|
extern char *optarg;
|
||||||
extern int optind,
|
extern int optind,
|
||||||
opterr;
|
opterr;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.57 2004/12/31 22:03:09 pgsql Exp $
|
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.58 2005/02/22 04:39:38 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -34,7 +34,6 @@ int optreset;
|
|||||||
#include "pg_backup.h"
|
#include "pg_backup.h"
|
||||||
#include "pqexpbuffer.h"
|
#include "pqexpbuffer.h"
|
||||||
|
|
||||||
#define _(x) gettext((x))
|
|
||||||
|
|
||||||
/* version string we expect back from postgres */
|
/* version string we expect back from postgres */
|
||||||
#define PG_VERSIONSTR "pg_dump (PostgreSQL) " PG_VERSION "\n"
|
#define PG_VERSIONSTR "pg_dump (PostgreSQL) " PG_VERSION "\n"
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_restore.c,v 1.68 2004/12/03 18:48:19 tgl Exp $
|
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_restore.c,v 1.69 2005/02/22 04:39:38 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -65,7 +65,6 @@ int optreset;
|
|||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _(x) gettext((x))
|
|
||||||
|
|
||||||
/* Forward decls */
|
/* Forward decls */
|
||||||
static void usage(const char *progname);
|
static void usage(const char *progname);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.28 2004/12/31 22:03:11 pgsql Exp $
|
* $PostgreSQL: pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.29 2005/02/22 04:40:20 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -48,8 +48,6 @@
|
|||||||
extern int optind;
|
extern int optind;
|
||||||
extern char *optarg;
|
extern char *optarg;
|
||||||
|
|
||||||
#define _(x) gettext((x))
|
|
||||||
|
|
||||||
|
|
||||||
char XLogDir[MAXPGPATH]; /* not static, see xlog_internal.h */
|
char XLogDir[MAXPGPATH]; /* not static, see xlog_internal.h */
|
||||||
static char ControlFilePath[MAXPGPATH];
|
static char ControlFilePath[MAXPGPATH];
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.139 2005/01/01 05:43:08 momjian Exp $
|
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.140 2005/02/22 04:40:51 momjian Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
@ -121,7 +121,7 @@ HandleSlashCmds(PsqlScanState scan_state,
|
|||||||
if (status == CMD_UNKNOWN)
|
if (status == CMD_UNKNOWN)
|
||||||
{
|
{
|
||||||
if (pset.cur_cmd_interactive)
|
if (pset.cur_cmd_interactive)
|
||||||
fprintf(stderr, gettext("Invalid command \\%s. Try \\? for help.\n"), cmd);
|
fprintf(stderr, _("Invalid command \\%s. Try \\? for help.\n"), cmd);
|
||||||
else
|
else
|
||||||
psql_error("invalid command \\%s\n", cmd);
|
psql_error("invalid command \\%s\n", cmd);
|
||||||
status = CMD_ERROR;
|
status = CMD_ERROR;
|
||||||
@ -609,7 +609,7 @@ exec_command(const char *cmd,
|
|||||||
if (query_buf && query_buf->len > 0)
|
if (query_buf && query_buf->len > 0)
|
||||||
puts(query_buf->data);
|
puts(query_buf->data);
|
||||||
else if (!quiet)
|
else if (!quiet)
|
||||||
puts(gettext("Query buffer is empty."));
|
puts(_("Query buffer is empty."));
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -643,7 +643,7 @@ exec_command(const char *cmd,
|
|||||||
resetPQExpBuffer(query_buf);
|
resetPQExpBuffer(query_buf);
|
||||||
psql_scan_reset(scan_state);
|
psql_scan_reset(scan_state);
|
||||||
if (!quiet)
|
if (!quiet)
|
||||||
puts(gettext("Query buffer reset (cleared)."));
|
puts(_("Query buffer reset (cleared)."));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* \s save history in a file or show it on the screen */
|
/* \s save history in a file or show it on the screen */
|
||||||
@ -657,7 +657,7 @@ exec_command(const char *cmd,
|
|||||||
success = saveHistory(fname ? fname : "/dev/tty");
|
success = saveHistory(fname ? fname : "/dev/tty");
|
||||||
|
|
||||||
if (success && !quiet && fname)
|
if (success && !quiet && fname)
|
||||||
printf(gettext("Wrote history to file \"%s\".\n"), fname);
|
printf(_("Wrote history to file \"%s\".\n"), fname);
|
||||||
if (!fname)
|
if (!fname)
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
free(fname);
|
free(fname);
|
||||||
@ -739,9 +739,9 @@ exec_command(const char *cmd,
|
|||||||
if (!quiet)
|
if (!quiet)
|
||||||
{
|
{
|
||||||
if (pset.timing)
|
if (pset.timing)
|
||||||
puts(gettext("Timing is on."));
|
puts(_("Timing is on."));
|
||||||
else
|
else
|
||||||
puts(gettext("Timing is off."));
|
puts(_("Timing is off."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -970,7 +970,7 @@ do_connect(const char *new_dbname, const char *new_user)
|
|||||||
PQfinish(pset.db);
|
PQfinish(pset.db);
|
||||||
if (oldconn)
|
if (oldconn)
|
||||||
{
|
{
|
||||||
fputs(gettext("Previous connection kept\n"), stderr);
|
fputs(_("Previous connection kept\n"), stderr);
|
||||||
pset.db = oldconn;
|
pset.db = oldconn;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -994,12 +994,12 @@ do_connect(const char *new_dbname, const char *new_user)
|
|||||||
if (!QUIET())
|
if (!QUIET())
|
||||||
{
|
{
|
||||||
if (userparam != new_user) /* no new user */
|
if (userparam != new_user) /* no new user */
|
||||||
printf(gettext("You are now connected to database \"%s\".\n"), dbparam);
|
printf(_("You are now connected to database \"%s\".\n"), dbparam);
|
||||||
else if (dbparam != new_dbname) /* no new db */
|
else if (dbparam != new_dbname) /* no new db */
|
||||||
printf(gettext("You are now connected as new user \"%s\".\n"), new_user);
|
printf(_("You are now connected as new user \"%s\".\n"), new_user);
|
||||||
else
|
else
|
||||||
/* both new */
|
/* both new */
|
||||||
printf(gettext("You are now connected to database \"%s\" as user \"%s\".\n"),
|
printf(_("You are now connected to database \"%s\" as user \"%s\".\n"),
|
||||||
PQdb(pset.db), PQuser(pset.db));
|
PQdb(pset.db), PQuser(pset.db));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1388,7 +1388,7 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!quiet)
|
if (!quiet)
|
||||||
printf(gettext("Output format is %s.\n"), _align2string(popt->topt.format));
|
printf(_("Output format is %s.\n"), _align2string(popt->topt.format));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set border style/width */
|
/* set border style/width */
|
||||||
@ -1398,7 +1398,7 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
|
|||||||
popt->topt.border = atoi(value);
|
popt->topt.border = atoi(value);
|
||||||
|
|
||||||
if (!quiet)
|
if (!quiet)
|
||||||
printf(gettext("Border style is %d.\n"), popt->topt.border);
|
printf(_("Border style is %d.\n"), popt->topt.border);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set expanded/vertical mode */
|
/* set expanded/vertical mode */
|
||||||
@ -1407,8 +1407,8 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
|
|||||||
popt->topt.expanded = !popt->topt.expanded;
|
popt->topt.expanded = !popt->topt.expanded;
|
||||||
if (!quiet)
|
if (!quiet)
|
||||||
printf(popt->topt.expanded
|
printf(popt->topt.expanded
|
||||||
? gettext("Expanded display is on.\n")
|
? _("Expanded display is on.\n")
|
||||||
: gettext("Expanded display is off.\n"));
|
: _("Expanded display is off.\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* null display */
|
/* null display */
|
||||||
@ -1420,7 +1420,7 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
|
|||||||
popt->nullPrint = pg_strdup(value);
|
popt->nullPrint = pg_strdup(value);
|
||||||
}
|
}
|
||||||
if (!quiet)
|
if (!quiet)
|
||||||
printf(gettext("Null display is \"%s\".\n"), popt->nullPrint ? popt->nullPrint : "");
|
printf(_("Null display is \"%s\".\n"), popt->nullPrint ? popt->nullPrint : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* field separator for unaligned text */
|
/* field separator for unaligned text */
|
||||||
@ -1432,7 +1432,7 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
|
|||||||
popt->topt.fieldSep = pg_strdup(value);
|
popt->topt.fieldSep = pg_strdup(value);
|
||||||
}
|
}
|
||||||
if (!quiet)
|
if (!quiet)
|
||||||
printf(gettext("Field separator is \"%s\".\n"), popt->topt.fieldSep);
|
printf(_("Field separator is \"%s\".\n"), popt->topt.fieldSep);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* record separator for unaligned text */
|
/* record separator for unaligned text */
|
||||||
@ -1446,9 +1446,9 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
|
|||||||
if (!quiet)
|
if (!quiet)
|
||||||
{
|
{
|
||||||
if (strcmp(popt->topt.recordSep, "\n") == 0)
|
if (strcmp(popt->topt.recordSep, "\n") == 0)
|
||||||
printf(gettext("Record separator is <newline>."));
|
printf(_("Record separator is <newline>."));
|
||||||
else
|
else
|
||||||
printf(gettext("Record separator is \"%s\".\n"), popt->topt.recordSep);
|
printf(_("Record separator is \"%s\".\n"), popt->topt.recordSep);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1459,9 +1459,9 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
|
|||||||
if (!quiet)
|
if (!quiet)
|
||||||
{
|
{
|
||||||
if (popt->topt.tuples_only)
|
if (popt->topt.tuples_only)
|
||||||
puts(gettext("Showing only tuples."));
|
puts(_("Showing only tuples."));
|
||||||
else
|
else
|
||||||
puts(gettext("Tuples only is off."));
|
puts(_("Tuples only is off."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1477,9 +1477,9 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
|
|||||||
if (!quiet)
|
if (!quiet)
|
||||||
{
|
{
|
||||||
if (popt->title)
|
if (popt->title)
|
||||||
printf(gettext("Title is \"%s\".\n"), popt->title);
|
printf(_("Title is \"%s\".\n"), popt->title);
|
||||||
else
|
else
|
||||||
printf(gettext("Title is unset.\n"));
|
printf(_("Title is unset.\n"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1495,9 +1495,9 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
|
|||||||
if (!quiet)
|
if (!quiet)
|
||||||
{
|
{
|
||||||
if (popt->topt.tableAttr)
|
if (popt->topt.tableAttr)
|
||||||
printf(gettext("Table attribute is \"%s\".\n"), popt->topt.tableAttr);
|
printf(_("Table attribute is \"%s\".\n"), popt->topt.tableAttr);
|
||||||
else
|
else
|
||||||
printf(gettext("Table attributes unset.\n"));
|
printf(_("Table attributes unset.\n"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1513,11 +1513,11 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
|
|||||||
if (!quiet)
|
if (!quiet)
|
||||||
{
|
{
|
||||||
if (popt->topt.pager == 1)
|
if (popt->topt.pager == 1)
|
||||||
puts(gettext("Pager is used for long output."));
|
puts(_("Pager is used for long output."));
|
||||||
else if (popt->topt.pager == 2)
|
else if (popt->topt.pager == 2)
|
||||||
puts(gettext("Pager is always used."));
|
puts(_("Pager is always used."));
|
||||||
else
|
else
|
||||||
puts(gettext("Pager usage is off."));
|
puts(_("Pager usage is off."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1528,9 +1528,9 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
|
|||||||
if (!quiet)
|
if (!quiet)
|
||||||
{
|
{
|
||||||
if (popt->default_footer)
|
if (popt->default_footer)
|
||||||
puts(gettext("Default footer is on."));
|
puts(_("Default footer is on."));
|
||||||
else
|
else
|
||||||
puts(gettext("Default footer is off."));
|
puts(_("Default footer is off."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.95 2005/01/01 05:43:08 momjian Exp $
|
* $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.96 2005/02/22 04:40:52 momjian Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
@ -75,7 +75,7 @@ pg_strdup(const char *string)
|
|||||||
|
|
||||||
if (!string)
|
if (!string)
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("%s: xstrdup: cannot duplicate null pointer (internal error)\n"),
|
fprintf(stderr, _("%s: xstrdup: cannot duplicate null pointer (internal error)\n"),
|
||||||
pset.progname);
|
pset.progname);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
@ -200,7 +200,7 @@ psql_error(const char *fmt,...)
|
|||||||
if (pset.inputfile)
|
if (pset.inputfile)
|
||||||
fprintf(stderr, "%s:%s:%u: ", pset.progname, pset.inputfile, pset.lineno);
|
fprintf(stderr, "%s:%s:%u: ", pset.progname, pset.inputfile, pset.lineno);
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
vfprintf(stderr, gettext(fmt), ap);
|
vfprintf(stderr, _(fmt), ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -357,19 +357,19 @@ CheckConnection(void)
|
|||||||
exit(EXIT_BADCONN);
|
exit(EXIT_BADCONN);
|
||||||
}
|
}
|
||||||
|
|
||||||
fputs(gettext("The connection to the server was lost. Attempting reset: "), stderr);
|
fputs(_("The connection to the server was lost. Attempting reset: "), stderr);
|
||||||
PQreset(pset.db);
|
PQreset(pset.db);
|
||||||
OK = ConnectionUp();
|
OK = ConnectionUp();
|
||||||
if (!OK)
|
if (!OK)
|
||||||
{
|
{
|
||||||
fputs(gettext("Failed.\n"), stderr);
|
fputs(_("Failed.\n"), stderr);
|
||||||
PQfinish(pset.db);
|
PQfinish(pset.db);
|
||||||
pset.db = NULL;
|
pset.db = NULL;
|
||||||
ResetCancelConn();
|
ResetCancelConn();
|
||||||
UnsyncVariables();
|
UnsyncVariables();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
fputs(gettext("Succeeded.\n"), stderr);
|
fputs(_("Succeeded.\n"), stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
@ -604,7 +604,7 @@ ReportSyntaxErrorPosition(const PGresult *result, const char *query)
|
|||||||
wquery[qidx[iend]] = '\0';
|
wquery[qidx[iend]] = '\0';
|
||||||
|
|
||||||
/* Begin building the finished message. */
|
/* Begin building the finished message. */
|
||||||
printfPQExpBuffer(&msg, gettext("LINE %d: "), loc_line);
|
printfPQExpBuffer(&msg, _("LINE %d: "), loc_line);
|
||||||
if (beg_trunc)
|
if (beg_trunc)
|
||||||
appendPQExpBufferStr(&msg, "...");
|
appendPQExpBufferStr(&msg, "...");
|
||||||
|
|
||||||
@ -768,7 +768,7 @@ PrintNotifications(void)
|
|||||||
|
|
||||||
while ((notify = PQnotifies(pset.db)))
|
while ((notify = PQnotifies(pset.db)))
|
||||||
{
|
{
|
||||||
fprintf(pset.queryFout, gettext("Asynchronous notification \"%s\" received from server process with PID %d.\n"),
|
fprintf(pset.queryFout, _("Asynchronous notification \"%s\" received from server process with PID %d.\n"),
|
||||||
notify->relname, notify->be_pid);
|
notify->relname, notify->be_pid);
|
||||||
fflush(pset.queryFout);
|
fflush(pset.queryFout);
|
||||||
PQfreemem(notify);
|
PQfreemem(notify);
|
||||||
@ -956,7 +956,7 @@ SendQuery(const char *query)
|
|||||||
{
|
{
|
||||||
char buf[3];
|
char buf[3];
|
||||||
|
|
||||||
printf(gettext("***(Single step mode: verify command)*******************************************\n"
|
printf(_("***(Single step mode: verify command)*******************************************\n"
|
||||||
"%s\n"
|
"%s\n"
|
||||||
"***(press return to proceed or enter x and return to cancel)********************\n"),
|
"***(press return to proceed or enter x and return to cancel)********************\n"),
|
||||||
query);
|
query);
|
||||||
@ -1007,7 +1007,7 @@ SendQuery(const char *query)
|
|||||||
|
|
||||||
/* Possible microtiming output */
|
/* Possible microtiming output */
|
||||||
if (OK && pset.timing)
|
if (OK && pset.timing)
|
||||||
printf(gettext("Time: %.3f ms\n"), DIFF_MSEC(&after, &before));
|
printf(_("Time: %.3f ms\n"), DIFF_MSEC(&after, &before));
|
||||||
|
|
||||||
/* check for events that may occur during query execution */
|
/* check for events that may occur during query execution */
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/psql/copy.c,v 1.55 2005/01/01 05:43:08 momjian Exp $
|
* $PostgreSQL: pgsql/src/bin/psql/copy.c,v 1.56 2005/02/22 04:40:54 momjian Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
#include "copy.h"
|
#include "copy.h"
|
||||||
@ -665,7 +665,7 @@ handleCopyIn(PGconn *conn, FILE *copystream)
|
|||||||
if (isatty(fileno(copystream)))
|
if (isatty(fileno(copystream)))
|
||||||
{
|
{
|
||||||
if (!QUIET())
|
if (!QUIET())
|
||||||
puts(gettext("Enter data to be copied followed by a newline.\n"
|
puts(_("Enter data to be copied followed by a newline.\n"
|
||||||
"End with a backslash and a period on a line by itself."));
|
"End with a backslash and a period on a line by itself."));
|
||||||
prompt = get_prompt(PROMPT_COPY);
|
prompt = get_prompt(PROMPT_COPY);
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.111 2005/01/01 05:43:08 momjian Exp $
|
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.112 2005/02/22 04:40:55 momjian Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
#include "describe.h"
|
#include "describe.h"
|
||||||
@ -28,8 +28,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define _(x) gettext((x))
|
|
||||||
|
|
||||||
static bool describeOneTableDetails(const char *schemaname,
|
static bool describeOneTableDetails(const char *schemaname,
|
||||||
const char *relationname,
|
const char *relationname,
|
||||||
const char *oid,
|
const char *oid,
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.100 2005/01/08 22:51:13 tgl Exp $
|
* $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.101 2005/02/22 04:40:55 momjian Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
@ -31,8 +31,6 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "sql_help.h"
|
#include "sql_help.h"
|
||||||
|
|
||||||
#define _(x) gettext((x))
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PLEASE:
|
* PLEASE:
|
||||||
* If you change something in this file, also make the same changes
|
* If you change something in this file, also make the same changes
|
||||||
@ -346,8 +344,8 @@ helpSQL(const char *topic, unsigned short int pager)
|
|||||||
"Description: %s\n"
|
"Description: %s\n"
|
||||||
"Syntax:\n%s\n\n"),
|
"Syntax:\n%s\n\n"),
|
||||||
QL_HELP[i].cmd,
|
QL_HELP[i].cmd,
|
||||||
gettext(QL_HELP[i].help),
|
_(QL_HELP[i].help),
|
||||||
gettext(QL_HELP[i].syntax));
|
_(QL_HELP[i].syntax));
|
||||||
/* If we have an exact match, exit. Fixes \h SELECT */
|
/* If we have an exact match, exit. Fixes \h SELECT */
|
||||||
if (pg_strcasecmp(topic, QL_HELP[i].cmd) == 0)
|
if (pg_strcasecmp(topic, QL_HELP[i].cmd) == 0)
|
||||||
break;
|
break;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/psql/large_obj.c,v 1.35 2005/01/01 05:43:08 momjian Exp $
|
* $PostgreSQL: pgsql/src/bin/psql/large_obj.c,v 1.36 2005/02/22 04:40:55 momjian Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
#include "large_obj.h"
|
#include "large_obj.h"
|
||||||
@ -253,7 +253,7 @@ do_lo_list(void)
|
|||||||
" pg_catalog.obj_description(loid, 'pg_largeobject') as \"%s\"\n"
|
" pg_catalog.obj_description(loid, 'pg_largeobject') as \"%s\"\n"
|
||||||
"FROM (SELECT DISTINCT loid FROM pg_catalog.pg_largeobject) x\n"
|
"FROM (SELECT DISTINCT loid FROM pg_catalog.pg_largeobject) x\n"
|
||||||
"ORDER BY 1",
|
"ORDER BY 1",
|
||||||
gettext("Description"));
|
_("Description"));
|
||||||
|
|
||||||
res = PSQLexec(buf, false);
|
res = PSQLexec(buf, false);
|
||||||
if (!res)
|
if (!res)
|
||||||
@ -261,7 +261,7 @@ do_lo_list(void)
|
|||||||
|
|
||||||
myopt.topt.tuples_only = false;
|
myopt.topt.tuples_only = false;
|
||||||
myopt.nullPrint = NULL;
|
myopt.nullPrint = NULL;
|
||||||
myopt.title = gettext("Large objects");
|
myopt.title = _("Large objects");
|
||||||
|
|
||||||
printQuery(res, &myopt, pset.queryFout);
|
printQuery(res, &myopt, pset.queryFout);
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/psql/mainloop.c,v 1.66 2005/01/01 05:43:08 momjian Exp $
|
* $PostgreSQL: pgsql/src/bin/psql/mainloop.c,v 1.67 2005/02/22 04:40:55 momjian Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
#include "mainloop.h"
|
#include "mainloop.h"
|
||||||
@ -172,7 +172,7 @@ MainLoop(FILE *source)
|
|||||||
if (count_eof < GetVariableNum(pset.vars, "IGNOREEOF", 0, 10, false))
|
if (count_eof < GetVariableNum(pset.vars, "IGNOREEOF", 0, 10, false))
|
||||||
{
|
{
|
||||||
if (!QUIET())
|
if (!QUIET())
|
||||||
printf(gettext("Use \"\\q\" to leave %s.\n"), pset.progname);
|
printf(_("Use \"\\q\" to leave %s.\n"), pset.progname);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.54 2005/01/01 05:43:08 momjian Exp $
|
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.55 2005/02/22 04:40:57 momjian Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include "mbprint.h"
|
#include "mbprint.h"
|
||||||
|
|
||||||
|
|
||||||
/*************************/
|
/*************************/
|
||||||
/* Unaligned text */
|
/* Unaligned text */
|
||||||
/*************************/
|
/*************************/
|
||||||
@ -227,14 +228,14 @@ print_aligned_text(const char *title, const char *const * headers,
|
|||||||
widths = calloc(col_count, sizeof(*widths));
|
widths = calloc(col_count, sizeof(*widths));
|
||||||
if (!widths)
|
if (!widths)
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("out of memory\n"));
|
fprintf(stderr, _("out of memory\n"));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
head_w = calloc(col_count, sizeof(*head_w));
|
head_w = calloc(col_count, sizeof(*head_w));
|
||||||
if (!head_w)
|
if (!head_w)
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("out of memory\n"));
|
fprintf(stderr, _("out of memory\n"));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -253,7 +254,7 @@ print_aligned_text(const char *title, const char *const * headers,
|
|||||||
cell_w = calloc(cell_count, sizeof(*cell_w));
|
cell_w = calloc(cell_count, sizeof(*cell_w));
|
||||||
if (!cell_w)
|
if (!cell_w)
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("out of memory\n"));
|
fprintf(stderr, _("out of memory\n"));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -425,7 +426,7 @@ print_aligned_vertical(const char *title, const char *const * headers,
|
|||||||
|
|
||||||
if (cells[0] == NULL)
|
if (cells[0] == NULL)
|
||||||
{
|
{
|
||||||
puts(gettext("(No rows)\n"));
|
puts(_("(No rows)\n"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -437,7 +438,7 @@ print_aligned_vertical(const char *title, const char *const * headers,
|
|||||||
head_w = calloc(col_count, sizeof(*head_w));
|
head_w = calloc(col_count, sizeof(*head_w));
|
||||||
if (!head_w)
|
if (!head_w)
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("out of memory\n"));
|
fprintf(stderr, _("out of memory\n"));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -461,7 +462,7 @@ print_aligned_vertical(const char *title, const char *const * headers,
|
|||||||
cell_w = calloc(cell_count, sizeof(*cell_w));
|
cell_w = calloc(cell_count, sizeof(*cell_w));
|
||||||
if (!cell_w)
|
if (!cell_w)
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("out of memory\n"));
|
fprintf(stderr, _("out of memory\n"));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -485,7 +486,7 @@ print_aligned_vertical(const char *title, const char *const * headers,
|
|||||||
divider = malloc(hwidth + dwidth + 10);
|
divider = malloc(hwidth + dwidth + 10);
|
||||||
if (!divider)
|
if (!divider)
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("out of memory\n"));
|
fprintf(stderr, _("out of memory\n"));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
divider[0] = '\0';
|
divider[0] = '\0';
|
||||||
@ -514,7 +515,7 @@ print_aligned_vertical(const char *title, const char *const * headers,
|
|||||||
|
|
||||||
if (!record_str)
|
if (!record_str)
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("out of memory\n"));
|
fprintf(stderr, _("out of memory\n"));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -532,7 +533,7 @@ print_aligned_vertical(const char *title, const char *const * headers,
|
|||||||
|
|
||||||
if (!div_copy)
|
if (!div_copy)
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("out of memory\n"));
|
fprintf(stderr, _("out of memory\n"));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1153,7 +1154,7 @@ printQuery(const PGresult *result, const printQueryOpt *opt, FILE *fout)
|
|||||||
headers = calloc(nfields + 1, sizeof(*headers));
|
headers = calloc(nfields + 1, sizeof(*headers));
|
||||||
if (!headers)
|
if (!headers)
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("out of memory\n"));
|
fprintf(stderr, _("out of memory\n"));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1165,7 +1166,7 @@ printQuery(const PGresult *result, const printQueryOpt *opt, FILE *fout)
|
|||||||
cells = calloc(ncells + 1, sizeof(*cells));
|
cells = calloc(ncells + 1, sizeof(*cells));
|
||||||
if (!cells)
|
if (!cells)
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("out of memory\n"));
|
fprintf(stderr, _("out of memory\n"));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1186,20 +1187,20 @@ printQuery(const PGresult *result, const printQueryOpt *opt, FILE *fout)
|
|||||||
footers = calloc(2, sizeof(*footers));
|
footers = calloc(2, sizeof(*footers));
|
||||||
if (!footers)
|
if (!footers)
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("out of memory\n"));
|
fprintf(stderr, _("out of memory\n"));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
footers[0] = malloc(100);
|
footers[0] = malloc(100);
|
||||||
if (!footers[0])
|
if (!footers[0])
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("out of memory\n"));
|
fprintf(stderr, _("out of memory\n"));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
if (PQntuples(result) == 1)
|
if (PQntuples(result) == 1)
|
||||||
snprintf(footers[0], 100, gettext("(1 row)"));
|
snprintf(footers[0], 100, _("(1 row)"));
|
||||||
else
|
else
|
||||||
snprintf(footers[0], 100, gettext("(%d rows)"), PQntuples(result));
|
snprintf(footers[0], 100, _("(%d rows)"), PQntuples(result));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
footers = NULL;
|
footers = NULL;
|
||||||
@ -1208,7 +1209,7 @@ printQuery(const PGresult *result, const printQueryOpt *opt, FILE *fout)
|
|||||||
align = calloc(nfields + 1, sizeof(*align));
|
align = calloc(nfields + 1, sizeof(*align));
|
||||||
if (!align)
|
if (!align)
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("out of memory\n"));
|
fprintf(stderr, _("out of memory\n"));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.112 2005/01/17 10:00:05 petere Exp $
|
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.113 2005/02/22 04:40:58 momjian Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
|
|
||||||
@ -38,6 +38,7 @@ int optreset;
|
|||||||
|
|
||||||
#include "mb/pg_wchar.h"
|
#include "mb/pg_wchar.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Global psql options
|
* Global psql options
|
||||||
*/
|
*/
|
||||||
@ -135,7 +136,7 @@ main(int argc, char *argv[])
|
|||||||
pset.vars = CreateVariableSpace();
|
pset.vars = CreateVariableSpace();
|
||||||
if (!pset.vars)
|
if (!pset.vars)
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("%s: out of memory\n"), pset.progname);
|
fprintf(stderr, _("%s: out of memory\n"), pset.progname);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
pset.popt.topt.format = PRINT_ALIGNED;
|
pset.popt.topt.format = PRINT_ALIGNED;
|
||||||
@ -290,7 +291,7 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (!QUIET() && !pset.notty)
|
if (!QUIET() && !pset.notty)
|
||||||
{
|
{
|
||||||
printf(gettext("Welcome to %s %s, the PostgreSQL interactive terminal.\n\n"
|
printf(_("Welcome to %s %s, the PostgreSQL interactive terminal.\n\n"
|
||||||
"Type: \\copyright for distribution terms\n"
|
"Type: \\copyright for distribution terms\n"
|
||||||
" \\h for help with SQL commands\n"
|
" \\h for help with SQL commands\n"
|
||||||
" \\? for help with psql commands\n"
|
" \\? for help with psql commands\n"
|
||||||
@ -444,7 +445,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
|
|||||||
|
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("%s: couldn't set printing parameter \"%s\"\n"), pset.progname, value);
|
fprintf(stderr, _("%s: couldn't set printing parameter \"%s\"\n"), pset.progname, value);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -490,7 +491,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
|
|||||||
{
|
{
|
||||||
if (!DeleteVariable(pset.vars, value))
|
if (!DeleteVariable(pset.vars, value))
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("%s: could not delete variable \"%s\"\n"),
|
fprintf(stderr, _("%s: could not delete variable \"%s\"\n"),
|
||||||
pset.progname, value);
|
pset.progname, value);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
@ -500,7 +501,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
|
|||||||
*equal_loc = '\0';
|
*equal_loc = '\0';
|
||||||
if (!SetVariable(pset.vars, value, equal_loc + 1))
|
if (!SetVariable(pset.vars, value, equal_loc + 1))
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("%s: could not set variable \"%s\"\n"),
|
fprintf(stderr, _("%s: could not set variable \"%s\"\n"),
|
||||||
pset.progname, value);
|
pset.progname, value);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
@ -531,13 +532,13 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
|
|||||||
/* unknown option reported by getopt */
|
/* unknown option reported by getopt */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("Try \"%s --help\" for more information.\n"),
|
fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
|
||||||
pset.progname);
|
pset.progname);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, gettext("Try \"%s --help\" for more information.\n"),
|
fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
|
||||||
pset.progname);
|
pset.progname);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
break;
|
break;
|
||||||
@ -555,14 +556,14 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
|
|||||||
else if (!options->username)
|
else if (!options->username)
|
||||||
options->username = argv[optind];
|
options->username = argv[optind];
|
||||||
else if (!QUIET())
|
else if (!QUIET())
|
||||||
fprintf(stderr, gettext("%s: warning: extra command-line argument \"%s\" ignored\n"),
|
fprintf(stderr, _("%s: warning: extra command-line argument \"%s\" ignored\n"),
|
||||||
pset.progname, argv[optind]);
|
pset.progname, argv[optind]);
|
||||||
|
|
||||||
optind++;
|
optind++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (used_old_u_option && !QUIET())
|
if (used_old_u_option && !QUIET())
|
||||||
fprintf(stderr, gettext("%s: Warning: The -u option is deprecated. Use -U.\n"), pset.progname);
|
fprintf(stderr, _("%s: Warning: The -u option is deprecated. Use -U.\n"), pset.progname);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -624,7 +625,7 @@ showVersion(void)
|
|||||||
puts("psql (PostgreSQL) " PG_VERSION);
|
puts("psql (PostgreSQL) " PG_VERSION);
|
||||||
|
|
||||||
#if defined(USE_READLINE)
|
#if defined(USE_READLINE)
|
||||||
puts(gettext("contains support for command-line editing"));
|
puts(_("contains support for command-line editing"));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -647,7 +648,7 @@ printSSLInfo(void)
|
|||||||
return; /* no SSL */
|
return; /* no SSL */
|
||||||
|
|
||||||
SSL_get_cipher_bits(ssl, &sslbits);
|
SSL_get_cipher_bits(ssl, &sslbits);
|
||||||
printf(gettext("SSL connection (cipher: %s, bits: %i)\n\n"),
|
printf(_("SSL connection (cipher: %s, bits: %i)\n\n"),
|
||||||
SSL_get_cipher(ssl), sslbits);
|
SSL_get_cipher(ssl), sslbits);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -670,7 +671,7 @@ checkWin32Codepage(void)
|
|||||||
concp = GetConsoleCP();
|
concp = GetConsoleCP();
|
||||||
if (wincp != concp)
|
if (wincp != concp)
|
||||||
{
|
{
|
||||||
printf(gettext("Warning: Console code page (%u) differs from Windows code page (%u)\n"
|
printf(_("Warning: Console code page (%u) differs from Windows code page (%u)\n"
|
||||||
" 8-bit characters may not work correctly. See psql reference\n"
|
" 8-bit characters may not work correctly. See psql reference\n"
|
||||||
" page \"Notes for Windows users\" for details.\n\n"),
|
" page \"Notes for Windows users\" for details.\n\n"),
|
||||||
concp, wincp);
|
concp, wincp);
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/scripts/common.c,v 1.16 2005/01/08 22:51:14 tgl Exp $
|
* $PostgreSQL: pgsql/src/bin/scripts/common.c,v 1.17 2005/02/22 04:41:30 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -168,9 +168,9 @@ executeQuery(PGconn *conn, const char *query, const char *progname, bool echo)
|
|||||||
int
|
int
|
||||||
check_yesno_response(const char *string)
|
check_yesno_response(const char *string)
|
||||||
{
|
{
|
||||||
if (strcmp(string, gettext(PG_YESLETTER)) == 0)
|
if (strcmp(string, _(PG_YESLETTER)) == 0)
|
||||||
return 1;
|
return 1;
|
||||||
else if (strcmp(string, gettext(PG_NOLETTER)) == 0)
|
else if (strcmp(string, _(PG_NOLETTER)) == 0)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -10,8 +10,6 @@ int optreset;
|
|||||||
|
|
||||||
const char *get_user_name(const char *progname);
|
const char *get_user_name(const char *progname);
|
||||||
|
|
||||||
#define _(x) gettext((x))
|
|
||||||
|
|
||||||
typedef void (*help_handler) (const char *);
|
typedef void (*help_handler) (const char *);
|
||||||
|
|
||||||
void handle_help_version_opts(int argc, char *argv[], const char *fixed_progname, help_handler hlp);
|
void handle_help_version_opts(int argc, char *argv[], const char *fixed_progname, help_handler hlp);
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/include/c.h,v 1.179 2005/02/15 01:03:47 momjian Exp $
|
* $PostgreSQL: pgsql/src/include/c.h,v 1.180 2005/02/22 04:41:51 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -91,6 +91,8 @@
|
|||||||
/* Must be before gettext() games below */
|
/* Must be before gettext() games below */
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
||||||
|
#define _(x) gettext((x))
|
||||||
|
|
||||||
#ifdef ENABLE_NLS
|
#ifdef ENABLE_NLS
|
||||||
#include <libintl.h>
|
#include <libintl.h>
|
||||||
#else
|
#else
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.302 2005/01/26 19:24:02 tgl Exp $
|
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.303 2005/02/22 04:42:20 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -740,9 +740,9 @@ update_db_info(PGconn *conn)
|
|||||||
if (strncmp(old, "unix:", 5) != 0)
|
if (strncmp(old, "unix:", 5) != 0)
|
||||||
{
|
{
|
||||||
printfPQExpBuffer(&conn->errorMessage,
|
printfPQExpBuffer(&conn->errorMessage,
|
||||||
"connectDBStart() -- "
|
libpq_gettext("connectDBStart() -- "
|
||||||
"socket name can only be specified with "
|
"socket name can only be specified with "
|
||||||
"non-TCP\n");
|
"non-TCP\n"));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
*tmp2 = '\0';
|
*tmp2 = '\0';
|
||||||
@ -769,9 +769,9 @@ update_db_info(PGconn *conn)
|
|||||||
if (strcmp(old + offset, "localhost") != 0)
|
if (strcmp(old + offset, "localhost") != 0)
|
||||||
{
|
{
|
||||||
printfPQExpBuffer(&conn->errorMessage,
|
printfPQExpBuffer(&conn->errorMessage,
|
||||||
"connectDBStart() -- "
|
libpq_gettext("connectDBStart() -- "
|
||||||
"non-TCP access only possible on "
|
"non-TCP access only possible on "
|
||||||
"localhost\n");
|
"localhost\n"));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1514,7 +1514,7 @@ keep_going: /* We will come back to here until there
|
|||||||
{
|
{
|
||||||
/* Received error - probably protocol mismatch */
|
/* Received error - probably protocol mismatch */
|
||||||
if (conn->Pfdebug)
|
if (conn->Pfdebug)
|
||||||
fprintf(conn->Pfdebug, "Postmaster reports error, attempting fallback to pre-7.0.\n");
|
fprintf(conn->Pfdebug, libpq_gettext("Postmaster reports error, attempting fallback to pre-7.0.\n"));
|
||||||
if (conn->sslmode[0] == 'r') /* "require" */
|
if (conn->sslmode[0] == 'r') /* "require" */
|
||||||
{
|
{
|
||||||
/* Require SSL, but server is too old */
|
/* Require SSL, but server is too old */
|
||||||
@ -2502,7 +2502,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
|
|||||||
f = fopen(serviceFile, "r");
|
f = fopen(serviceFile, "r");
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
{
|
{
|
||||||
printfPQExpBuffer(errorMessage, "ERROR: Service file '%s' not found\n",
|
printfPQExpBuffer(errorMessage, libpq_gettext("ERROR: Service file '%s' not found\n"),
|
||||||
serviceFile);
|
serviceFile);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -2515,7 +2515,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
|
|||||||
{
|
{
|
||||||
fclose(f);
|
fclose(f);
|
||||||
printfPQExpBuffer(errorMessage,
|
printfPQExpBuffer(errorMessage,
|
||||||
"ERROR: line %d too long in service file '%s'\n",
|
libpq_gettext("ERROR: line %d too long in service file '%s'\n"),
|
||||||
linenr,
|
linenr,
|
||||||
serviceFile);
|
serviceFile);
|
||||||
return 2;
|
return 2;
|
||||||
@ -2566,7 +2566,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
|
|||||||
if (val == NULL)
|
if (val == NULL)
|
||||||
{
|
{
|
||||||
printfPQExpBuffer(errorMessage,
|
printfPQExpBuffer(errorMessage,
|
||||||
"ERROR: syntax error in service file '%s', line %d\n",
|
libpq_gettext("ERROR: syntax error in service file '%s', line %d\n"),
|
||||||
serviceFile,
|
serviceFile,
|
||||||
linenr);
|
linenr);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
@ -2593,7 +2593,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
|
|||||||
if (!found_keyword)
|
if (!found_keyword)
|
||||||
{
|
{
|
||||||
printfPQExpBuffer(errorMessage,
|
printfPQExpBuffer(errorMessage,
|
||||||
"ERROR: syntax error in service file '%s', line %d\n",
|
libpq_gettext("ERROR: syntax error in service file '%s', line %d\n"),
|
||||||
serviceFile,
|
serviceFile,
|
||||||
linenr);
|
linenr);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.112 2004/12/31 22:03:50 pgsql Exp $
|
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.113 2005/02/22 04:42:20 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -85,7 +85,7 @@ pqGetc(char *result, PGconn *conn)
|
|||||||
*result = conn->inBuffer[conn->inCursor++];
|
*result = conn->inBuffer[conn->inCursor++];
|
||||||
|
|
||||||
if (conn->Pfdebug)
|
if (conn->Pfdebug)
|
||||||
fprintf(conn->Pfdebug, "From backend> %c\n", *result);
|
fprintf(conn->Pfdebug, libpq_gettext("From backend> %c\n"), *result);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -101,7 +101,7 @@ pqPutc(char c, PGconn *conn)
|
|||||||
return EOF;
|
return EOF;
|
||||||
|
|
||||||
if (conn->Pfdebug)
|
if (conn->Pfdebug)
|
||||||
fprintf(conn->Pfdebug, "To backend> %c\n", c);
|
fprintf(conn->Pfdebug, libpq_gettext("To backend> %c\n"), c);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -137,7 +137,7 @@ pqGets(PQExpBuffer buf, PGconn *conn)
|
|||||||
conn->inCursor = ++inCursor;
|
conn->inCursor = ++inCursor;
|
||||||
|
|
||||||
if (conn->Pfdebug)
|
if (conn->Pfdebug)
|
||||||
fprintf(conn->Pfdebug, "From backend> \"%s\"\n",
|
fprintf(conn->Pfdebug, libpq_gettext("From backend> \"%s\"\n"),
|
||||||
buf->data);
|
buf->data);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -154,7 +154,7 @@ pqPuts(const char *s, PGconn *conn)
|
|||||||
return EOF;
|
return EOF;
|
||||||
|
|
||||||
if (conn->Pfdebug)
|
if (conn->Pfdebug)
|
||||||
fprintf(conn->Pfdebug, "To backend> '%s'\n", s);
|
fprintf(conn->Pfdebug, libpq_gettext("To backend> '%s'\n"), s);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -175,7 +175,7 @@ pqGetnchar(char *s, size_t len, PGconn *conn)
|
|||||||
conn->inCursor += len;
|
conn->inCursor += len;
|
||||||
|
|
||||||
if (conn->Pfdebug)
|
if (conn->Pfdebug)
|
||||||
fprintf(conn->Pfdebug, "From backend (%lu)> %.*s\n", (unsigned long) len, (int) len, s);
|
fprintf(conn->Pfdebug, libpq_gettext("From backend (%lu)> %.*s\n"), (unsigned long) len, (int) len, s);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -191,7 +191,7 @@ pqPutnchar(const char *s, size_t len, PGconn *conn)
|
|||||||
return EOF;
|
return EOF;
|
||||||
|
|
||||||
if (conn->Pfdebug)
|
if (conn->Pfdebug)
|
||||||
fprintf(conn->Pfdebug, "To backend> %.*s\n", (int) len, s);
|
fprintf(conn->Pfdebug, libpq_gettext("To backend> %.*s\n"), (int) len, s);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -231,7 +231,7 @@ pqGetInt(int *result, size_t bytes, PGconn *conn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (conn->Pfdebug)
|
if (conn->Pfdebug)
|
||||||
fprintf(conn->Pfdebug, "From backend (#%lu)> %d\n", (unsigned long) bytes, *result);
|
fprintf(conn->Pfdebug, libpq_gettext("From backend (#%lu)> %d\n"), (unsigned long) bytes, *result);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -267,7 +267,7 @@ pqPutInt(int value, size_t bytes, PGconn *conn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (conn->Pfdebug)
|
if (conn->Pfdebug)
|
||||||
fprintf(conn->Pfdebug, "To backend (%lu#)> %d\n", (unsigned long) bytes, value);
|
fprintf(conn->Pfdebug, libpq_gettext("To backend (%lu#)> %d\n"), (unsigned long) bytes, value);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -455,7 +455,7 @@ pqPutMsgStart(char msg_type, bool force_len, PGconn *conn)
|
|||||||
/* length word, if needed, will be filled in by pqPutMsgEnd */
|
/* length word, if needed, will be filled in by pqPutMsgEnd */
|
||||||
|
|
||||||
if (conn->Pfdebug)
|
if (conn->Pfdebug)
|
||||||
fprintf(conn->Pfdebug, "To backend> Msg %c\n",
|
fprintf(conn->Pfdebug, libpq_gettext("To backend> Msg %c\n"),
|
||||||
msg_type ? msg_type : ' ');
|
msg_type ? msg_type : ' ');
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -493,7 +493,7 @@ int
|
|||||||
pqPutMsgEnd(PGconn *conn)
|
pqPutMsgEnd(PGconn *conn)
|
||||||
{
|
{
|
||||||
if (conn->Pfdebug)
|
if (conn->Pfdebug)
|
||||||
fprintf(conn->Pfdebug, "To backend> Msg complete, length %u\n",
|
fprintf(conn->Pfdebug, libpq_gettext("To backend> Msg complete, length %u\n"),
|
||||||
conn->outMsgEnd - conn->outCount);
|
conn->outMsgEnd - conn->outCount);
|
||||||
|
|
||||||
/* Fill in length word if needed */
|
/* Fill in length word if needed */
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* didn't really belong there.
|
* didn't really belong there.
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-print.c,v 1.58 2004/12/31 22:03:50 pgsql Exp $
|
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-print.c,v 1.59 2005/02/22 04:42:20 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -219,10 +219,10 @@ PQprint(FILE *fout,
|
|||||||
if (po->expanded)
|
if (po->expanded)
|
||||||
{
|
{
|
||||||
if (po->align)
|
if (po->align)
|
||||||
fprintf(fout, "%-*s%s Value\n",
|
fprintf(fout, libpq_gettext("%-*s%s Value\n"),
|
||||||
fieldMaxLen - fs_len, "Field", po->fieldSep);
|
fieldMaxLen - fs_len, libpq_gettext("Field"), po->fieldSep);
|
||||||
else
|
else
|
||||||
fprintf(fout, "%s%sValue\n", "Field", po->fieldSep);
|
fprintf(fout, libpq_gettext("%s%sValue\n"), libpq_gettext("Field"), po->fieldSep);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -262,7 +262,7 @@ PQprint(FILE *fout,
|
|||||||
"<table %s><caption align=high>%d</caption>\n",
|
"<table %s><caption align=high>%d</caption>\n",
|
||||||
po->tableOpt ? po->tableOpt : "", i);
|
po->tableOpt ? po->tableOpt : "", i);
|
||||||
else
|
else
|
||||||
fprintf(fout, "-- RECORD %d --\n", i);
|
fprintf(fout, libpq_gettext("-- RECORD %d --\n"), i);
|
||||||
}
|
}
|
||||||
for (j = 0; j < nFields; j++)
|
for (j = 0; j < nFields; j++)
|
||||||
do_field(po, res, i, j, fs_len, fields, nFields,
|
do_field(po, res, i, j, fs_len, fields, nFields,
|
||||||
|
@ -309,7 +309,7 @@ winsock_strerror(int err, char *strerrbuf, size_t buflen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!success)
|
if (!success)
|
||||||
sprintf(strerrbuf, "Unknown socket error (0x%08X/%i)", err, err);
|
sprintf(strerrbuf, libpq_gettext("Unknown socket error (0x%08X/%i)"), err, err);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strerrbuf[buflen - 1] = '\0';
|
strerrbuf[buflen - 1] = '\0';
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
/* this must be first: */
|
/* this must be first: */
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
/* Defined by Perl */
|
||||||
|
#undef _(x)
|
||||||
|
|
||||||
/* perl stuff */
|
/* perl stuff */
|
||||||
#include "EXTERN.h"
|
#include "EXTERN.h"
|
||||||
|
@ -33,11 +33,13 @@
|
|||||||
* ENHANCEMENTS, OR MODIFICATIONS.
|
* ENHANCEMENTS, OR MODIFICATIONS.
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.67 2005/01/14 16:25:42 tgl Exp $
|
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.68 2005/02/22 04:42:44 momjian Exp $
|
||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
/* Defined by Perl */
|
||||||
|
#undef _(x)
|
||||||
|
|
||||||
/* system stuff */
|
/* system stuff */
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
/* Defined by Perl */
|
||||||
|
#undef _(x)
|
||||||
|
|
||||||
#include "spi_internal.h"
|
#include "spi_internal.h"
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* procedural language
|
* procedural language
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.128 2005/02/01 19:35:14 tgl Exp $
|
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.129 2005/02/22 04:43:07 momjian Exp $
|
||||||
*
|
*
|
||||||
* This software is copyrighted by Jan Wieck - Hamburg.
|
* This software is copyrighted by Jan Wieck - Hamburg.
|
||||||
*
|
*
|
||||||
@ -746,7 +746,7 @@ plpgsql_exec_error_callback(void *arg)
|
|||||||
*/
|
*/
|
||||||
errcontext("PL/pgSQL function \"%s\" %s",
|
errcontext("PL/pgSQL function \"%s\" %s",
|
||||||
estate->err_func->fn_name,
|
estate->err_func->fn_name,
|
||||||
gettext(estate->err_text));
|
_(estate->err_text));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
errcontext("PL/pgSQL function \"%s\"",
|
errcontext("PL/pgSQL function \"%s\"",
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* Win32 (NT, Win2k, XP). replace() doesn't work on Win95/98/Me.
|
* Win32 (NT, Win2k, XP). replace() doesn't work on Win95/98/Me.
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/port/dirmod.c,v 1.35 2005/02/13 16:50:44 momjian Exp $
|
* $PostgreSQL: pgsql/src/port/dirmod.c,v 1.36 2005/02/22 04:43:16 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -40,6 +40,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifndef FRONTEND
|
#ifndef FRONTEND
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -72,7 +73,7 @@ fe_palloc(Size size)
|
|||||||
|
|
||||||
if ((res = malloc(size)) == NULL)
|
if ((res = malloc(size)) == NULL)
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("out of memory\n"));
|
fprintf(stderr, _("out of memory\n"));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
@ -85,7 +86,7 @@ fe_pstrdup(const char *string)
|
|||||||
|
|
||||||
if ((res = strdup(string)) == NULL)
|
if ((res = strdup(string)) == NULL)
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("out of memory\n"));
|
fprintf(stderr, _("out of memory\n"));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
@ -98,7 +99,7 @@ fe_repalloc(void *pointer, Size size)
|
|||||||
|
|
||||||
if ((res = realloc(pointer, size)) == NULL)
|
if ((res = realloc(pointer, size)) == NULL)
|
||||||
{
|
{
|
||||||
fprintf(stderr, gettext("out of memory\n"));
|
fprintf(stderr, _("out of memory\n"));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
@ -139,7 +140,7 @@ pgrename(const char *from, const char *to)
|
|||||||
elog(LOG, "could not rename \"%s\" to \"%s\", continuing to try",
|
elog(LOG, "could not rename \"%s\" to \"%s\", continuing to try",
|
||||||
from, to);
|
from, to);
|
||||||
#else
|
#else
|
||||||
fprintf(stderr, "could not rename \"%s\" to \"%s\", continuing to try\n",
|
fprintf(stderr, _("could not rename \"%s\" to \"%s\", continuing to try\n"),
|
||||||
from, to);
|
from, to);
|
||||||
#endif
|
#endif
|
||||||
loops++;
|
loops++;
|
||||||
@ -149,7 +150,7 @@ pgrename(const char *from, const char *to)
|
|||||||
#ifndef FRONTEND
|
#ifndef FRONTEND
|
||||||
elog(LOG, "completed rename of \"%s\" to \"%s\"", from, to);
|
elog(LOG, "completed rename of \"%s\" to \"%s\"", from, to);
|
||||||
#else
|
#else
|
||||||
fprintf(stderr, "completed rename of \"%s\" to \"%s\"\n", from, to);
|
fprintf(stderr, _("completed rename of \"%s\" to \"%s\"\n"), from, to);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -175,7 +176,7 @@ pgunlink(const char *path)
|
|||||||
elog(LOG, "could not unlink \"%s\", continuing to try",
|
elog(LOG, "could not unlink \"%s\", continuing to try",
|
||||||
path);
|
path);
|
||||||
#else
|
#else
|
||||||
fprintf(stderr, "could not unlink \"%s\", continuing to try\n",
|
fprintf(stderr, _("could not unlink \"%s\", continuing to try\n"),
|
||||||
path);
|
path);
|
||||||
#endif
|
#endif
|
||||||
loops++;
|
loops++;
|
||||||
@ -185,7 +186,7 @@ pgunlink(const char *path)
|
|||||||
#ifndef FRONTEND
|
#ifndef FRONTEND
|
||||||
elog(LOG, "completed unlink of \"%s\"", path);
|
elog(LOG, "completed unlink of \"%s\"", path);
|
||||||
#else
|
#else
|
||||||
fprintf(stderr, "completed unlink of \"%s\"\n", path);
|
fprintf(stderr, _("completed unlink of \"%s\"\n"), path);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -283,7 +284,7 @@ pgsymlink(const char *oldpath, const char *newpath)
|
|||||||
errmsg("Error setting junction for %s: %s",
|
errmsg("Error setting junction for %s: %s",
|
||||||
nativeTarget, msg)));
|
nativeTarget, msg)));
|
||||||
#else
|
#else
|
||||||
fprintf(stderr, "Error setting junction for %s: %s\n",
|
fprintf(stderr, _("Error setting junction for %s: %s\n"),
|
||||||
nativeTarget, msg);
|
nativeTarget, msg);
|
||||||
#endif
|
#endif
|
||||||
LocalFree(msg);
|
LocalFree(msg);
|
||||||
@ -433,7 +434,7 @@ report_and_fail:
|
|||||||
#ifndef FRONTEND
|
#ifndef FRONTEND
|
||||||
elog(WARNING, "could not remove file or directory \"%s\": %m", filepath);
|
elog(WARNING, "could not remove file or directory \"%s\": %m", filepath);
|
||||||
#else
|
#else
|
||||||
fprintf(stderr, "could not remove file or directory \"%s\": %s\n", filepath, strerror(errno));
|
fprintf(stderr, _("could not remove file or directory \"%s\": %s\n"), filepath, strerror(errno));
|
||||||
#endif
|
#endif
|
||||||
fnames_cleanup(filenames);
|
fnames_cleanup(filenames);
|
||||||
return false;
|
return false;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/port/exec.c,v 1.37 2005/01/14 17:47:49 tgl Exp $
|
* $PostgreSQL: pgsql/src/port/exec.c,v 1.38 2005/02/22 04:43:16 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -191,7 +191,7 @@ find_my_exec(const char *argv0, char *retpath)
|
|||||||
|
|
||||||
if (!getcwd(cwd, MAXPGPATH))
|
if (!getcwd(cwd, MAXPGPATH))
|
||||||
{
|
{
|
||||||
log_error(gettext("could not identify current directory: %s"),
|
log_error(_("could not identify current directory: %s"),
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -210,7 +210,7 @@ find_my_exec(const char *argv0, char *retpath)
|
|||||||
if (validate_exec(retpath) == 0)
|
if (validate_exec(retpath) == 0)
|
||||||
return resolve_symlinks(retpath);
|
return resolve_symlinks(retpath);
|
||||||
|
|
||||||
log_error(gettext("invalid binary \"%s\""), retpath);
|
log_error(_("invalid binary \"%s\""), retpath);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -259,14 +259,14 @@ find_my_exec(const char *argv0, char *retpath)
|
|||||||
case -1: /* wasn't even a candidate, keep looking */
|
case -1: /* wasn't even a candidate, keep looking */
|
||||||
break;
|
break;
|
||||||
case -2: /* found but disqualified */
|
case -2: /* found but disqualified */
|
||||||
log_error(gettext("could not read binary \"%s\""),
|
log_error(_("could not read binary \"%s\""),
|
||||||
retpath);
|
retpath);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} while (*endp);
|
} while (*endp);
|
||||||
}
|
}
|
||||||
|
|
||||||
log_error(gettext("could not find a \"%s\" to execute"), argv0);
|
log_error(_("could not find a \"%s\" to execute"), argv0);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -305,7 +305,7 @@ resolve_symlinks(char *path)
|
|||||||
*/
|
*/
|
||||||
if (!getcwd(orig_wd, MAXPGPATH))
|
if (!getcwd(orig_wd, MAXPGPATH))
|
||||||
{
|
{
|
||||||
log_error(gettext("could not identify current directory: %s"),
|
log_error(_("could not identify current directory: %s"),
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -321,7 +321,7 @@ resolve_symlinks(char *path)
|
|||||||
*lsep = '\0';
|
*lsep = '\0';
|
||||||
if (chdir(path) == -1)
|
if (chdir(path) == -1)
|
||||||
{
|
{
|
||||||
log_error(gettext("could not change directory to \"%s\""), path);
|
log_error(_("could not change directory to \"%s\""), path);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
fname = lsep + 1;
|
fname = lsep + 1;
|
||||||
@ -336,7 +336,7 @@ resolve_symlinks(char *path)
|
|||||||
rllen = readlink(fname, link_buf, sizeof(link_buf));
|
rllen = readlink(fname, link_buf, sizeof(link_buf));
|
||||||
if (rllen < 0 || rllen >= sizeof(link_buf))
|
if (rllen < 0 || rllen >= sizeof(link_buf))
|
||||||
{
|
{
|
||||||
log_error(gettext("could not read symbolic link \"%s\""), fname);
|
log_error(_("could not read symbolic link \"%s\""), fname);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
link_buf[rllen] = '\0';
|
link_buf[rllen] = '\0';
|
||||||
@ -348,7 +348,7 @@ resolve_symlinks(char *path)
|
|||||||
|
|
||||||
if (!getcwd(path, MAXPGPATH))
|
if (!getcwd(path, MAXPGPATH))
|
||||||
{
|
{
|
||||||
log_error(gettext("could not identify current directory: %s"),
|
log_error(_("could not identify current directory: %s"),
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -357,7 +357,7 @@ resolve_symlinks(char *path)
|
|||||||
|
|
||||||
if (chdir(orig_wd) == -1)
|
if (chdir(orig_wd) == -1)
|
||||||
{
|
{
|
||||||
log_error(gettext("could not change directory to \"%s\""), orig_wd);
|
log_error(_("could not change directory to \"%s\""), orig_wd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -584,13 +584,13 @@ pclose_check(FILE *stream)
|
|||||||
perror("pclose failed");
|
perror("pclose failed");
|
||||||
}
|
}
|
||||||
else if (WIFEXITED(exitstatus))
|
else if (WIFEXITED(exitstatus))
|
||||||
log_error(gettext("child process exited with exit code %d"),
|
log_error(_("child process exited with exit code %d"),
|
||||||
WEXITSTATUS(exitstatus));
|
WEXITSTATUS(exitstatus));
|
||||||
else if (WIFSIGNALED(exitstatus))
|
else if (WIFSIGNALED(exitstatus))
|
||||||
log_error(gettext("child process was terminated by signal %d"),
|
log_error(_("child process was terminated by signal %d"),
|
||||||
WTERMSIG(exitstatus));
|
WTERMSIG(exitstatus));
|
||||||
else
|
else
|
||||||
log_error(gettext("child process exited with unrecognized status %d"),
|
log_error(_("child process exited with unrecognized status %d"),
|
||||||
exitstatus);
|
exitstatus);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/port/sprompt.c,v 1.10 2004/12/31 22:03:53 pgsql Exp $
|
* $PostgreSQL: pgsql/src/port/sprompt.c,v 1.11 2005/02/22 04:43:16 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -103,7 +103,7 @@ simple_prompt(const char *prompt, int maxlen, bool echo)
|
|||||||
|
|
||||||
if (prompt)
|
if (prompt)
|
||||||
{
|
{
|
||||||
fputs(gettext(prompt), termout);
|
fputs(_(prompt), termout);
|
||||||
fflush(termout);
|
fflush(termout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $PostgreSQL: pgsql/src/port/strerror.c,v 1.3 2003/11/29 22:41:31 pgsql Exp $ */
|
/* $PostgreSQL: pgsql/src/port/strerror.c,v 1.4 2005/02/22 04:43:16 momjian Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* strerror - map error number to descriptive string
|
* strerror - map error number to descriptive string
|
||||||
@ -23,7 +23,7 @@ strerror(int errnum)
|
|||||||
|
|
||||||
if (errnum < 0 || errnum > sys_nerr)
|
if (errnum < 0 || errnum > sys_nerr)
|
||||||
{
|
{
|
||||||
sprintf(buf, "unrecognized error %d", errnum);
|
sprintf(buf, _("unrecognized error %d"), errnum);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
|
* 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/timezone/private.h,v 1.9 2004/08/29 05:07:02 momjian Exp $
|
* $PostgreSQL: pgsql/src/timezone/private.h,v 1.10 2005/02/22 04:43:23 momjian Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -104,6 +104,7 @@ extern char *scheck(const char *string, const char *format);
|
|||||||
((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + 1 + TYPE_SIGNED(type))
|
((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + 1 + TYPE_SIGNED(type))
|
||||||
#endif /* !defined INT_STRLEN_MAXIMUM */
|
#endif /* !defined INT_STRLEN_MAXIMUM */
|
||||||
|
|
||||||
|
#undef _(x)
|
||||||
#define _(msgid) (msgid)
|
#define _(msgid) (msgid)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user