Peter Eisentraut wrote:
> Some of you have already been doing a great job, but I would like to point
> out
> that with the upcoming release of PostgreSQL 8.3, it is once again time to
> update the message translations. We are now near a string freeze, which has
> traditionally been associated with the first release candidate, so it's a
> good time to do this work now.
I would like to propose this patch. This avoids an inconsistent message
wording, and removes the need to translate a string by duplicate.
--
Alvaro Herrera http://www.PlanetPostgreSQL.org/
"Estoy de acuerdo contigo en que la verdad absoluta no existe...
El problema es que la mentira sà existe y tu estás mintiendo" (G. Lama)
Index: src/bin/initdb/initdb.c
===================================================================
RCS file: /home/alvherre/cvs/pgsql/src/bin/initdb/initdb.c,v
retrieving revision 1.150
diff -c -p -r1.150 initdb.c
*** src/bin/initdb/initdb.c 15 Nov 2007 21:14:41 -0000 1.150
--- src/bin/initdb/initdb.c 16 Nov 2007 15:08:02 -0000
*************** check_input(char *path)
*** 938,963 ****
if (stat(path, &statbuf) != 0)
{
if (errno == ENOENT)
fprintf(stderr,
! _("%s: file \"%s\" does not exist\n"
! "This means you have a corrupted installation or identified\n"
! "the wrong directory with the invocation option -L.\n"),
! progname, path);
else
fprintf(stderr,
! _("%s: could not access file \"%s\": %s\n"
! "This might mean you have a corrupted installation or identified\n"
! "the wrong directory with the invocation option -L.\n"),
! progname, path, strerror(errno));
exit(1);
}
if (!S_ISREG(statbuf.st_mode))
{
fprintf(stderr,
! _("%s: file \"%s\" is not a regular file\n"
! "This means you have a corrupted installation or identified\n"
! "the wrong directory with the invocation option -L.\n"),
! progname, path);
exit(1);
}
}
--- 938,968 ----
if (stat(path, &statbuf) != 0)
{
if (errno == ENOENT)
+ {
+ fprintf(stderr,
+ _("%s: file \"%s\" does not exist\n"), progname, path);
fprintf(stderr,
! _("This might mean you have a corrupted installation or identified\n"
! "the wrong directory with the invocation option -L.\n"));
! }
else
+ {
+ fprintf(stderr,
+ _("%s: could not access file \"%s\": %s\n"), progname, path,
+ strerror(errno));
fprintf(stderr,
! _("This might mean you have a corrupted installation or identified\n"
! "the wrong directory with the invocation option -L.\n"));
! }
exit(1);
}
if (!S_ISREG(statbuf.st_mode))
{
fprintf(stderr,
! _("%s: file \"%s\" is not a regular file\n"), progname, path);
! fprintf(stderr,
! _("This might mean you have a corrupted installation or identified\n"
! "the wrong directory with the invocation option -L.\n"));
exit(1);
}
}
*************** main(int argc, char *argv[])
*** 2958,2968 ****
case 2:
/* Present and not empty */
fprintf(stderr,
! _("%s: directory \"%s\" exists but is not empty\n"
! "If you want to create a new database system, either remove or empty\n"
"the directory \"%s\" or run %s\n"
"with an argument other than \"%s\".\n"),
! progname, pg_data, pg_data, progname, pg_data);
exit(1); /* no further message needed */
default:
--- 2963,2975 ----
case 2:
/* Present and not empty */
fprintf(stderr,
! _("%s: directory \"%s\" exists but is not empty\n"),
! progname, pg_data);
! fprintf(stderr,
! _("If you want to create a new database system, either remove or empty\n"
"the directory \"%s\" or run %s\n"
"with an argument other than \"%s\".\n"),
! pg_data, progname, pg_data);
exit(1); /* no further message needed */
default:
*************** main(int argc, char *argv[])
*** 3022,3031 ****
case 2:
/* Present and not empty */
fprintf(stderr,
! _("%s: directory \"%s\" exists but is not empty\n"
! "If you want to store the transaction log there, either\n"
"remove or empty the directory \"%s\".\n"),
! progname, xlog_dir, xlog_dir);
exit(1); /* no further message needed */
default:
--- 3029,3040 ----
case 2:
/* Present and not empty */
fprintf(stderr,
! _("%s: directory \"%s\" exists but is not empty\n"),
! progname, xlog_dir);
! fprintf(stderr,
! _("If you want to store the transaction log there, either\n"
"remove or empty the directory \"%s\".\n"),
! xlog_dir);
exit(1); /* no further message needed */
default:
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org