summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/load_balancer_monitor.php18
-rwxr-xr-xusr/local/www/load_balancer_monitor_edit.php54
-rwxr-xr-xusr/local/www/load_balancer_pool.php22
-rwxr-xr-xusr/local/www/load_balancer_pool_edit.php54
-rwxr-xr-xusr/local/www/load_balancer_relay_action.php24
-rwxr-xr-xusr/local/www/load_balancer_relay_action_edit.php42
-rwxr-xr-xusr/local/www/load_balancer_relay_protocol.php20
-rwxr-xr-xusr/local/www/load_balancer_relay_protocol_edit.php44
-rwxr-xr-xusr/local/www/load_balancer_virtual_server.php24
-rwxr-xr-xusr/local/www/load_balancer_virtual_server_edit.php52
-rwxr-xr-xusr/local/www/services_captiveportal.php303
-rwxr-xr-xusr/local/www/services_captiveportal_filemanager.php53
-rwxr-xr-xusr/local/www/services_captiveportal_ip.php37
-rwxr-xr-xusr/local/www/services_captiveportal_ip_edit.php41
-rwxr-xr-xusr/local/www/services_captiveportal_mac.php37
-rwxr-xr-xusr/local/www/services_captiveportal_mac_edit.php33
-rw-r--r--usr/local/www/services_captiveportal_vouchers.php123
-rw-r--r--usr/local/www/services_captiveportal_vouchers_edit.php33
-rwxr-xr-xusr/local/www/services_dhcp.php198
-rwxr-xr-xusr/local/www/services_dhcp_edit.php44
-rwxr-xr-xusr/local/www/services_dhcp_relay.php32
-rwxr-xr-xusr/local/www/services_dnsmasq.php80
-rwxr-xr-xusr/local/www/services_dnsmasq_domainoverride_edit.php28
-rwxr-xr-xusr/local/www/services_dnsmasq_edit.php42
-rwxr-xr-xusr/local/www/services_dyndns.php20
-rw-r--r--usr/local/www/services_dyndns_edit.php54
-rwxr-xr-xusr/local/www/services_igmpproxy.php24
-rwxr-xr-xusr/local/www/services_igmpproxy_edit.php52
-rw-r--r--usr/local/www/services_rfc2136.php12
-rw-r--r--usr/local/www/services_rfc2136_edit.php62
-rwxr-xr-xusr/local/www/services_snmp.php65
-rwxr-xr-xusr/local/www/services_wol.php42
-rwxr-xr-xusr/local/www/services_wol_edit.php26
33 files changed, 902 insertions, 893 deletions
diff --git a/usr/local/www/load_balancer_monitor.php b/usr/local/www/load_balancer_monitor.php
index 86f7530..f4c1411 100755
--- a/usr/local/www/load_balancer_monitor.php
+++ b/usr/local/www/load_balancer_monitor.php
@@ -69,7 +69,7 @@ if ($_GET['act'] == "del") {
if (is_array($config['load_balancer']['lbpool'])) {
foreach ($config['load_balancer']['pool'] as $pool) {
if ($pool['monitor'] == $a_monitor[$_GET['id']]['name']) {
- $input_errors[] = "This entry cannot be deleted because it is still referenced by at least one pool.";
+ $input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one pool.");
break;
}
}
@@ -85,7 +85,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("Services", "Load Balancer","Monitor");
+$pgtitle = array(gettext("Services"),gettext("Load Balancer"),gettext("Monitor"));
#$statusurl = "status_lb_vs.php";
$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
@@ -99,16 +99,16 @@ include("head.inc");
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('loadbalancer')): ?><p>
-<?php print_info_box_np("The load balancer configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The load balancer configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="tabnavtbl">
<?php
/* active tabs */
$tab_array = array();
- $tab_array[] = array("Monitors", true, "load_balancer_monitor.php");
- $tab_array[] = array("Pools", false, "load_balancer_pool.php");
- $tab_array[] = array("Virtual Servers", false, "load_balancer_virtual_server.php");
+ $tab_array[] = array(gettext("Monitors"), true, "load_balancer_monitor.php");
+ $tab_array[] = array(gettext("Pools"), false, "load_balancer_pool.php");
+ $tab_array[] = array(gettext("Virtual Servers"), false, "load_balancer_virtual_server.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -119,9 +119,9 @@ include("head.inc");
$t = new MainTable();
$t->edit_uri('load_balancer_monitor_edit.php');
$t->my_uri('load_balancer_monitor.php');
- $t->add_column('Name','name',20);
- $t->add_column('Type','type',10);
- $t->add_column('Description','desc',30);
+ $t->add_column(gettext('Name'),'name',20);
+ $t->add_column(gettext('Type'),'type',10);
+ $t->add_column(gettext('Description'),'desc',30);
$t->add_button('edit');
$t->add_button('dup');
$t->add_button('del');
diff --git a/usr/local/www/load_balancer_monitor_edit.php b/usr/local/www/load_balancer_monitor_edit.php
index 934be05..826547c 100755
--- a/usr/local/www/load_balancer_monitor_edit.php
+++ b/usr/local/www/load_balancer_monitor_edit.php
@@ -63,7 +63,7 @@ if (isset($id) && $a_monitor[$id]) {
$pconfig['options']['code'] = 200;
}
-$changedesc = "Load Balancer: Monitor: ";
+$changedesc = gettext("Load Balancer: Monitor:") . " ";
$changecount = 0;
if ($_POST) {
@@ -85,14 +85,14 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "name type desc");
- $reqdfieldsn = explode(",", "Name,Type,Description");
+ $reqdfieldsn = array(gettext("Name"),gettext("Type"),gettext("Description"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
/* Ensure that our monitor names are unique */
for ($i=0; isset($config['load_balancer']['monitor_type'][$i]); $i++)
if (($_POST['name'] == $config['load_balancer']['monitor_type'][$i]['name']) && ($i != $id))
- $input_errors[] = "This monitor name has already been used. Monitor names must be unique.";
+ $input_errors[] = gettext("This monitor name has already been used. Monitor names must be unique.");
switch($_POST['type']) {
case 'icmp': {
@@ -106,17 +106,17 @@ if ($_POST) {
if (is_array($pconfig['options'])) {
if (isset($pconfig['options']['host']) && $pconfig['options']['host'] != "") {
if (!is_hostname($pconfig['options']['host'])) {
- $input_errors[] = "The hostname can only contain the characters A-Z, 0-9 and '-'.";
+ $input_errors[] = gettext("The hostname can only contain the characters A-Z, 0-9 and '-'.");
}
}
if (isset($pconfig['options']['code']) && $pconfig['options']['code'] != "") {
// Check code
if(!is_rfc2616_code($pconfig['options']['code'])) {
- $input_errors[] = "HTTP(s) codes must be from RFC2616.";
+ $input_errors[] = gettext("HTTP(s) codes must be from RFC2616.");
}
}
if (!isset($pconfig['options']['path']) || $pconfig['options']['path'] == "") {
- $input_errors[] = "The path to monitor must be set.";
+ $input_errors[] = gettext("The path to monitor must be set.");
}
}
break;
@@ -139,7 +139,7 @@ if ($_POST) {
if(isset($id) && $a_monitor[$id])
$monent = $a_monitor[$id];
if($monent['name'] != "")
- $changedesc .= " modified '{$monent['name']}' monitor:";
+ $changedesc .= " " . sprintf(gettext("modified '%s' monitor"), $monent['name']) . ":";
update_if_changed("name", $monent['name'], $pconfig['name']);
update_if_changed("type", $monent['type'], $pconfig['type']);
@@ -187,13 +187,13 @@ if ($_POST) {
}
}
-$pgtitle = array("Services", "Load Balancer","Monitor","Edit");
+$pgtitle = array(gettext("Services"),gettext("Load Balancer"),gettext("Monitor"),gettext("Edit"));
#$statusurl = "status_lb_vs.php";
$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
include("head.inc");
-$types = array("icmp" => "ICMP", "tcp" => "TCP", "http" => "HTTP", "https" => "HTTPS", "send" => "Send/Expect");
+$types = array("icmp" => gettext("ICMP"), "tcp" => gettext("TCP"), "http" => gettext("HTTP"), "https" => gettext("HTTPS"), "send" => gettext("Send/Expect"));
?>
@@ -226,22 +226,22 @@ function updateType(t){
<form action="load_balancer_monitor_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Edit Load Balancer - Monitor entry</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Load Balancer - Monitor entry"); ?></td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Name</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Name"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="name" type="text" <?if(isset($pconfig['name'])) echo "value=\"{$pconfig['name']}\"";?> size="16" maxlength="16">
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Description</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="desc" type="text" <?if(isset($pconfig['desc'])) echo "value=\"{$pconfig['desc']}\"";?>size="64">
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Type</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Type"); ?></td>
<td width="78%" class="vtable" colspan="2">
<select id="type" name="type">
<?
@@ -262,23 +262,23 @@ function updateType(t){
<tr align="left" id="tcp"<?= $pconfig['type'] == "tcp" ? "" : " style=\"display:none;\""?>>
</tr>
<tr align="left" id="http"<?= $pconfig['type'] == "http" ? "" : " style=\"display:none;\""?>>
- <td width="22%" valign="top" class="vncellreq">HTTP</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("HTTP"); ?></td>
<td width="78%" class="vtable" colspan="2">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr align="left">
- <td valign="top" align="right" class="vtable">Path</td>
+ <td valign="top" align="right" class="vtable"><?=gettext("Path"); ?></td>
<td class="vtable" colspan="2">
<input name="http_options_path" type="text" <?if(isset($pconfig['options']['path'])) echo "value=\"{$pconfig['options']['path']}\"";?>size="64">
</td>
</tr>
<tr align="left">
- <td valign="top" align="right" class="vtable">Host</td>
+ <td valign="top" align="right" class="vtable"><?=gettext("Host"); ?></td>
<td class="vtable" colspan="2">
- <input name="http_options_host" type="text" <?if(isset($pconfig['options']['host'])) echo "value=\"{$pconfig['options']['host']}\"";?>size="64"><br/>Hostname for Host: header if needed.
+ <input name="http_options_host" type="text" <?if(isset($pconfig['options']['host'])) echo "value=\"{$pconfig['options']['host']}\"";?>size="64"><br/><?=gettext("Hostname for Host: header if needed."); ?>
</td>
</td>
<tr align="left">
- <td valign="top" align="right" class="vtable">HTTP Code</td>
+ <td valign="top" align="right" class="vtable"><?=gettext("HTTP Code"); ?></td>
<td class="vtable" colspan="2">
<?= print_rfc2616_select("http_options_code", $pconfig['options']['code']); ?>
</td>
@@ -295,23 +295,23 @@ function updateType(t){
</td>
</tr>
<tr align="left" id="https"<?= $pconfig['type'] == "https" ? "" : " style=\"display:none;\""?>>
- <td width="22%" valign="top" class="vncellreq">HTTPS</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("HTTPS"); ?></td>
<td width="78%" class="vtable" colspan="2">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr align="left">
- <td valign="top" align="right" class="vtable">Path</td>
+ <td valign="top" align="right" class="vtable"><?=gettext("Path"); ?></td>
<td class="vtable" colspan="2">
<input name="https_options_path" type="text" <?if(isset($pconfig['options']['path'])) echo "value=\"{$pconfig['options']['path']}\"";?>size="64">
</td>
</tr>
<tr align="left">
- <td valign="top" align="right" class="vtable">Host</td>
+ <td valign="top" align="right" class="vtable"><?=gettext("Host"); ?></td>
<td class="vtable" colspan="2">
- <input name="https_options_host" type="text" <?if(isset($pconfig['options']['host'])) echo "value=\"{$pconfig['options']['host']}\"";?>size="64"><br/>Hostname for Host: header if needed.
+ <input name="https_options_host" type="text" <?if(isset($pconfig['options']['host'])) echo "value=\"{$pconfig['options']['host']}\"";?>size="64"><br/><?=gettext("Hostname for Host: header if needed."); ?>
</td>
</td>
<tr align="left">
- <td valign="top" align="right" class="vtable">HTTP Code</td>
+ <td valign="top" align="right" class="vtable"><?=gettext("HTTP Code"); ?></td>
<td class="vtable" colspan="2">
<?= print_rfc2616_select("https_options_code", $pconfig['options']['code']); ?>
</td>
@@ -329,17 +329,17 @@ function updateType(t){
</td>
</tr>
<tr align="left" id="send"<?= $pconfig['type'] == "send" ? "" : " style=\"display:none;\""?>>
- <td width="22%" valign="top" class="vncellreq">Send/Expect</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Send/Expect"); ?></td>
<td width="78%" class="vtable" colspan="2">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr align="left">
- <td valign="top" align="right" class="vtable">Send string</td>
+ <td valign="top" align="right" class="vtable"><?=gettext("Send string"); ?></td>
<td class="vtable" colspan="2">
<input name="send_options_send" type="text" <?if(isset($pconfig['options']['send'])) echo "value=\"{$pconfig['options']['send']}\"";?>size="64">
</td>
</tr>
<tr align="left">
- <td valign="top" align="right" class="vtable">Expect string</td>
+ <td valign="top" align="right" class="vtable"><?=gettext("Expect string"); ?></td>
<td class="vtable" colspan="2">
<input name="send_options_expect" type="text" <?if(isset($pconfig['options']['expect'])) echo "value=\"{$pconfig['options']['expect']}\"";?>size="64">
</td>
@@ -350,7 +350,7 @@ function updateType(t){
<tr align="left">
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save"><input type="button" class="formbtn" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"><input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
<?php if (isset($id) && $a_monitor[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/load_balancer_pool.php b/usr/local/www/load_balancer_pool.php
index bc97d85..81901d1 100755
--- a/usr/local/www/load_balancer_pool.php
+++ b/usr/local/www/load_balancer_pool.php
@@ -69,7 +69,7 @@ if ($_GET['act'] == "del") {
if (is_array($config['load_balancer']['virtual_server'])) {
foreach ($config['load_balancer']['virtual_server'] as $vs) {
if ($vs['pool'] == $a_pool[$_GET['id']]['name']) {
- $input_errors[] = "This entry cannot be deleted because it is still referenced by at least one virtual server.";
+ $input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one virtual server.");
break;
}
}
@@ -94,7 +94,7 @@ for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) {
$a_pool[$i]['monitor'] = "<a href=\"/load_balancer_monitor_edit.php?id={$mondex[$a_pool[$i]['monitor']]}\">{$a_pool[$i]['monitor']}</a>";
}
-$pgtitle = array("Services", "Load Balancer","Pool");
+$pgtitle = array(gettext("Services"), gettext("Load Balancer"),gettext("Pool"));
#$statusurl = "status_lb_vs.php";
$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
@@ -108,16 +108,16 @@ include("head.inc");
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('loadbalancer')): ?><p>
-<?php print_info_box_np("The load balancer configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(sprintf(gettext("The load balancer configuration has been changed%sYou must apply the changes in order for them to take effect."), "<br>"));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="tabnavtbl">
<?php
/* active tabs */
$tab_array = array();
- $tab_array[] = array("Monitors", false, "load_balancer_monitor.php");
- $tab_array[] = array("Pools", true, "load_balancer_pool.php");
- $tab_array[] = array("Virtual Servers", false, "load_balancer_virtual_server.php");
+ $tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php");
+ $tab_array[] = array(gettext("Pools"), true, "load_balancer_pool.php");
+ $tab_array[] = array(gettext("Virtual Servers"), false, "load_balancer_virtual_server.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -128,11 +128,11 @@ include("head.inc");
$t = new MainTable();
$t->edit_uri('load_balancer_pool_edit.php');
$t->my_uri('load_balancer_pool.php');
- $t->add_column('Name','name',10);
- $t->add_column('Servers','servers',15);
- $t->add_column('Port','port',10);
- $t->add_column('Monitor','monitor',15);
- $t->add_column('Description','desc',30);
+ $t->add_column(gettext('Name'),'name',10);
+ $t->add_column(gettext('Servers'),'servers',15);
+ $t->add_column(gettext('Port'),'port',10);
+ $t->add_column(gettext('Monitor'),'monitor',15);
+ $t->add_column(gettext('Description'),'desc',30);
$t->add_button('edit');
$t->add_button('dup');
$t->add_button('del');
diff --git a/usr/local/www/load_balancer_pool_edit.php b/usr/local/www/load_balancer_pool_edit.php
index f34a31a..748580f 100755
--- a/usr/local/www/load_balancer_pool_edit.php
+++ b/usr/local/www/load_balancer_pool_edit.php
@@ -60,7 +60,7 @@ if (isset($id) && $a_pool[$id]) {
$pconfig['monitor'] = $a_pool[$id]['monitor'];
}
-$changedesc = "Load Balancer: Pool: ";
+$changedesc = gettext("Load Balancer: Pool:") . " ";
$changecount = 0;
if ($_POST) {
@@ -71,27 +71,27 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "name port monitor servers");
- $reqdfieldsn = explode(",", "Name,Port,Monitor,Server List");
+ $reqdfieldsn = array(gettext("Name"),gettext("Port"),gettext("Monitor"),gettext("Server List"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
/* Ensure that our pool names are unique */
for ($i=0; isset($config['load_balancer']['lbpool'][$i]); $i++)
if (($_POST['name'] == $config['load_balancer']['lbpool'][$i]['name']) && ($i != $id))
- $input_errors[] = "This pool name has already been used. Pool names must be unique.";
+ $input_errors[] = gettext("This pool name has already been used. Pool names must be unique.");
if (!is_port($_POST['port']))
- $input_errors[] = "The port must be an integer between 1 and 65535.";
+ $input_errors[] = gettext("The port must be an integer between 1 and 65535.");
if (is_array($_POST['servers'])) {
foreach($pconfig['servers'] as $svrent) {
if (!is_ipaddr($svrent)) {
- $input_errors[] = "{$svrent} is not a valid IP address (in \"enabled\" list).";
+ $input_errors[] = sprintf(gettext("%s is not a valid IP address (in \"enabled\" list)."), $svrent);
}
}
}
if (is_array($_POST['serversdisabled'])) {
foreach($pconfig['serversdisabled'] as $svrent) {
if (!is_ipaddr($svrent)) {
- $input_errors[] = "{$svrent} is not a valid IP address (in \"disabled\" list).";
+ $input_errors[] = sprintf(gettext("%s is not a valid IP address (in \"disabled\" list)."), $svrent);
}
}
}
@@ -100,14 +100,14 @@ if ($_POST) {
$m[$config['load_balancer']['monitor_type'][$i]['name']] = $config['load_balancer']['monitor_type'][$i];
if (!isset($m[$_POST['monitor']]))
- $input_errors[] = "Invalid monitor chosen.";
+ $input_errors[] = gettext("Invalid monitor chosen.");
if (!$input_errors) {
$poolent = array();
if(isset($id) && $a_pool[$id])
$poolent = $a_pool[$id];
if($poolent['name'] != "")
- $changedesc .= " modified '{$poolent['name']}' pool:";
+ $changedesc .= sprintf(gettext(" modified '%s' pool:"), $poolent['name']);
update_if_changed("name", $poolent['name'], $_POST['name']);
update_if_changed("description", $poolent['desc'], $_POST['desc']);
@@ -137,7 +137,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services", "Load Balancer","Pool","Edit");
+$pgtitle = array(gettext("Services"), gettext("Load Balancer"),gettext("Pool"),gettext("Edit"));
#$statusurl = "status_lb_vs.php";
$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
@@ -162,36 +162,36 @@ function clearcombo(){
<form action="load_balancer_pool_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Add/edit Load Balancer - Pool entry</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Add/edit Load Balancer - Pool entry"); ?></td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Name</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Name"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="name" type="text" <?if(isset($pconfig['name'])) echo "value=\"{$pconfig['name']}\"";?> size="16" maxlength="16">
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Description</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="desc" type="text" <?if(isset($pconfig['desc'])) echo "value=\"{$pconfig['desc']}\"";?>size="64">
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" id="monitorport_text" class="vncellreq">Port</td>
+ <td width="22%" valign="top" id="monitorport_text" class="vncellreq"><?=gettext("Port"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="port" type="text" <?if(isset($pconfig['port'])) echo "value=\"{$pconfig['port']}\"";?> size="16" maxlength="16"><br>
- <div id="monitorport_desc">This is the port your servers are listening on.</div>
+ <div id="monitorport_desc"><?=gettext("This is the port your servers are listening on"); ?>.</div>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Add item to pool</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Add item to pool"); ?></td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Monitor</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Monitor"); ?></td>
<td width="78%" class="vtable" colspan="2">
<?php if(count($config['load_balancer']['monitor_type'])): ?>
<select id="monitor" name="monitor">
@@ -206,33 +206,33 @@ function clearcombo(){
}
?>
<?php else: ?>
- <b>NOTE:</b> Please add a monitor IP address on the monitors tab if you wish to use this feature.
+ <b><?=gettext("NOTE"); ?>:</b> <?=gettext("Please add a monitor IP address on the monitors tab if you wish to use this feature"); ?>.
<?php endif; ?>
</select>
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Server IP Address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Server IP Address"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="ipaddr" type="text" size="16" style="float: left;">
- <input class="formbtn" type="button" name="button1" value="Add to pool" onclick="AddServerToPool(document.iform);"><br>
+ <input class="formbtn" type="button" name="button1" value="<?=gettext("Add to pool"); ?>" onclick="AddServerToPool(document.iform);"><br>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Current Pool Members</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Current Pool Members"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Members</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Members"); ?></td>
<td width="78%" class="vtable" colspan="2" valign="top">
<table>
<tbody>
<tr>
<td>
<center>
- <b>Pool Disabled</b>
+ <b><?=gettext("Pool Disabled"); ?></b>
<p/>
<select id="serversDisabledSelect" name="serversdisabled[]" multiple="true" size="5">
@@ -245,7 +245,7 @@ function clearcombo(){
echo "</select>";
?>
<p/>
- <input class="formbtn" type="button" name="removeDisabled" value="Remove" onclick="RemoveServerFromPool(document.iform, 'serversdisabled[]');" />
+ <input class="formbtn" type="button" name="removeDisabled" value="<?=gettext("Remove"); ?>" onclick="RemoveServerFromPool(document.iform, 'serversdisabled[]');" />
</td>
<td valign="middle">
@@ -255,7 +255,7 @@ function clearcombo(){
<td>
<center>
- <b>Enabled (default)</b>
+ <b><?=gettext("Enabled (default)"); ?></b>
<p/>
<select id="serversSelect" name="servers[]" multiple="true" size="5">
@@ -268,7 +268,7 @@ if (is_array($pconfig['servers'])) {
echo "</select>";
?>
<p/>
- <input class="formbtn" type="button" name="removeEnabled" value="Remove" onclick="RemoveServerFromPool(document.iform, 'servers[]');" />
+ <input class="formbtn" type="button" name="removeEnabled" value="<?=gettext("Remove"); ?>" onclick="RemoveServerFromPool(document.iform, 'servers[]');" />
</td>
</tr>
</tbody>
@@ -279,8 +279,8 @@ echo "</select>";
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<br/>
- <input name="Submit" type="submit" class="formbtn" value="Save" onClick="AllServers('serversSelect', true); AllServers('serversDisabledSelect', true);">
- <input type="button" class="formbtn" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onClick="AllServers('serversSelect', true); AllServers('serversDisabledSelect', true);">
+ <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
<?php if (isset($id) && $a_pool[$id] && $_GET['act'] != 'dup'): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/load_balancer_relay_action.php b/usr/local/www/load_balancer_relay_action.php
index 5e73cfb..73e201d 100755
--- a/usr/local/www/load_balancer_relay_action.php
+++ b/usr/local/www/load_balancer_relay_action.php
@@ -71,7 +71,7 @@ if ($_GET['act'] == "del") {
foreach ($config['load_balancer']['lbprotocol'] as $lbp) {
foreach($lbp['lbaction'] as $lba) {
if ($lba['name'] == $a_action[$_GET['id']]['name']) {
- $input_errors[] = "This entry cannot be deleted because it is still referenced by at least one relay protocol.";
+ $input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one relay protocol.");
break;
}
}
@@ -101,7 +101,7 @@ if ($_GET['act'] == "del") {
}
*/
-$pgtitle = array("Services", "Load Balancer","Relay Action");
+$pgtitle = array(gettext("Services"), gettext("Load Balancer"),gettext("Relay Action"));
#$statusurl = "status_lb_vs.php";
$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
@@ -115,18 +115,18 @@ include("head.inc");
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('loadbalancer')): ?><p>
-<?php print_info_box_np("The load balancer configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The load balancer configuration has been changed.<br>You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="tabnavtbl">
<?php
/* active tabs */
$tab_array = array();
- $tab_array[] = array("Monitors", false, "load_balancer_monitor.php");
- $tab_array[] = array("Pools", false, "load_balancer_pool.php");
- $tab_array[] = array("Virtual Servers", false, "load_balancer_virtual_server.php");
- $tab_array[] = array("Relay Actions", true, "load_balancer_relay_action.php");
- $tab_array[] = array("Relay Protocols", false, "load_balancer_relay_protocol.php");
+ $tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php");
+ $tab_array[] = array(gettext("Pools"), false, "load_balancer_pool.php");
+ $tab_array[] = array(gettext("Virtual Servers"), false, "load_balancer_virtual_server.php");
+ $tab_array[] = array(gettext("Relay Actions"), true, "load_balancer_relay_action.php");
+ $tab_array[] = array(gettext("Relay Protocols"), false, "load_balancer_relay_protocol.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -137,10 +137,10 @@ include("head.inc");
$t = new MainTable();
$t->edit_uri('load_balancer_relay_action_edit.php');
$t->my_uri('load_balancer_relay_action.php');
- $t->add_column('Name','name',20);
- $t->add_column('Type','type',10);
- $t->add_column('Options','options',30);
- $t->add_column('Description','desc',30);
+ $t->add_column(gettext('Name'),'name',20);
+ $t->add_column(gettext('Type'),'type',10);
+ $t->add_column(gettext('Options'),'options',30);
+ $t->add_column(gettext('Description'),'desc',30);
$t->add_button('edit');
$t->add_button('dup');
$t->add_button('del');
diff --git a/usr/local/www/load_balancer_relay_action_edit.php b/usr/local/www/load_balancer_relay_action_edit.php
index d623fef..4a1a1a9 100755
--- a/usr/local/www/load_balancer_relay_action_edit.php
+++ b/usr/local/www/load_balancer_relay_action_edit.php
@@ -62,7 +62,7 @@ if (isset($id) && $a_action[$id]) {
$pconfig['action'] = 'change';
}
-$changedesc = "Load Balancer: Relay Action: ";
+$changedesc = gettext("Load Balancer: Relay Action:") . " ";
$changecount = 0;
$kv = array('key', 'value');
@@ -114,14 +114,14 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "name protocol direction action desc");
- $reqdfieldsn = explode(",", "Name,Protocol,Direction,Action,Description");
+ $reqdfieldsn = array(gettext("Name"),gettext("Protocol"),gettext("Direction"),gettext("Action"),gettext("Description"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
/* Ensure that our monitor names are unique */
for ($i=0; isset($config['load_balancer']['lbactions'][$i]); $i++)
if (($_POST['name'] == $config['load_balancer']['lbactions'][$i]['name']) && ($i != $id))
- $input_errors[] = "This action name has already been used. Action names must be unique.";
+ $input_errors[] = gettext("This action name has already been used. Action names must be unique.");
if (!$input_errors) {
@@ -129,7 +129,7 @@ if ($_POST) {
if(isset($id) && $a_action[$id])
$actent = $a_action[$id];
if($actent['name'] != "")
- $changedesc .= " modified '{$actent['name']}' action:";
+ $changedesc .= " " . sprintf(gettext("modified '%s' action:"), $actent['name']);
update_if_changed("name", $actent['name'], $pconfig['name']);
update_if_changed("protocol", $actent['protocol'], $pconfig['protocol']);
@@ -175,13 +175,13 @@ if ($_POST) {
}
}
-$pgtitle = array("Services", "Load Balancer","Relay Action","Edit");
+$pgtitle = array(gettext("Services"), gettext("Load Balancer"),gettext("Relay Action"),gettext("Edit"));
#$statusurl = "status_lb_vs.php";
$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
include("head.inc");
- $types = array("http" => "HTTP", "tcp" => "TCP", "dns" => "DNS");
+ $types = array("http" => gettext("HTTP"), "tcp" => gettext("TCP"), "dns" => gettext("DNS"));
?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
@@ -403,23 +403,23 @@ document.observe("dom:loaded", function() {
<form action="load_balancer_relay_action_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Edit Load Balancer - Relay Action entry</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Load Balancer - Relay Action entry"); ?></td>
</tr>
<tr align="left" id="name">
- <td width="22%" valign="top" class="vncellreq">Name</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Name"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="name" type="text" <?if(isset($pconfig['name'])) echo "value=\"{$pconfig['name']}\"";?> size="16" maxlength="16">
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Description</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="desc" type="text" <?if(isset($pconfig['desc'])) echo "value=\"{$pconfig['desc']}\"";?>size="64">
</td>
</tr>
<!-- Protocol -->
<tr align="left" id="protocol_row">
- <td width="22%" valign="top" class="vncellreq">Protocol</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Protocol"); ?></td>
<td width="78%" class="vtable" colspan="2">
<select id="protocol" name="protocol">
<?
@@ -438,7 +438,7 @@ document.observe("dom:loaded", function() {
<!-- Direction -->
<tr align="left" id="direction_row">
- <td width="22%" valign="top" class="vncellreq">Direction</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Direction"); ?></td>
<td width="78%" class="vtable" colspan="2">
<select id="direction" name="direction" style="disabled">
<?
@@ -458,7 +458,7 @@ document.observe("dom:loaded", function() {
<!-- Type -->
<tr align="left" id="type_row"<?= $pconfig['protocol'] == "http" ? "" : " style=\"display:none;\""?>>
- <td width="22%" valign="top" class="vncellreq">Type</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Type"); ?></td>
<td width="78%" class="vtable" colspan="2">
<?
foreach ($actions['direction'] as $dir => $v) {
@@ -479,7 +479,7 @@ document.observe("dom:loaded", function() {
<!-- Action -->
<tr align="left" id="action_row"<?= $pconfig['protocol'] == "http" ? "" : " style=\"display:none;\""?>>
- <td width="22%" valign="top" class="vncellreq">Action</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Action"); ?></td>
<td width="78%" class="vtable" colspan="2">
<select id="action" name="action" style=\"display: none;\">
<?
@@ -501,18 +501,18 @@ document.observe("dom:loaded", function() {
</select>
<br/>
<table><tr>
-<td><div id="input_action_value">Value&nbsp;<input id="option_action_value" name="option_action_value" type="text" <?if(isset($pconfig['options']['value'])) echo "value=\"{$pconfig['options']['value']}\"";?>size="20"></div></td>
+<td><div id="input_action_value"><?=gettext("Value"); ?>&nbsp;<input id="option_action_value" name="option_action_value" type="text" <?if(isset($pconfig['options']['value'])) echo "value=\"{$pconfig['options']['value']}\"";?>size="20"></div></td>
<td><div id="action_action_value"></div></td>
-<td><div id="input_action_key">Key&nbsp;<input id="option_action_key" name="option_action_key" type="text" <?if(isset($pconfig['options']['akey'])) echo "value=\"{$pconfig['options']['akey']}\"";?>size="20"></div></td>
+<td><div id="input_action_key"><?=gettext("Key"); ?>&nbsp;<input id="option_action_key" name="option_action_key" type="text" <?if(isset($pconfig['options']['akey'])) echo "value=\"{$pconfig['options']['akey']}\"";?>size="20"></div></td>
<td><div id="action_action_id"></div></td>
-<td><div id="input_action_id">ID&nbsp;<input id="option_action_id" name="option_action_id" type="text" <?if(isset($pconfig['options']['id'])) echo "value=\"{$pconfig['options']['id']}\"";?>size="20"></div></td>
+<td><div id="input_action_id"><?=gettext("ID"); ?>&nbsp;<input id="option_action_id" name="option_action_id" type="text" <?if(isset($pconfig['options']['id'])) echo "value=\"{$pconfig['options']['id']}\"";?>size="20"></div></td>
</tr></table>
</td>
</tr>
<tr align="left" id="tcp_options_row"<?= $pconfig['protocol'] == "tcp" ? "" : " style=\"display:none;\""?>>
- <td width="22%" valign="top" class="vncellreq">Options</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Options"); ?></td>
<td width="78%" class="vtable" colspan="2">
- XXX: TODO
+ XXX: <?=gettext("TODO"); ?>
<select id="options" name="options">
<!-- XXX TODO >
<?
@@ -530,9 +530,9 @@ document.observe("dom:loaded", function() {
</td>
</tr>
<tr align="left" id="ssl_options_row"<?= $pconfig['protocol'] == "http" ? "" : " style=\"display:none;\""?>>
- <td width="22%" valign="top" class="vncellreq">Options</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Options"); ?></td>
<td width="78%" class="vtable" colspan="2">
- XXX: TODO
+ XXX: <?=gettext("TODO"); ?>
<!-- XXX TODO >
<select id="options" name="options">
<?
@@ -552,7 +552,7 @@ document.observe("dom:loaded", function() {
<tr align="left">
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save"><input type="button" class="formbtn" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"><input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
<?php if (isset($id) && $a_action[$id] && $_GET['act'] != 'dup'): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/load_balancer_relay_protocol.php b/usr/local/www/load_balancer_relay_protocol.php
index d184f1d..6710dea 100755
--- a/usr/local/www/load_balancer_relay_protocol.php
+++ b/usr/local/www/load_balancer_relay_protocol.php
@@ -68,7 +68,7 @@ if ($_GET['act'] == "del") {
if (is_array($config['load_balancer']['virtual_server'])) {
foreach ($config['load_balancer']['virtual_server'] as $vs) {
if ($vs['protocol'] == $a_protocol[$_GET['id']]['name']) {
- $input_errors[] = "This entry cannot be deleted because it is still referenced by at least one virtual server.";
+ $input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one virtual server.");
break;
}
}
@@ -97,7 +97,7 @@ if ($_GET['act'] == "del") {
}
*/
-$pgtitle = array("Services", "Load Balancer","Relay Protocol");
+$pgtitle = array(gettext("Services"), gettext("Load Balancer"),gettext("Relay Protocol"));
#$statusurl = "status_lb_vs.php";
$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
@@ -111,16 +111,16 @@ include("head.inc");
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('loadbalancer')): ?><p>
-<?php print_info_box_np("The load balancer configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The load balancer configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="tabnavtbl">
<?php
/* active tabs */
$tab_array = array();
- $tab_array[] = array("Monitors", false, "load_balancer_monitor.php");
- $tab_array[] = array("Pools", false, "load_balancer_pool.php");
- $tab_array[] = array("Virtual Servers", false, "load_balancer_virtual_server.php");
+ $tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php");
+ $tab_array[] = array(gettext("Pools"), false, "load_balancer_pool.php");
+ $tab_array[] = array(gettext("Virtual Servers"), false, "load_balancer_virtual_server.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -131,10 +131,10 @@ include("head.inc");
$t = new MainTable();
$t->edit_uri('load_balancer_relay_protocol_edit.php');
$t->my_uri('load_balancer_relay_protocol.php');
- $t->add_column('Name','name',20);
- $t->add_column('Type','type',10);
- $t->add_column('Options','options',30);
- $t->add_column('Description','desc',30);
+ $t->add_column(gettext('Name'),'name',20);
+ $t->add_column(gettext('Type'),'type',10);
+ $t->add_column(gettext('Options'),'options',30);
+ $t->add_column(gettext('Description'),'desc',30);
$t->add_button('edit');
$t->add_button('dup');
$t->add_button('del');
diff --git a/usr/local/www/load_balancer_relay_protocol_edit.php b/usr/local/www/load_balancer_relay_protocol_edit.php
index 519dd0b..95e07ab 100755
--- a/usr/local/www/load_balancer_relay_protocol_edit.php
+++ b/usr/local/www/load_balancer_relay_protocol_edit.php
@@ -62,7 +62,7 @@ if (isset($id) && $a_protocol[$id]) {
$pconfig['type'] = 'http';
}
-$changedesc = "Load Balancer: Relay Protocol: ";
+$changedesc = gettext("Load Balancer: Relay Protocol:") . " ";
$changecount = 0;
@@ -76,14 +76,14 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "name type desc");
- $reqdfieldsn = explode(",", "Name,Type,Description");
+ $reqdfieldsn = array(gettext("Name"),gettext("Type"),gettext("Description"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
/* Ensure that our monitor names are unique */
for ($i=0; isset($config['load_balancer']['lbprotocol'][$i]); $i++)
if (($_POST['name'] == $config['load_balancer']['lbprotocol'][$i]['name']) && ($i != $id))
- $input_errors[] = "This protocol name has already been used. Protocol names must be unique.";
+ $input_errors[] = gettext("This protocol name has already been used. Protocol names must be unique.");
switch($_POST['type']) {
case 'tcp':
@@ -99,13 +99,13 @@ if ($_POST) {
if(isset($id) && $a_protocol[$id])
$protent = $a_protocol[$id];
if($protent['name'] != "")
- $changedesc .= " modified '{$protent['name']}' load balancing protocol:";
+ $changedesc .= " " . sprintf(gettext("modified '%s' load balancing protocol:"), $protent['name']);
- update_if_changed("name", $protent['name'], $pconfig['name']);
- update_if_changed("type", $protent['type'], $pconfig['type']);
- update_if_changed("description", $protent['desc'], $pconfig['desc']);
- update_if_changed("type", $protent['type'], $pconfig['type']);
- update_if_changed("action", $protent['lbaction'], $pconfig['lbaction']);
+ update_if_changed(gettext("name"), $protent['name'], $pconfig['name']);
+ update_if_changed(gettext("type"), $protent['type'], $pconfig['type']);
+ update_if_changed(gettext("description"), $protent['desc'], $pconfig['desc']);
+ update_if_changed(gettext("type"), $protent['type'], $pconfig['type']);
+ update_if_changed(gettext("action"), $protent['lbaction'], $pconfig['lbaction']);
if (isset($id) && $a_protocol[$id]) {
/* modify all virtual servers with this name */
@@ -131,14 +131,14 @@ if ($_POST) {
}
}
-$pgtitle = array("Services", "Load Balancer","Relay Protocol","Edit");
+$pgtitle = array(gettext("Services"), gettext("Load Balancer"),gettext("Relay Protocol"),gettext("Edit"));
#$statusurl = "status_lb_vs.php";
$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
include("head.inc");
-$types = array("http" => "HTTP", "tcp" => "TCP", "dns" => "DNS");
+$types = array("http" => gettext("HTTP"), "tcp" => gettext("TCP"), "dns" => gettext("DNS"));
?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<script language="javascript">
@@ -186,16 +186,16 @@ document.observe('dom:loaded', function(){
<form action="load_balancer_relay_protocol_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Edit Load Balancer - Relay Protocol entry</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Load Balancer - Relay Protocol entry"); ?></td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Name</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Name"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="name" type="text" <?if(isset($pconfig['name'])) echo "value=\"{$pconfig['name']}\"";?> size="16" maxlength="16">
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Type</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Type"); ?></td>
<td width="78%" class="vtable" colspan="2">
<select id="type" name="type">
<?
@@ -212,7 +212,7 @@ document.observe('dom:loaded', function(){
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Description</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="desc" type="text" <?if(isset($pconfig['desc'])) echo "value=\"{$pconfig['desc']}\"";?>size="64">
</td>
@@ -221,17 +221,17 @@ document.observe('dom:loaded', function(){
<td>&nbsp;</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Add / remove available actions</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Add / remove available actions"); ?></td>
</tr>
<tr align="left" id="actions">
- <td width="22%" valign="top" class="vncellreq">Actions</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Actions"); ?></td>
<td width="78%" class="vtable" colspan="2">
<table>
<tbody>
<tr>
<td>
<center>
- <b>Available Actions</b>
+ <b><?=gettext("Available Actions"); ?></b>
<br/>
<select id="available_action" name="available_action[]" multiple="true" size="5">
<?php
@@ -246,14 +246,14 @@ echo "</select>";
</td>
<td valign="middle">
<center>
- <input class="formbtn" type="button" name="copyToEnabled" value="Add" onclick="copyOption($('available_action'), $('lbaction'));" /><br/>
- <input class="formbtn" type="button" name="removeFromEnabled" value="Remove" onclick="deleteOption($('lbaction'));" />
+ <input class="formbtn" type="button" name="copyToEnabled" value="<?=gettext("Add"); ?>" onclick="copyOption($('available_action'), $('lbaction'));" /><br/>
+ <input class="formbtn" type="button" name="removeFromEnabled" value="<?=gettext("Remove"); ?>" onclick="deleteOption($('lbaction'));" />
</center>
</td>
<td>
<center>
- <b>Enabled Actions</b>
+ <b><?=gettext("Enabled Actions"); ?></b>
<br/>
<select id="lbaction" name="lbaction[]" multiple="true" size="5">
<?php
@@ -274,7 +274,7 @@ echo "</select>";
<tr align="left">
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save" onClick="AllOptions($('lbaction'), true); AllOptions($('available_action'), false);"><input type="button" class="formbtn" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onClick="AllOptions($('lbaction'), true); AllOptions($('available_action'), false);"><input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
<?php if (isset($id) && $a_protocol[$id] && $_GET['act'] != 'dup'): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/load_balancer_virtual_server.php b/usr/local/www/load_balancer_virtual_server.php
index 4e6186e..41cc36e 100755
--- a/usr/local/www/load_balancer_virtual_server.php
+++ b/usr/local/www/load_balancer_virtual_server.php
@@ -93,7 +93,7 @@ for ($i = 0; isset($config['load_balancer']['virtual_server'][$i]); $i++) {
}
}
-$pgtitle = array("Services","Load Balancer","Virtual Servers");
+$pgtitle = array(gettext("Services"),gettext("Load Balancer"),gettext("Virtual Servers"));
$statusurl = "status_lb_vs.php";
#$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
@@ -107,16 +107,16 @@ include("head.inc");
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('loadbalancer')): ?><p>
-<?php print_info_box_np("The virtual server configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The virtual server configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="tabnavtbl">
<?php
/* active tabs */
$tab_array = array();
- $tab_array[] = array("Monitors", false, "load_balancer_monitor.php");
- $tab_array[] = array("Pools", false, "load_balancer_pool.php");
- $tab_array[] = array("Virtual Servers", true, "load_balancer_virtual_server.php");
+ $tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php");
+ $tab_array[] = array(gettext("Pools"), false, "load_balancer_pool.php");
+ $tab_array[] = array(gettext("Virtual Servers"), true, "load_balancer_virtual_server.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -127,13 +127,13 @@ include("head.inc");
$t = new MainTable();
$t->edit_uri('load_balancer_virtual_server_edit.php');
$t->my_uri('load_balancer_virtual_server.php');
- $t->add_column('Name','name',10);
- $t->add_column('Mode','mode',10);
- $t->add_column('IP Address','ipaddr',15);
- $t->add_column('Port','port',10);
- $t->add_column('Pool','pool',15);
- $t->add_column('Fall Back Pool','sitedown',15);
- $t->add_column('Description','desc',30);
+ $t->add_column(gettext('Name'),'name',10);
+ $t->add_column(gettext('Mode'),'mode',10);
+ $t->add_column(gettext('IP Address'),'ipaddr',15);
+ $t->add_column(gettext('Port'),'port',10);
+ $t->add_column(gettext('Pool'),'pool',15);
+ $t->add_column(gettext('Fall Back Pool'),'sitedown',15);
+ $t->add_column(gettext('Description'),'desc',30);
$t->add_button('edit');
$t->add_button('dup');
$t->add_button('del');
diff --git a/usr/local/www/load_balancer_virtual_server_edit.php b/usr/local/www/load_balancer_virtual_server_edit.php
index 0cd91e5..247c42b 100755
--- a/usr/local/www/load_balancer_virtual_server_edit.php
+++ b/usr/local/www/load_balancer_virtual_server_edit.php
@@ -58,7 +58,7 @@ if (isset($id) && $a_vs[$id]) {
$pconfig['mode'] = 'redirect';
}
-$changedesc = "Load Balancer: Virtual Server: ";
+$changedesc = gettext("Load Balancer: Virtual Server:") . " ";
$changecount = 0;
if ($_POST) {
@@ -69,12 +69,12 @@ if ($_POST) {
switch($pconfig['mode']) {
case "redirect": {
$reqdfields = explode(" ", "ipaddr name port mode");
- $reqdfieldsn = explode(",", "IP Address, Name, Port, Mode");
+ $reqdfieldsn = array(gettext("IP Address"),gettext("Name"),gettext("Port"),gettext("Mode"));
break;
}
case "relay": {
$reqdfields = explode(" ", "ipaddr name port mode relay_protocol");
- $reqdfieldsn = explode(",", "IP Address, Name, Port, Relay Protocol");
+ $reqdfieldsn = array(gettext("IP Address"),gettext("Name"),gettext("Port"),gettext("Relay Protocol"));
break;
}
}
@@ -83,22 +83,22 @@ if ($_POST) {
for ($i=0; isset($config['load_balancer']['virtual_server'][$i]); $i++)
if (($_POST['name'] == $config['load_balancer']['virtual_server'][$i]['name']) && ($i != $id))
- $input_errors[] = "This virtual server name has already been used. Virtual server names must be unique.";
+ $input_errors[] = gettext("This virtual server name has already been used. Virtual server names must be unique.");
if (!is_port($_POST['port']))
- $input_errors[] = "The port must be an integer between 1 and 65535.";
+ $input_errors[] = gettext("The port must be an integer between 1 and 65535.");
if(!is_ipaddr($_POST['ipaddr']))
- $input_errors[] = "{$_POST['ipaddr']} is not a valid IP address.";
+ $input_errors[] = sprintf(gettext("%s is not a valid IP address."), $_POST['ipaddr']);
if (!$input_errors) {
$vsent = array();
if(isset($id) && $a_vs[$id])
$vsent = $a_vs[$id];
if($vsent['name'] != "")
- $changedesc .= " modified '{$vsent['name']}' vs:";
+ $changedesc .= " " . sprintf(gettext("modified '%s' vs"), $vsent['name']) . ":";
else
- $changedesc .= " created '{$_POST['name']}' vs:";
+ $changedesc .= " " . sprintf(gettext("created '%s' vs"), $_POST['name']) . ":";
update_if_changed("name", $vsent['name'], $_POST['name']);
update_if_changed("desc", $vsent['desc'], $_POST['desc']);
@@ -128,7 +128,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services", "Load Balancer","Virtual Server","Edit");
+$pgtitle = array(gettext("Services"),gettext("Load Balancer"),gettext("Virtual Server"),gettext("Edit"));
$statusurl = "status_lb_vs.php";
#$statusurl = "status_lb_pool.php";
$logurl = "diag_logs_relayd.php";
@@ -174,39 +174,39 @@ document.observe("dom:loaded", function() {
<form action="load_balancer_virtual_server_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="3" valign="top" class="listtopic">Edit Load Balancer - Virtual Server entry</td>
+ <td colspan="3" valign="top" class="listtopic"><?=gettext("Edit Load Balancer - Virtual Server entry"); ?></td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Name</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Name"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="name" type="text" <?if(isset($pconfig['name'])) echo "value=\"{$pconfig['name']}\"";?>size="32" maxlength="32">
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Description</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="desc" type="text" <?if(isset($pconfig['desc'])) echo "value=\"{$pconfig['desc']}\"";?>size="64">
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">IP Address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("IP Address"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="ipaddr" type="text" <?if(isset($pconfig['ipaddr'])) echo "value=\"{$pconfig['ipaddr']}\"";?> size="16" maxlength="16">
- <br>This is normally the WAN IP address that you would like the server to listen on. All connections to this IP and port will be forwarded to the pool cluster.
+ <br><?=gettext("This is normally the WAN IP address that you would like the server to listen on. All connections to this IP and port will be forwarded to the pool cluster"); ?>.
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Port</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Port"); ?></td>
<td width="78%" class="vtable" colspan="2">
<input name="port" type="text" <?if(isset($pconfig['port'])) echo "value=\"{$pconfig['port']}\"";?> size="16" maxlength="16">
- <br>This is the port that the clients will connect to. All connections to this port will be forwarded to the pool cluster.
+ <br><?=gettext("This is the port that the clients will connect to. All connections to this port will be forwarded to the pool cluster"); ?>.
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Virtual Server Pool</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Virtual Server Pool"); ?></td>
<td width="78%" class="vtable" colspan="2">
<?php if(count($config['load_balancer']['lbpool']) == 0): ?>
- <b>NOTE:</b> Please add a pool on the Pools tab to use this feature.
+ <b><?=gettext("NOTE"); ?>:</b> <?=gettext("Please add a pool on the Pools tab to use this feature"); ?>.
<?php else: ?>
<select id="pool" name="pool">
<?php
@@ -222,13 +222,13 @@ document.observe("dom:loaded", function() {
</td>
</tr>
<tr align="left">
- <td width="22%" valign="top" class="vncellreq">Fall Back Pool</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Fall Back Pool"); ?></td>
<td width="78%" class="vtable" colspan="2">
<?php if(count($config['load_balancer']['lbpool']) == 0): ?>
- <b>NOTE:</b> Please add a pool on the Pools tab to use this feature.
+ <b><?=gettext("NOTE"); ?>:</b> <?=gettext("Please add a pool on the Pools tab to use this feature"); ?>.
<?php else: ?>
<select id="sitedown" name="sitedown">
- <option value=""<?=$pconfig['sitedown'] == '' ? ' selected' : ''?>>none</option>
+ <option value=""<?=$pconfig['sitedown'] == '' ? ' selected' : ''?>><?=gettext("none"); ?></option>
<?php
for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) {
$selected = "";
@@ -238,7 +238,7 @@ document.observe("dom:loaded", function() {
}
?>
</select>
- <br><b>NOTE:</b> This is the server that clients will be redirected to if *ALL* servers in the pool are offline.
+ <br><b><?=gettext("NOTE"); ?>:</b> <?=gettext("This is the server that clients will be redirected to if *ALL* servers in the pool are offline"); ?>.
<?php endif; ?>
</td>
</tr>
@@ -255,7 +255,7 @@ document.observe("dom:loaded", function() {
</tr>
-->
<tr id="relay" align="left" style="display:none;">
- <td width="22%" valign="top" class="vncellreq">Relay Protocol</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Relay Protocol"); ?></td>
<td width="78%" class="vtable" colspan="2">
<select id="relay_protocol" name="relay_protocol">
<?php
@@ -272,8 +272,8 @@ document.observe("dom:loaded", function() {
</tr>
<tr align="left">
<td align="left" valign="bottom">
- <input name="Submit" type="submit" class="formbtn" value="Submit">
- <input type="button" class="formbtn" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>">
+ <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
<?php if (isset($id) && $a_vs[$id] && $_GET['act'] != 'dup'): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
@@ -282,7 +282,7 @@ document.observe("dom:loaded", function() {
</table>
</form>
<br/>
- <span class="red"><strong>Note:</strong></span> Don't forget to add a firewall rule for the virtual server/pool after you're finished setting it up.
+ <span class="red"><strong><?=gettext("Note"); ?>:</strong></span> <?=gettext("Don't forget to add a firewall rule for the virtual server/pool after you're finished setting it up"); ?>.
<?php include("fend.inc"); ?>
</body>
</html>
diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php
index fc5a1a9..c18e496 100755
--- a/usr/local/www/services_captiveportal.php
+++ b/usr/local/www/services_captiveportal.php
@@ -38,7 +38,6 @@
##|*MATCH=services_captiveportal.php*
##|-PRIV
-$pgtitle = array("Services","Captive portal");
$statusurl = "status_captiveportal.php";
$logurl = "diag_logs_auth.php";
@@ -48,6 +47,8 @@ require("filter.inc");
require("shaper.inc");
require("captiveportal.inc");
+$pgtitle = array(gettext("Services"),gettext("Captive portal"));
+
if (!is_array($config['captiveportal'])) {
$config['captiveportal'] = array();
$config['captiveportal']['page'] = array();
@@ -111,60 +112,60 @@ if ($_POST) {
/* input validation */
if ($_POST['enable']) {
$reqdfields = explode(" ", "cinterface");
- $reqdfieldsn = explode(",", "Interface");
+ $reqdfieldsn = array(gettext("Interface"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
/* make sure no interfaces are bridged */
foreach ($pconfig['cinterface'] as $cpbrif)
if (link_interface_to_bridge($cpbrif))
- $input_errors[] = "The captive portal cannot be used on interface {$cpbrif} since it is part of a bridge.";
+ $input_errors[] = sprintf(gettext("The captive portal cannot be used on interface %s since it is part of a bridge."), $cpbrif);
if ($_POST['httpslogin_enable']) {
if (!$_POST['cert'] || !$_POST['key']) {
- $input_errors[] = "Certificate and key must be specified for HTTPS login.";
+ $input_errors[] = gettext("Certificate and key must be specified for HTTPS login.");
} else {
if (!strstr($_POST['cert'], "BEGIN CERTIFICATE") || !strstr($_POST['cert'], "END CERTIFICATE"))
- $input_errors[] = "This certificate does not appear to be valid.";
+ $input_errors[] = gettext("This certificate does not appear to be valid.");
if (!strstr($_POST['cacert'], "BEGIN CERTIFICATE") || !strstr($_POST['cacert'], "END CERTIFICATE"))
- $input_errors[] = "This intermmediate certificate does not appear to be valid.";
+ $input_errors[] = gettext("This intermmediate certificate does not appear to be valid.");
if (!strstr($_POST['key'], "BEGIN RSA PRIVATE KEY") || !strstr($_POST['key'], "END RSA PRIVATE KEY"))
- $input_errors[] = "This key does not appear to be valid.";
+ $input_errors[] = gettext("This key does not appear to be valid.");
}
if (!$_POST['httpsname'] || !is_domain($_POST['httpsname'])) {
- $input_errors[] = "The HTTPS server name must be specified for HTTPS login.";
+ $input_errors[] = gettext("The HTTPS server name must be specified for HTTPS login.");
}
}
}
if ($_POST['timeout'] && (!is_numeric($_POST['timeout']) || ($_POST['timeout'] < 1))) {
- $input_errors[] = "The timeout must be at least 1 minute.";
+ $input_errors[] = gettext("The timeout must be at least 1 minute.");
}
if ($_POST['idletimeout'] && (!is_numeric($_POST['idletimeout']) || ($_POST['idletimeout'] < 1))) {
- $input_errors[] = "The idle timeout must be at least 1 minute.";
+ $input_errors[] = gettext("The idle timeout must be at least 1 minute.");
}
if (($_POST['radiusip'] && !is_ipaddr($_POST['radiusip']))) {
- $input_errors[] = "A valid IP address must be specified. [".$_POST['radiusip']."]";
+ $input_errors[] = sprintf(gettext("A valid IP address must be specified. [%s]"), $_POST['radiusip']);
}
if (($_POST['radiusip2'] && !is_ipaddr($_POST['radiusip2']))) {
- $input_errors[] = "A valid IP address must be specified. [".$_POST['radiusip2']."]";
+ $input_errors[] = sprintf(gettext("A valid IP address must be specified. [%s]"), $_POST['radiusip2']);
}
if (($_POST['radiusport'] && !is_port($_POST['radiusport']))) {
- $input_errors[] = "A valid port number must be specified. [".$_POST['radiusport']."]";
+ $input_errors[] = sprintf(gettext("A valid port number must be specified. [%s]"), $_POST['radiusport']);
}
if (($_POST['radiusport2'] && !is_port($_POST['radiusport2']))) {
- $input_errors[] = "A valid port number must be specified. [".$_POST['radiusport2']."]";
+ $input_errors[] = sprintf(gettext("A valid port number must be specified. [%s]"), $_POST['radiusport2']);
}
if (($_POST['radiusacctport'] && !is_port($_POST['radiusacctport']))) {
- $input_errors[] = "A valid port number must be specified. [".$_POST['radiusacctport']."]";
+ $input_errors[] = sprintf(gettext("A valid port number must be specified. [%s]"), $_POST['radiusacctport']);
}
if ($_POST['maxproc'] && (!is_numeric($_POST['maxproc']) || ($_POST['maxproc'] < 4) || ($_POST['maxproc'] > 100))) {
- $input_errors[] = "The total maximum number of concurrent connections must be between 4 and 100.";
+ $input_errors[] = gettext("The total maximum number of concurrent connections must be between 4 and 100.");
}
$mymaxproc = $_POST['maxproc'] ? $_POST['maxproc'] : 16;
if ($_POST['maxprocperip'] && (!is_numeric($_POST['maxprocperip']) || ($_POST['maxprocperip'] > $mymaxproc))) {
- $input_errors[] = "The maximum number of concurrent connections per client IP address may not be larger than the global maximum.";
+ $input_errors[] = gettext("The maximum number of concurrent connections per client IP address may not be larger than the global maximum.");
}
if (!$input_errors) {
@@ -289,11 +290,11 @@ function enable_change(enable_change) {
<tr><td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[] = array("Captive portal", true, "services_captiveportal.php");
- $tab_array[] = array("Pass-through MAC", false, "services_captiveportal_mac.php");
- $tab_array[] = array("Allowed IP addresses", false, "services_captiveportal_ip.php");
- $tab_array[] = array("Vouchers", false, "services_captiveportal_vouchers.php");
- $tab_array[] = array("File Manager", false, "services_captiveportal_filemanager.php");
+ $tab_array[] = array(gettext("Captive portal"), true, "services_captiveportal.php");
+ $tab_array[] = array(gettext("Pass-through MAC"), false, "services_captiveportal_mac.php");
+ $tab_array[] = array(gettext("Allowed IP addresses"), false, "services_captiveportal_ip.php");
+ $tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php");
+ $tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php");
display_top_tabs($tab_array);
?> </td></tr>
<tr>
@@ -303,10 +304,10 @@ function enable_change(enable_change) {
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable">
<input name="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(false)">
- <strong>Enable captive portal </strong></td>
+ <strong><?=gettext("Enable captive portal"); ?> </strong></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Interfaces</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interfaces"); ?></td>
<td width="78%" class="vtable">
<select name="cinterface[]" multiple="true" size="<?php echo count($config['interfaces']); ?>" class="formselect" id="cinterface">
<?php
@@ -317,113 +318,113 @@ function enable_change(enable_change) {
</option>
<?php endforeach; ?>
</select> <br>
- <span class="vexpl">Select the interface(s) to enable for captive portal.</span></td>
+ <span class="vexpl"><?=gettext("Select the interface(s) to enable for captive portal"); ?>.</span></td>
</tr>
<tr>
- <td valign="top" class="vncell">Maximum concurrent connections</td>
+ <td valign="top" class="vncell"><?=gettext("Maximum concurrent connections"); ?></td>
<td class="vtable">
<table cellpadding="0" cellspacing="0">
<tr>
<td><input name="maxprocperip" type="text" class="formfld unknown" id="maxprocperip" size="5"
-value="<?=htmlspecialchars($pconfig['maxprocperip']);?>"> per client IP address (0 = no limit)</td>
+value="<?=htmlspecialchars($pconfig['maxprocperip']);?>"> <?=gettext("per client IP address (0 = no limit)"); ?></td>
</tr>
</table>
-This setting limits the number of concurrent connections to the captive portal HTTP(S) server. This does not set how many users can be logged in
-to the captive portal, but rather how many users can load the portal page or authenticate at the same time!
-Default is 4 connections per client IP address, with a total maximum of 16 connections.</td>
+<?=gettext("This setting limits the number of concurrent connections to the captive portal HTTP(S) server. This does not set how many users can be logged in " .
+"to the captive portal, but rather how many users can load the portal page or authenticate at the same time! " .
+"Default is 4 connections per client IP address, with a total maximum of 16 connections"); ?>.</td>
</tr>
<tr>
- <td valign="top" class="vncell">Idle timeout</td>
+ <td valign="top" class="vncell"><?=gettext("Idle timeout"); ?></td>
<td class="vtable">
<input name="idletimeout" type="text" class="formfld unknown" id="idletimeout" size="6" value="<?=htmlspecialchars($pconfig['idletimeout']);?>">
-minutes<br>
-Clients will be disconnected after this amount of inactivity. They may log in again immediately, though. Leave this field blank for no idle timeout.</td>
+<?=gettext("minutes"); ?><br>
+<?=gettext("Clients will be disconnected after this amount of inactivity. They may log in again immediately, though. Leave this field blank for no idle timeout"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Hard timeout</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Hard timeout"); ?></td>
<td width="78%" class="vtable">
<input name="timeout" type="text" class="formfld unknown" id="timeout" size="6" value="<?=htmlspecialchars($pconfig['timeout']);?>">
- minutes<br>
- Clients will be disconnected after this amount of time, regardless of activity. They may log in again immediately, though. Leave this field blank for no hard timeout (not recommended unless an idle timeout is set).</td>
+ <?=gettext("minutes"); ?><br>
+ <?=gettext("Clients will be disconnected after this amount of time, regardless of activity. They may log in again immediately, though. Leave this field blank for no hard timeout (not recommended unless an idle timeout is set)"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Logout popup window</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Logout popup window"); ?></td>
<td width="78%" class="vtable">
<input name="logoutwin_enable" type="checkbox" class="formfld" id="logoutwin_enable" value="yes" <?php if($pconfig['logoutwin_enable']) echo "checked"; ?>>
- <strong>Enable logout popup window</strong><br>
- If enabled, a popup window will appear when clients are allowed through the captive portal. This allows clients to explicitly disconnect themselves before the idle or hard timeout occurs.</td>
+ <strong><?=gettext("Enable logout popup window"); ?></strong><br>
+ <?=gettext("If enabled, a popup window will appear when clients are allowed through the captive portal. This allows clients to explicitly disconnect themselves before the idle or hard timeout occurs"); ?>.</td>
</tr>
<tr>
- <td valign="top" class="vncell">Redirection URL</td>
+ <td valign="top" class="vncell"><?=gettext("Redirection URL"); ?></td>
<td class="vtable">
<input name="redirurl" type="text" class="formfld url" id="redirurl" size="60" value="<?=htmlspecialchars($pconfig['redirurl']);?>">
<br>
-If you provide a URL here, clients will be redirected to that URL instead of the one they initially tried
-to access after they've authenticated.</td>
+<?=gettext("If you provide a URL here, clients will be redirected to that URL instead of the one they initially tried " .
+"to access after they've authenticated"); ?>.</td>
</tr>
<tr>
- <td valign="top" class="vncell">Concurrent user logins</td>
+ <td valign="top" class="vncell"><?=gettext("Concurrent user logins"); ?></td>
<td class="vtable">
<input name="noconcurrentlogins" type="checkbox" class="formfld" id="noconcurrentlogins" value="yes" <?php if ($pconfig['noconcurrentlogins']) echo "checked"; ?>>
- <strong>Disable concurrent logins</strong><br>
- If this option is set, only the most recent login per username will be active. Subsequent logins will cause machines previously logged in with the same username to be disconnected.</td>
+ <strong><?=gettext("Disable concurrent logins"); ?></strong><br>
+ <?=gettext("If this option is set, only the most recent login per username will be active. Subsequent logins will cause machines previously logged in with the same username to be disconnected"); ?>.</td>
</tr>
<tr>
- <td valign="top" class="vncell">MAC filtering </td>
+ <td valign="top" class="vncell"><?=gettext("MAC filtering"); ?> </td>
<td class="vtable">
<input name="nomacfilter" type="checkbox" class="formfld" id="nomacfilter" value="yes" <?php if ($pconfig['nomacfilter']) echo "checked"; ?>>
- <strong>Disable MAC filtering</strong><br>
- If this option is set, no attempts will be made to ensure that the MAC address of clients stays the same while they're logged in.
- This is required when the MAC address of the client cannot be determined (usually because there are routers between <?php echo $g['product_name'] ?> and the clients).
- If this is enabled, RADIUS MAC authentication cannot be used.</td>
+ <strong><?=gettext("Disable MAC filtering"); ?></strong><br>
+ <?=gettext("If this option is set, no attempts will be made to ensure that the MAC address of clients stays the same while they're logged in." .
+ "This is required when the MAC address of the client cannot be determined (usually because there are routers between"); ?> <?php echo $g['product_name'] ?> <?=gettext("and the clients)"); ?>.
+ <?=gettext("If this is enabled, RADIUS MAC authentication cannot be used"); ?>.</td>
</tr>
<tr>
- <td valign="top" class="vncell">Pass-through MAC Auto Entry</td>
+ <td valign="top" class="vncell"><?=gettext("Pass-through MAC Auto Entry"); ?></td>
<td class="vtable">
<input name="passthrumacadd" type="checkbox" class="formfld" id="passthrumacadd" value="yes" <?php if ($pconfig['passthrumacadd']) echo "checked"; ?>>
- <strong>Enable Pass-through MAC automatic additions</strong><br>
- If this option is set, a MAC passthrough entry is automatically added after the user has successfully authenticated. Users of that MAC address will never have to authenticate again.
- To remove the passthrough MAC entry you either have to log in and remove it manually from the <a href="services_captiveportal_mac.php">Pass-through MAC tab</a> or send a POST from another system to remove it.
- If this is enabled, RADIUS MAC authentication cannot be used. Also, the logout window will not be shown.
+ <strong><?=gettext("Enable Pass-through MAC automatic additions"); ?></strong><br>
+ <?=gettext("If this option is set, a MAC passthrough entry is automatically added after the user has successfully authenticated. Users of that MAC address will never have to authenticate again"); ?>.
+ <?=gettext("To remove the passthrough MAC entry you either have to log in and remove it manually from the"); ?> <a href="services_captiveportal_mac.php"><?=gettext("Pass-through MAC tab"); ?></a> <?=gettext("or send a POST from another system to remove it"); ?>.
+ <?=gettext("If this is enabled, RADIUS MAC authentication cannot be used. Also, the logout window will not be shown"); ?>.
<br/><br/>
<input name="passthrumacaddusername" type="checkbox" class="formfld" id="passthrumacaddusername" value="yes" <?php if ($pconfig['passthrumacaddusername']) echo "checked"; ?>>
- <strong>Enable Pass-through MAC automatic addition with username</strong><br>
- If this option is set, with the automatically MAC passthrough entry created the username, used during authentication, will be saved.
- To remove the passthrough MAC entry you either have to log in and remove it manually from the <a href="services_captiveportal_mac.php">Pass-through MAC tab</a> or send a POST from another system to remove it.
+ <strong><?=gettext("Enable Pass-through MAC automatic addition with username"); ?></strong><br>
+ <?=gettext("If this option is set, with the automatically MAC passthrough entry created the username, used during authentication, will be saved"); ?>.
+ <?=gettext("To remove the passthrough MAC entry you either have to log in and remove it manually from the"); ?> <a href="services_captiveportal_mac.php"><?=gettext("Pass-through MAC tab"); ?></a> <?=gettext("or send a POST from another system to remove it"); ?>.
</td>
</tr>
<tr>
- <td valign="top" class="vncell">Per-user bandwidth restriction</td>
+ <td valign="top" class="vncell"><?=gettext("Per-user bandwidth restriction"); ?></td>
<td class="vtable">
<input name="peruserbw" type="checkbox" class="formfld" id="peruserbw" value="yes" <?php if ($pconfig['peruserbw']) echo "checked"; ?>>
- <strong>Enable per-user bandwidth restriction</strong><br><br>
+ <strong><?=gettext("Enable per-user bandwidth restriction"); ?></strong><br><br>
<table cellpadding="0" cellspacing="0">
<tr>
- <td>Default download</td>
- <td><input type="text" class="formfld unknown" name="bwdefaultdn" id="bwdefaultdn" size="10" value="<?=htmlspecialchars($pconfig['bwdefaultdn']);?>"> Kbit/s</td>
+ <td><?=gettext("Default download"); ?></td>
+ <td><input type="text" class="formfld unknown" name="bwdefaultdn" id="bwdefaultdn" size="10" value="<?=htmlspecialchars($pconfig['bwdefaultdn']);?>"> <?=gettext("Kbit/s"); ?></td>
</tr>
<tr>
- <td>Default upload</td>
- <td><input type="text" class="formfld unknown" name="bwdefaultup" id="bwdefaultup" size="10" value="<?=htmlspecialchars($pconfig['bwdefaultup']);?>"> Kbit/s</td>
+ <td><?=gettext("Default upload"); ?></td>
+ <td><input type="text" class="formfld unknown" name="bwdefaultup" id="bwdefaultup" size="10" value="<?=htmlspecialchars($pconfig['bwdefaultup']);?>"> <?=gettext("Kbit/s"); ?></td>
</tr></table>
<br>
- If this option is set, the captive portal will restrict each user who logs in to the specified default bandwidth. RADIUS can override the default settings. Leave empty or set to 0 for no limit. </td>
+ <?=gettext("If this option is set, the captive portal will restrict each user who logs in to the specified default bandwidth. RADIUS can override the default settings. Leave empty or set to 0 for no limit"); ?>. </td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Authentication</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Authentication"); ?></td>
<td width="78%" class="vtable">
<table cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><input name="auth_method" type="radio" id="auth_method" value="none" onClick="enable_change(false)" <?php if($pconfig['auth_method']!="local" && $pconfig['auth_method']!="radius") echo "checked"; ?>>
- No Authentication</td>
+ <?=gettext("No Authentication"); ?></td>
</tr>
<tr>
<td colspan="2"><input name="auth_method" type="radio" id="auth_method" value="local" onClick="enable_change(false)" <?php if($pconfig['auth_method']=="local") echo "checked"; ?>>
- Local <a href="system_usermanager.php">User Manager</a></td>
+ <?=gettext("Local"); ?> <a href="system_usermanager.php"><?=gettext("User Manager"); ?></a></td>
</tr>
<tr>
<td colspan="2"><input name="auth_method" type="radio" id="auth_method" value="radius" onClick="enable_change(false)" <?php if($pconfig['auth_method']=="radius") echo "checked"; ?>>
- RADIUS Authentication</td>
+ <?=gettext("RADIUS Authentication"); ?></td>
</tr><tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
@@ -431,40 +432,40 @@ to access after they've authenticated.</td>
</table>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="optsect_t2">Primary RADIUS server</td>
+ <td colspan="2" valign="top" class="optsect_t2"><?=gettext("Primary RADIUS server"); ?></td>
</tr>
<tr>
- <td class="vncell" valign="top">IP address</td>
+ <td class="vncell" valign="top"><?=gettext("IP address"); ?></td>
<td class="vtable"><input name="radiusip" type="text" class="formfld unknown" id="radiusip" size="20" value="<?=htmlspecialchars($pconfig['radiusip']);?>"><br>
- Enter the IP address of the RADIUS server which users of the captive portal have to authenticate against.</td>
+ <?=gettext("Enter the IP address of the RADIUS server which users of the captive portal have to authenticate against"); ?>.</td>
</tr>
<tr>
- <td class="vncell" valign="top">Port</td>
+ <td class="vncell" valign="top"><?=gettext("Port"); ?></td>
<td class="vtable"><input name="radiusport" type="text" class="formfld unknown" id="radiusport" size="5" value="<?=htmlspecialchars($pconfig['radiusport']);?>"><br>
- Leave this field blank to use the default port (1812).</td>
+ <?=gettext("Leave this field blank to use the default port (1812)"); ?>.</td>
</tr>
<tr>
- <td class="vncell" valign="top">Shared secret&nbsp;&nbsp;</td>
+ <td class="vncell" valign="top"><?=gettext("Shared secret"); ?>&nbsp;&nbsp;</td>
<td class="vtable"><input name="radiuskey" type="text" class="formfld unknown" id="radiuskey" size="16" value="<?=htmlspecialchars($pconfig['radiuskey']);?>"><br>
- Leave this field blank to not use a RADIUS shared secret (not recommended).</td>
+ <?=gettext("Leave this field blank to not use a RADIUS shared secret (not recommended)"); ?>.</td>
</tr>
<tr>
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="optsect_t2">Secondary RADIUS server</td>
+ <td colspan="2" valign="top" class="optsect_t2"><?=gettext("Secondary RADIUS server"); ?></td>
</tr>
<tr>
- <td class="vncell" valign="top">IP address</td>
+ <td class="vncell" valign="top"><?=gettext("IP address"); ?></td>
<td class="vtable"><input name="radiusip2" type="text" class="formfld unknown" id="radiusip2" size="20" value="<?=htmlspecialchars($pconfig['radiusip2']);?>"><br>
- If you have a second RADIUS server, you can activate it by entering its IP address here.</td>
+ <?=gettext("If you have a second RADIUS server, you can activate it by entering its IP address here"); ?>.</td>
</tr>
<tr>
- <td class="vncell" valign="top">Port</td>
+ <td class="vncell" valign="top"><?=gettext("Port"); ?></td>
<td class="vtable"><input name="radiusport2" type="text" class="formfld unknown" id="radiusport2" size="5" value="<?=htmlspecialchars($pconfig['radiusport2']);?>"></td>
</tr>
<tr>
- <td class="vncell" valign="top">Shared secret&nbsp;&nbsp;</td>
+ <td class="vncell" valign="top"><?=gettext("Shared secret"); ?>&nbsp;&nbsp;</td>
<td class="vtable"><input name="radiuskey2" type="text" class="formfld unknown" id="radiuskey2" size="16"
value="<?=htmlspecialchars($pconfig['radiuskey2']);?>"></td>
</tr>
@@ -472,66 +473,66 @@ value="<?=htmlspecialchars($pconfig['radiuskey2']);?>"></td>
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="optsect_t2">Accounting</td>
+ <td colspan="2" valign="top" class="optsect_t2"><?=gettext("Accounting"); ?></td>
</tr>
<tr>
<td class="vncell">&nbsp;</td>
<td class="vtable"><input name="radacct_enable" type="checkbox" id="radacct_enable" value="yes" onClick="enable_change(false)" <?php if($pconfig['radacct_enable']) echo "checked"; ?>>
- <strong>send RADIUS accounting packets</strong><br>
- If this is enabled, RADIUS accounting packets will be sent to the primary RADIUS server.</td>
+ <strong><?=gettext("send RADIUS accounting packets"); ?></strong><br>
+ <?=gettext("If this is enabled, RADIUS accounting packets will be sent to the primary RADIUS server"); ?>.</td>
</tr>
<tr>
- <td class="vncell" valign="top">Accounting port</td>
+ <td class="vncell" valign="top"><?=gettext("Accounting port"); ?></td>
<td class="vtable"><input name="radiusacctport" type="text" class="formfld unknown" id="radiusacctport" size="5" value="<?=htmlspecialchars($pconfig['radiusacctport']);?>"><br>
- Leave blank to use the default port (1813).</td>
+ <?=gettext("Leave blank to use the default port (1813)"); ?>.</td>
</tr>
<tr>
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="optsect_t2">Reauthentication</td>
+ <td colspan="2" valign="top" class="optsect_t2"><?=gettext("Reauthentication"); ?></td>
</tr>
<tr>
<td class="vncell">&nbsp;</td>
<td class="vtable"><input name="reauthenticate" type="checkbox" id="reauthenticate" value="yes" onClick="enable_change(false)" <?php if($pconfig['reauthenticate']) echo "checked"; ?>>
- <strong>Reauthenticate connected users every minute</strong><br>
- If reauthentication is enabled, Access-Requests will be sent to the RADIUS server for each user that is
- logged in every minute. If an Access-Reject is received for a user, that user is disconnected from the captive portal immediately.</td>
+ <strong><?=gettext("Reauthenticate connected users every minute"); ?></strong><br>
+ <?=gettext("If reauthentication is enabled, Access-Requests will be sent to the RADIUS server for each user that is " .
+ "logged in every minute. If an Access-Reject is received for a user, that user is disconnected from the captive portal immediately"); ?>.</td>
</tr>
<tr>
- <td class="vncell" valign="top">Accounting updates</td>
+ <td class="vncell" valign="top"><?=gettext("Accounting updates"); ?></td>
<td class="vtable">
- <input name="reauthenticateacct" type="radio" value="" <?php if(!$pconfig['reauthenticateacct']) echo "checked"; ?>> no accounting updates<br>
- <input name="reauthenticateacct" type="radio" value="stopstart" <?php if($pconfig['reauthenticateacct'] == "stopstart") echo "checked"; ?>> stop/start accounting<br>
- <input name="reauthenticateacct" type="radio" value="interimupdate" <?php if($pconfig['reauthenticateacct'] == "interimupdate") echo "checked"; ?>> interim update
+ <input name="reauthenticateacct" type="radio" value="" <?php if(!$pconfig['reauthenticateacct']) echo "checked"; ?>> <?=gettext("no accounting updates"); ?><br>
+ <input name="reauthenticateacct" type="radio" value="stopstart" <?php if($pconfig['reauthenticateacct'] == "stopstart") echo "checked"; ?>> <?=gettext("stop/start accounting"); ?><br>
+ <input name="reauthenticateacct" type="radio" value="interimupdate" <?php if($pconfig['reauthenticateacct'] == "interimupdate") echo "checked"; ?>> <?=gettext("interim update"); ?>
</td>
</tr>
<tr>
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="optsect_t2">RADIUS MAC authentication</td>
+ <td colspan="2" valign="top" class="optsect_t2"><?=gettext("RADIUS MAC authentication"); ?></td>
</tr>
<tr>
<td class="vncell">&nbsp;</td>
<td class="vtable">
- <input name="radmac_enable" type="checkbox" id="radmac_enable" value="yes" onClick="enable_change(false)" <?php if ($pconfig['radmac_enable']) echo "checked"; ?>><strong>Enable RADIUS MAC authentication</strong><br>
- If this option is enabled, the captive portal will try to authenticate users by sending their MAC address as the username and the password
- entered below to the RADIUS server.</td>
+ <input name="radmac_enable" type="checkbox" id="radmac_enable" value="yes" onClick="enable_change(false)" <?php if ($pconfig['radmac_enable']) echo "checked"; ?>><strong><?=gettext("Enable RADIUS MAC authentication"); ?></strong><br>
+ <?=gettext("If this option is enabled, the captive portal will try to authenticate users by sending their MAC address as the username and the password " .
+ "entered below to the RADIUS server"); ?>.</td>
</tr>
<tr>
- <td class="vncell">Shared secret</td>
+ <td class="vncell"><?=gettext("Shared secret"); ?></td>
<td class="vtable"><input name="radmac_secret" type="text" class="formfld unknown" id="radmac_secret" size="16" value="<?=htmlspecialchars($pconfig['radmac_secret']);?>"></td>
</tr>
<tr>
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="optsect_t2">RADIUS options</td>
+ <td colspan="2" valign="top" class="optsect_t2"><?=gettext("RADIUS options"); ?></td>
</tr>
<tr>
- <td class="vncell" valign="top">Radius ip attribute</td>
+ <td class="vncell" valign="top"><?=gettext("Radius ip attribute"); ?></td>
<td>
<select name="radiussrcip_attribute" id="radiussrcip_attribute">
<?php $iflist = get_configured_interface_with_descr();
@@ -561,20 +562,20 @@ value="<?=htmlspecialchars($pconfig['radiuskey2']);?>"></td>
}
?>
</select><br/>
- Choose the ip to use for calling station attribute.
+ <?=gettext("Choose the ip to use for calling station attribute"); ?>.
</td>
</tr>
<tr>
- <td class="vncell" valign="top">Session-Timeout</td>
- <td class="vtable"><input name="radiussession_timeout" type="checkbox" id="radiussession_timeout" value="yes" <?php if ($pconfig['radiussession_timeout']) echo "checked"; ?>><strong>Use RADIUS Session-Timeout attributes</strong><br>
- When this is enabled, clients will be disconnected after the amount of time retrieved from the RADIUS Session-Timeout attribute.</td>
+ <td class="vncell" valign="top"><?=gettext("Session-Timeout"); ?></td>
+ <td class="vtable"><input name="radiussession_timeout" type="checkbox" id="radiussession_timeout" value="yes" <?php if ($pconfig['radiussession_timeout']) echo "checked"; ?>><strong><?=gettext("Use RADIUS Session-Timeout attributes"); ?></strong><br>
+ <?=gettext("When this is enabled, clients will be disconnected after the amount of time retrieved from the RADIUS Session-Timeout attribute"); ?>.</td>
</tr>
<tr>
- <td class="vncell" valign="top">Type</td>
+ <td class="vncell" valign="top"><?=gettext("Type"); ?></td>
<td class="vtable"><select name="radiusvendor" id="radiusvendor">
- <option>default</option>
+ <option><?=gettext("default"); ?></option>
<?php
$radiusvendors = array("cisco");
foreach ($radiusvendors as $radiusvendor){
@@ -584,18 +585,18 @@ value="<?=htmlspecialchars($pconfig['radiuskey2']);?>"></td>
echo "<option value=\"$radiusvendor\">$radiusvendor</option>\n";
}
?></select><br>
- If RADIUS type is set to Cisco, in Access-Requests the value of Calling-Station-Id will be set to the client's IP address and
- the Called-Station-Id to the client's MAC address. Default behavior is Calling-Station-Id = client's MAC address and Called-Station-Id = <?=$g['product_name']?>'s WAN IP address.</td>
+ <?=gettext("If RADIUS type is set to Cisco, in Access-Requests the value of Calling-Station-Id will be set to the client's IP address and " .
+ "the Called-Station-Id to the client's MAC address. Default behavior is Calling-Station-Id = client's MAC address and Called-Station-Id"); ?> = <?=$g['product_name']?>'s <?=gettext("WAN IP address"); ?>.</td>
</tr>
</table>
</tr>
<tr>
- <td class="vncell" valign="top">MAC address format</td>
+ <td class="vncell" valign="top"><?=gettext("MAC address format"); ?></td>
<td class="vtable">
<select name="radmac_format" id="radmac_format">
- <option>default</option>
+ <option><?=gettext("default"); ?></option>
<?php
- $macformats = array("singledash","ietf","cisco","unformatted");
+ $macformats = array(gettext("singledash"),gettext("ietf"),gettext("cisco"),gettext("unformatted"));
foreach ($macformats as $macformat) {
if ($pconfig['radmac_format'] == $macformat)
echo "<option selected value=\"$macformat\">$macformat</option>\n";
@@ -604,50 +605,50 @@ value="<?=htmlspecialchars($pconfig['radiuskey2']);?>"></td>
}
?>
</select></br>
- This option changes the MAC address format used in the whole RADIUS system. Change this if you also
- need to change the username format for RADIUS MAC authentication.<br>
- default: 00:11:22:33:44:55<br>
- singledash: 001122-334455<br>
- ietf: 00-11-22-33-44-55<br>
- cisco: 0011.2233.4455<br>
- unformatted: 001122334455
+ <?=gettext("This option changes the MAC address format used in the whole RADIUS system. Change this if you also"); ?>
+ <?=gettext("need to change the username format for RADIUS MAC authentication"); ?>.<br>
+ <?=gettext("default"); ?>: 00:11:22:33:44:55<br>
+ <?=gettext("singledash"); ?>: 001122-334455<br>
+ <?=gettext("ietf"); ?>: 00-11-22-33-44-55<br>
+ <?=gettext("cisco"); ?>: 0011.2233.4455<br>
+ <?=gettext("unformatted"); ?>: 001122334455
</tr>
<tr>
- <td valign="top" class="vncell">HTTPS login</td>
+ <td valign="top" class="vncell"><?=gettext("HTTPS login"); ?></td>
<td class="vtable">
<input name="httpslogin_enable" type="checkbox" class="formfld" id="httpslogin_enable" value="yes" <?php if($pconfig['httpslogin_enable']) echo "checked"; ?>>
- <strong>Enable HTTPS login</strong><br>
- If enabled, the username and password will be transmitted over an HTTPS connection to protect against eavesdroppers. A server name, certificate and matching private key must also be specified below.</td>
+ <strong><?=gettext("Enable HTTPS login"); ?></strong><br>
+ <?=gettext("If enabled, the username and password will be transmitted over an HTTPS connection to protect against eavesdroppers. A server name, certificate and matching private key must also be specified below"); ?>.</td>
</tr>
<tr>
- <td valign="top" class="vncell">HTTPS server name </td>
+ <td valign="top" class="vncell"><?=gettext("HTTPS server name"); ?> </td>
<td class="vtable">
<input name="httpsname" type="text" class="formfld unknown" id="httpsname" size="30" value="<?=htmlspecialchars($pconfig['httpsname']);?>"><br>
- This name will be used in the form action for the HTTPS POST and should match the Common Name (CN) in your certificate (otherwise, the client browser will most likely display a security warning). Make sure captive portal clients can resolve this name in DNS and verify on the client that the IP resolves to the correct interface IP on <?=$g['product_name']?>. </td>
+ <?=gettext("This name will be used in the form action for the HTTPS POST and should match the Common Name (CN) in your certificate (otherwise, the client browser will most likely display a security warning). Make sure captive portal clients can resolve this name in DNS and verify on the client that the IP resolves to the correct interface IP on"); ?> <?=$g['product_name']?>. </td>
</tr>
<tr>
- <td valign="top" class="vncell">HTTPS certificate</td>
+ <td valign="top" class="vncell"><?=gettext("HTTPS certificate"); ?></td>
<td class="vtable">
<textarea name="cert" cols="65" rows="7" id="cert" class="formpre"><?=htmlspecialchars($pconfig['cert']);?></textarea>
<br>
- Paste a signed certificate in X.509 PEM format here.</td>
+ <?=gettext("Paste a signed certificate in X.509 PEM format here"); ?>.</td>
</tr>
<tr>
- <td valign="top" class="vncell">HTTPS private key</td>
+ <td valign="top" class="vncell"><?=gettext("HTTPS private key"); ?></td>
<td class="vtable">
<textarea name="key" cols="65" rows="7" id="key" class="formpre"><?=htmlspecialchars($pconfig['key']);?></textarea>
<br>
- Paste an RSA private key in PEM format here.</td>
+ <?=gettext("Paste an RSA private key in PEM format here"); ?>.</td>
</tr>
<tr>
- <td valign="top" class="vncell">HTTPS intermediate certificate</td>
+ <td valign="top" class="vncell"><?=gettext("HTTPS intermediate certificate"); ?></td>
<td class="vtable">
<textarea name="cacert" cols="65" rows="7" id="cacert" class="formpre"><?=htmlspecialchars($pconfig['cacert']);?></textarea>
<br>
- Paste a certificate in X.509 PEM format here.</td>
+ <?=gettext("Paste a certificate in X.509 PEM format here"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Portal page contents</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Portal page contents"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input type="file" name="htmlfile" class="formfld file" id="htmlfile"><br>
<?php
@@ -659,14 +660,14 @@ value="<?=htmlspecialchars($pconfig['radiuskey2']);?>"></td>
}
?>
<?php if ($config['captiveportal']['page']['htmltext']): ?>
- <a href="<?=$href?>" target="_new">View current page</a>
+ <a href="<?=$href?>" target="_new"><?=gettext("View current page"); ?></a>
<br>
<br>
<?php endif; ?>
- Upload an HTML/PHP file for the portal page here (leave blank to keep the current one). Make sure to include a form (POST to &quot;$PORTAL_ACTION$&quot;)
-with a submit button (name=&quot;accept&quot;) and a hidden field with name=&quot;redirurl&quot; and value=&quot;$PORTAL_REDIRURL$&quot;.
-Include the &quot;auth_user&quot; and &quot;auth_pass&quot; and/or &quot;auth_voucher&quot; input fields if authentication is enabled, otherwise it will always fail.
-Example code for the form:<br>
+ <?=gettext("Upload an HTML/PHP file for the portal page here (leave blank to keep the current one). Make sure to include a form (POST to"); ?> &quot;$PORTAL_ACTION$&quot;)
+<?=gettext("with a submit button"); ?> (name=&quot;accept&quot;) <?=gettext("and a hidden field with"); ?> name=&quot;redirurl&quot; <?=gettext("and"); ?> value=&quot;$PORTAL_REDIRURL$&quot;.
+<?=gettext("Include the"); ?> &quot;auth_user&quot; <?=gettext("and"); ?> &quot;auth_pass&quot; <?=gettext("and/or"); ?> &quot;auth_voucher&quot; <?=gettext("input fields if authentication is enabled, otherwise it will always fail"); ?>.
+<?=gettext("Example code for the form"); ?>:<br>
<br>
<tt>&lt;form method=&quot;post&quot; action=&quot;$PORTAL_ACTION$&quot;&gt;<br>
&nbsp;&nbsp;&nbsp;&lt;input name=&quot;auth_user&quot; type=&quot;text&quot;&gt;<br>
@@ -677,43 +678,43 @@ Example code for the form:<br>
&lt;/form&gt;</tt></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Authentication<br>
- error page<br>
- contents</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Authentication"); ?><br>
+ <?=gettext("error page"); ?><br>
+ <?=gettext("contents"); ?></td>
<td class="vtable">
<input name="errfile" type="file" class="formfld file" id="errfile"><br>
<?php if ($config['captiveportal']['page']['errtext']): ?>
- <a href="?act=viewerrhtml" target="_blank">View current page</a>
+ <a href="?act=viewerrhtml" target="_blank"><?=gettext("View current page"); ?></a>
<br>
<br>
<?php endif; ?>
-The contents of the HTML/PHP file that you upload here are displayed when an authentication error occurs.
-You may include &quot;$PORTAL_MESSAGE$&quot;, which will be replaced by the error or reply messages from the RADIUS server, if any.</td>
+<?=gettext("The contents of the HTML/PHP file that you upload here are displayed when an authentication error occurs. " .
+"You may include"); ?> &quot;$PORTAL_MESSAGE$&quot;, <?=gettext("which will be replaced by the error or reply messages from the RADIUS server, if any"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Logout<br>
- page<br>
- contents</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Logout"); ?><br>
+ <?=gettext("page"); ?><br>
+ <?=gettext("contents"); ?></td>
<td class="vtable">
<input name="logoutfile" type="file" class="formfld file" id="logoutfile"><br>
<?php if ($config['captiveportal']['page']['logouttext']): ?>
- <a href="?act=viewlogouthtml" target="_blank">View current page</a>
+ <a href="?act=viewlogouthtml" target="_blank"><?=gettext("View current page"); ?></a>
<br>
<br>
<?php endif; ?>
-The contents of the HTML/PHP file that you upload here are displayed when an authentication error occurs.
-You may include &quot;$PORTAL_MESSAGE$&quot;, which will be replaced by the error or reply messages from the RADIUS server, if any.</td>
+<?=gettext("The contents of the HTML/PHP file that you upload here are displayed when an authentication error occurs. " .
+"You may include"); ?> &quot;$PORTAL_MESSAGE$&quot;, <?=gettext("which will be replaced by the error or reply messages from the RADIUS server, if any"); ?>.</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save" onClick="enable_change(true)">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onClick="enable_change(true)">
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
- <td width="78%"><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>Changing any settings on this page will disconnect all clients! Don't forget to enable the DHCP server on your captive portal interface! Make sure that the default/maximum DHCP lease time is higher than the timeout entered on this page. Also, the DNS forwarder needs to be enabled for DNS lookups by unauthenticated clients to work. </span></td>
+ <td width="78%"><span class="vexpl"><span class="red"><strong><?=gettext("Note"); ?>:<br>
+ </strong></span><?=gettext("Changing any settings on this page will disconnect all clients! Don't forget to enable the DHCP server on your captive portal interface! Make sure that the default/maximum DHCP lease time is higher than the timeout entered on this page. Also, the DNS forwarder needs to be enabled for DNS lookups by unauthenticated clients to work"); ?>. </span></td>
</tr>
</table>
</td>
diff --git a/usr/local/www/services_captiveportal_filemanager.php b/usr/local/www/services_captiveportal_filemanager.php
index efef6b7..9e99395 100755
--- a/usr/local/www/services_captiveportal_filemanager.php
+++ b/usr/local/www/services_captiveportal_filemanager.php
@@ -49,7 +49,6 @@ function cpelements_sort() {
usort($config['captiveportal']['element'],"cpelementscmp");
}
-$pgtitle = array("Services","Captive portal");
$statusurl = "status_captiveportal.php";
$logurl = "diag_logs_auth.php";
@@ -60,6 +59,8 @@ require("filter.inc");
require("shaper.inc");
require("captiveportal.inc");
+$pgtitle = array(gettext("Services"),gettext("Captive portal"));
+
if (!is_array($config['captiveportal']['element']))
$config['captiveportal']['element'] = array();
@@ -85,14 +86,14 @@ if ($_POST) {
// is there already a file with that name?
foreach ($a_element as $element) {
if ($element['name'] == $name) {
- $input_errors[] = "A file with the name '$name' already exists.";
+ $input_errors[] = sprintf(gettext("A file with the name '%s' already exists."), $name);
break;
}
}
// check total file size
if (($total_size + $size) > $g['captiveportal_element_sizelimit']) {
- $input_errors[] = "The total size of all files uploaded may not exceed " .
+ $input_errors[] = gettext("The total size of all files uploaded may not exceed ") .
format_bytes($g['captiveportal_element_sizelimit']) . ".";
}
@@ -135,24 +136,24 @@ include("head.inc");
<tr><td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[] = array("Captive portal", false, "services_captiveportal.php");
- $tab_array[] = array("Pass-through MAC", false, "services_captiveportal_mac.php");
- $tab_array[] = array("Allowed IP addresses", false, "services_captiveportal_ip.php");
- $tab_array[] = array("Vouchers", false, "services_captiveportal_vouchers.php");
- $tab_array[] = array("File Manager", true, "services_captiveportal_filemanager.php");
+ $tab_array[] = array(gettext("Captive portal"), false, "services_captiveportal.php");
+ $tab_array[] = array(gettext("Pass-through MAC"), false, "services_captiveportal_mac.php");
+ $tab_array[] = array(gettext("Allowed IP addresses"), false, "services_captiveportal_ip.php");
+ $tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php");
+ $tab_array[] = array(gettext("File Manager"), true, "services_captiveportal_filemanager.php");
display_top_tabs($tab_array);
?> </td></tr>
<tr>
<td class="tabcont">
<table width="80%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="70%" class="listhdrr">Name</td>
- <td width="20%" class="listhdr">Size</td>
+ <td width="70%" class="listhdrr"><?=gettext("Name"); ?></td>
+ <td width="20%" class="listhdr"><?=gettext("Size"); ?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17" heigth="17"></td>
- <td><a href="services_captiveportal_filemanager.php?act=add"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_plus.gif" title="add file" width="17" height="17" border="0"></a></td>
+ <td><a href="services_captiveportal_filemanager.php?act=add"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add file"); ?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
@@ -162,14 +163,14 @@ include("head.inc");
<td class="listlr"><?=htmlspecialchars($element['name']);?></td>
<td class="listr" align="right"><?=format_bytes($element['size']);?></td>
<td valign="middle" nowrap class="list">
- <a href="services_captiveportal_filemanager.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this file?')"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" title="delete file" width="17" height="17" border="0"></a>
+ <a href="services_captiveportal_filemanager.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this file?"); ?>')"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete file"); ?>" width="17" height="17" border="0"></a>
</td>
</tr>
<?php $i++; endforeach; ?>
<?php if (count($a_element) > 0): ?>
<tr>
- <td class="listlr" style="background-color: #eee"><strong>TOTAL</strong></td>
+ <td class="listlr" style="background-color: #eee"><strong><?=gettext("TOTAL"); ?></strong></td>
<td class="listr" style="background-color: #eee" align="right"><strong><?=format_bytes($total_size);?></strong></td>
<td valign="middle" nowrap class="list"></td>
</tr>
@@ -178,9 +179,9 @@ include("head.inc");
<?php if ($_GET['act'] == 'add'): ?>
<tr>
<td class="listlr" colspan="2"><input type="file" name="new" class="formfld file" size="40" id="new">
- <input name="Submit" type="submit" class="formbtn" value="Upload"></td>
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Upload"); ?>"></td>
<td valign="middle" nowrap class="list">
- <a href="services_captiveportal_filemanager.php"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" title="cancel" width="17" height="17" border="0"></a>
+ <a href="services_captiveportal_filemanager.php"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("cancel"); ?>" width="17" height="17" border="0"></a>
</td>
</tr>
<?php else: ?>
@@ -190,7 +191,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17" heigth="17"></td>
- <td><a href="services_captiveportal_filemanager.php?act=add"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_plus.gif" title="add file" width="17" height="17" border="0"></a></td>
+ <td><a href="services_captiveportal_filemanager.php?act=add"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add file"); ?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
@@ -198,21 +199,21 @@ include("head.inc");
<?php endif; ?>
</table>
<span class="vexpl"><span class="red"><strong>
- Note:<br>
+ <?=gettext("Note"); ?>:<br>
</strong></span>
- Any files that you upload here with the filename prefix of captiveportal- will
- be made available in the root directory of the captive portal HTTP(S) server.
- You may reference them directly from your portal page HTML code using relative paths.
- Example: you've uploaded an image with the name 'captiveportal-test.jpg' using the
- file manager. Then you can include it in your portal page like this:<br><br>
+ <?=gettext("Any files that you upload here with the filename prefix of captiveportal- will " .
+ "be made available in the root directory of the captive portal HTTP(S) server. " .
+ "You may reference them directly from your portal page HTML code using relative paths. " .
+ "Example: you've uploaded an image with the name 'captiveportal-test.jpg' using the " .
+ "file manager. Then you can include it in your portal page like this"); ?>:<br><br>
<tt>&lt;img src=&quot;captiveportal-test.jpg&quot; width=... height=...&gt;</tt>
<br><br>
- In addition, you can also upload .php files for execution. You can pass the filename
- to your custom page from the initial page by using text similar to:
+ <?=gettext("In addition, you can also upload .php files for execution. You can pass the filename " .
+ "to your custom page from the initial page by using text similar to"); ?>:
<br><br>
- <tt>&lt;a href="/captiveportal-aup.php?redirurl=$PORTAL_REDIRURL$"&gt;Acceptable usage policy&lt/a&gt;</tt>
+ <tt>&lt;a href="/captiveportal-aup.php?redirurl=$PORTAL_REDIRURL$"&gt;<?=gettext("Acceptable usage policy"); ?>&lt/a&gt;</tt>
<br><br>
- The total size limit for all files is <?=format_bytes($g['captiveportal_element_sizelimit']);?>.</span>
+ <?=gettext("The total size limit for all files is"); ?> <?=format_bytes($g['captiveportal_element_sizelimit']);?>.</span>
</td>
</tr>
</table>
diff --git a/usr/local/www/services_captiveportal_ip.php b/usr/local/www/services_captiveportal_ip.php
index 171f583..2eedce3 100755
--- a/usr/local/www/services_captiveportal_ip.php
+++ b/usr/local/www/services_captiveportal_ip.php
@@ -39,7 +39,6 @@
##|*MATCH=services_captiveportal_ip.php*
##|-PRIV
-$pgtitle = array("Services","Captive portal");
$statusurl = "status_captiveportal.php";
$logurl = "diag_logs_auth.php";
@@ -49,6 +48,8 @@ require("filter.inc");
require("shaper.inc");
require("captiveportal.inc");
+$pgtitle = array(gettext("Services"),gettext("Captive portal"));
+
if (!is_array($config['captiveportal']['allowedip']))
$config['captiveportal']['allowedip'] = array();
@@ -89,11 +90,11 @@ include("head.inc");
<tr><td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[] = array("Captive portal", false, "services_captiveportal.php");
- $tab_array[] = array("Pass-through MAC", false, "services_captiveportal_mac.php");
- $tab_array[] = array("Allowed IP addresses", true, "services_captiveportal_ip.php");
- $tab_array[] = array("Vouchers", false, "services_captiveportal_vouchers.php");
- $tab_array[] = array("File Manager", false, "services_captiveportal_filemanager.php");
+ $tab_array[] = array(gettext("Captive portal"), false, "services_captiveportal.php");
+ $tab_array[] = array(gettext("Pass-through MAC"), false, "services_captiveportal_mac.php");
+ $tab_array[] = array(gettext("Allowed IP addresses"), true, "services_captiveportal_ip.php");
+ $tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php");
+ $tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -101,13 +102,13 @@ include("head.inc");
<td class="tabcont">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="30%" class="listhdrr">IP address</td>
- <td width="60%" class="listhdr">Description</td>
+ <td width="30%" class="listhdrr"><?=gettext("IP address"); ?></td>
+ <td width="60%" class="listhdr"><?=gettext("Description"); ?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17" heigth="17"></td>
- <td><a href="services_captiveportal_ip_edit.php"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_plus.gif" title="add address" width="17" height="17" border="0"></a></td>
+ <td><a href="services_captiveportal_ip_edit.php"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add address"); ?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
@@ -136,8 +137,8 @@ include("head.inc");
<td class="listbg">
<?=htmlspecialchars($ip['descr']);?>&nbsp;
</td>
- <td valign="middle" nowrap class="list"> <a href="services_captiveportal_ip_edit.php?id=<?=$i;?>"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_e.gif" title="edit address" width="17" height="17" border="0"></a>
- &nbsp;<a href="services_captiveportal_ip.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this address?')"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" title="delete address" width="17" height="17" border="0"></a></td>
+ <td valign="middle" nowrap class="list"> <a href="services_captiveportal_ip_edit.php?id=<?=$i;?>"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit address"); ?>" width="17" height="17" border="0"></a>
+ &nbsp;<a href="services_captiveportal_ip.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this address?"); ?>')"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete address"); ?>" width="17" height="17" border="0"></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
@@ -146,27 +147,27 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17" heigth="17"></td>
- <td><a href="services_captiveportal_ip_edit.php"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_plus.gif" title="add address" width="17" height="17" border="0"></a></td>
+ <td><a href="services_captiveportal_ip_edit.php"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add address"); ?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="list"><p class="vexpl"><span class="red"><strong>
- Note:<br>
+ <?=gettext("Note"); ?>:<br>
</strong></span>
- Adding allowed IP addresses will allow IP access to/from these addresses through the captive portal without being taken to the portal page. This can be used for a web server serving images for the portal page or a DNS server on another network, for example. By specifying <em>from</em> addresses, it may be used to always allow pass-through access from a client behind the captive portal.</p>
+ <?=gettext("Adding allowed IP addresses will allow IP access to/from these addresses through the captive portal without being taken to the portal page. This can be used for a web server serving images for the portal page or a DNS server on another network, for example. By specifying"); ?> <em><?=gettext("from"); ?></em> <?=gettext("addresses, it may be used to always allow pass-through access from a client behind the captive portal"); ?>.</p>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td><span class="vexpl">any <img src="/themes/<?=$g['theme'];?>/images/icons/icon_in.gif" width="11" height="11" align="absmiddle"> x.x.x.x </span></td>
- <td><span class="vexpl">All connections <strong>to</strong> the IP address are allowed</span></td>
+ <td><span class="vexpl"><?=gettext("any"); ?> <img src="/themes/<?=$g['theme'];?>/images/icons/icon_in.gif" width="11" height="11" align="absmiddle"> x.x.x.x </span></td>
+ <td><span class="vexpl"><?=gettext("All connections"); ?> <strong><?=gettext("to"); ?></strong> <?=gettext("the IP address are allowed"); ?></span></td>
</tr>
<tr>
<td colspan="5" height="4"></td>
</tr>
<tr>
- <td>x.x.x.x <span class="vexpl"><img src="/themes/<?=$g['theme'];?>/images/icons/icon_in.gif" width="11" height="11" align="absmiddle"></span> any&nbsp;&nbsp;&nbsp; </td>
- <td><span class="vexpl">All connections <strong>from</strong> the IP address are allowed </span></td>
+ <td>x.x.x.x <span class="vexpl"><img src="/themes/<?=$g['theme'];?>/images/icons/icon_in.gif" width="11" height="11" align="absmiddle"></span> <?=gettext("any"); ?>&nbsp;&nbsp;&nbsp; </td>
+ <td><span class="vexpl"><?=gettext("All connections"); ?> <strong><?=gettext("from"); ?></strong> <?=gettext("the IP address are allowed"); ?> </span></td>
</tr>
<tr>
<td><span class="vexpl"><img src="/themes/<?=$g['theme'];?>/images/icons/icon_pass.gif" width="11" height="11" align="right"></span>&nbsp;&nbsp;&nbsp;&nbsp; </td>
diff --git a/usr/local/www/services_captiveportal_ip_edit.php b/usr/local/www/services_captiveportal_ip_edit.php
index e6eab55..b9b4efc 100755
--- a/usr/local/www/services_captiveportal_ip_edit.php
+++ b/usr/local/www/services_captiveportal_ip_edit.php
@@ -49,7 +49,6 @@ function allowedips_sort() {
usort($config['captiveportal']['allowedip'],"allowedipscmp");
}
-$pgtitle = array("Services","Captive portal","Edit allowed IP address");
$statusurl = "status_captiveportal.php";
$logurl = "diag_logs_auth.php";
@@ -59,6 +58,8 @@ require("filter.inc");
require("shaper.inc");
require("captiveportal.inc");
+$pgtitle = array(gettext("Services"),gettext("Captive portal"),gettext("Edit allowed IP address"));
+
if (!is_array($config['captiveportal']['allowedip']))
$config['captiveportal']['allowedip'] = array();
@@ -84,24 +85,24 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "ip");
- $reqdfieldsn = explode(",", "Allowed IP address");
+ $reqdfieldsn = array(gettext("Allowed IP address"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['ip'] && !is_ipaddr($_POST['ip']))) {
- $input_errors[] = "A valid IP address must be specified. [".$_POST['ip']."]";
+ $input_errors[] = sprintf(gettext("A valid IP address must be specified. [%s]"), $_POST['ip']);
}
if ($_POST['bw_up'] && !is_numeric($_POST['bw_up']))
- $input_errors[] = "Upload speed needs to be an integer";
+ $input_errors[] = gettext("Upload speed needs to be an integer");
if ($_POST['bw_down'] && !is_numeric($_POST['bw_down']))
- $input_errors[] = "Download speed needs to be an integer";
+ $input_errors[] = gettext("Download speed needs to be an integer");
foreach ($a_allowedips as $ipent) {
if (isset($id) && ($a_allowedips[$id]) && ($a_allowedips[$id] === $ipent))
continue;
if ($ipent['ip'] == $_POST['ip']){
- $input_errors[] = "[" . $_POST['ip'] . "] already allowed." ;
+ $input_errors[] = sprintf("[%s] %s.", $_POST['ip'], gettext("already allowed")) ;
break ;
}
}
@@ -155,11 +156,11 @@ include("head.inc");
<form action="services_captiveportal_ip_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td width="22%" valign="top" class="vncellreq">Direction</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Direction"); ?></td>
<td width="78%" class="vtable">
<select name="dir" class="formfld">
<?php
- $dirs = explode(" ", "Both From To") ;
+ $dirs = array(gettext("Both"),gettext("From"),gettext("To")) ;
foreach ($dirs as $dir): ?>
<option value="<?=strtolower($dir);?>" <?php if (strtolower($dir) == strtolower($pconfig['dir'])) echo "selected";?> >
<?=htmlspecialchars($dir);?>
@@ -167,11 +168,11 @@ include("head.inc");
<?php endforeach; ?>
</select>
<br>
- <span class="vexpl">Use <em>From</em> to always allow an IP address through the captive portal (without authentication).
- Use <em>To</em> to allow access from all clients (even non-authenticated ones) behind the portal to this IP address.</span></td>
+ <span class="vexpl"><?=gettext("Use"); ?> <em><?=gettext("From"); ?></em> <?=gettext("to always allow an IP address through the captive portal (without authentication)"); ?>.
+ <?=gettext("Use"); ?> <em><?=gettext("To"); ?></em> <?=gettext("to allow access from all clients (even non-authenticated ones) behind the portal to this IP address"); ?>.</span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">IP address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("IP address"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="ip" type="text" class="formfld unknown" id="ip" size="17" value="<?=htmlspecialchars($pconfig['ip']);?>">
/<select name='sn' class="formselect" id='sn'>
@@ -180,31 +181,31 @@ include("head.inc");
<?php endfor; ?>
</select>
<br>
- <span class="vexpl">IP address and subnet mask. Use /32 for a single IP.</span></td>
+ <span class="vexpl"><?=gettext("IP address and subnet mask. Use /32 for a single IP");?>.</span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here " .
+ "for your reference (not parsed)"); ?>.</span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Bandwidth up</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Bandwidth up"); ?></td>
<td width="78%" class="vtable">
<input name="bw_up" type="text" class="formfld unknown" id="bw_up" size="10" value="<?=htmlspecialchars($pconfig['bw_up']);?>">
- <br> <span class="vexpl">Enter a upload limit to be enforced on this IP address in Kbit/s</span></td>
+ <br> <span class="vexpl"><?=gettext("Enter a upload limit to be enforced on this IP address in Kbit/s"); ?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Bandwidth down</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Bandwidth down"); ?></td>
<td width="78%" class="vtable">
<input name="bw_down" type="text" class="formfld unknown" id="bw_down" size="10" value="<?=htmlspecialchars($pconfig['bw_down']);?>">
- <br> <span class="vexpl">Enter a download limit to be enforced on this IP address in Kbit/s</span></td>
+ <br> <span class="vexpl"><?=gettext("Enter a download limit to be enforced on this IP address in Kbit/s"); ?></span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
<?php if (isset($id) && $a_allowedips[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/services_captiveportal_mac.php b/usr/local/www/services_captiveportal_mac.php
index 38989a5..fd2193c 100755
--- a/usr/local/www/services_captiveportal_mac.php
+++ b/usr/local/www/services_captiveportal_mac.php
@@ -38,7 +38,6 @@
##|*MATCH=services_captiveportal_mac.php*
##|-PRIV
-$pgtitle = array("Services","Captive portal");
$statusurl = "status_captiveportal.php";
$logurl = "diag_logs_auth.php";
@@ -48,6 +47,8 @@ require("filter.inc");
require("shaper.inc");
require("captiveportal.inc");
+$pgtitle = array(gettext("Services"),gettext("Captive portal"));
+
if (!is_array($config['captiveportal']['passthrumac']))
$config['captiveportal']['passthrumac'] = array();
@@ -69,7 +70,7 @@ if ($_POST) {
if ($_POST['postafterlogin']) {
if (!is_array($a_passthrumacs)) {
- echo "No entry exists yet!\n";
+ echo gettext("No entry exists yet!") ."\n";
exit;
}
if ($_POST['username']) {
@@ -77,7 +78,7 @@ if ($_POST) {
if (!empty($mac))
$_POST['delmac'] = $mac['mac'];
else
- echo "No entry exists for this username: {$_POST['username']}\n";
+ echo gettext("No entry exists for this username:") . " " . $_POST['username'] . "\n";
}
if ($_POST['delmac']) {
$found = false;
@@ -95,9 +96,9 @@ if ($_POST) {
}
unset($a_passthrumacs[$idx]);
write_config();
- echo "The entry was sucessfully deleted\n";
+ echo gettext("The entry was sucessfully deleted") . "\n";
} else
- echo "No entry exists for this mac address: {$_POST['delmac']}\n";
+ echo gettext("No entry exists for this mac address:") . " " . $_POST['delmac'] . "\n";
}
exit;
}
@@ -124,17 +125,17 @@ include("head.inc");
<form action="services_captiveportal_mac.php" method="post">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('passthrumac')): ?><p>
-<?php print_info_box_np("The captive portal MAC address configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The captive portal MAC address configuration has been changed.<br>You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[] = array("Captive portal", false, "services_captiveportal.php");
- $tab_array[] = array("Pass-through MAC", true, "services_captiveportal_mac.php");
- $tab_array[] = array("Allowed IP addresses", false, "services_captiveportal_ip.php");
- $tab_array[] = array("Vouchers", false, "services_captiveportal_vouchers.php");
- $tab_array[] = array("File Manager", false, "services_captiveportal_filemanager.php");
+ $tab_array[] = array(gettext("Captive portal"), false, "services_captiveportal.php");
+ $tab_array[] = array(gettext("Pass-through MAC"), true, "services_captiveportal_mac.php");
+ $tab_array[] = array(gettext("Allowed IP addresses"), false, "services_captiveportal_ip.php");
+ $tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php");
+ $tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -142,8 +143,8 @@ include("head.inc");
<td class="tabcont">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="30%" class="listhdrr">MAC address</td>
- <td width="60%" class="listhdr">Description</td>
+ <td width="30%" class="listhdrr"><?=gettext("MAC address"); ?></td>
+ <td width="60%" class="listhdr"><?=gettext("Description"); ?></td>
<td width="10%" class="list"></td>
</tr>
<?php $i = 0; foreach ($a_passthrumacs as $mac): ?>
@@ -154,19 +155,19 @@ include("head.inc");
<td class="listbg">
<?=htmlspecialchars($mac['descr']);?>&nbsp;
</td>
- <td valign="middle" nowrap class="list"> <a href="services_captiveportal_mac_edit.php?id=<?=$i;?>"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_e.gif" title="edit host" width="17" height="17" border="0"></a>
- &nbsp;<a href="services_captiveportal_mac.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this host?')"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" title="delete host" width="17" height="17" border="0"></a></td>
+ <td valign="middle" nowrap class="list"> <a href="services_captiveportal_mac_edit.php?id=<?=$i;?>"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit host"); ?>" width="17" height="17" border="0"></a>
+ &nbsp;<a href="services_captiveportal_mac.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this host?"); ?>')"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete host"); ?>" width="17" height="17" border="0"></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
<td class="list" colspan="2">&nbsp;</td>
- <td class="list"> <a href="services_captiveportal_mac_edit.php"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_plus.gif" title="add host" width="17" height="17" border="0"></a></td>
+ <td class="list"> <a href="services_captiveportal_mac_edit.php"><img src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add host"); ?>" width="17" height="17" border="0"></a></td>
</tr>
<tr>
<td colspan="2" class="list"><span class="vexpl"><span class="red"><strong>
- Note:<br>
+ <?=gettext("Note"); ?>:<br>
</strong></span>
- Adding MAC addresses as pass-through MACs allows them access through the captive portal automatically without being taken to the portal page. </span></td>
+ <?=gettext("Adding MAC addresses as pass-through MACs allows them access through the captive portal automatically without being taken to the portal page"); ?>. </span></td>
<td class="list">&nbsp;</td>
</tr>
</table>
diff --git a/usr/local/www/services_captiveportal_mac_edit.php b/usr/local/www/services_captiveportal_mac_edit.php
index d5dace5..4508a02 100755
--- a/usr/local/www/services_captiveportal_mac_edit.php
+++ b/usr/local/www/services_captiveportal_mac_edit.php
@@ -48,7 +48,6 @@ function passthrumacs_sort() {
usort($config['captiveportal']['passthrumac'],"passthrumacscmp");
}
-$pgtitle = array("Services","Captive portal","Edit pass-through MAC address");
$statusurl = "status_captiveportal.php";
$logurl = "diag_logs_auth.php";
@@ -58,6 +57,8 @@ require("filter.inc");
require("shaper.inc");
require("captiveportal.inc");
+$pgtitle = array(gettext("Services"),gettext("Captive portal"),gettext("Edit pass-through MAC address"));
+
if (!is_array($config['captiveportal']['passthrumac']))
$config['captiveportal']['passthrumac'] = array();
@@ -81,26 +82,26 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "mac");
- $reqdfieldsn = explode(",", "MAC address");
+ $reqdfieldsn = array(gettext("MAC address"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
$_POST['mac'] = str_replace("-", ":", $_POST['mac']);
if (($_POST['mac'] && !is_macaddr($_POST['mac']))) {
- $input_errors[] = "A valid MAC address must be specified. [".$_POST['mac']."]";
+ $input_errors[] = sprintf("%s. [%s]", gettext("A valid MAC address must be specified"), $_POST['mac']);
}
if ($_POST['bw_up'] && !is_numeric($_POST['bw_up']))
- $input_errors[] = "Upload speed needs to be an integer";
+ $input_errors[] = gettext("Upload speed needs to be an integer");
if ($_POST['bw_down'] && !is_numeric($_POST['bw_down']))
- $input_errors[] = "Download speed needs to be an integer";
+ $input_errors[] = gettext("Download speed needs to be an integer");
foreach ($a_passthrumacs as $macent) {
if (isset($id) && ($a_passthrumacs[$id]) && ($a_passthrumacs[$id] === $macent))
continue;
if ($macent['mac'] == $_POST['mac']){
- $input_errors[] = "[" . $_POST['mac'] . "] already allowed." ;
+ $input_errors[] = sprintf("[%s] %s.", $_POST['mac'], gettext("already allowed"));
break;
}
}
@@ -150,35 +151,35 @@ include("head.inc");
<form action="services_captiveportal_mac_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td width="22%" valign="top" class="vncellreq">MAC address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("MAC address"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="mac" type="text" class="formfld unknown" id="mac" size="17" value="<?=htmlspecialchars($pconfig['mac']);?>">
<br>
- <span class="vexpl">MAC address (6 hex octets separated by colons)</span></td>
+ <span class="vexpl"><?=gettext("MAC address (6 hex octets separated by colons)"); ?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here " .
+ "for your reference (not parsed)"); ?>.</span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Bandwidth up</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Bandwidth up"); ?></td>
<td width="78%" class="vtable">
<input name="bw_up" type="text" class="formfld unknown" id="bw_up" size="10" value="<?=htmlspecialchars($pconfig['bw_up']);?>">
- <br> <span class="vexpl">Enter a upload limit to be enforced on this MAC address in Kbit/s</span></td>
+ <br> <span class="vexpl"><?=gettext("Enter a upload limit to be enforced on this MAC address in Kbit/s"); ?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Bandwidth down</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Bandwidth down"); ?></td>
<td width="78%" class="vtable">
<input name="bw_down" type="text" class="formfld unknown" id="bw_down" size="10" value="<?=htmlspecialchars($pconfig['bw_down']);?>">
- <br> <span class="vexpl">Enter a download limit to be enforced on this MAC address in Kbit/s</span></td>
+ <br> <span class="vexpl"><?=gettext("Enter a download limit to be enforced on this MAC address in Kbit/s"); ?></span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
<?php if (isset($id) && $a_passthrumacs[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/services_captiveportal_vouchers.php b/usr/local/www/services_captiveportal_vouchers.php
index f6c4577..c6cf3e9 100644
--- a/usr/local/www/services_captiveportal_vouchers.php
+++ b/usr/local/www/services_captiveportal_vouchers.php
@@ -36,7 +36,6 @@
##|*MATCH=services_captiveportal_vouchers.php*
##|-PRIV
-$pgtitle = array("Services", "Captive portal", "Vouchers");
$statusurl = "status_captiveportal_vouchers.php";
$logurl = "diag_logs_auth.php";
@@ -47,6 +46,8 @@ require("shaper.inc");
require("captiveportal.inc");
require_once("voucher.inc");
+$pgtitle = array(gettext("Services"), gettext("Captive portal"), gettext("Vouchers"));
+
if (!is_array($config['voucher'])) {
$config['voucher'] = array();
}
@@ -87,10 +88,10 @@ if (!isset($config['voucher']['publickey'])) {
}
}
if (!isset($config['voucher']['msgnoaccess'])) {
- $config['voucher']['msgnoaccess'] = "Voucher invalid";
+ $config['voucher']['msgnoaccess'] = gettext("Voucher invalid");
}
if (!isset($config['voucher']['msgexpired'])) {
- $config['voucher']['msgexpired'] = "Voucher expired";
+ $config['voucher']['msgexpired'] = gettext("Voucher expired");
}
$a_roll = &$config['voucher']['roll'];
@@ -115,7 +116,7 @@ if ($_GET['act'] == "csv") {
if (strstr($privkey,"BEGIN RSA PRIVATE KEY")) {
$fd = fopen("{$g['varetc_path']}/voucher.private","w");
if (!$fd) {
- $input_errors[] = "Cannot write private key file.\n";
+ $input_errors[] = gettext("Cannot write private key file") . ".\n";
} else {
chmod("{$g['varetc_path']}/voucher.private", 0600);
fwrite($fd, $privkey);
@@ -135,7 +136,7 @@ if ($_GET['act'] == "csv") {
}
}
} else {
- $input_errors[] = "Need private RSA key to print vouchers\n";
+ $input_errors[] = gettext("Need private RSA key to print vouchers") . "\n";
}
}
@@ -159,37 +160,37 @@ if ($_POST) {
/* input validation */
if ($_POST['enable']) {
$reqdfields = explode(" ", "charset rollbits ticketbits checksumbits publickey magic saveinterval");
- $reqdfieldsn = explode(",", "charset,rollbits,ticketbits,checksumbits,publickey,magic,saveinterval");
+ $reqdfieldsn = array(gettext("charset"),gettext("rollbits"),gettext("ticketbits"),gettext("checksumbits"),gettext("publickey"),gettext("magic"),gettext("saveinterval"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
}
if ($_POST['charset'] && (strlen($_POST['charset'] < 2))) {
- $input_errors[] = "Need at least 2 characters to create vouchers.";
+ $input_errors[] = gettext("Need at least 2 characters to create vouchers.");
}
if ($_POST['charset'] && (strpos($_POST['charset'],"\"")>0)) {
- $input_errors[] = "Double quotes aren't allowed.";
+ $input_errors[] = gettext("Double quotes aren't allowed.");
}
if ($_POST['charset'] && (strpos($_POST['charset'],",")>0)) {
- $input_errors[] = "',' aren't allowed.";
+ $input_errors[] = "',' " . gettext("aren't allowed.");
}
if ($_POST['rollbits'] && (!is_numeric($_POST['rollbits']) || ($_POST['rollbits'] < 1) || ($_POST['rollbits'] > 31))) {
- $input_errors[] = "# of Bits to store Roll Id needs to be between 1..31.";
+ $input_errors[] = gettext("# of Bits to store Roll Id needs to be between 1..31.");
}
if ($_POST['ticketbits'] && (!is_numeric($_POST['ticketbits']) || ($_POST['ticketbits'] < 1) || ($_POST['ticketbits'] > 16))) {
- $input_errors[] = "# of Bits to store Ticket Id needs to be between 1..16.";
+ $input_errors[] = gettext("# of Bits to store Ticket Id needs to be between 1..16.");
}
if ($_POST['checksumbits'] && (!is_numeric($_POST['checksumbits']) || ($_POST['checksumbits'] < 1) || ($_POST['checksumbits'] > 31))) {
- $input_errors[] = "# of Bits to store checksum needs to be between 1..31.";
+ $input_errors[] = gettext("# of Bits to store checksum needs to be between 1..31.");
}
if ($_POST['saveinterval'] && (!is_numeric($_POST['saveinterval']) || ($_POST['saveinterval'] < 1))) {
- $input_errors[] = "Save interval in minutes cant be negative.";
+ $input_errors[] = gettext("Save interval in minutes cant be negative.");
}
if ($_POST['publickey'] && (!strstr($_POST['publickey'],"BEGIN PUBLIC KEY"))) {
- $input_errors[] = "This doesn't look like an RSA Public key.";
+ $input_errors[] = gettext("This doesn't look like an RSA Public key.");
}
if ($_POST['privatekey'] && (!strstr($_POST['privatekey'],"BEGIN RSA PRIVATE KEY"))) {
- $input_errors[] = "This doesn't look like an RSA Private key.";
+ $input_errors[] = gettext("This doesn't look like an RSA Private key.");
}
if (!$input_errors) {
@@ -208,7 +209,7 @@ if ($_POST) {
write_config();
voucher_configure();
if (isset($config['voucher']['enable']) && !isset($config['captiveportal']['enable'])) {
- $savemsg = "Don't forget to configure and enable Captive Portal.";
+ $savemsg = gettext("Don't forget to configure and enable Captive Portal.");
}
}
}
@@ -242,11 +243,11 @@ function enable_change(enable_change) {
<ul id="tabnav">
<?php
$tab_array = array();
- $tab_array[] = array("Captive portal", false, "services_captiveportal.php");
- $tab_array[] = array("Pass-through MAC", false, "services_captiveportal_mac.php");
- $tab_array[] = array("Allowed IP addresses", false, "services_captiveportal_ip.php");
- $tab_array[] = array("Vouchers", true, "services_captiveportal_vouchers.php");
- $tab_array[] = array("File Manager", false, "services_captiveportal_filemanager.php");
+ $tab_array[] = array(gettext("Captive portal"), false, "services_captiveportal.php");
+ $tab_array[] = array(gettext("Pass-through MAC"), false, "services_captiveportal_mac.php");
+ $tab_array[] = array(gettext("Allowed IP addresses"), false, "services_captiveportal_ip.php");
+ $tab_array[] = array(gettext("Vouchers"), true, "services_captiveportal_vouchers.php");
+ $tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php");
display_top_tabs($tab_array);
?>
</ul>
@@ -258,18 +259,18 @@ function enable_change(enable_change) {
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable">
<input name="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(false)">
- <strong>Enable Vouchers</strong></td>
+ <strong><?=gettext("Enable Vouchers"); ?></strong></td>
</tr>
<tr>
- <td valign="top" class="vncell">Voucher Rolls</td>
+ <td valign="top" class="vncell"><?=gettext("Voucher Rolls"); ?></td>
<td class="vtable">
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="content pane">
<tr>
- <td width="10%" class="listhdrr">Roll#</td>
- <td width="20%" class="listhdrr">Minutes/Ticket</td>
- <td width="20%" class="listhdrr"># of Tickets</td>
- <td width="35%" class="listhdr">Comment</td>
+ <td width="10%" class="listhdrr"><?=gettext("Roll"); ?>#</td>
+ <td width="20%" class="listhdrr"><?=gettext("Minutes/Ticket"); ?></td>
+ <td width="20%" class="listhdrr"># <?=gettext("of Tickets"); ?></td>
+ <td width="35%" class="listhdr"><?=gettext("Comment"); ?></td>
<td width="15%" class="list"></td>
</tr>
<?php $i = 0; foreach($a_roll as $rollent): ?>
@@ -288,9 +289,9 @@ function enable_change(enable_change) {
</td>
<td valign="middle" nowrap class="list">
<?php if ($pconfig['enable']): ?>
- <a href="services_captiveportal_vouchers_edit.php?id=<?=$i; ?>"><img src="/themes/<?=$g['theme']; ?>/images/icons/icon_e.gif" title="edit voucher" width="17" height="17" border="0" alt="edit voucher"></a>
- <a href="services_captiveportal_vouchers.php?act=del&amp;id=<?=$i; ?>" onclick="return confirm('Do you really want to delete this voucher? This makes all vouchers from this roll invalid')"><img src="/themes/<?=$g['theme']; ?>/images/icons/icon_x.gif" title="delete vouchers" width="17" height="17" border="0" alt="delete vouchers"></a>
- <a href="services_captiveportal_vouchers.php?act=csv&amp;id=<?=$i; ?>"><img src="/themes/<?=$g['theme']; ?>/images/icons/icon_log_s.gif" title="generate vouchers for this roll to CSV file" width="11" height="15" border="0" alt="generate vouchers for this roll to CSV file"></a>
+ <a href="services_captiveportal_vouchers_edit.php?id=<?=$i; ?>"><img src="/themes/<?=$g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit voucher"); ?>" width="17" height="17" border="0" alt="<?=gettext("edit voucher"); ?>"></a>
+ <a href="services_captiveportal_vouchers.php?act=del&amp;id=<?=$i; ?>" onclick="return confirm('<?=gettext("Do you really want to delete this voucher? This makes all vouchers from this roll invalid"); ?>')"><img src="/themes/<?=$g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete vouchers"); ?>" width="17" height="17" border="0" alt="<?=gettext("delete vouchers"); ?>"></a>
+ <a href="services_captiveportal_vouchers.php?act=csv&amp;id=<?=$i; ?>"><img src="/themes/<?=$g['theme']; ?>/images/icons/icon_log_s.gif" title="<?=gettext("generate vouchers for this roll to CSV file"); ?>" width="11" height="15" border="0" alt="<?=gettext("generate vouchers for this roll to CSV file"); ?>"></a>
<?php endif;?>
</td>
</tr>
@@ -299,99 +300,99 @@ function enable_change(enable_change) {
<td class="list" colspan="4"></td>
<?php
if ($pconfig['enable']) {
- echo "<td class=\"list\"> <a href=\"services_captiveportal_vouchers_edit.php\"><img src=\"/themes/{$g['theme']}/images/icons/icon_plus.gif\" title=\"add voucher\" width=\"17\" height=\"17\" border=\"0\" alt=\"add voucher\"></a></td>";
+ echo "<td class=\"list\"> <a href=\"services_captiveportal_vouchers_edit.php\"><img src=\"/themes/{$g['theme']}/images/icons/icon_plus.gif\" title=\"" . gettext("add voucher") . "\" width=\"17\" height=\"17\" border=\"0\" alt=\"" . gettext("add voucher") . "\"></a></td>";
}
?>
</tr>
</table>
<?php if ($pconfig['enable']): ?>
-Create, generate and activate Rolls with Vouchers that allow access through the
-captive portal for the configured time. Once a voucher is activated,
-its clock is started and runs uninterrupted until it expires. During that
-time, the voucher can be re-used from the same or a different computer. If the voucher
-is used again from another computer, the previous session is stopped.
+<?=gettext("Create, generate and activate Rolls with Vouchers that allow access through the " .
+"captive portal for the configured time. Once a voucher is activated, " .
+"its clock is started and runs uninterrupted until it expires. During that " .
+"time, the voucher can be re-used from the same or a different computer. If the voucher " .
+"is used again from another computer, the previous session is stopped"); ?>.
<?php else: ?>
-Enable Voucher support first using the checkbox above and hit Save at the bottom.</td>
+<?=gettext("Enable Voucher support first using the checkbox above and hit Save at the bottom"); ?>.</td>
<?php endif;?>
</tr>
<tr>
- <td valign="top" class="vncellreq">Voucher public key</td>
+ <td valign="top" class="vncellreq"><?=gettext("Voucher public key"); ?></td>
<td class="vtable">
<textarea name="publickey" cols="65" rows="4" id="publickey" class="formpre"><?=htmlspecialchars($pconfig['publickey']);?></textarea>
<br>
- Paste an RSA public key (64 Bit or smaller) in PEM format here. This key is used to decrypt vouchers.</td>
+ <?=gettext("Paste an RSA public key (64 Bit or smaller) in PEM format here. This key is used to decrypt vouchers"); ?>.</td>
</tr>
<tr>
- <td valign="top" class="vncell">Voucher private key</td>
+ <td valign="top" class="vncell"><?=gettext("Voucher private key"); ?></td>
<td class="vtable">
<textarea name="privatekey" cols="65" rows="5" id="privatekey" class="formpre"><?=htmlspecialchars($pconfig['privatekey']);?></textarea>
<br>
- Paste an RSA private key (64 Bit or smaller) in PEM format here. This key is only used to generate encrypted vouchers and doesn't need to be available if the vouchers have been generated offline.</td>
+ <?=gettext("Paste an RSA private key (64 Bit or smaller) in PEM format here. This key is only used to generate encrypted vouchers and doesn't need to be available if the vouchers have been generated offline"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Character set</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Character set"); ?></td>
<td width="78%" class="vtable">
<input name="charset" type="text" class="formfld" id="charset" size="80" value="<?=htmlspecialchars($pconfig['charset']);?>">
<br>
- Tickets are generated with the specified character set. It should contain printable characters (numbers, lower case and upper case letters) that are hard to confuse with others. Avoid e.g. 0/O and l/1.</td>
+ <?=gettext("Tickets are generated with the specified character set. It should contain printable characters (numbers, lower case and upper case letters) that are hard to confuse with others. Avoid e.g. 0/O and l/1"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"># of Roll Bits</td>
+ <td width="22%" valign="top" class="vncellreq"># <?=gettext("of Roll Bits"); ?></td>
<td width="78%" class="vtable">
<input name="rollbits" type="text" class="formfld" id="rollbits" size="2" value="<?=htmlspecialchars($pconfig['rollbits']);?>">
<br>
- Reserves a range in each voucher to store the Roll# it belongs to. Allowed range: 1..31. Sum of Roll+Ticket+Checksum bits must be one Bit less than the RSA key size.</td>
+ <?=gettext("Reserves a range in each voucher to store the Roll# it belongs to. Allowed range: 1..31. Sum of Roll+Ticket+Checksum bits must be one Bit less than the RSA key size"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"># of Ticket Bits</td>
+ <td width="22%" valign="top" class="vncellreq"># <?=gettext("of Ticket Bits"); ?></td>
<td width="78%" class="vtable">
<input name="ticketbits" type="text" class="formfld" id="ticketbits" size="2" value="<?=htmlspecialchars($pconfig['ticketbits']);?>">
<br>
- Reserves a range in each voucher to store the Ticket# it belongs to. Allowed range: 1..16. Using 16 bits allows a roll to have up to 65535 vouchers. A bit array, stored in RAM and in the config, is used to mark if a voucher has been used. A bit array for 65535 vouchers requires 8 KB of storage.</td>
+ <?=gettext("Reserves a range in each voucher to store the Ticket# it belongs to. Allowed range: 1..16. Using 16 bits allows a roll to have up to 65535 vouchers. A bit array, stored in RAM and in the config, is used to mark if a voucher has been used. A bit array for 65535 vouchers requires 8 KB of storage"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"># of Checksum Bits</td>
+ <td width="22%" valign="top" class="vncellreq"># <?=gettext("of Checksum Bits"); ?></td>
<td width="78%" class="vtable">
<input name="checksumbits" type="text" class="formfld" id="checksumbits" size="2" value="<?=htmlspecialchars($pconfig['checksumbits']);?>">
<br>
- Reserves a range in each voucher to store a simple checksum over Roll# and Ticket#. Allowed range is 0..31.</td>
+ <?=gettext("Reserves a range in each voucher to store a simple checksum over Roll# and Ticket#. Allowed range is 0..31"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Magic Number</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Magic Number"); ?></td>
<td width="78%" class="vtable">
<input name="magic" type="text" class="formfld" id="magic" size="20" value="<?=htmlspecialchars($pconfig['magic']);?>">
<br>
- Magic number stored in every voucher. Verified during voucher check. Size depends on how many bits are left by Roll+Ticket+Checksum bits. If all bits are used, no magic number will be used and checked.</td>
+ <?=gettext("Magic number stored in every voucher. Verified during voucher check. Size depends on how many bits are left by Roll+Ticket+Checksum bits. If all bits are used, no magic number will be used and checked"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Save Interval</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Save Interval"); ?></td>
<td width="78%" class="vtable">
<input name="saveinterval" type="text" class="formfld" id="saveinterval" size="4" value="<?=htmlspecialchars($pconfig['saveinterval']);?>">
- Minutes<br>
- The list of active and used vouchers can be stored in the system's configuration file once every x minutes to survive power outages. No save is done if no new vouchers have been activated. Enter 0 to never write runtime state to XML config.</td>
+ <?=gettext("Minutes"); ?><br>
+ <?=gettext("The list of active and used vouchers can be stored in the system's configuration file once every x minutes to survive power outages. No save is done if no new vouchers have been activated. Enter 0 to never write runtime state to XML config"); ?>.</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Invalid Voucher Message</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Invalid Voucher Message"); ?></td>
<td width="78%" class="vtable">
<input name="msgnoaccess" type="text" class="formfld" id="msgnoaccess" size="80" value="<?=htmlspecialchars($pconfig['msgnoaccess']);?>">
- <br>Error message displayed for invalid vouchers on captive portal error page ($PORTAL_MESSAGE$).</td>
+ <br><?=gettext("Error message displayed for invalid vouchers on captive portal error page"); ?> ($PORTAL_MESSAGE$).</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Expired Voucher Message</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Expired Voucher Message"); ?></td>
<td width="78%" class="vtable">
<input name="msgexpired" type="text" class="formfld" id="msgexpired" size="80" value="<?=htmlspecialchars($pconfig['msgexpired']);?>">
- <br>Error message displayed for expired vouchers on captive portal error page ($PORTAL_MESSAGE$).</td>
+ <br><?=gettext("Error message displayed for expired vouchers on captive portal error page"); ?> ($PORTAL_MESSAGE$).</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save" onClick="enable_change(true)">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onClick="enable_change(true)">
</td>
</tr>
<tr>
<td colspan="2" class="list"><p class="vexpl">
- <span class="red"><strong> Note:<br> </strong></span>
- Changing any Voucher parameter (apart from managing the list of Rolls) on this page will render existing vouchers useless if they were generated with different settings.
+ <span class="red"><strong> <?=gettext("Note"); ?>:<br> </strong></span>
+ <?=gettext("Changing any Voucher parameter (apart from managing the list of Rolls) on this page will render existing vouchers useless if they were generated with different settings"); ?>.
</p>
</td>
</tr>
diff --git a/usr/local/www/services_captiveportal_vouchers_edit.php b/usr/local/www/services_captiveportal_vouchers_edit.php
index cacbb61..932837e 100644
--- a/usr/local/www/services_captiveportal_vouchers_edit.php
+++ b/usr/local/www/services_captiveportal_vouchers_edit.php
@@ -35,7 +35,6 @@
##|*MATCH=services_captiveportal_vouchers_edit.php*
##|-PRIV
-$pgtitle = array("Services", "Captive portal", "Edit Voucher Rolls");
$statusurl = "status_captiveportal_vouchers.php";
$logurl = "diag_logs_auth.php";
@@ -46,6 +45,8 @@ require("shaper.inc");
require("captiveportal.inc");
require_once("voucher.inc");
+$pgtitle = array(gettext("Services"), gettext("Captive portal"), gettext("Edit Voucher Rolls"));
+
if (!is_array($config['voucher'])) {
$config['voucher'] = array();
}
@@ -76,26 +77,26 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "number count minutes");
- $reqdfieldsn = explode(",", "Number,Count,minutes");
+ $reqdfieldsn = array(gettext("Number"),gettext("Count"),gettext("minutes"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
// Look for duplicate roll #
foreach($a_roll as $re) {
if($re['number'] == $_POST['number']) {
- $input_errors[] = "Roll number {$_POST['number']} already exists.";
+ $input_errors[] = sprintf(gettext("Roll number %s already exists."), $_POST['number']);
break;
}
}
if (!is_numeric($_POST['number']) || $_POST['number'] >= $maxnumber)
- $input_errors[] = "Roll number must be numeric and less than $maxnumber";
+ $input_errors[] = sprintf(gettext("Roll number must be numeric and less than %s"), $maxnumber);
if (!is_numeric($_POST['count']) || $_POST['count'] < 1 || $_POST['count'] > $maxcount)
- $input_errors[] = "A roll has at least one voucher and less than $maxcount.";
+ $input_errors[] = sprintf(gettext("A roll has at least one voucher and less than %s."), $maxcount);
if (!is_numeric($_POST['minutes']) || $_POST['minutes'] < 1)
- $input_errors[] = "Each voucher must be good for at least 1 minute.";
+ $input_errors[] = gettext("Each voucher must be good for at least 1 minute.");
if (!$input_errors) {
@@ -115,7 +116,7 @@ if ($_POST) {
$rollent['active'] = array();
voucher_write_used_db($rollent['number'], $rollent['used']);
voucher_write_active_db($rollent['number'], array()); // create empty DB
- voucher_log(LOG_INFO, "All {$rollent['count']} vouchers from Roll {$rollent['number']} marked unused");
+ voucher_log(LOG_INFO,printf(gettext("All %s vouchers from Roll %s marked unused"), $rollent['count'], $rollent['number']));
} else {
// existing roll has been modified but without changing the count
// read active and used DB from ramdisk and store it in XML config
@@ -154,41 +155,41 @@ include("head.inc");
<form action="services_captiveportal_vouchers_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="content pane">
<tr>
- <td width="22%" valign="top" class="vncellreq">Roll#</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Roll"); ?>#</td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="number" type="text" class="formfld" id="number" size="10" value="<?=htmlspecialchars($pconfig['number']);?>">
<br>
- <span class="vexpl">Enter the Roll# (0..<?=htmlspecialchars($maxnumber);?>) found on top of the generated/printed vouchers.</span>
+ <span class="vexpl"><?=gettext("Enter the Roll"); ?># (0..<?=htmlspecialchars($maxnumber);?>) <?=gettext("found on top of the generated/printed vouchers"); ?>.</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Minutes per Ticket</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Minutes per Ticket"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="minutes" type="text" class="formfld" id="minutes" size="10" value="<?=htmlspecialchars($pconfig['minutes']);?>">
<br>
- <span class="vexpl">Defines the time in minutes that a user is allowed access. The clock starts ticking the first time a voucher is used for authentication.</span>
+ <span class="vexpl"><?=gettext("Defines the time in minutes that a user is allowed access. The clock starts ticking the first time a voucher is used for authentication"); ?>.</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Count</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Count"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="count" type="text" class="formfld" id="count" size="10" value="<?=htmlspecialchars($pconfig['count']);?>">
<br>
- <span class="vexpl">Enter the number of vouchers (1..<?=htmlspecialchars($maxcount);?>) found on top of the generated/printed vouchers. WARNING: Changing this number for an existing Roll will mark all vouchers as unused again.</span>
+ <span class="vexpl"><?=gettext("Enter the number of vouchers"); ?> (1..<?=htmlspecialchars($maxcount);?>) <?=gettext("found on top of the generated/printed vouchers. WARNING: Changing this number for an existing Roll will mark all vouchers as unused again"); ?>.</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Comment</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Comment"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="comment" type="text" class="formfld" id="comment" size="60" value="<?=htmlspecialchars($pconfig['comment']);?>">
<br>
- <span class="vexpl">Can be used to further identify this roll. Ignored by the system.</span>
+ <span class="vexpl"><?=gettext("Can be used to further identify this roll. Ignored by the system"); ?>.</span>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
<?php if (isset($id) && $a_roll[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php
index 9f4d9d6..c3889c0 100755
--- a/usr/local/www/services_dhcp.php
+++ b/usr/local/www/services_dhcp.php
@@ -113,7 +113,7 @@ if($config['installedpackages']['olsrd']) {
}
if (!$_GET['if'])
- $savemsg = "<b>The DHCP Server can only be enabled on interfaces configured with static IP addresses.<p> Only interfaces configured with a static IP will be shown.</p></b>";
+ $savemsg = "<b>" . gettext("The DHCP Server can only be enabled on interfaces configured with static IP addresses") . ".<p>" . gettext("Only interfaces configured with a static IP will be shown") . ".</p></b>";
$iflist = get_configured_interface_with_descr();
@@ -208,47 +208,47 @@ if ($_POST) {
/* input validation */
if ($_POST['enable']) {
$reqdfields = explode(" ", "range_from range_to");
- $reqdfieldsn = explode(",", "Range begin,Range end");
+ $reqdfieldsn = array(gettext("Range begin"),gettext("Range end"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['range_from'] && !is_ipaddr($_POST['range_from'])))
- $input_errors[] = "A valid range must be specified.";
+ $input_errors[] = gettext("A valid range must be specified.");
if (($_POST['range_to'] && !is_ipaddr($_POST['range_to'])))
- $input_errors[] = "A valid range must be specified.";
+ $input_errors[] = gettext("A valid range must be specified.");
if (($_POST['gateway'] && !is_ipaddr($_POST['gateway'])))
- $input_errors[] = "A valid IP address must be specified for the gateway.";
+ $input_errors[] = gettext("A valid IP address must be specified for the gateway.");
if (($_POST['wins1'] && !is_ipaddr($_POST['wins1'])) || ($_POST['wins2'] && !is_ipaddr($_POST['wins2'])))
- $input_errors[] = "A valid IP address must be specified for the primary/secondary WINS servers.";
+ $input_errors[] = gettext("A valid IP address must be specified for the primary/secondary WINS servers.");
if (($_POST['dns1'] && !is_ipaddr($_POST['dns1'])) || ($_POST['dns2'] && !is_ipaddr($_POST['dns2'])))
- $input_errors[] = "A valid IP address must be specified for the primary/secondary DNS servers.";
+ $input_errors[] = gettext("A valid IP address must be specified for the primary/secondary DNS servers.");
if ($_POST['deftime'] && (!is_numeric($_POST['deftime']) || ($_POST['deftime'] < 60)))
- $input_errors[] = "The default lease time must be at least 60 seconds.";
+ $input_errors[] = gettext("The default lease time must be at least 60 seconds.");
if ($_POST['maxtime'] && (!is_numeric($_POST['maxtime']) || ($_POST['maxtime'] < 60) || ($_POST['maxtime'] <= $_POST['deftime'])))
- $input_errors[] = "The maximum lease time must be at least 60 seconds and higher than the default lease time.";
+ $input_errors[] = gettext("The maximum lease time must be at least 60 seconds and higher than the default lease time.");
if (($_POST['ddnsdomain'] && !is_domain($_POST['ddnsdomain'])))
- $input_errors[] = "A valid domain name must be specified for the dynamic DNS registration.";
+ $input_errors[] = gettext("A valid domain name must be specified for the dynamic DNS registration.");
if (($_POST['ntp1'] && !is_ipaddr($_POST['ntp1'])) || ($_POST['ntp2'] && !is_ipaddr($_POST['ntp2'])))
- $input_errors[] = "A valid IP address must be specified for the primary/secondary NTP servers.";
+ $input_errors[] = gettext("A valid IP address must be specified for the primary/secondary NTP servers.");
if (($_POST['domain'] && !is_domain($_POST['domain'])))
- $input_errors[] = "A valid domain name must be specified for the DNS domain.";
+ $input_errors[] = gettext("A valid domain name must be specified for the DNS domain.");
if (($_POST['tftp'] && (!is_ipaddr($_POST['tftp']) && !is_domain($_POST['tftp']))))
- $input_errors[] = "A valid IP address or hostname must be specified for the TFTP server.";
+ $input_errors[] = gettext("A valid IP address or hostname must be specified for the TFTP server.");
if (($_POST['nextserver'] && !is_ipaddr($_POST['nextserver'])))
- $input_errors[] = "A valid IP address must be specified for the network boot server.";
+ $input_errors[] = gettext("A valid IP address must be specified for the network boot server.");
if(gen_subnet($ifcfgip, $ifcfgsn) == $_POST['range_from'])
- $input_errors[] = "You cannot use the network address in the starting subnet range.";
+ $input_errors[] = gettext("You cannot use the network address in the starting subnet range.");
if(gen_subnet_max($ifcfgip, $ifcfgsn) == $_POST['range_to'])
- $input_errors[] = "You cannot use the broadcast address in the ending subnet range.";
+ $input_errors[] = gettext("You cannot use the broadcast address in the ending subnet range.");
// Disallow a range that includes the virtualip
if (is_array($config['virtualip']['vip'])) {
foreach($config['virtualip']['vip'] as $vip) {
if($vip['interface'] == $if)
if($vip['subnet'] && is_inrange($vip['subnet'], $_POST['range_from'], $_POST['range_to']))
- $input_errors[] = "The subnet range cannot overlap with virtual IP address {$vip['subnet']}.";
+ $input_errors[] = printf(gettext("The subnet range cannot overlap with virtual IP address %s."),$vip['subnet']);
}
}
@@ -266,15 +266,15 @@ if ($_POST) {
if ((ip2ulong($_POST['range_from']) < $subnet_start) || (ip2ulong($_POST['range_from']) > $subnet_end) ||
(ip2ulong($_POST['range_to']) < $subnet_start) || (ip2ulong($_POST['range_to']) > $subnet_end)) {
- $input_errors[] = "The specified range lies outside of the current subnet.";
+ $input_errors[] = gettext("The specified range lies outside of the current subnet.");
}
if (ip2ulong($_POST['range_from']) > ip2ulong($_POST['range_to']))
- $input_errors[] = "The range is invalid (first element higher than second element).";
+ $input_errors[] = gettext("The range is invalid (first element higher than second element).");
/* make sure that the DHCP Relay isn't enabled on this interface */
if (isset($config['dhcrelay'][$if]['enable']))
- $input_errors[] = "You must disable the DHCP relay on the {$iflist[$if]} interface before enabling the DHCP server.";
+ $input_errors[] = printf(gettext("You must disable the DHCP relay on the %s interface before enabling the DHCP server."),$iflist[$if]);
}
}
@@ -376,7 +376,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("Services","DHCP server");
+$pgtitle = array(gettext("Services"),gettext("DHCP server"));
$statusurl = "status_dhcp_leases.php";
$logurl = "diag_logs_dhcp.php";
@@ -470,7 +470,7 @@ include("head.inc");
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php
if ($dhcrelay_enabled) {
- echo "DHCP Relay is currently enabled. Cannot enable the DHCP Server service while the DHCP Relay is enabled on any interface.";
+ echo gettext("DHCP Relay is currently enabled. Cannot enable the DHCP Server service while the DHCP Relay is enabled on any interface.");
include("fend.inc");
echo "</body>";
echo "</html>";
@@ -478,7 +478,7 @@ include("head.inc");
}
?>
<?php if (is_subsystem_dirty('staticmaps')): ?><p>
-<?php print_info_box_np("The static mapping configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The static mapping configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
@@ -517,31 +517,31 @@ include("head.inc");
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable">
<input name="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(false)">
- <strong>Enable DHCP server on
- <?=htmlspecialchars($iflist[$if]);?>
- interface</strong></td>
+ <strong><?php printf(gettext("Enable DHCP server on " .
+ "%s " .
+ "interface"),htmlspecialchars($iflist[$if]));?></strong></td>
</tr>
<tr>
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable">
<input name="denyunknown" id="denyunknown" type="checkbox" value="yes" <?php if ($pconfig['denyunknown']) echo "checked"; ?>>
- <strong>Deny unknown clients</strong><br>
- If this is checked, only the clients defined below will get DHCP leases from this server. </td>
+ <strong><?=gettext("Deny unknown clients");?></strong><br>
+ <?=gettext("If this is checked, only the clients defined below will get DHCP leases from this server. ");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Subnet</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Subnet");?></td>
<td width="78%" class="vtable">
<?=gen_subnet($ifcfgip, $ifcfgsn);?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Subnet mask</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Subnet mask");?></td>
<td width="78%" class="vtable">
<?=gen_subnet_mask($ifcfgsn);?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Available range</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Available range");?></td>
<td width="78%" class="vtable">
<?php
$range_from = ip2long(long2ip32(ip2long($ifcfgip) & gen_subnet_mask_long($ifcfgsn)));
@@ -558,7 +558,7 @@ include("head.inc");
</tr>
<?php if($is_olsr_enabled): ?>
<tr>
- <td width="22%" valign="top" class="vncellreq">Subnet Mask</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Subnet Mask");?></td>
<td width="78%" class="vtable">
<select name="netmask" class="formselect" id="netmask">
<?php
@@ -575,115 +575,115 @@ include("head.inc");
</tr>
<?php endif; ?>
<tr>
- <td width="22%" valign="top" class="vncellreq">Range</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Range");?></td>
<td width="78%" class="vtable">
<input name="range_from" type="text" class="formfld unknown" id="range_from" size="20" value="<?=htmlspecialchars($pconfig['range_from']);?>">
- &nbsp;to&nbsp; <input name="range_to" type="text" class="formfld unknown" id="range_to" size="20" value="<?=htmlspecialchars($pconfig['range_to']);?>">
+ &nbsp;<?=gettext("to"); ?>&nbsp; <input name="range_to" type="text" class="formfld unknown" id="range_to" size="20" value="<?=htmlspecialchars($pconfig['range_to']);?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">WINS servers</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("WINS servers");?></td>
<td width="78%" class="vtable">
<input name="wins1" type="text" class="formfld unknown" id="wins1" size="20" value="<?=htmlspecialchars($pconfig['wins1']);?>"><br>
<input name="wins2" type="text" class="formfld unknown" id="wins2" size="20" value="<?=htmlspecialchars($pconfig['wins2']);?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">DNS servers</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("DNS servers");?></td>
<td width="78%" class="vtable">
<input name="dns1" type="text" class="formfld unknown" id="dns1" size="20" value="<?=htmlspecialchars($pconfig['dns1']);?>"><br>
<input name="dns2" type="text" class="formfld unknown" id="dns2" size="20" value="<?=htmlspecialchars($pconfig['dns2']);?>"><br>
- NOTE: leave blank to use the system default DNS servers - this interface's IP if DNS forwarder is enabled, otherwise the servers configured on the General page.
+ <?=gettext("NOTE: leave blank to use the system default DNS servers - this interface's IP if DNS forwarder is enabled, otherwise the servers configured on the General page.");?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Gateway</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Gateway");?></td>
<td width="78%" class="vtable">
<input name="gateway" type="text" class="formfld host" id="gateway" size="20" value="<?=htmlspecialchars($pconfig['gateway']);?>"><br>
- The default is to use the IP on this interface of the firewall as the gateway. Specify an alternate gateway here if this is not the correct gateway for your network.
+ <?=gettext("The default is to use the IP on this interface of the firewall as the gateway. Specify an alternate gateway here if this is not the correct gateway for your network.");?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Domain name</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Domain name");?></td>
<td width="78%" class="vtable">
<input name="domain" type="text" class="formfld unknown" id="domain" size="20" value="<?=htmlspecialchars($pconfig['domain']);?>"><br>
- The default is to use the domain name of this system as the default domain name provided by DHCP. You may specify an alternate domain name here.
+ <?=gettext("The default is to use the domain name of this system as the default domain name provided by DHCP. You may specify an alternate domain name here.");?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Domain search list</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Domain search list");?></td>
<td width="78%" class="vtable">
<input name="domainsearchlist" type="text" class="formfld unknown" id="domainsearchlist" size="20" value="<?=htmlspecialchars($pconfig['domainsearchlist']);?>"><br>
- The DHCP server can optionally provide a domain search list.
+ <?=gettext("The DHCP server can optionally provide a domain search list.");?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Default lease time</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Default lease time");?></td>
<td width="78%" class="vtable">
<input name="deftime" type="text" class="formfld unknown" id="deftime" size="10" value="<?=htmlspecialchars($pconfig['deftime']);?>">
- seconds<br>
- This is used for clients that do not ask for a specific
- expiration time.<br>
- The default is 7200 seconds.
+ <?=gettext("seconds");?><br>
+ <?=gettext("This is used for clients that do not ask for a specific " .
+ "expiration time"); ?>.<br>
+ <?=gettext("The default is 7200 seconds");?>.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Maximum lease time</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Maximum lease time");?></td>
<td width="78%" class="vtable">
<input name="maxtime" type="text" class="formfld unknown" id="maxtime" size="10" value="<?=htmlspecialchars($pconfig['maxtime']);?>">
- seconds<br>
- This is the maximum lease time for clients that ask
- for a specific expiration time.<br>
- The default is 86400 seconds.
+ <?=gettext("seconds");?><br>
+ <?=gettext("This is the maximum lease time for clients that ask".
+ " for a specific expiration time"); ?>.<br>
+ <?=gettext("The default is 86400 seconds");?>.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Failover peer IP:</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Failover peer IP");?>:</td>
<td width="78%" class="vtable">
<input name="failover_peerip" type="text" class="formfld host" id="failover_peerip" size="20" value="<?=htmlspecialchars($pconfig['failover_peerip']);?>"><br>
- Leave blank to disable. Enter the interface IP address of the other machine. Machines must be using CARP.
+ <?=gettext("Leave blank to disable. Enter the interface IP address of the other machine. Machines must be using CARP.");?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Static ARP</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Static ARP");?></td>
<td width="78%" class="vtable">
<table>
<tr>
<td>
<input valign="middle" type="checkbox" value="yes" name="staticarp" id="staticarp" <?php if($pconfig['staticarp']) echo " checked"; ?>>&nbsp;
</td>
- <td><b>Enable Static ARP entries</b></td>
+ <td><b><?=gettext("Enable Static ARP entries");?></b></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
- <span class="red"><strong>Note:</strong></span> Only the machines listed below will be able to communicate with the firewall on this NIC.
+ <span class="red"><strong><?=gettext("Note");?>:</strong></span> <?=gettext("Only the machines listed below will be able to communicate with the firewall on this NIC.");?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Dynamic DNS</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Dynamic DNS");?></td>
<td width="78%" class="vtable">
<div id="showddnsbox">
- <input type="button" onClick="show_ddns_config()" value="Advanced"></input> - Show Dynamic DNS</a>
+ <input type="button" onClick="show_ddns_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show Dynamic DNS");?></a>
</div>
<div id="showddns" style="display:none">
<input valign="middle" type="checkbox" value="yes" name="ddnsupdate" id="ddnsupdate" <?php if($pconfig['ddnsupdate']) echo " checked"; ?>>&nbsp;
- <b>Enable registration of DHCP client names in DNS.</b><br />
+ <b><?=gettext("Enable registration of DHCP client names in DNS.");?></b><br />
<p>
<input name="ddnsdomain" type="text" class="formfld unknown" id="ddnsdomain" size="20" value="<?=htmlspecialchars($pconfig['ddnsdomain']);?>"><br />
- Note: Leave blank to disable dynamic DNS registration.<br />
- Enter the dynamic DNS domain which will be used to register client names in the DNS server.
+ <?=gettext("Note: Leave blank to disable dynamic DNS registration");?>.<br />
+ <?=gettext("Enter the dynamic DNS domain which will be used to register client names in the DNS server");?>.
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">NTP servers</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("NTP servers");?></td>
<td width="78%" class="vtable">
<div id="showntpbox">
- <input type="button" onClick="show_ntp_config()" value="Advanced"></input> - Show NTP configuration</a>
+ <input type="button" onClick="show_ntp_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show NTP configuration");?></a>
</div>
<div id="showntp" style="display:none">
<input name="ntp1" type="text" class="formfld unknown" id="ntp1" size="20" value="<?=htmlspecialchars($pconfig['ntp1']);?>"><br>
@@ -692,56 +692,56 @@ include("head.inc");
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">TFTP server</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("TFTP server");?></td>
<td width="78%" class="vtable">
<div id="showtftpbox">
- <input type="button" onClick="show_tftp_config()" value="Advanced"></input> - Show TFTP configuration</a>
+ <input type="button" onClick="show_tftp_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show TFTP configuration");?></a>
</div>
<div id="showtftp" style="display:none">
<input name="tftp" type="text" class="formfld unknown" id="tftp" size="50" value="<?=htmlspecialchars($pconfig['tftp']);?>"><br>
- Leave blank to disable. Enter a full hostname or IP for the TFTP server.
+ <?=gettext("Leave blank to disable. Enter a full hostname or IP for the TFTP server.");?>
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">LDAP URI</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("LDAP URI");?></td>
<td width="78%" class="vtable">
<div id="showldapbox">
- <input type="button" onClick="show_ldap_config()" value="Advanced"></input> - Show LDAP configuration</a>
+ <input type="button" onClick="show_ldap_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show LDAP configuration");?></a>
</div>
<div id="showldap" style="display:none">
<input name="ldap" type="text" class="formfld unknown" id="ldap" size="80" value="<?=htmlspecialchars($pconfig['ldap']);?>"><br>
- Leave blank to disable. Enter a full URI for the LDAP server in the form ldap://ldap.example.com/dc=example,dc=com
+ <?=gettext("Leave blank to disable. Enter a full URI for the LDAP server in the form ldap://ldap.example.com/dc=example,dc=com");?>
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Enable network booting</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Enable network booting");?></td>
<td width="78%" class="vtable">
<div id="shownetbootbox">
- <input type="button" onClick="show_netboot_config()" value="Advanced"></input> - Show Network booting</a>
+ <input type="button" onClick="show_netboot_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show Network booting");?></a>
</div>
<div id="shownetboot" style="display:none">
<input valign="middle" type="checkbox" value="yes" name="netboot" id="netboot" <?php if($pconfig['netboot']) echo " checked"; ?>>&nbsp;
- <b>Enables network booting.</b>
+ <b><?=gettext("Enables network booting.");?></b>
<p>
- Enter the IP of the <b>next-server</b>
+ <?=gettext("Enter the IP of the"); ?> <b><?=gettext("next-server"); ?></b>
<input name="nextserver" type="text" class="formfld unknown" id="nextserver" size="20" value="<?=htmlspecialchars($pconfig['nextserver']);?>">
- and the filename
+ <?=gettext("and the filename");?>
<input name="filename" type="text" class="formfld unknown" id="filename" size="20" value="<?=htmlspecialchars($pconfig['filename']);?>"><br>
- Note: You need both a filename and a boot server configured for this to work!
+ <?=gettext("Note: You need both a filename and a boot server configured for this to work!");?>
<p>
- Enter the <b>root-path</b>-string
+ <?=gettext("Enter the"); ?> <b><?=gettext("root-path"); ?></b>-<?=gettext("string");?>
<input name="rootpath" type="text" class="formfld unknown" id="rootpath" size="90" value="<?=htmlspecialchars($pconfig['rootpath']);?>"><br>
- Note: string-format: iscsi:(servername):(protocol):(port):(LUN):targetname
+ <?=gettext("Note: string-format: iscsi:(servername):(protocol):(port):(LUN):targetname");?>
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Additional BOOTP/DHCP Options</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Additional BOOTP/DHCP Options");?></td>
<td width="78%" class="vtable">
<div id="shownumbervaluebox">
- <input type="button" onClick="show_shownumbervalue()" value="Advanced"></input> - Show Additional BOOTP/DHCP Options</a>
+ <input type="button" onClick="show_shownumbervalue()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show Additional BOOTP/DHCP Options");?></a>
</div>
<div id="shownumbervalue" style="display:none">
<table id="maintable">
@@ -749,13 +749,13 @@ include("head.inc");
<tr>
<td colspan="3">
<div style="padding:5px; margin-top: 16px; margin-bottom: 16px; border:1px dashed #000066; background-color: #ffffff; color: #000000; font-size: 8pt;" id="itemhelp">
- Enter the DHCP option number and the value for each item you would like to include in the DHCP lease information. For a list of available options please visit this <a href="http://www.iana.org/assignments/bootp-dhcp-parameters/" target="_new">URL</a>.
+ <?=gettext("Enter the DHCP option number and the value for each item you would like to include in the DHCP lease information. For a list of available options please visit this"); ?> <a href="http://www.iana.org/assignments/bootp-dhcp-parameters/" target="_new"><?=gettext("URL"); ?></a>
</div>
</td>
</tr>
<tr>
- <td><div id="onecolumn">Number</div></td>
- <td><div id="twocolumn">Value</div></td>
+ <td><div id="onecolumn"><?=gettext("Number");?></div></td>
+ <td><div id="twocolumn"><?=gettext("Value");?></div></td>
</tr>
<?php $counter = 0; ?>
<?php
@@ -774,7 +774,7 @@ include("head.inc");
<input autocomplete="off" name="value<?php echo $counter; ?>" type="text" class="formfld" id="value<?php echo $counter; ?>" size="55" value="<?=htmlspecialchars($value);?>" />
</td>
<td>
- <input type="image" src="/themes/<?echo $g['theme'];?>/images/icons/icon_x.gif" onclick="removeRow(this); return false;" value="Delete" />
+ <input type="image" src="/themes/<?echo $g['theme'];?>/images/icons/icon_x.gif" onclick="removeRow(this); return false;" value="<?=gettext("Delete");?>" />
</td>
</tr>
<?php $counter++; ?>
@@ -784,7 +784,7 @@ include("head.inc");
</tfoot>
</table>
<a onclick="javascript:addRowTo('maintable', 'formfldalias'); return false;" href="#">
- <img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" title="add another entry" />
+ <img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" title="<?=gettext("add another entry");?>" />
</a>
<script type="text/javascript">
field_counter_js = 2;
@@ -800,29 +800,29 @@ include("head.inc");
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input name="if" type="hidden" value="<?=$if;?>">
- <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onclick="enable_change(true)">
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
- <td width="78%"> <p><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>The DNS servers entered in <a href="system.php">System:
- General setup</a> (or the <a href="services_dnsmasq.php">DNS
- forwarder</a>, if enabled) </span><span class="vexpl">will
- be assigned to clients by the DHCP server.<br>
+ <td width="78%"> <p><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br>
+ </strong></span><?=gettext("The DNS servers entered in"); ?> <a href="system.php"><?=gettext("System: " .
+ "General setup"); ?></a> <?=gettext("(or the"); ?> <a href="services_dnsmasq.php"><?=gettext("DNS " .
+ "forwarder"); ?></a>, <?=gettext("if enabled)"); ?> </span><span class="vexpl"><?=gettext("will " .
+ "be assigned to clients by the DHCP server"); ?>.<br>
<br>
- The DHCP lease table can be viewed on the <a href="status_dhcp_leases.php">Status:
- DHCP leases</a> page.<br>
+ <?=gettext("The DHCP lease table can be viewed on the"); ?> <a href="status_dhcp_leases.php"><?=gettext("Status: " .
+ "DHCP leases"); ?></a> <?=gettext("page"); ?>.<br>
</span></p>
</td>
</tr>
</table>
<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="25%" class="listhdrr">MAC address</td>
- <td width="15%" class="listhdrr">IP address</td>
- <td width="20%" class="listhdrr">Hostname</td>
- <td width="30%" class="listhdr">Description</td>
+ <td width="25%" class="listhdrr"><?=gettext("MAC address");?></td>
+ <td width="15%" class="listhdrr"><?=gettext("IP address");?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Hostname");?></td>
+ <td width="30%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -852,7 +852,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle"><a href="services_dhcp_edit.php?if=<?=$if;?>&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a></td>
- <td valign="middle"><a href="services_dhcp.php?if=<?=$if;?>&act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this mapping?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ <td valign="middle"><a href="services_dhcp.php?if=<?=$if;?>&act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this mapping?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
diff --git a/usr/local/www/services_dhcp_edit.php b/usr/local/www/services_dhcp_edit.php
index dd98fa4..26d3580 100755
--- a/usr/local/www/services_dhcp_edit.php
+++ b/usr/local/www/services_dhcp_edit.php
@@ -101,7 +101,7 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "mac");
- $reqdfieldsn = explode(",", "MAC address");
+ $reqdfieldsn = array(gettext("MAC address"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -110,21 +110,21 @@ if ($_POST) {
if ($_POST['hostname']) {
if (!is_hostname($_POST['hostname'])) {
- $input_errors[] = "The hostname can only contain the characters A-Z, 0-9 and '-'.";
+ $input_errors[] = gettext("The hostname can only contain the characters A-Z, 0-9 and '-'.");
} else {
if (strpos($_POST['hostname'],'.')) {
- $input_errors[] = "A valid hostname is specified, but the domain name part should be omitted";
+ $input_errors[] = gettext("A valid hostname is specified, but the domain name part should be omitted");
}
}
}
if (($_POST['ipaddr'] && !is_ipaddr($_POST['ipaddr']))) {
- $input_errors[] = "A valid IP address must be specified.";
+ $input_errors[] = gettext("A valid IP address must be specified.");
}
if (($_POST['mac'] && !is_macaddr($_POST['mac']))) {
- $input_errors[] = "A valid MAC address must be specified.";
+ $input_errors[] = gettext("A valid MAC address must be specified.");
}
if($static_arp_enabled && !$_POST['ipaddr']) {
- $input_errors[] = "Static ARP is enabled. You must specify an IP address.";
+ $input_errors[] = gettext("Static ARP is enabled. You must specify an IP address.");
}
/* check for overlaps */
@@ -133,7 +133,7 @@ if ($_POST) {
continue;
if ((($mapent['hostname'] == $_POST['hostname']) && $mapent['hostname']) || ($mapent['mac'] == $_POST['mac'])) {
- $input_errors[] = "This Hostname, IP or MAC address already exists.";
+ $input_errors[] = gettext("This Hostname, IP or MAC address already exists.");
break;
}
}
@@ -146,7 +146,7 @@ if ($_POST) {
$lansubnet_end = ip2ulong(long2ip32(ip2long($ifcfgip) | (~gen_subnet_mask_long($ifcfgsn))));
if ((ip2ulong($_POST['ipaddr']) < $lansubnet_start) ||
(ip2ulong($_POST['ipaddr']) > $lansubnet_end)) {
- $input_errors[] = "The IP address must lie in the {$ifcfgdescr} subnet.";
+ $input_errors[] = sprintf(gettext("The IP address must lie in the %s subnet."),$ifcfgdescr);
}
}
@@ -176,7 +176,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services","DHCP","Edit static mapping");
+$pgtitle = array(gettext("Services"),gettext("DHCP"),gettext("Edit static mapping"));
$statusurl = "status_dhcp_leases.php";
$logurl = "diag_logs_dhcp.php";
@@ -190,10 +190,10 @@ include("head.inc");
<form action="services_dhcp_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Static DHCP Mapping</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Static DHCP Mapping");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">MAC address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("MAC address");?></td>
<td width="78%" class="vtable">
<input name="mac" type="text" class="formfld unknown" id="mac" size="30" value="<?=htmlspecialchars($pconfig['mac']);?>">
<?php
@@ -201,35 +201,35 @@ include("head.inc");
$mac = `/usr/sbin/arp -an | grep {$ip} | cut -d" " -f4`;
$mac = str_replace("\n","",$mac);
?>
- <a OnClick="document.forms[0].mac.value='<?=$mac?>';" href="#">Copy my MAC address</a>
+ <a OnClick="document.forms[0].mac.value='<?=$mac?>';" href="#"><?=gettext("Copy my MAC address");?></a>
<br>
- <span class="vexpl">Enter a MAC address in the following format:
- xx:xx:xx:xx:xx:xx</span></td>
+ <span class="vexpl"><?=gettext("Enter a MAC address in the following format: ".
+ "xx:xx:xx:xx:xx:xx");?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">IP address</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("IP address");?></td>
<td width="78%" class="vtable">
<input name="ipaddr" type="text" class="formfld unknown" id="ipaddr" size="20" value="<?=htmlspecialchars($pconfig['ipaddr']);?>">
<br>
- If no IP address is given, one will be dynamically allocated from the pool.</td>
+ <?=gettext("If no IP address is given, one will be dynamically allocated from the pool.");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Hostname</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Hostname");?></td>
<td width="78%" class="vtable">
<input name="hostname" type="text" class="formfld unknown" id="hostname" size="20" value="<?=htmlspecialchars($pconfig['hostname']);?>">
- <br> <span class="vexpl">Name of the host, without domain part.</span></td>
+ <br> <span class="vexpl"><?=gettext("Name of the host, without domain part.");?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here ".
+ "for your reference (not parsed).");?></span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input class="formbtn" type="button" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()">
<?php if (isset($id) && $a_maps[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/services_dhcp_relay.php b/usr/local/www/services_dhcp_relay.php
index 0075fa2..c9e8fd1 100755
--- a/usr/local/www/services_dhcp_relay.php
+++ b/usr/local/www/services_dhcp_relay.php
@@ -106,17 +106,17 @@ if ($_POST) {
if (isset($_POST['proxydhcp']))
$_POST['server'] = get_wan_dhcp_server();
$reqdfields = explode(" ", "server");
- $reqdfieldsn = explode(",", "Destination Server");
+ $reqdfieldsn = array(gettext("Destination Server"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['server'] && !is_ipaddr($_POST['server'])))
- $input_errors[] = "A valid Destination Server IP address must be specified.";
+ $input_errors[] = gettext("A valid Destination Server IP address must be specified.");
if (!$input_errors) {
/* make sure that the DHCP server isn't enabled on this interface */
if (isset($config['dhcpd'][$if]['enable']))
- $input_errors[] = "You must disable the DHCP server on the {$iflist[$if]} interface before enabling the DHCP Relay.";
+ $input_errors[] = sprintf(gettext("You must disable the DHCP server on the %s interface before enabling the DHCP Relay."),$iflist[$if]);
/* make sure that the DHCP server isn't running on any of the implied interfaces */
foreach ($config['interfaces'] as $ifname => $ifcfg) {
$subnet = $ifcfg['ipaddr'] . "/" . $ifcfg['subnet'];
@@ -126,11 +126,11 @@ if ($_POST) {
if (!isset($destif))
$destif = "wan";
if (isset($config['dhcpd'][$destif]['enable']))
- $input_errors[] = "You must disable the DHCP server on the {$destif} interface before enabling the DHCP Relay.";
+ $input_errors[] = sprintf(gettext("You must disable the DHCP server on the %s interface before enabling the DHCP Relay."),$destif);
/* if proxydhcp is selected, make sure DHCP is enabled on WAN */
if (isset($config['dhcrelay']['proxydhcp']) && $config['interfaces']['wan']['ipaddr'] != "dhcp")
- $input_errors[] = "You must have DHCP active on the WAN interface before enabling the DHCP proxy option.";
+ $input_errors[] = gettext("You must have DHCP active on the WAN interface before enabling the DHCP proxy option.");
}
}
@@ -149,7 +149,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services","DHCP Relay");
+$pgtitle = array(gettext("Services"),gettext("DHCP Relay"));
include("head.inc");
?>
@@ -181,7 +181,7 @@ function enable_change(enable_over) {
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php
if ($dhcpd_enabled) {
- echo "DHCP Server is currently enabled. Cannot enable the DHCP Relay service while the DHCP Server is enabled on any interface.";
+ echo gettext("DHCP Server is currently enabled. Cannot enable the DHCP Relay service while the DHCP Server is enabled on any interface.");
include("fend.inc");
echo "</body>";
echo "</html>";
@@ -214,31 +214,31 @@ function enable_change(enable_over) {
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable">
<input name="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(false)">
- <strong>Enable DHCP relay on
- <?=htmlspecialchars($iflist[$if]);?>
- interface</strong></td>
+ <strong><?php printf(gettext("Enable DHCP relay on " .
+ "%s " .
+ "interface"),htmlspecialchars($iflist[$if]));?></strong></td>
</tr>
<tr>
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable">
<input name="agentoption" type="checkbox" value="yes" <?php if ($pconfig['agentoption']) echo "checked"; ?>>
- <strong>Append circuit ID and agent ID to requests</strong><br>
- If this is checked, the DHCP relay will append the circuit ID (<?=$g['product_name'];?> interface number) and the agent ID to the DHCP request.</td>
+ <strong><?=gettext("Append circuit ID and agent ID to requests"); ?></strong><br>
+ <?php printf(gettext("If this is checked, the DHCP relay will append the circuit ID (%s interface number) and the agent ID to the DHCP request."), $g['product_name']); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Destination server</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Destination server");?></td>
<td width="78%" class="vtable">
- <input name="proxydhcp" type="checkbox" value="yes" <?php if ($pconfig['proxydhcp']) echo "checked"; ?> onClick="enable_change(false)"> Proxy requests to DHCP server on WAN subnet
+ <input name="proxydhcp" type="checkbox" value="yes" <?php if ($pconfig['proxydhcp']) echo "checked"; ?> onClick="enable_change(false)"> <?=gettext("Proxy requests to DHCP server on WAN subnet");?>
<br><br><input name="server" type="text" class="formfld unknown" id="server" size="20" value="<?=htmlspecialchars($pconfig['server']);?>">
<br>
- This is the IP address of the server to which the DHCP packet is relayed. Select "Proxy requests to DHCP server on WAN subnet" to relay DHCP packets to the server that was used on the WAN interface.
+ <?=gettext("This is the IP address of the server to which the DHCP packet is relayed. Select \"Proxy requests to DHCP server on WAN subnet\" to relay DHCP packets to the server that was used on the WAN interface.");?>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input name="if" type="hidden" value="<?=$if;?>">
- <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onclick="enable_change(true)">
</td>
</tr>
</table>
diff --git a/usr/local/www/services_dnsmasq.php b/usr/local/www/services_dnsmasq.php
index 4215655..910065b 100755
--- a/usr/local/www/services_dnsmasq.php
+++ b/usr/local/www/services_dnsmasq.php
@@ -100,7 +100,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("Services","DNS forwarder");
+$pgtitle = array(gettext("Services"),gettext("DNS forwarder"));
include("head.inc");
?>
@@ -121,65 +121,65 @@ function enable_change(enable_over) {
<form action="services_dnsmasq.php" method="post" name="iform" id="iform">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('hosts')): ?><p>
-<?php print_info_box_np("The DNS forwarder configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The DNS forwarder configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
<td class="vtable"><p>
<input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable'] == "yes") echo "checked";?> onClick="enable_change(false)">
- <strong>Enable DNS forwarder<br>
+ <strong><?=gettext("Enable DNS forwarder");?><br>
</strong></p></td>
</tr>
<tr>
<td class="vtable"><p>
<input name="regdhcp" type="checkbox" id="regdhcp" value="yes" <?php if ($pconfig['regdhcp'] == "yes") echo "checked";?>>
- <strong>Register DHCP leases in DNS forwarder<br>
- </strong>If this option is set, then machines that specify
- their hostname when requesting a DHCP lease will be registered
- in the DNS forwarder, so that their name can be resolved.
- You should also set the domain in <a href="system.php">System:
- General setup</a> to the proper value.</p>
+ <strong><?=gettext("Register DHCP leases in DNS forwarder");?><br>
+ </strong><?php printf(gettext("If this option is set, then machines that specify".
+ " their hostname when requesting a DHCP lease will be registered".
+ " in the DNS forwarder, so that their name can be resolved.".
+ " You should also set the domain in %sSystem:".
+ " General setup%s to the proper value."),'<a href="system.php">','</a>')?></p>
</td>
</tr>
<tr>
<td class="vtable"><p>
<input name="regdhcpstatic" type="checkbox" id="regdhcpstatic" value="yes" <?php if ($pconfig['regdhcpstatic'] == "yes") echo "checked";?>>
- <strong>Register DHCP static mappings in DNS forwarder<br>
- </strong>If this option is set, then DHCP static mappings will
- be registered in the DNS forwarder, so that their name can be
- resolved. You should also set the domain in <a href="system.php">
- System: General setup</a> to the proper value.</p>
+ <strong><?=gettext("Register DHCP static mappings in DNS forwarder");?><br>
+ </strong><?php printf(gettext("If this option is set, then DHCP static mappings will ".
+ "be registered in the DNS forwarder, so that their name can be ".
+ "resolved. You should also set the domain in %s".
+ "System: General setup%s to the proper value."),'<a href="system.php">','</a>');?></p>
</td>
</tr>
<tr>
- <td> <input name="submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
+ <td> <input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)">
</td>
</tr>
<tr>
- <td><p><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>If the DNS forwarder is enabled, the DHCP
- service (if enabled) will automatically serve the LAN IP
- address as a DNS server to DHCP clients so they will use
- the forwarder. The DNS forwarder will use the DNS servers
- entered in <a href="system.php">System: General setup</a>
- or those obtained via DHCP or PPP on WAN if the &quot;Allow
- DNS server list to be overridden by DHCP/PPP on WAN&quot;
- is checked. If you don't use that option (or if you use
- a static IP address on WAN), you must manually specify at
- least one DNS server on the <a href="system.php">System:
- General setup</a> page.<br>
+ <td><p><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br>
+ </strong></span><?php printf(gettext("If the DNS forwarder is enabled, the DHCP".
+ " service (if enabled) will automatically serve the LAN IP".
+ " address as a DNS server to DHCP clients so they will use".
+ " the forwarder. The DNS forwarder will use the DNS servers".
+ " entered in %sSystem: General setup%s".
+ " or those obtained via DHCP or PPP on WAN if the &quot;Allow".
+ " DNS server list to be overridden by DHCP/PPP on WAN&quot;".
+ " is checked. If you don't use that option (or if you use".
+ " a static IP address on WAN), you must manually specify at".
+ " least one DNS server on the %sSystem:".
+ "General setup%s page."),'<a href="system.php">','</a>','<a href="system.php">','</a>');?><br>
<br>
- You may enter records that override the results from the
- forwarders below.</span></p></td>
+ <?=gettext("You may enter records that override the results from the".
+ " forwarders below.");?></span></p></td>
</tr>
</table>
&nbsp;<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="20%" class="listhdrr">Host</td>
- <td width="25%" class="listhdrr">Domain</td>
- <td width="20%" class="listhdrr">IP</td>
- <td width="25%" class="listhdr">Description</td>
+ <td width="20%" class="listhdrr"><?=gettext("Host");?></td>
+ <td width="25%" class="listhdrr"><?=gettext("Domain");?></td>
+ <td width="20%" class="listhdrr"><?=gettext("IP");?></td>
+ <td width="25%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -207,7 +207,7 @@ function enable_change(enable_over) {
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle"><a href="services_dnsmasq_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a></td>
- <td><a href="services_dnsmasq.php?type=host&act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this host?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ <td><a href="services_dnsmasq.php?type=host&act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this host?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
</table>
</tr>
@@ -227,16 +227,16 @@ function enable_change(enable_over) {
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr><td>&nbsp;</td></tr>
<tr>
- <td><p>Below you can override an entire domain by specifying an
- authoritative DNS server to be queried for that domain.</p></td>
+ <td><p><?=gettext("Below you can override an entire domain by specifying an".
+ " authoritative DNS server to be queried for that domain.");?></p></td>
</tr>
</table>
&nbsp;<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="35%" class="listhdrr">Domain</td>
- <td width="20%" class="listhdrr">IP</td>
- <td width="35%" class="listhdr">Description</td>
+ <td width="35%" class="listhdrr"><?=gettext("Domain");?></td>
+ <td width="20%" class="listhdrr"><?=gettext("IP");?></td>
+ <td width="35%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -258,7 +258,7 @@ function enable_change(enable_over) {
<?=htmlspecialchars($doment['descr']);?>&nbsp;
</td>
<td valign="middle" nowrap class="list"> <a href="services_dnsmasq_domainoverride_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
- &nbsp;<a href="services_dnsmasq.php?act=del&type=doverride&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this domain override?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ &nbsp;<a href="services_dnsmasq.php?act=del&type=doverride&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this domain override?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
diff --git a/usr/local/www/services_dnsmasq_domainoverride_edit.php b/usr/local/www/services_dnsmasq_domainoverride_edit.php
index 8570198..e55b6ee 100755
--- a/usr/local/www/services_dnsmasq_domainoverride_edit.php
+++ b/usr/local/www/services_dnsmasq_domainoverride_edit.php
@@ -62,15 +62,15 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "domain ip");
- $reqdfieldsn = explode(",", "Domain,IP address");
+ $reqdfieldsn = array(gettext("Domain"),gettext("IP address"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['domain'] && !is_domain($_POST['domain']))) {
- $input_errors[] = "A valid domain must be specified.";
+ $input_errors[] = gettext("A valid domain must be specified.");
}
if (($_POST['ip'] && !is_ipaddr($_POST['ip']))) {
- $input_errors[] = "A valid IP address must be specified.";
+ $input_errors[] = gettext("A valid IP address must be specified.");
}
if (!$input_errors) {
@@ -93,7 +93,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services","DNS forwarder","Edit Domain Override");
+$pgtitle = array(gettext("Services"),gettext("DNS forwarder"),gettext("Edit Domain Override"));
include("head.inc");
?>
@@ -104,30 +104,30 @@ include("head.inc");
<form action="services_dnsmasq_domainoverride_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td width="22%" valign="top" class="vncellreq">Domain</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Domain");?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="domain" type="text" class="formfld unknown" id="domain" size="40" value="<?=htmlspecialchars($pconfig['domain']);?>">
- <br> <span class="vexpl">Domain to override (NOTE: this does not have to be a valid TLD!)<br>
- e.g. <em>test</em></span></td>
+ <br> <span class="vexpl"><?=gettext("Domain to override (NOTE: this does not have to be a valid TLD!)"); ?><br>
+ <?=gettext("e.g."); ?> <em><?=gettext("test"); ?></em></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">IP address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("IP address");?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="ip" type="text" class="formfld unknown" id="ip" size="40" value="<?=htmlspecialchars($pconfig['ip']);?>">
- <br> <span class="vexpl">IP address of the authoritative DNS server for this domain<br>
- e.g. <em>192.168.100.100</em></span></td>
+ <br> <span class="vexpl"><?=gettext("IP address of the authoritative DNS server for this domain"); ?><br>
+ <?=gettext("e.g."); ?> <em>192.168.100.100</em></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here".
+ " for your reference (not parsed).");?></span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input class="formbtn" type="button" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()">
<?php if (isset($id) && $a_domainOverrides[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/services_dnsmasq_edit.php b/usr/local/www/services_dnsmasq_edit.php
index 7438758..a80ff00 100755
--- a/usr/local/www/services_dnsmasq_edit.php
+++ b/usr/local/www/services_dnsmasq_edit.php
@@ -77,18 +77,18 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "domain ip");
- $reqdfieldsn = explode(",", "Domain,IP address");
+ $reqdfieldsn = array(gettext("Domain"),gettext("IP address"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['host'] && !is_hostname($_POST['host'])))
- $input_errors[] = "The hostname can only contain the characters A-Z, 0-9 and '-'.";
+ $input_errors[] = gettext("The hostname can only contain the characters A-Z, 0-9 and '-'.");
if (($_POST['domain'] && !is_domain($_POST['domain'])))
- $input_errors[] = "A valid domain must be specified.";
+ $input_errors[] = gettext("A valid domain must be specified.");
if (($_POST['ip'] && !is_ipaddr($_POST['ip'])))
- $input_errors[] = "A valid IP address must be specified.";
+ $input_errors[] = gettext("A valid IP address must be specified.");
/* check for overlaps */
foreach ($a_hosts as $hostent) {
@@ -96,7 +96,7 @@ if ($_POST) {
continue;
if (($hostent['host'] == $_POST['host']) && ($hostent['domain'] == $_POST['domain'])) {
- $input_errors[] = "This host/domain already exists.";
+ $input_errors[] = gettext("This host/domain already exists.");
break;
}
}
@@ -123,7 +123,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services","DNS forwarder","Edit host");
+$pgtitle = array(gettext("Services"),gettext("DNS forwarder"),gettext("Edit host"));
include("head.inc");
?>
@@ -134,41 +134,41 @@ include("head.inc");
<form action="services_dnsmasq_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Edit DNS Forwarder entry</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit DNS Forwarder entry");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Host</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Host");?></td>
<td width="78%" class="vtable">
<input name="host" type="text" class="formfld" id="host" size="40" value="<?=htmlspecialchars($pconfig['host']);?>">
- <br> <span class="vexpl">Name of the host, without
- domain part<br>
- e.g. <em>myhost</em></span></td>
+ <br> <span class="vexpl"><?=gettext("Name of the host, without".
+ " domain part"); ?><br>
+ <?=gettext("e.g."); ?> <em><?=gettext("myhost"); ?></em></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Domain</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Domain");?></td>
<td width="78%" class="vtable">
<input name="domain" type="text" class="formfld" id="domain" size="40" value="<?=htmlspecialchars($pconfig['domain']);?>">
- <br> <span class="vexpl">Domain of the host<br>
- e.g. <em>example.com</em></span></td>
+ <br> <span class="vexpl"><?=gettext("Domain of the host"); ?><br>
+ <?=gettext("e.g."); ?> <em><?=gettext("example.com"); ?></em></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">IP address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("IP address");?></td>
<td width="78%" class="vtable">
<input name="ip" type="text" class="formfld" id="ip" size="40" value="<?=htmlspecialchars($pconfig['ip']);?>">
- <br> <span class="vexpl">IP address of the host<br>
- e.g. <em>192.168.100.100</em></span></td>
+ <br> <span class="vexpl"><?=gettext("IP address of the host"); ?><br>
+ <?=gettext("e.g."); ?> <em>192.168.100.100</em></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here".
+ " for your reference (not parsed).");?></span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input class="formbtn" type="button" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()">
<?php if (isset($id) && $a_hosts[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/services_dyndns.php b/usr/local/www/services_dyndns.php
index c68227e..b9d2e01 100755
--- a/usr/local/www/services_dyndns.php
+++ b/usr/local/www/services_dyndns.php
@@ -73,7 +73,7 @@ function dyndnsCheckIP($int) {
return $ip_address;
}
-$pgtitle = array("Services", "Dynamic DNS clients");
+$pgtitle = array(gettext("Services"), gettext("Dynamic DNS clients"));
include("head.inc");
?>
@@ -86,8 +86,8 @@ include("head.inc");
<tr><td>
<?php
$tab_array = array();
- $tab_array[] = array("DynDns", true, "services_dyndns.php");
- $tab_array[] = array("RFC 2136", false, "services_rfc2136.php");
+ $tab_array[] = array(gettext("DynDns"), true, "services_dyndns.php");
+ $tab_array[] = array(gettext("RFC 2136"), false, "services_rfc2136.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -97,10 +97,10 @@ include("head.inc");
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="5%" class="listhdrr"></td>
- <td width="15%" class="listhdrr">Service</td>
- <td width="20%" class="listhdrr">Hostname</td>
- <td width="20%" class="listhdrr">Cached IP</td>
- <td width="50%" class="listhdr">Description</td>
+ <td width="15%" class="listhdrr"><?=gettext("Service");?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Hostname");?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Cached IP");?></td>
+ <td width="50%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list"></td>
</tr>
<?php $i = 0; foreach ($a_dyndns as $dyndns): ?>
@@ -148,7 +148,7 @@ include("head.inc");
<?=htmlspecialchars($dyndns['descr']);?>&nbsp;
</td>
<td valign="middle" nowrap class="list"> <a href="services_dyndns_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
- &nbsp;<a href="services_dyndns.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this entry?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ &nbsp;<a href="services_dyndns.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this entry?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
@@ -157,9 +157,9 @@ include("head.inc");
</tr>
<tr>
<td colspan="3" class="list"><p class="vexpl"><span class="red"><strong>
- Note:<br>
+ <?=gettext("Note");?>:<br>
</strong></span>
- IP addresses appearing in green are up to date with Dynamic DNS provider.
+ <?=gettext("IP addresses appearing in green are up to date with Dynamic DNS provider.");?>
</td>
<td class="list">&nbsp;</td>
</tr>
diff --git a/usr/local/www/services_dyndns_edit.php b/usr/local/www/services_dyndns_edit.php
index c79734a..bf3c207 100644
--- a/usr/local/www/services_dyndns_edit.php
+++ b/usr/local/www/services_dyndns_edit.php
@@ -81,14 +81,14 @@ if ($_POST) {
$reqdfields = array();
$reqdfieldsn = array();
$reqdfields = array_merge($reqdfields, explode(" ", "host username password type"));
- $reqdfieldsn = array_merge($reqdfieldsn, explode(",", "Hostname,Username,Password,Service type"));
+ $reqdfieldsn = array_merge($reqdfieldsn, array(gettext("Hostname"),gettext("Username"),gettext("Password"),gettext("Service type")));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['mx'] && !is_domain($_POST['mx'])))
- $input_errors[] = "The MX contains invalid characters.";
+ $input_errors[] = gettext("The MX contains invalid characters.");
if (($_POST['username'] && !is_dyndns_username($_POST['username'])) || $_POST['username'] == "")
- $input_errors[] = "The username contains invalid characters.";
+ $input_errors[] = gettext("The username contains invalid characters.");
if (!$input_errors) {
$dyndns = array();
@@ -124,7 +124,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services","Dynamic DNS client");
+$pgtitle = array(gettext("Services"),gettext("Dynamic DNS client"));
include("head.inc");
?>
@@ -138,18 +138,18 @@ include("head.inc");
<tr>
<td colspan="2" valign="top" class="optsect_t">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr><td class="optsect_s"><strong>Dynamic DNS client</strong></td></tr>
+ <tr><td class="optsect_s"><strong><?=gettext("Dynamic DNS client");?></strong></td></tr>
</table>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Disable</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Disable");?></td>
<td width="78%" class="vtable">
- <input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?>>
+ <input name="enable" type="checkbox" id="enable" value="<?=gettext("yes");?>" <?php if ($pconfig['enable']) echo "checked"; ?>>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Service type</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Service type");?></td>
<td width="78%" class="vtable">
<select name="type" class="formselect" id="type">
<?php
@@ -163,7 +163,7 @@ include("head.inc");
</select></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Interface to monitor</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to monitor");?></td>
<td width="78%" class="vtable">
<select name="interface" class="formselect" id="interface">
<?php $iflist = get_configured_interface_with_descr();
@@ -175,47 +175,47 @@ include("head.inc");
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Hostname</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname");?></td>
<td width="78%" class="vtable">
<input name="host" type="text" class="formfld unknown" id="host" size="30" value="<?=htmlspecialchars($pconfig['host']);?>">
<br>
<span class="vexpl">
- <span class="red"><strong>Note:<br></strong>
+ <span class="red"><strong><?=gettext("Note");?>:<br></strong>
</span>
- Enter the complete host/domain name. example: myhost.dyndns.org
+ <?=gettext("Enter the complete host/domain name. example: myhost.dyndns.org");?>
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">MX</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("MX"); ?></td>
<td width="78%" class="vtable">
<input name="mx" type="text" class="formfld unknown" id="mx" size="30" value="<?=htmlspecialchars($pconfig['mx']);?>">
<br>
- Note: With DynDNS service you can only use a hostname, not an IP address.
+ <?=gettext("Note: With DynDNS service you can only use a hostname, not an IP address.");?>
<br>
- Set this option only if you need a special MX record. Not
- all services support this.</td>
+ <?=gettext("Set this option only if you need a special MX record. Not".
+ " all services support this.");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Wildcards</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Wildcards"); ?></td>
<td width="78%" class="vtable">
<input name="wildcard" type="checkbox" id="wildcard" value="yes" <?php if ($pconfig['wildcard']) echo "checked"; ?>>
- Enable Wildcard</td>
+ <?=gettext("Enable ");?><?=gettext("Wildcard"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Username</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Username");?></td>
<td width="78%" class="vtable">
<input name="username" type="text" class="formfld user" id="username" size="20" value="<?=htmlspecialchars($pconfig['username']);?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Password</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Password");?></td>
<td width="78%" class="vtable">
<input name="password" type="password" class="formfld pwd" id="password" size="20" value="<?=htmlspecialchars($pconfig['password']);?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="60" value="<?=htmlspecialchars($pconfig['descr']);?>">
</td>
@@ -223,8 +223,8 @@ include("head.inc");
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save" onClick="enable_change(true)">
- <a href="services_dyndns.php"><input name="cancel" type="button" class="formbtn" value="Cancel"></a>
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onClick="enable_change(true)">
+ <a href="services_dyndns.php"><input name="cancel" type="button" class="formbtn" value="<?=gettext("Cancel");?>"></a>
<?php if (isset($id) && $a_dyndns[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
@@ -232,10 +232,10 @@ include("head.inc");
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
- <td width="78%"><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>You must configure a DNS server in <a href="system.php">System:
- General setup</a> or allow the DNS server list to be overridden
- by DHCP/PPP on WAN for dynamic DNS updates to work.</span></td>
+ <td width="78%"><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br>
+ </strong></span><?php printf(gettext("You must configure a DNS server in %sSystem:
+ General setup%s or allow the DNS server list to be overridden
+ by DHCP/PPP on WAN for dynamic DNS updates to work."),'<a href="system.php">','</a>');?></span></td>
</tr>
</table>
</form>
diff --git a/usr/local/www/services_igmpproxy.php b/usr/local/www/services_igmpproxy.php
index 7141b5d..4fc531d 100755
--- a/usr/local/www/services_igmpproxy.php
+++ b/usr/local/www/services_igmpproxy.php
@@ -77,7 +77,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("Services","IGMP Proxy");
+$pgtitle = array(gettext("Services"),gettext("IGMP Proxy"));
include("head.inc");
?>
@@ -87,20 +87,20 @@ include("head.inc");
<form action="services_igmpproxy.php" method="post">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('igmpproxy')): ?><p>
-<?php print_info_box_np("The IGMP entry list has been changed.<br>You must apply the changes in order for them to take effect.");?>
+<?php print_info_box_np(gettext("The IGMP entry list has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?>
<?php endif; ?>
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="15%" class="listhdrr">Name</td>
- <td width="10%" class="listhdrr">Type</td>
- <td width="25%" class="listhdrr">Values</td>
- <td width="25%" class="listhdr">Description</td>
+ <td width="15%" class="listhdrr"><?=gettext("Name");?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Type");?></td>
+ <td width="25%" class="listhdrr"><?=gettext("Values");?></td>
+ <td width="25%" class="listhdr"><?=gettext("Description");?></td>
<td width="5%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle" width="17">&nbsp;</td>
- <td valign="middle"><a href="services_igmpproxy_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="add a new igmpentry"></a></td>
+ <td valign="middle"><a href="services_igmpproxy_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new igmpentry");?>"></a></td>
</tr>
</table>
</td>
@@ -130,8 +130,8 @@ include("head.inc");
<td valign="middle" nowrap class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td valign="middle"><a href="services_igmpproxy_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="edit igmpentry"></a></td>
- <td><a href="services_igmpproxy.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this igmpentry? All elements that still use it will become invalid (e.g. filter rules)!')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="delete igmpentry"></a></td>
+ <td valign="middle"><a href="services_igmpproxy_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit igmpentry"); ?>"></a></td>
+ <td><a href="services_igmpproxy.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this igmpentry? All elements that still use it will become invalid (e.g. filter rules)!");?>')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete igmpentry");?>"></a></td>
</tr>
</table>
</td>
@@ -143,7 +143,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle" width="17">&nbsp;</td>
- <td valign="middle"><a href="services_igmpproxy_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="add a new igmpentry"></a></td>
+ <td valign="middle"><a href="services_igmpproxy_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new igmpentry");?>"></a></td>
</td>
</tr>
</table>
@@ -152,13 +152,13 @@ include("head.inc");
<tr>
<td colspan="2" width="78%">
<br />
- <input id="submit" name="submit" type="submit" class="formbtn" value="Save" />
+ <input id="submit" name="submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
<br />
</td>
</tr>
<tr>
<td class="tabcont" colspan="4">
- <p><span class="vexpl"><span class="red"><strong>Note:<br></strong></span>Please add the interface for upstream, the allowed subnets, and the downstream interfaces you would like the proxy to allow. Only one 'upstream' interface can be configured.</span></p>
+ <p><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br></strong></span><?=gettext("Please add the interface for upstream, the allowed subnets, and the downstream interfaces you would like the proxy to allow. Only one 'upstream' interface can be configured.");?></span></p>
</td>
</tr>
</table>
diff --git a/usr/local/www/services_igmpproxy_edit.php b/usr/local/www/services_igmpproxy_edit.php
index a6f2571..d2acfc5 100755
--- a/usr/local/www/services_igmpproxy_edit.php
+++ b/usr/local/www/services_igmpproxy_edit.php
@@ -43,7 +43,7 @@
##|*MATCH=services_igmpproxy_edit.php*
##|-PRIV
-$pgtitle = array("Firewall","IGMP Proxy", "Edit");
+$pgtitle = array(gettext("Firewall"),gettext("IGMP Proxy"), gettext("Edit"));
require("guiconfig.inc");
@@ -76,7 +76,7 @@ if ($_POST) {
if (isset($id) && $id == $pid)
continue;
if ($proxyentry['type'] == "upstream" && $proxyentry['ifname'] != $_POST['interface'])
- $input_errors[] = "Only one 'upstream' interface can be configured.";
+ $input_errors[] = gettext("Only one 'upstream' interface can be configured.");
}
}
$igmpentry = array();
@@ -154,10 +154,10 @@ include("head.inc");
<form action="services_igmpproxy_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">IGMP Proxy Edit</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("IGMP Proxy Edit");?></td>
</tr>
<tr>
- <td valign="top" class="vncellreq">Interface</td>
+ <td valign="top" class="vncellreq"><?=gettext("Interface");?></td>
<td class="vtable"> <select name="ifname" id="ifname" >
<?php $iflist = get_configured_interface_with_descr();
foreach ($iflist as $ifnam => $ifdescr) {
@@ -171,56 +171,56 @@ include("head.inc");
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=$pconfig['descr'];?>" />
<br />
<span class="vexpl">
- You may enter a description here for your reference (not parsed).
+ <?=gettext("You may enter a description here for your reference (not parsed).");?>
</span>
</td>
</tr>
<tr>
- <td valign="top" class="vncellreq">Type</td>
+ <td valign="top" class="vncellreq"><?=gettext("Type");?></td>
<td class="vtable">
<select name="type" class="formselect" id="type" >
- <option value="upstream" <?php if ($pconfig['type'] == "upstream") echo "selected"; ?>>Upstream Interface</option>
- <option value="downstream" <?php if ($pconfig['type'] == "downstream") echo "selected"; ?>>Downstream Interface</option>
+ <option value="upstream" <?php if ($pconfig['type'] == "upstream") echo "selected"; ?>><?=gettext("Upstream Interface");?></option>
+ <option value="downstream" <?php if ($pconfig['type'] == "downstream") echo "selected"; ?>><?=gettext("Downstream Interface");?></option>
</select>
<br />
<span class="vexpl">
- The <b>upstream</b> network interface is the outgoing interface which is
- responsible for communicating to available multicast data sources.
- There can only be one upstream interface.
+ <?=gettext("The <b>upstream</b> network interface is the outgoing interface which is".
+ " responsible for communicating to available multicast data sources.".
+ " There can only be one upstream interface.");?>
</span>
<br />
<span class="vexpl">
- <b>Downstream</b> network interfaces are the distribution interfaces to the
- destination networks, where multicast clients can join groups and
- receive multicast data. One or more downstream interfaces must be configured.
+ <b><?=gettext("Downstream"); ?></b> <?=gettext("network interfaces are the distribution interfaces to the".
+ " destination networks, where multicast clients can join groups and".
+ " receive multicast data. One or more downstream interfaces must be configured.");?>
</span>
</td>
</tr>
<tr>
- <td valign="top" class="vncell">Threshold</td>
+ <td valign="top" class="vncell"><?=gettext("Threshold");?></td>
<td class="vtable">
<input name="threshold" class="formfld unknown" id="threshold" value="<?php echo $pconfig['threshold'];?>">
<br />
<span class="vexpl">
- Defines the TTL threshold for the network interface. Packets
- with a lower TTL than the threshols value will be ignored. This
- setting is optional, and by default the threshold is 1.
+ <?=gettext("Defines the TTL threshold for the network interface. Packets".
+ " with a lower TTL than the threshols value will be ignored. This".
+ " setting is optional, and by default the threshold is 1.");?>
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"><div id="addressnetworkport">Network (s)</div></td>
+ <td width="22%" valign="top" class="vncellreq"><div id="addressnetworkport"><?=gettext("Network (s)");?></div></td>
<td width="78%" class="vtable">
<table id="maintable">
<tbody>
<tr>
- <td><div id="onecolumn">Network</div></td>
- <td><div id="twocolumn">CIDR</div></td>
+ <td><div id="onecolumn"><?=gettext("Network");?></div></td>
+ <td><div id="twocolumn"><?=gettext("CIDR");?></div></td>
</tr>
<?php
@@ -254,7 +254,7 @@ include("head.inc");
</select>
</td>
<td>
- <input type="image" src="/themes/<?echo $g['theme'];?>/images/icons/icon_x.gif" onclick="removeRow(this); return false;" value="Delete" />
+ <input type="image" src="/themes/<?echo $g['theme'];?>/images/icons/icon_x.gif" onclick="removeRow(this); return false;" value="<?=gettext("Delete");?>" />
</td>
</tr>
<?php
@@ -269,15 +269,15 @@ include("head.inc");
</tfoot>
</table>
<a onclick="javascript:addRowTo('maintable'); return false;" href="#">
- <img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" title="add another entry" />
+ <img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" title="<?=gettext("add another entry");?>" />
</a>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input id="submit" name="submit" type="submit" class="formbtn" value="Save" />
- <a href="services_igmpproxy.php"><input id="cancelbutton" name="cancelbutton" type="button" class="formbtn" value="Cancel" /></a>
+ <input id="submit" name="submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
+ <a href="services_igmpproxy.php"><input id="cancelbutton" name="cancelbutton" type="button" class="formbtn" value="<?=gettext("Cancel");?>" /></a>
<?php if (isset($id) && $a_igmpproxy[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>" />
<?php endif; ?>
diff --git a/usr/local/www/services_rfc2136.php b/usr/local/www/services_rfc2136.php
index a8e9913..563ee26 100644
--- a/usr/local/www/services_rfc2136.php
+++ b/usr/local/www/services_rfc2136.php
@@ -52,7 +52,7 @@ if ($_GET['act'] == "del") {
exit;
}
-$pgtitle = array("Services", "RFC 2136 clients");
+$pgtitle = array(gettext("Services"), gettext("RFC 2136 clients"));
include("head.inc");
?>
@@ -65,8 +65,8 @@ include("head.inc");
<tr><td>
<?php
$tab_array = array();
- $tab_array[] = array("DynDns", false, "services_dyndns.php");
- $tab_array[] = array("RFC 2136", true, "services_rfc2136.php");
+ $tab_array[] = array(gettext("DynDns"), false, "services_dyndns.php");
+ $tab_array[] = array(gettext("RFC 2136"), true, "services_rfc2136.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -76,8 +76,8 @@ include("head.inc");
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="5%" class="listhdrr"></td>
- <td width="25%" class="listhdrr">Hostname</td>
- <td width="60%" class="listhdr">Description</td>
+ <td width="25%" class="listhdrr"><?=gettext("Hostname");?></td>
+ <td width="60%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list"></td>
</tr>
<?php $i = 0; foreach ($a_rfc2136 as $rfc2136): ?>
@@ -96,7 +96,7 @@ include("head.inc");
<?=htmlspecialchars($rfc2136['descr']);?>&nbsp;
</td>
<td valign="middle" nowrap class="list"> <a href="services_rfc2136_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
- &nbsp;<a href="services_rfc2136.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this client?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ &nbsp;<a href="services_rfc2136.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this client?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
diff --git a/usr/local/www/services_rfc2136_edit.php b/usr/local/www/services_rfc2136_edit.php
index a7d9e7b..df0ea47 100644
--- a/usr/local/www/services_rfc2136_edit.php
+++ b/usr/local/www/services_rfc2136_edit.php
@@ -68,16 +68,16 @@ if ($_POST) {
$reqdfields = array();
$reqdfieldsn = array();
$reqdfields = array_merge($reqdfields, explode(" ", "host ttl keyname keydata"));
- $reqdfieldsn = array_merge($reqdfieldsn, explode(",", "Hostname,TTL,Key name,Key"));
+ $reqdfieldsn = array_merge($reqdfieldsn, array(gettext("Hostname"), gettext("TTL"), gettext("Key name"), gettext("Key")));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['host'] && !is_domain($_POST['host'])))
- $input_errors[] = "The DNS update host name contains invalid characters.";
+ $input_errors[] = gettext("The DNS update host name contains invalid characters.");
if (($_POST['ttl'] && !is_numericint($_POST['ttl'])))
- $input_errors[] = "The DNS update TTL must be an integer.";
+ $input_errors[] = gettext("The DNS update TTL must be an integer.");
if (($_POST['keyname'] && !is_domain($_POST['keyname'])))
- $input_errors[] = "The DNS update key name contains invalid characters.";
+ $input_errors[] = gettext("The DNS update key name contains invalid characters.");
if (!$input_errors) {
$rfc2136 = array();
@@ -97,7 +97,7 @@ if ($_POST) {
else
$a_rfc2136[] = $rfc2136;
- write_config("New/Edited RFC2136 dnsupdate entry was posted.");
+ write_config(gettext("New/Edited RFC2136 dnsupdate entry was posted."));
$retval = services_dnsupdate_process();
@@ -106,7 +106,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services","RFC 2136 client", "Edit");
+$pgtitle = array(gettext("Services"),gettext("RFC 2136 client"), gettext("Edit"));
include("head.inc");
?>
@@ -120,18 +120,18 @@ include("head.inc");
<tr>
<td colspan="2" valign="top" class="optsect_t">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr><td class="optsect_s"><strong>RFC 2136 client</strong></td></tr>
+ <tr><td class="optsect_s"><strong><?=gettext("RFC 2136 client");?></strong></td></tr>
</table>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Enable</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Enable");?></td>
<td width="78%" class="vtable">
<input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?>>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Interface to monitor</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to monitor");?></td>
<td width="78%" class="vtable">
<select name="interface" class="formselect" id="interface">
<?php $iflist = get_configured_interface_with_descr();
@@ -143,52 +143,52 @@ include("head.inc");
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Hostname</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname");?></td>
<td width="78%" class="vtable">
<input name="host" type="text" class="formfld unknown" id="host" size="30" value="<?=htmlspecialchars($pconfig['host']);?>">
</td>
</tr>
<tr>
- <td valign="top" class="vncellreq">TTL</td>
+ <td valign="top" class="vncellreq"><?=gettext("TTL"); ?></td>
<td class="vtable">
<input name="ttl" type="text" class="formfld unknown" id="ttl" size="6" value="<?=htmlspecialchars($pconfig['ttl']);?>">
- seconds</td>
+ <?=gettext("seconds");?></td>
</tr>
<tr>
- <td valign="top" class="vncellreq">Key name</td>
+ <td valign="top" class="vncellreq"><?=gettext("Key name");?></td>
<td class="vtable">
<input name="keyname" type="text" class="formfld unknown" id="keyname" size="30" value="<?=htmlspecialchars($pconfig['keyname']);?>">
<br>
- This must match the setting on the DNS server.</td>
+ <?=gettext("This must match the setting on the DNS server.");?></td>
</tr>
<tr>
- <td valign="top" class="vncellreq">Key type </td>
+ <td valign="top" class="vncellreq"><?=gettext("Key type");?> </td>
<td class="vtable">
- <input name="keytype" type="radio" value="zone" <?php if ($pconfig['keytype'] == "zone") echo "checked"; ?>> Zone &nbsp;
- <input name="keytype" type="radio" value="host" <?php if ($pconfig['keytype'] == "host") echo "checked"; ?>> Host &nbsp;
- <input name="keytype" type="radio" value="user" <?php if ($pconfig['keytype'] == "user") echo "checked"; ?>> User
+ <input name="keytype" type="radio" value="zone" <?php if ($pconfig['keytype'] == "zone") echo "checked"; ?>> <?=gettext("Zone");?> &nbsp;
+ <input name="keytype" type="radio" value="host" <?php if ($pconfig['keytype'] == "host") echo "checked"; ?>> <?=gettext("Host");?> &nbsp;
+ <input name="keytype" type="radio" value="user" <?php if ($pconfig['keytype'] == "user") echo "checked"; ?>><?=gettext(" User");?>
</tr>
<tr>
- <td valign="top" class="vncellreq">Key</td>
+ <td valign="top" class="vncellreq"><?=gettext("Key");?></td>
<td class="vtable">
<input name="keydata" type="text" class="formfld unknown" id="keydata" size="70" value="<?=htmlspecialchars($pconfig['keydata']);?>">
<br>
- Paste an HMAC-MD5 key here.</td>
+ <?=gettext("Paste an HMAC-MD5 key here.");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Server</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Server");?></td>
<td width="78%" class="vtable">
<input name="server" type="text" class+"formfld" id="server" size="30" value="<?=htmlspecialchars($pconfig['server'])?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Protocol</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Protocol");?></td>
<td width="78%" class="vtable">
- <input name="usetcp" type="checkbox" id="usetcp" value="yes" <?php if ($pconfig['usetcp']) echo "checked"; ?>>
- <strong>Use TCP instead of UDP</strong></td>
+ <input name="usetcp" type="checkbox" id="usetcp" value="<?=gettext("yes");?>" <?php if ($pconfig['usetcp']) echo "checked"; ?>>
+ <strong><?=gettext("Use TCP instead of UDP");?></strong></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Description</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="60" value="<?=htmlspecialchars($pconfig['descr']);?>">
</td>
@@ -196,8 +196,8 @@ include("head.inc");
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save" onClick="enable_change(true)">
- <a href="services_rfc2136.php"><input name="Cancel" type="button" class="formbtn" value="Cancel"></a>
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onClick="enable_change(true)">
+ <a href="services_rfc2136.php"><input name="Cancel" type="button" class="formbtn" value="<?=gettext("Cancel");?>"></a>
<?php if (isset($id) && $a_rfc2136[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
@@ -205,10 +205,10 @@ include("head.inc");
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
- <td width="78%"><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>You must configure a DNS server in <a href="system.php">System:
- General setup</a> or allow the DNS server list to be overridden
- by DHCP/PPP on WAN for dynamic DNS updates to work.</span></td>
+ <td width="78%"><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br>
+ </strong></span><?php printf(gettext("You must configure a DNS server in %sSystem: " .
+ "General setup %sor allow the DNS server list to be overridden " .
+ "by DHCP/PPP on WAN for dynamic DNS updates to work."),'<a href="system.php">', '</a>');?></span></td>
</tr>
</table>
</form>
diff --git a/usr/local/www/services_snmp.php b/usr/local/www/services_snmp.php
index a9f8b7b..25284ae 100755
--- a/usr/local/www/services_snmp.php
+++ b/usr/local/www/services_snmp.php
@@ -40,6 +40,7 @@
##|-PRIV
require("guiconfig.inc");
+require_once("functions.inc");
if (!is_array($config['snmpd'])) {
$config['snmpd'] = array();
@@ -84,11 +85,11 @@ if ($_POST) {
/* input validation */
if ($_POST['enable']) {
$reqdfields = explode(" ", "rocommunity");
- $reqdfieldsn = explode(",", "Community");
+ $reqdfieldsn = array(gettext("Community"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
$reqdfields = explode(" ", "pollport");
- $reqdfieldsn = explode(",", "Polling Port");
+ $reqdfieldsn = array(gettext("Polling Port"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -96,15 +97,15 @@ if ($_POST) {
if ($_POST['trapenable']) {
$reqdfields = explode(" ", "trapserver");
- $reqdfieldsn = explode(",", "Trap server");
+ $reqdfieldsn = array(gettext("Trap server"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
$reqdfields = explode(" ", "trapserverport");
- $reqdfieldsn = explode(",", "Trap server port");
+ $reqdfieldsn = array(gettext("Trap server port"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
$reqdfields = explode(" ", "trapstring");
- $reqdfieldsn = explode(",", "Trap string");
+ $reqdfieldsn = array(gettext("Trap string"));
do_input_validation($_POST, $reqdfields, $reqdfields, $reqdfieldsn, &$input_errors);
}
@@ -149,7 +150,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services","SNMP");
+$pgtitle = array(gettext("Services"),gettext("SNMP"));
include("head.inc");
?>
@@ -259,38 +260,38 @@ function enable_change(whichone) {
<tr>
<td colspan="2" valign="top" class="optsect_t">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr><td class="optsect_s"><strong>SNMP Daemon</strong></td>
- <td align="right" class="optsect_s"><input name="enable" id="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(this)"> <strong>Enable</strong></td></tr>
+ <tr><td class="optsect_s"><strong><?=gettext("SNMP Daemon");?></strong></td>
+ <td align="right" class="optsect_s"><input name="enable" id="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(this)"> <strong><?=gettext("Enable");?></strong></td></tr>
</table></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Polling Port </td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Polling Port ");?></td>
<td width="78%" class="vtable">
<input name="pollport" type="text" class="formfld unknown" id="pollport" size="40" value="<?=$pconfig['pollport'] ? htmlspecialchars($pconfig['pollport']) : htmlspecialchars(161);?>">
- <br>Enter the port to accept polling events on (default 161)</br>
+ <br><?=gettext("Enter the port to accept polling events on (default 161)");?></br>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">System location</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("System location");?></td>
<td width="78%" class="vtable">
<input name="syslocation" type="text" class="formfld unknown" id="syslocation" size="40" value="<?=htmlspecialchars($pconfig['syslocation']);?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">System contact</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("System contact");?></td>
<td width="78%" class="vtable">
<input name="syscontact" type="text" class="formfld unknown" id="syscontact" size="40" value="<?=htmlspecialchars($pconfig['syscontact']);?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Read Community String</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Read Community String");?></td>
<td width="78%" class="vtable">
<input name="rocommunity" type="text" class="formfld unknown" id="rocommunity" size="40" value="<?=htmlspecialchars($pconfig['rocommunity']);?>">
- <br>The community string is like a password, restricting access to querying SNMP to hosts knowing the community string. Use a strong value here to protect from unauthorized information disclosure.</br>
+ <br><?=gettext("The community string is like a password, restricting access to querying SNMP to hosts knowing the community string. Use a strong value here to protect from unauthorized information disclosure.");?></br>
</td>
</tr>
@@ -319,33 +320,33 @@ function enable_change(whichone) {
<tr>
<td colspan="2" valign="top" class="optsect_t">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr><td class="optsect_s"><strong>SNMP Traps</strong></td>
- <td align="right" class="optsect_s"><input name="trapenable" id="trapenable" type="checkbox" value="yes" <?php if ($pconfig['trapenable']) echo "checked"; ?> onClick="enable_change(this)"> <strong>Enable</strong></td></tr>
+ <tr><td class="optsect_s"><strong><?=gettext("SNMP Traps");?></strong></td>
+ <td align="right" class="optsect_s"><input name="trapenable" id="trapenable" type="checkbox" value="yes" <?php if ($pconfig['trapenable']) echo "checked"; ?> onClick="enable_change(this)"> <strong><?=gettext("Enable");?></strong></td></tr>
</table></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Trap server</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Trap server");?></td>
<td width="78%" class="vtable">
<input name="trapserver" type="text" class="formfld unknown" id="trapserver" size="40" value="<?=htmlspecialchars($pconfig['trapserver']);?>">
- <br>Enter trap server name</br>
+ <br><?=gettext("Enter trap server name");?></br>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Trap server port </td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Trap server port ");?></td>
<td width="78%" class="vtable">
<input name="trapserverport" type="text" class="formfld unknown" id="trapserverport" size="40" value="<?=$pconfig['trapserverport'] ? htmlspecialchars($pconfig['trapserverport']) : htmlspecialchars(162);?>">
- <br>Enter the port to send the traps to (default 162)</br>
+ <br><?=gettext("Enter the port to send the traps to (default 162)");?></br>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Enter the SNMP trap string</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Enter the SNMP trap string");?></td>
<td width="78%" class="vtable">
<input name="trapstring" type="text" class="formfld unknown" id="trapstring" size="40" value="<?=htmlspecialchars($pconfig['trapstring']);?>">
- <br>Trap string</br>
+ <br><?=gettext("Trap string");?></br>
</td>
</tr>
@@ -354,37 +355,37 @@ function enable_change(whichone) {
<tr>
<td colspan="2" valign="top" class="optsect_t">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr><td class="optsect_s"><strong>Modules</strong></td>
+ <tr><td class="optsect_s"><strong><?=gettext("Modules");?></strong></td>
<td align="right" class="optsect_s">&nbsp;</td></tr>
</table></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">SNMP Modules</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("SNMP Modules");?></td>
<td width="78%" class="vtable">
- <input name="mibii" type="checkbox" id="mibii" value="yes" <?php if ($pconfig['mibii']) echo "checked"; ?> >MibII
+ <input name="mibii" type="checkbox" id="mibii" value="yes" <?php if ($pconfig['mibii']) echo "checked"; ?> ><?=gettext("MibII"); ?>
<br />
- <input name="netgraph" type="checkbox" id="netgraph" value="yes" <?php if ($pconfig['netgraph']) echo "checked"; ?> >Netgraph
+ <input name="netgraph" type="checkbox" id="netgraph" value="yes" <?php if ($pconfig['netgraph']) echo "checked"; ?> ><?=gettext("Netgraph"); ?>
<br />
- <input name="pf" type="checkbox" id="pf" value="yes" <?php if ($pconfig['pf']) echo "checked"; ?> >PF
+ <input name="pf" type="checkbox" id="pf" value="yes" <?php if ($pconfig['pf']) echo "checked"; ?> ><?=gettext("PF"); ?>
<br />
- <input name="hostres" type="checkbox" id="hostres" value="yes" <?php if ($pconfig['hostres']) echo "checked"; ?> >Host Resources
+ <input name="hostres" type="checkbox" id="hostres" value="yes" <?php if ($pconfig['hostres']) echo "checked"; ?> ><?=gettext("Host Resources");?>
</td>
</tr>
<?php if(!$config['interfaces']['lan']): ?>
<tr>
<td width="22%" valign="top" class="vtable"></td>
<td width="78%" class="vtable">
- <input name="bindlan" type="checkbox" value="yes" <?php if ($pconfig['bindlan']) echo "checked"; ?>> <strong>Bind to LAN interface only</strong>
+ <input name="bindlan" type="checkbox" value="yes" <?php if ($pconfig['bindlan']) echo "checked"; ?>> <strong><?=gettext("Bind to LAN interface only");?></strong>
<br>
- This option can be useful when trying to access the SNMP agent
- by the LAN interface's IP address through a VPN tunnel terminated on the WAN interface.</td>
+ <?=gettext("This option can be useful when trying to access the SNMP agent".
+ " by the LAN interface's IP address through a VPN tunnel terminated on the WAN interface.");?></td>
</tr>
<?php endif; ?>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save" onClick="enable_change(true)">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onClick="enable_change(true)">
</td>
</tr>
</table>
diff --git a/usr/local/www/services_wol.php b/usr/local/www/services_wol.php
index faf0bf9..b798e39 100755
--- a/usr/local/www/services_wol.php
+++ b/usr/local/www/services_wol.php
@@ -58,10 +58,10 @@ if($_GET['wakeall'] <> "") {
get_interface_subnet($if));
/* Execute wol command and check return code. */
if(!mwexec("/usr/local/bin/wol -i {$bcip} {$mac}")){
- $savemsg .= "Sent magic packet to {$mac} ({$description}).<br>";
+ $savemsg .= sprintf(gettext("Sent magic packet to %s (%s)%s"),$mac, $description, ".<br>");
}
else {
- $savemsg .= "Please check the <a href=\"/diag_logs.php\">system log</a>, the wol command for {$description} ({$mac}) did not complete successfully.<br>";
+ $savemsg .= sprintf(gettext("Please check the %ssystem log%s, the wol command for %s (%s) did not complete successfully%s"),'<a href=\"/diag_logs.php\">','</a>',$description,$mac,".<br>");
}
}
}
@@ -83,9 +83,9 @@ if ($_POST || $_GET['mac']) {
/* input validation */
if (!$mac || !is_macaddr($mac))
- $input_errors[] = "A valid MAC address must be specified.";
+ $input_errors[] = gettext("A valid MAC address must be specified.");
if (!$if)
- $input_errors[] = "A valid interface must be specified.";
+ $input_errors[] = gettext("A valid interface must be specified.");
if (!$input_errors) {
/* determine broadcast address */
@@ -93,10 +93,10 @@ if ($_POST || $_GET['mac']) {
get_interface_subnet($if));
/* Execute wol command and check return code. */
if(!mwexec("/usr/local/bin/wol -i {$bcip} {$mac}")){
- $savemsg .= "Sent magic packet to {$mac}.";
+ $savemsg .= sprintf(gettext("Sent magic packet to %s."),$mac);
}
else {
- $savemsg .= "Please check the <a href=\"/diag_logs.php\">system log</a>, the wol command for {$mac} did not complete successfully.<br>";
+ $savemsg .= sprintf(gettext("Please check the %ssystem log%s, the wol command for %s did not complete successfully%s"),'<a href=\"/diag_logs.php\">', '</a>', $mac, ".<br>");
}
}
}
@@ -110,7 +110,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("Services","Wake on LAN");
+$pgtitle = array(gettext("Services"),gettext("Wake on LAN"));
include("head.inc");
?>
@@ -122,10 +122,10 @@ include("head.inc");
<form action="services_wol.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Wake on LAN</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Wake on LAN");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Interface</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface");?></td>
<td width="78%" class="vtable">
<select name="interface" class="formselect">
<?php
@@ -136,29 +136,29 @@ include("head.inc");
</option>
<?php endforeach; ?>
</select> <br>
- <span class="vexpl">Choose which interface the host to be woken up is connected to.</span></td>
+ <span class="vexpl"><?=gettext("Choose which interface the host to be woken up is connected to.");?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">MAC address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("MAC address");?></td>
<td width="78%" class="vtable">
<input name="mac" type="text" class="formfld unknown" id="mac" size="20" value="<?=htmlspecialchars($mac);?>">
<br>
- Enter a MAC address <span class="vexpl"> in the following format: xx:xx:xx:xx:xx:xx</span></td></tr>
+ <?=gettext("Enter a MAC address ");?><span class="vexpl"> <?=gettext("in the following format: xx:xx:xx:xx:xx:xx");?></span></td></tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Send">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Send");?>">
</td>
</tr>
</table>
&nbsp;<br>
- Wake all clients at once: <a href="services_wol.php?wakeall=true"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_wol_all.gif" width="17" height="17" border="0"></a><p/>
- Or Click the MAC address to wake up an individual device:
+ <?=gettext("Wake all clients at once: ");?><a href="services_wol.php?wakeall=true"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_wol_all.gif" width="17" height="17" border="0"></a><p/>
+ <?=gettext("Or Click the MAC address to wake up an individual device:");?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="15%" class="listhdrr">Interface</td>
- <td width="25%" class="listhdrr">MAC address</td>
- <td width="50%" class="listhdr">Description</td>
+ <td width="15%" class="listhdrr"><?=gettext("Interface");?></td>
+ <td width="25%" class="listhdrr"><?=gettext("MAC address");?></td>
+ <td width="50%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -187,7 +187,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle"><a href="services_wol_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a></td>
- <td valign="middle"><a href="services_wol.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this entry?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ <td valign="middle"><a href="services_wol.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this entry?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
@@ -209,9 +209,9 @@ include("head.inc");
<span class="vexpl">
<span class="red">
<strong>
- Note:<br>
+ <?=gettext("Note");?>:<br>
</strong>
- </span>This service can be used to wake up (power on) computers by sending special &quot;Magic Packets&quot;. The NIC in the computer that is to be woken up must support Wake on LAN and has to be configured properly (WOL cable, BIOS settings).
+ </span><?=gettext("This service can be used to wake up (power on) computers by sending special"); ?> &quot;<?=gettext("Magic Packets"); ?>&quot;. <?=gettext("The NIC in the computer that is to be woken up must support Wake on LAN and has to be configured properly (WOL cable, BIOS settings). ");?>
</span>
</form>
diff --git a/usr/local/www/services_wol_edit.php b/usr/local/www/services_wol_edit.php
index 04a7f2f..f495abf 100755
--- a/usr/local/www/services_wol_edit.php
+++ b/usr/local/www/services_wol_edit.php
@@ -79,7 +79,7 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "interface mac");
- $reqdfieldsn = explode(",", "Interface,MAC address");
+ $reqdfieldsn = array(gettext("Interface"),gettext("MAC address"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -87,7 +87,7 @@ if ($_POST) {
$_POST['mac'] = strtolower(str_replace("-", ":", $_POST['mac']));
if (($_POST['mac'] && !is_macaddr($_POST['mac']))) {
- $input_errors[] = "A valid MAC address must be specified.";
+ $input_errors[] = gettext("A valid MAC address must be specified.");
}
if (!$input_errors) {
@@ -109,7 +109,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services","Wake on LAN","Edit");
+$pgtitle = array(gettext("Services"),gettext("Wake on LAN"),gettext("Edit"));
include("head.inc");
?>
@@ -120,10 +120,10 @@ include("head.inc");
<form action="services_wol_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Edit WOL entry</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit WOL entry");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Interface</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface");?></td>
<td width="78%" class="vtable">
<select name="interface" class="formfld">
<?php
@@ -134,27 +134,27 @@ include("head.inc");
</option>
<?php endforeach; ?>
</select> <br>
- <span class="vexpl">Choose which interface this host is connected to.</span></td>
+ <span class="vexpl"><?=gettext("Choose which interface this host is connected to.");?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">MAC address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("MAC address");?></td>
<td width="78%" class="vtable">
<input name="mac" type="text" class="formfld" id="mac" size="20" value="<?=htmlspecialchars($pconfig['mac']);?>">
<br>
- <span class="vexpl">Enter a MAC address in the following format:
- xx:xx:xx:xx:xx:xx<em></em></span></td>
+ <span class="vexpl"><?=gettext("Enter a MAC address in the following format: ".
+ "xx:xx:xx:xx:xx:xx");?><em></em></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here".
+ " for your reference (not parsed).");?></span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input class="formbtn" type="button" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()">
<?php if (isset($id) && $a_wol[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
OpenPOWER on IntegriCloud