diff options
author | Bruce Momjian <bruce@momjian.us> | 2005-02-22 04:43:23 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2005-02-22 04:43:23 +0000 |
commit | 0542b1e2fee5fe7c7fa1a83fa9fe81618b2bc69e (patch) | |
tree | eb42bea6234c92d377cb52257855b4b882120e78 /src/interfaces | |
parent | 64011b4dce7db05bd7bb1911fe81fcc8f2da75e1 (diff) | |
download | postgresql-0542b1e2fee5fe7c7fa1a83fa9fe81618b2bc69e.tar.gz postgresql-0542b1e2fee5fe7c7fa1a83fa9fe81618b2bc69e.zip |
Use _() macro consistently rather than gettext(). Add translation
macros around strings that were missing them.
Diffstat (limited to 'src/interfaces')
-rw-r--r-- | src/interfaces/libpq/fe-connect.c | 22 | ||||
-rw-r--r-- | src/interfaces/libpq/fe-misc.c | 22 | ||||
-rw-r--r-- | src/interfaces/libpq/fe-print.c | 10 | ||||
-rw-r--r-- | src/interfaces/libpq/win32.c | 2 |
4 files changed, 28 insertions, 28 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index 8a6731c2c3f..188c80a72be 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -8,7 +8,7 @@ * * * 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) { printfPQExpBuffer(&conn->errorMessage, - "connectDBStart() -- " - "socket name can only be specified with " - "non-TCP\n"); + libpq_gettext("connectDBStart() -- " + "socket name can only be specified with " + "non-TCP\n")); return 1; } *tmp2 = '\0'; @@ -769,9 +769,9 @@ update_db_info(PGconn *conn) if (strcmp(old + offset, "localhost") != 0) { printfPQExpBuffer(&conn->errorMessage, - "connectDBStart() -- " + libpq_gettext("connectDBStart() -- " "non-TCP access only possible on " - "localhost\n"); + "localhost\n")); return 1; } } @@ -1514,7 +1514,7 @@ keep_going: /* We will come back to here until there { /* Received error - probably protocol mismatch */ 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" */ { /* Require SSL, but server is too old */ @@ -2502,7 +2502,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage) f = fopen(serviceFile, "r"); if (f == NULL) { - printfPQExpBuffer(errorMessage, "ERROR: Service file '%s' not found\n", + printfPQExpBuffer(errorMessage, libpq_gettext("ERROR: Service file '%s' not found\n"), serviceFile); return 1; } @@ -2515,7 +2515,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage) { fclose(f); 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, serviceFile); return 2; @@ -2566,7 +2566,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage) if (val == NULL) { 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, linenr); fclose(f); @@ -2593,7 +2593,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage) if (!found_keyword) { 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, linenr); fclose(f); diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c index f3691c783b5..f3ed41423ec 100644 --- a/src/interfaces/libpq/fe-misc.c +++ b/src/interfaces/libpq/fe-misc.c @@ -23,7 +23,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * 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++]; if (conn->Pfdebug) - fprintf(conn->Pfdebug, "From backend> %c\n", *result); + fprintf(conn->Pfdebug, libpq_gettext("From backend> %c\n"), *result); return 0; } @@ -101,7 +101,7 @@ pqPutc(char c, PGconn *conn) return EOF; if (conn->Pfdebug) - fprintf(conn->Pfdebug, "To backend> %c\n", c); + fprintf(conn->Pfdebug, libpq_gettext("To backend> %c\n"), c); return 0; } @@ -137,7 +137,7 @@ pqGets(PQExpBuffer buf, PGconn *conn) conn->inCursor = ++inCursor; if (conn->Pfdebug) - fprintf(conn->Pfdebug, "From backend> \"%s\"\n", + fprintf(conn->Pfdebug, libpq_gettext("From backend> \"%s\"\n"), buf->data); return 0; @@ -154,7 +154,7 @@ pqPuts(const char *s, PGconn *conn) return EOF; if (conn->Pfdebug) - fprintf(conn->Pfdebug, "To backend> '%s'\n", s); + fprintf(conn->Pfdebug, libpq_gettext("To backend> '%s'\n"), s); return 0; } @@ -175,7 +175,7 @@ pqGetnchar(char *s, size_t len, PGconn *conn) conn->inCursor += len; 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; } @@ -191,7 +191,7 @@ pqPutnchar(const char *s, size_t len, PGconn *conn) return EOF; 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; } @@ -231,7 +231,7 @@ pqGetInt(int *result, size_t bytes, PGconn *conn) } 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; } @@ -267,7 +267,7 @@ pqPutInt(int value, size_t bytes, PGconn *conn) } 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; } @@ -455,7 +455,7 @@ pqPutMsgStart(char msg_type, bool force_len, PGconn *conn) /* length word, if needed, will be filled in by pqPutMsgEnd */ 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 : ' '); return 0; @@ -493,7 +493,7 @@ int pqPutMsgEnd(PGconn *conn) { 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); /* Fill in length word if needed */ diff --git a/src/interfaces/libpq/fe-print.c b/src/interfaces/libpq/fe-print.c index 345ebc263eb..e6740a3d188 100644 --- a/src/interfaces/libpq/fe-print.c +++ b/src/interfaces/libpq/fe-print.c @@ -10,7 +10,7 @@ * didn't really belong there. * * 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->align) - fprintf(fout, "%-*s%s Value\n", - fieldMaxLen - fs_len, "Field", po->fieldSep); + fprintf(fout, libpq_gettext("%-*s%s Value\n"), + fieldMaxLen - fs_len, libpq_gettext("Field"), po->fieldSep); else - fprintf(fout, "%s%sValue\n", "Field", po->fieldSep); + fprintf(fout, libpq_gettext("%s%sValue\n"), libpq_gettext("Field"), po->fieldSep); } else { @@ -262,7 +262,7 @@ PQprint(FILE *fout, "<table %s><caption align=high>%d</caption>\n", po->tableOpt ? po->tableOpt : "", i); else - fprintf(fout, "-- RECORD %d --\n", i); + fprintf(fout, libpq_gettext("-- RECORD %d --\n"), i); } for (j = 0; j < nFields; j++) do_field(po, res, i, j, fs_len, fields, nFields, diff --git a/src/interfaces/libpq/win32.c b/src/interfaces/libpq/win32.c index 8122bc9b146..fce0d3f26b5 100644 --- a/src/interfaces/libpq/win32.c +++ b/src/interfaces/libpq/win32.c @@ -309,7 +309,7 @@ winsock_strerror(int err, char *strerrbuf, size_t buflen) } 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 { strerrbuf[buflen - 1] = '\0'; |