@@ -141,15 +141,18 @@ EnableLockPagesPrivilege(int elevel)
141141 if (!OpenProcessToken (GetCurrentProcess (), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY , & hToken ))
142142 {
143143 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 ()),
145148 errdetail ("Failed system call was %s." , "OpenProcessToken" )));
146149 return FALSE;
147150 }
148151
149152 if (!LookupPrivilegeValue (NULL , SE_LOCK_MEMORY_NAME , & luid ))
150153 {
151154 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 ()),
153156 errdetail ("Failed system call was %s." , "LookupPrivilegeValue" )));
154157 CloseHandle (hToken );
155158 return FALSE;
@@ -161,7 +164,7 @@ EnableLockPagesPrivilege(int elevel)
161164 if (!AdjustTokenPrivileges (hToken , FALSE, & tp , 0 , NULL , NULL ))
162165 {
163166 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 ()),
165168 errdetail ("Failed system call was %s." , "AdjustTokenPrivileges" )));
166169 CloseHandle (hToken );
167170 return FALSE;
@@ -172,11 +175,12 @@ EnableLockPagesPrivilege(int elevel)
172175 if (GetLastError () == ERROR_NOT_ALL_ASSIGNED )
173176 ereport (elevel ,
174177 (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" ))));
177181 else
178182 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 ()),
180184 errdetail ("Failed system call was %s." , "AdjustTokenPrivileges" )));
181185 CloseHandle (hToken );
182186 return FALSE;
0 commit comments