Skip to content

Commit 2005b77

Browse files
committed
initdb: Mark more messages for translation
Some Windows-only messages had apparently been forgotten so far. Also make the wording of the messages more consistent with similar messages other parts, such as pg_ctl and pg_regress.
1 parent 68219aa commit 2005b77

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/bin/initdb/initdb.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2431,7 +2431,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo)
24312431

24322432
if (_CreateRestrictedToken == NULL)
24332433
{
2434-
fprintf(stderr, "WARNING: cannot create restricted tokens on this platform\n");
2434+
fprintf(stderr, _("%s: WARNING: cannot create restricted tokens on this platform\n"), progname);
24352435
if (Advapi32Handle != NULL)
24362436
FreeLibrary(Advapi32Handle);
24372437
return 0;
@@ -2440,7 +2440,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo)
24402440
/* Open the current token to use as a base for the restricted one */
24412441
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &origToken))
24422442
{
2443-
fprintf(stderr, "Failed to open process token: error code %lu\n", GetLastError());
2443+
fprintf(stderr, _("%s: could not open process token: error code %lu\n"), progname, GetLastError());
24442444
return 0;
24452445
}
24462446

@@ -2453,7 +2453,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo)
24532453
SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_POWER_USERS, 0, 0, 0, 0, 0,
24542454
0, &dropSids[1].Sid))
24552455
{
2456-
fprintf(stderr, "Failed to allocate SIDs: error code %lu\n", GetLastError());
2456+
fprintf(stderr, _("%s: could not to allocate SIDs: error code %lu\n"), progname, GetLastError());
24572457
return 0;
24582458
}
24592459

@@ -2472,7 +2472,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo)
24722472

24732473
if (!b)
24742474
{
2475-
fprintf(stderr, "Failed to create restricted token: error code %lu\n", GetLastError());
2475+
fprintf(stderr, _("%s: could not create restricted token: error code %lu\n"), progname, GetLastError());
24762476
return 0;
24772477
}
24782478

@@ -2493,7 +2493,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo)
24932493
processInfo))
24942494

24952495
{
2496-
fprintf(stderr, "CreateProcessAsUser failed: error code %lu\n", GetLastError());
2496+
fprintf(stderr, _("%s: could not start process for \"%s\": error code %lu\n"), progname, cmd, GetLastError());
24972497
return 0;
24982498
}
24992499

@@ -2835,7 +2835,7 @@ main(int argc, char *argv[])
28352835

28362836
if (!CreateRestrictedProcess(cmdline, &pi))
28372837
{
2838-
fprintf(stderr, "Failed to re-exec with restricted token: error code %lu\n", GetLastError());
2838+
fprintf(stderr, _("%s: could not re-exec with restricted token: error code %lu\n"), progname, GetLastError());
28392839
}
28402840
else
28412841
{
@@ -2850,7 +2850,7 @@ main(int argc, char *argv[])
28502850

28512851
if (!GetExitCodeProcess(pi.hProcess, &x))
28522852
{
2853-
fprintf(stderr, "Failed to get exit code from subprocess: error code %lu\n", GetLastError());
2853+
fprintf(stderr, _("%s: could not get exit code from subprocess: error code %lu\n"), progname, GetLastError());
28542854
exit(1);
28552855
}
28562856
exit(x);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy