Commit 26aeb193 authored by Franco Fichtner's avatar Franco Fichtner

system: fixup scattered gettext() usage in the user manager

(cherry picked from commit a52ec237)
parent 3daed677
......@@ -172,7 +172,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$userdeleted = $a_user[$id]['name'];
unset($a_user[$id]);
write_config();
$savemsg = gettext("User")." {$userdeleted} ". gettext("successfully deleted");
$savemsg = sprintf(gettext('The user "%s" was successfully removed.'), $userdeleted);
header("Location: system_usermanager.php?savemsg=".$savemsg);
exit;
}
......@@ -182,8 +182,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$certdeleted = $certdeleted['descr'];
unset($a_user[$id]['cert'][$pconfig['certid']]);
write_config();
$savemsg = gettext("Certificate")." {$certdeleted} ".
gettext("association removed.");
$savemsg = sprintf(gettext('The certificate association "%s" was successfully removed.'), $certdeleted);
header("Location: system_usermanager.php?savemsg=".$savemsg."&act=edit&userid=".$id);
exit;
} elseif ($act == "newApiKey" && isset($id)) {
......@@ -205,8 +204,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$authFactory = new \OPNsense\Auth\AuthenticationFactory();
$authenticator = $authFactory->get("Local API");
$authenticator->dropKey($username, $pconfig['api_delete']);
$savemsg = gettext("API key")." {$pconfig['api_delete']} ".
gettext("removed.");
$savemsg = sprintf(gettext('The API key "%s" was successfully removed.'), $pconfig['api_delete']);
} else {
$savemsg = gettext('No API key found');
}
......@@ -221,9 +219,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$reqdfieldsn = array(gettext("Username"));
} else {
$reqdfields = explode(" ", "usernamefld passwordfld1");
$reqdfieldsn = array(
gettext("Username"),
gettext("Password"));
$reqdfieldsn = array(gettext("Username"), gettext("Password"));
}
do_input_validation($pconfig, $reqdfields, $reqdfieldsn, $input_errors);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment