@@ -141,15 +141,18 @@ EnableLockPagesPrivilege(int elevel)
141
141
if (!OpenProcessToken (GetCurrentProcess (), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY , & hToken ))
142
142
{
143
143
ereport (elevel ,
144
- (errmsg ("could not enable Lock Pages in Memory user right: error code %lu" , GetLastError ()),
144
+ (errmsg ("could not enable user right \"%s\": error code %lu" ,
145
+ /* translator: This is a term from Windows and should be translated to match the Windows localization. */
146
+ _ ("Lock pages in memory" ),
147
+ GetLastError ()),
145
148
errdetail ("Failed system call was %s." , "OpenProcessToken" )));
146
149
return FALSE;
147
150
}
148
151
149
152
if (!LookupPrivilegeValue (NULL , SE_LOCK_MEMORY_NAME , & luid ))
150
153
{
151
154
ereport (elevel ,
152
- (errmsg ("could not enable Lock Pages in Memory user right: error code %lu" , GetLastError ()),
155
+ (errmsg ("could not enable user right \"%s\" : error code %lu" , _ ( "Lock pages in memory" ) , GetLastError ()),
153
156
errdetail ("Failed system call was %s." , "LookupPrivilegeValue" )));
154
157
CloseHandle (hToken );
155
158
return FALSE;
@@ -161,7 +164,7 @@ EnableLockPagesPrivilege(int elevel)
161
164
if (!AdjustTokenPrivileges (hToken , FALSE, & tp , 0 , NULL , NULL ))
162
165
{
163
166
ereport (elevel ,
164
- (errmsg ("could not enable Lock Pages in Memory user right: error code %lu" , GetLastError ()),
167
+ (errmsg ("could not enable user right \"%s\" : error code %lu" , _ ( "Lock pages in memory" ) , GetLastError ()),
165
168
errdetail ("Failed system call was %s." , "AdjustTokenPrivileges" )));
166
169
CloseHandle (hToken );
167
170
return FALSE;
@@ -172,11 +175,12 @@ EnableLockPagesPrivilege(int elevel)
172
175
if (GetLastError () == ERROR_NOT_ALL_ASSIGNED )
173
176
ereport (elevel ,
174
177
(errcode (ERRCODE_INSUFFICIENT_PRIVILEGE ),
175
- errmsg ("could not enable Lock Pages in Memory user right" ),
176
- errhint ("Assign Lock Pages in Memory user right to the Windows user account which runs PostgreSQL." )));
178
+ errmsg ("could not enable user right \"%s\"" , _ ("Lock pages in memory" )),
179
+ errhint ("Assign user right \"%s\" to the Windows user account which runs PostgreSQL." ,
180
+ _ ("Lock pages in memory" ))));
177
181
else
178
182
ereport (elevel ,
179
- (errmsg ("could not enable Lock Pages in Memory user right: error code %lu" , GetLastError ()),
183
+ (errmsg ("could not enable user right \"%s\" : error code %lu" , _ ( "Lock pages in memory" ) , GetLastError ()),
180
184
errdetail ("Failed system call was %s." , "AdjustTokenPrivileges" )));
181
185
CloseHandle (hToken );
182
186
return FALSE;
0 commit comments