mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Merge branch 'gettext' of git@rcs.pfsense.org:pfsense/bluepex-clone into gettext
This commit is contained in:
commit
f2a0ebed33
@ -41,7 +41,7 @@
|
||||
require("guiconfig.inc");
|
||||
require_once("auth.inc");
|
||||
|
||||
$pgtitle = array("System", "Authentication Servers");
|
||||
$pgtitle = array(gettext("System"), gettext("Authentication Servers"));
|
||||
|
||||
$id = $_GET['id'];
|
||||
if (isset($_POST['id']))
|
||||
@ -141,40 +141,52 @@ if ($_POST) {
|
||||
$reqdfields = explode(" ", "name type ldap_host ldap_port ".
|
||||
"ldap_urltype ldap_protver ldap_scope ldap_basedn ".
|
||||
"ldap_attr_user ldap_attr_group ldap_attr_member ldapauthcontainers");
|
||||
$reqdfieldsn = explode(",", "Descriptive name,Type,Hostname or IP,".
|
||||
"Port value,Transport,Protocol version,Search level,".
|
||||
"Search Base DN,User naming Attribute,".
|
||||
"Group naming Attribute,Group member attribute,Authentication container");
|
||||
$reqdfieldsn = array(
|
||||
gettext("Descriptive name"),
|
||||
gettext("Type"),
|
||||
gettext("Hostname or IP"),
|
||||
gettext("Port value"),
|
||||
gettext("Transport"),
|
||||
gettext("Protocol version"),
|
||||
gettext("Search level"),
|
||||
gettext("Search Base DN"),
|
||||
gettext("User naming Attribute"),
|
||||
gettext("Group naming Attribute"),
|
||||
gettext("Group member attribute"),
|
||||
gettext("Authentication container"));
|
||||
|
||||
if (!$pconfig['ldap_anon']) {
|
||||
$reqdfields[] = "ldap_binddn";
|
||||
$reqdfields[] = "ldap_bindpw";
|
||||
$reqdfieldsn[] = "Bind user DN";
|
||||
$reqdfieldsn[] = "Bind Password";
|
||||
$reqdfieldsn[] = gettext("Bind user DN");
|
||||
$reqdfieldsn[] = gettext("Bind Password");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($pconfig['type'] == "radius") {
|
||||
$reqdfields = explode(" ", "name type radius_host radius_srvcs");
|
||||
$reqdfieldsn = explode(",", "Descriptive name,Type,Hostname or IP,".
|
||||
"Services");
|
||||
$reqdfieldsn = array(
|
||||
gettext("Descriptive name"),
|
||||
gettext("Type"),
|
||||
gettext("Hostname or IP"),
|
||||
gettext("Services"));
|
||||
|
||||
if ($pconfig['radisu_srvcs'] == "both" ||
|
||||
$pconfig['radisu_srvcs'] == "auth") {
|
||||
$reqdfields[] = "radius_auth_port";
|
||||
$reqdfieldsn[] = "Authentication port value";
|
||||
$reqdfieldsn[] = gettext("Authentication port value");
|
||||
}
|
||||
|
||||
if ($pconfig['radisu_srvcs'] == "both" ||
|
||||
$pconfig['radisu_srvcs'] == "acct") {
|
||||
$reqdfields[] = "radius_acct_port";
|
||||
$reqdfieldsn[] = "Accounting port value";
|
||||
$reqdfieldsn[] = gettext("Accounting port value");
|
||||
}
|
||||
|
||||
if (!isset($id)) {
|
||||
$reqdfields[] = "radius_secret";
|
||||
$reqdfieldsn[] = "Shared Secret";
|
||||
$reqdfieldsn[] = gettext("Shared Secret");
|
||||
}
|
||||
}
|
||||
|
||||
@ -184,7 +196,7 @@ if ($_POST) {
|
||||
$input_errors[] = gettext("The host name contains invalid characters.");
|
||||
|
||||
if (auth_get_authserver($pconfig['name']) && !isset($id))
|
||||
$input_errors[] = "A authentication server with the same name already exists.";
|
||||
$input_errors[] = gettext("An authentication server with the same name already exists.");
|
||||
|
||||
/* if this is an AJAX caller then handle via JSON */
|
||||
if (isAjax() && is_array($input_errors)) {
|
||||
@ -350,13 +362,13 @@ function select_clicked() {
|
||||
document.getElementById("ldap_scope").value == '' ||
|
||||
document.getElementById("ldap_basedn").value == '' ||
|
||||
document.getElementById("ldapauthcontainers").value == '') {
|
||||
alert("Please fill the required values.");
|
||||
alert("<?=gettext("Please fill the required values.");?>");
|
||||
return;
|
||||
}
|
||||
if (!document.getElementById("ldap_anon").checked) {
|
||||
if (document.getElementById("ldap_binddn").value == '' ||
|
||||
document.getElementById("ldap_bindpw").value == '') {
|
||||
alert("Please fill the bind username/password.");
|
||||
alert("<?=gettext("Please fill the bind username/password.");?>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -373,7 +385,7 @@ function select_clicked() {
|
||||
|
||||
var oWin = window.open(url,"pfSensePop","width=620,height=400,top=150,left=150");
|
||||
if (oWin==null || typeof(oWin)=="undefined")
|
||||
alert('Popup blocker detected. Action aborted.');
|
||||
alert("<?=gettext('Popup blocker detected. Action aborted.');?>");
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
@ -442,7 +454,7 @@ function select_clicked() {
|
||||
<td colspan="2" class="list" height="12"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="listtopic">LDAP Server Settings</td>
|
||||
<td colspan="2" valign="top" class="listtopic"><?=gettext("LDAP Server Settings");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname or IP address");?></td>
|
||||
@ -491,7 +503,7 @@ function select_clicked() {
|
||||
<td width="78%" class="vtable">
|
||||
<table border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td>Level: </td>
|
||||
<td><?=gettext("Level");?>: </td>
|
||||
<td>
|
||||
<select name='ldap_scope' id='ldap_scope' class="formselect">
|
||||
<?php
|
||||
@ -506,7 +518,7 @@ function select_clicked() {
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Base DN: </td>
|
||||
<td><?=gettext("Base DN");?>: </td>
|
||||
<td>
|
||||
<input name="ldap_basedn" type="text" class="formfld unknown" id="ldap_basedn" size="40" value="<?=htmlspecialchars($pconfig['ldap_basedn']);?>"/>
|
||||
</td>
|
||||
@ -516,23 +528,22 @@ function select_clicked() {
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Authentication containers");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<table border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td>Containers: </td>
|
||||
<td>
|
||||
<input name="ldapauthcontainers" type="text" class="formfld unknown" id="ldapauthcontainers" size="40" value="<?=htmlspecialchars($pconfig['ldap_authcn']);?>"/>
|
||||
<input type="button" onClick="select_clicked();" value="Select">
|
||||
<br />NOTE: Semi-Colon separated. This will be prepended to the search base dn above or you can specify full container path.
|
||||
<br />EXAMPLE: CN=Users;DC=example
|
||||
<br />EXAMPLE: CN=Users,DC=example,DC=com;OU=OtherUsers,DC=example,DC=com
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Authentication containers");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<table border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td><?=gettext("Containers");?>: </td>
|
||||
<td>
|
||||
<input name="ldapauthcontainers" type="text" class="formfld unknown" id="ldapauthcontainers" size="40" value="<?=htmlspecialchars($pconfig['ldap_authcn']);?>"/>
|
||||
<input type="button" onClick="select_clicked();" value="<?=gettext("Select");?>">
|
||||
<br /><?=gettext("NOTE: Semi-Colon separated. This will be prepended to the search base dn above or you can specify full container path.");?>
|
||||
<br /><?=gettext("EXAMPLE: CN=Users;DC=example");?>
|
||||
<br /><?=gettext("EXAMPLE: CN=Users,DC=example,DC=com;OU=OtherUsers,DC=example,DC=com ");?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Bind credentials");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
@ -542,7 +553,7 @@ function select_clicked() {
|
||||
<input name="ldap_anon" type="checkbox" id="ldap_anon" value="yes" <?php if ($pconfig['ldap_anon']) echo "checked"; ?> onClick="ldap_bindchange()">
|
||||
</td>
|
||||
<td>
|
||||
Use anonymous binds to resolve distinguished names
|
||||
<?=gettext("Use anonymous binds to resolve distinguished names");?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -551,13 +562,13 @@ function select_clicked() {
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>User DN: </td>
|
||||
<td><?=gettext("User DN");?>: </td>
|
||||
<td>
|
||||
<input name="ldap_binddn" type="text" class="formfld unknown" id="ldap_binddn" size="40" value="<?=htmlspecialchars($pconfig['ldap_binddn']);?>"/><br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Password: </td>
|
||||
<td><?=gettext("Password");?>: </td>
|
||||
<td>
|
||||
<input name="ldap_bindpw" type="password" class="formfld pwd" id="ldap_bindpw" size="20" value="<?=htmlspecialchars($pconfig['ldap_bindpw']);?>"/><br/>
|
||||
</td>
|
||||
@ -607,7 +618,7 @@ function select_clicked() {
|
||||
<td colspan="2" class="list" height="12"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" valign="top" class="listtopic">Radius Server Settings</td>
|
||||
<td colspan="2" valign="top" class="listtopic"><?=gettext("Radius Server Settings");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname or IP address");?></td>
|
||||
@ -654,7 +665,7 @@ function select_clicked() {
|
||||
<tr>
|
||||
<td width="22%" valign="top"> </td>
|
||||
<td width="78%">
|
||||
<input id="submit" name="save" type="submit" class="formbtn" value="Save" />
|
||||
<input id="submit" name="save" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
|
||||
<?php if (isset($id) && $a_server[$id]): ?>
|
||||
<input name="id" type="hidden" value="<?=$id;?>" />
|
||||
<?php endif;?>
|
||||
@ -667,9 +678,9 @@ function select_clicked() {
|
||||
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="25%" class="listhdrr">Server Name</td>
|
||||
<td width="25%" class="listhdrr">Type</td>
|
||||
<td width="35%" class="listhdrr">Host Name</td>
|
||||
<td width="25%" class="listhdrr"><?=gettext("Server Name");?></td>
|
||||
<td width="25%" class="listhdrr"><?=gettext("Type");?></td>
|
||||
<td width="35%" class="listhdrr"><?=gettext("Host Name");?></td>
|
||||
<td width="10%" class="list"></td>
|
||||
</tr>
|
||||
<?php
|
||||
@ -686,11 +697,11 @@ function select_clicked() {
|
||||
<td valign="middle" nowrap class="list">
|
||||
<?php if ($i < (count($a_server) - 1)): ?>
|
||||
<a href="system_authservers.php?act=edit&id=<?=$i;?>">
|
||||
<img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="edit server" alt="edit server" width="17" height="17" border="0" />
|
||||
<img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit server");?>" alt="<?=gettext("edit server");?>" width="17" height="17" border="0" />
|
||||
</a>
|
||||
|
||||
<a href="system_authservers.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this Server?");?>')">
|
||||
<img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="delete server" alt="delete server" width="17" height="17" border="0" />
|
||||
<img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete server");?>" alt="<?=gettext("delete server");?>" width="17" height="17" border="0" />
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
@ -702,7 +713,7 @@ function select_clicked() {
|
||||
<td class="list" colspan="3"></td>
|
||||
<td class="list">
|
||||
<a href="system_authservers.php?act=new">
|
||||
<img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="add server" alt="add server" width="17" height="17" border="0" />
|
||||
<img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add server");?>" alt="<?=gettext("add server");?>" width="17" height="17" border="0" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -251,7 +251,9 @@ if ($_POST) {
|
||||
|
||||
/* input validation */
|
||||
$reqdfields = explode(" ", "name cert");
|
||||
$reqdfieldsn = explode(",", gettext("Descriptive name") . "," . gettext("Final Certificate data"));
|
||||
$reqdfieldsn = array(
|
||||
gettext("Descriptive name"),
|
||||
gettext("Final Certificate data"));
|
||||
|
||||
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
|
||||
|
||||
|
||||
@ -184,7 +184,7 @@ include("head.inc");
|
||||
}
|
||||
?>
|
||||
<br/><span class="vexpl">
|
||||
<strong><?=GETTEXT("Link Priority"); ?></strong> <br />
|
||||
<strong><?=gettext("Link Priority"); ?></strong> <br />
|
||||
<?=gettext("The priority selected here defines in what order failover and balancing of links will be done.
|
||||
Multiple links of the same priority will balance connections until all links in the priority will be exhausted.
|
||||
If all links in a priority level are exhausted we will use the next available link(s) in the next priority level.") ?>
|
||||
@ -218,7 +218,7 @@ value="<?=htmlspecialchars($pconfig['descr']);?>">
|
||||
<tr>
|
||||
<td width="22%" valign="top"> </td>
|
||||
<td width="78%">
|
||||
<input name="Submit" type="submit" class="formbtn" value="Save"> <input type="button" value="<?=gettext("Cancel"); ?>" class="formbtn" onclick="history.back()">
|
||||
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input type="button" value="<?=gettext("Cancel"); ?>" class="formbtn" onclick="history.back()">
|
||||
<?php if (isset($id) && $a_gateway_groups[$id]): ?>
|
||||
<input name="id" type="hidden" value="<?=$id;?>">
|
||||
<?php endif; ?>
|
||||
|
||||
@ -76,7 +76,7 @@ if ($_POST) {
|
||||
|
||||
/* input validation */
|
||||
$reqdfields = explode(" ", "sysprivs");
|
||||
$reqdfieldsn = explode(",", gettext("Selected priveleges"));
|
||||
$reqdfieldsn = array(gettext("Selected priveleges"));
|
||||
|
||||
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
|
||||
|
||||
|
||||
@ -180,15 +180,22 @@ if (isAllowedPage("system_usermanager")) {
|
||||
/* input validation */
|
||||
if (isset($id) && ($a_user[$id])) {
|
||||
$reqdfields = explode(" ", "usernamefld");
|
||||
$reqdfieldsn = explode(",", gettext("Username"));
|
||||
$reqdfieldsn = array(gettext("Username"));
|
||||
} else {
|
||||
if (empty($_POST['name'])) {
|
||||
$reqdfields = explode(" ", "usernamefld passwordfld1");
|
||||
$reqdfieldsn = explode(",", gettext("Username,Password"));
|
||||
$reqdfieldsn = array(
|
||||
gettext("Username"),
|
||||
gettext("Password"));
|
||||
} else {
|
||||
$reqdfields = explode(" ", "usernamefld passwordfld1 name caref keylen lifetime");
|
||||
$reqdfieldsn = explode(",", gettext("Username,Password,Descriptive name,Certificate authority,Key length,Lifetime"));
|
||||
|
||||
$reqdfieldsn = array(
|
||||
gettext("Username"),
|
||||
gettext("Password"),
|
||||
gettext("Descriptive name"),
|
||||
gettext("Certificate authority"),
|
||||
gettext("Key length"),
|
||||
gettext("Lifetime"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -832,7 +839,7 @@ function sshkeyClicked(obj) {
|
||||
|
||||
/* input validation */
|
||||
$reqdfields = explode(" ", "passwordfld1");
|
||||
$reqdfieldsn = explode(",", gettext("Password"));
|
||||
$reqdfieldsn = array(gettext("Password"));
|
||||
|
||||
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
|
||||
|
||||
@ -844,7 +851,7 @@ function sshkeyClicked(obj) {
|
||||
$config['system']['user'][$userindex[$HTTP_SERVER_VARS['AUTH_USER']]]['password'] = crypt(trim($_POST['passwordfld1']));
|
||||
|
||||
write_config();
|
||||
$savemsg = sprintf("Password successfully changed%s", "<br />");
|
||||
$savemsg = gettext("Password successfully changed") . "<br />";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user