Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7666ef3

Browse files
committed
Unify find_other_exec() error messages
There were a few different ways to line-wrap the error messages. Makethem all the same, and use placeholders for the actual program names,to save translation work.
1 parent086ffdd commit7666ef3

File tree

5 files changed

+21
-22
lines changed

5 files changed

+21
-22
lines changed

‎src/bin/initdb/initdb.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2431,15 +2431,15 @@ setup_bin_paths(const char *argv0)
24312431
strlcpy(full_path,progname,sizeof(full_path));
24322432

24332433
if (ret==-1)
2434-
pg_log_error("The program \"postgres\" is needed by %s but was not found in the\n"
2434+
pg_log_error("The program \"%s\" is needed by %s but was not found in the\n"
24352435
"same directory as \"%s\".\n"
24362436
"Check your installation.",
2437-
progname,full_path);
2437+
"postgres",progname,full_path);
24382438
else
2439-
pg_log_error("The program \"postgres\" was found by \"%s\"\n"
2439+
pg_log_error("The program \"%s\" was found by \"%s\"\n"
24402440
"but was not the same version as %s.\n"
24412441
"Check your installation.",
2442-
full_path,progname);
2442+
"postgres",full_path,progname);
24432443
exit(1);
24442444
}
24452445

‎src/bin/pg_ctl/pg_ctl.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -810,8 +810,7 @@ find_other_exec_or_die(const char *argv0, const char *target, const char *versio
810810
strlcpy(full_path,progname,sizeof(full_path));
811811

812812
if (ret==-1)
813-
write_stderr(_("The program \"%s\" is needed by %s "
814-
"but was not found in the\n"
813+
write_stderr(_("The program \"%s\" is needed by %s but was not found in the\n"
815814
"same directory as \"%s\".\n"
816815
"Check your installation.\n"),
817816
target,progname,full_path);

‎src/bin/pg_dump/pg_dumpall.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,15 @@ main(int argc, char *argv[])
196196
strlcpy(full_path,progname,sizeof(full_path));
197197

198198
if (ret==-1)
199-
pg_log_error("The program \"pg_dump\" is needed by %s but was not found in the\n"
199+
pg_log_error("The program \"%s\" is needed by %s but was not found in the\n"
200200
"same directory as \"%s\".\n"
201201
"Check your installation.",
202-
progname,full_path);
202+
"pg_dump",progname,full_path);
203203
else
204-
pg_log_error("The program \"pg_dump\" was found by \"%s\"\n"
204+
pg_log_error("The program \"%s\" was found by \"%s\"\n"
205205
"but was not the same version as %s.\n"
206206
"Check your installation.",
207-
full_path,progname);
207+
"pg_dump",full_path,progname);
208208
exit_nicely(1);
209209
}
210210

‎src/bin/pg_rewind/pg_rewind.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -847,15 +847,15 @@ getRestoreCommand(const char *argv0)
847847
strlcpy(full_path,progname,sizeof(full_path));
848848

849849
if (rc==-1)
850-
pg_log_error("The program \"postgres\" is needed by %s but was not found in the\n"
850+
pg_log_error("The program \"%s\" is needed by %s but was not found in the\n"
851851
"same directory as \"%s\".\n"
852852
"Check your installation.",
853-
progname,full_path);
853+
"postgres",progname,full_path);
854854
else
855-
pg_log_error("The program \"postgres\" was found by \"%s\"\n"
855+
pg_log_error("The program \"%s\" was found by \"%s\"\n"
856856
"but was not the same version as %s.\n"
857857
"Check your installation.",
858-
full_path,progname);
858+
"postgres",full_path,progname);
859859
exit(1);
860860
}
861861

@@ -905,13 +905,13 @@ ensureCleanShutdown(const char *argv0)
905905
strlcpy(full_path,progname,sizeof(full_path));
906906

907907
if (ret==-1)
908-
pg_fatal("The program \"%s\" is needed by %s but was\n"
909-
"not found in thesame directory as \"%s\".\n"
908+
pg_fatal("The program \"%s\" is needed by %s but was not found in the\n"
909+
"same directory as \"%s\".\n"
910910
"Check your installation.",
911911
"postgres",progname,full_path);
912912
else
913-
pg_fatal("The program \"%s\" was found by \"%s\" but was\n"
914-
"not the same version as %s.\n"
913+
pg_fatal("The program \"%s\" was found by \"%s\"\n"
914+
"but wasnot the same version as %s.\n"
915915
"Check your installation.",
916916
"postgres",full_path,progname);
917917
}

‎src/bin/pg_verifybackup/pg_verifybackup.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,13 @@ main(int argc, char **argv)
295295
if (find_my_exec(argv[0],full_path)<0)
296296
strlcpy(full_path,progname,sizeof(full_path));
297297
if (ret==-1)
298-
pg_log_fatal("The program \"%s\" is needed by %s but was\n"
299-
"not found in thesame directory as \"%s\".\n"
298+
pg_log_fatal("The program \"%s\" is needed by %s but was not found in the\n"
299+
"same directory as \"%s\".\n"
300300
"Check your installation.",
301301
"pg_waldump","pg_verifybackup",full_path);
302302
else
303-
pg_log_fatal("The program \"%s\" was found by \"%s\" but was\n"
304-
"not the same version as %s.\n"
303+
pg_log_fatal("The program \"%s\" was found by \"%s\"\n"
304+
"but wasnot the same version as %s.\n"
305305
"Check your installation.",
306306
"pg_waldump",full_path,"pg_verifybackup");
307307
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp