Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7e61edf

Browse files
committed
Fix some message style guideline violations in pg_regress, as well as
some failures to expose messages for translation.
1 parent be3b265 commit 7e61edf

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/test/regress/pg_regress.c

+12-9
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
14-
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.46 2008/08/03 05:12:38 tgl Exp $
14+
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.47 2008/08/05 05:16:08 tgl Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -141,7 +141,7 @@ unlimit_core_size(void)
141141
if (lim.rlim_max == 0)
142142
{
143143
fprintf(stderr,
144-
_("%s: cannot set core size,: disallowed by hard limit.\n"),
144+
_("%s: could not set core size: disallowed by hard limit\n"),
145145
progname);
146146
return;
147147
}
@@ -524,7 +524,7 @@ convert_sourcefiles_in(char *source, char *dest, char *suffix)
524524
*/
525525
if (count <= 0)
526526
{
527-
fprintf(stderr, _("%s: no *.source files found in %s\n"),
527+
fprintf(stderr, _("%s: no *.source files found in \"%s\"\n"),
528528
progname, indir);
529529
exit_nicely(2);
530530
}
@@ -965,14 +965,16 @@ spawn_process(const char *cmdline)
965965
{
966966
if (Advapi32Handle != NULL)
967967
FreeLibrary(Advapi32Handle);
968-
fprintf(stderr, "ERROR: cannot create restricted tokens on this platform\n");
968+
fprintf(stderr, _("%s: cannot create restricted tokens on this platform\n"),
969+
progname);
969970
exit_nicely(2);
970971
}
971972

972973
/* Open the current token to use as base for the restricted one */
973974
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &origToken))
974975
{
975-
fprintf(stderr, "could not open process token: %lu\n", GetLastError());
976+
fprintf(stderr, _("could not open process token: %lu\n"),
977+
GetLastError());
976978
exit_nicely(2);
977979
}
978980

@@ -983,7 +985,7 @@ spawn_process(const char *cmdline)
983985
!AllocateAndInitializeSid(&NtAuthority, 2,
984986
SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_POWER_USERS, 0, 0, 0, 0, 0, 0, &dropSids[1].Sid))
985987
{
986-
fprintf(stderr, "could not allocate SIDs: %lu\n", GetLastError());
988+
fprintf(stderr, _("could not allocate SIDs: %lu\n"), GetLastError());
987989
exit_nicely(2);
988990
}
989991

@@ -1002,7 +1004,8 @@ spawn_process(const char *cmdline)
10021004

10031005
if (!b)
10041006
{
1005-
fprintf(stderr, "could not create restricted token: %lu\n", GetLastError());
1007+
fprintf(stderr, _("could not create restricted token: %lu\n"),
1008+
GetLastError());
10061009
exit_nicely(2);
10071010
}
10081011

@@ -2073,13 +2076,13 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
20732076
pg_conf = fopen(buf, "a");
20742077
if (pg_conf == NULL)
20752078
{
2076-
fprintf(stderr, _("\n%s: could not open %s for adding extra config:\nError was %s\n"), progname, buf, strerror(errno));
2079+
fprintf(stderr, _("\n%s: could not open \"%s\" for adding extra config: %s\n"), progname, buf, strerror(errno));
20772080
exit_nicely(2);
20782081
}
20792082
extra_conf = fopen(temp_config, "r");
20802083
if (extra_conf == NULL)
20812084
{
2082-
fprintf(stderr, _("\n%s: could not open %s to read extra config:\nError was %s\n"), progname, temp_config, strerror(errno));
2085+
fprintf(stderr, _("\n%s: could not open \"%s\" to read extra config: %s\n"), progname, temp_config, strerror(errno));
20832086
exit_nicely(2);
20842087
}
20852088
while (fgets(line_buf, sizeof(line_buf), extra_conf) != NULL)

0 commit comments

Comments
 (0)