summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/diag_arp.php32
-rwxr-xr-xusr/local/www/diag_authentication.php20
-rwxr-xr-xusr/local/www/diag_confbak.php45
-rwxr-xr-xusr/local/www/diag_defaults.php29
-rwxr-xr-xusr/local/www/diag_dump_states.php4
-rw-r--r--usr/local/www/diag_ipsec.php26
-rwxr-xr-xusr/local/www/diag_ipsec_spd.php32
-rwxr-xr-xusr/local/www/diag_logs.php28
-rwxr-xr-xusr/local/www/diag_logs_auth.php28
-rwxr-xr-xusr/local/www/diag_logs_dhcp.php28
-rwxr-xr-xusr/local/www/diag_logs_filter.php56
-rwxr-xr-xusr/local/www/diag_logs_filter_dynamic.php40
-rw-r--r--usr/local/www/diag_logs_filter_summary.php48
-rwxr-xr-xusr/local/www/diag_logs_ipsec.php28
-rw-r--r--usr/local/www/diag_logs_ntpd.php26
-rw-r--r--usr/local/www/diag_logs_openvpn.php26
-rwxr-xr-xusr/local/www/diag_logs_ppp.php28
-rwxr-xr-xusr/local/www/diag_logs_relayd.php26
-rwxr-xr-xusr/local/www/diag_logs_settings.php86
-rwxr-xr-xusr/local/www/diag_nanobsd.php38
-rw-r--r--usr/local/www/diag_overload_tables.php10
-rw-r--r--usr/local/www/diag_packet_capture.php73
-rwxr-xr-xusr/local/www/diag_patterns.php16
-rwxr-xr-xusr/local/www/diag_resetstate.php34
-rw-r--r--usr/local/www/diag_routes.php11
-rw-r--r--usr/local/www/diag_system_activity.php4
-rw-r--r--usr/local/www/diag_system_pftop.php28
-rwxr-xr-xusr/local/www/load_balancer_monitor.php12
-rwxr-xr-xusr/local/www/load_balancer_monitor_edit.php54
-rwxr-xr-xusr/local/www/load_balancer_pool.php12
-rwxr-xr-xusr/local/www/load_balancer_pool_edit.php54
-rwxr-xr-xusr/local/www/load_balancer_relay_action.php16
-rwxr-xr-xusr/local/www/load_balancer_relay_action_edit.php42
-rwxr-xr-xusr/local/www/load_balancer_relay_protocol.php12
-rwxr-xr-xusr/local/www/load_balancer_relay_protocol_edit.php44
-rwxr-xr-xusr/local/www/load_balancer_virtual_server.php10
-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.php37
-rw-r--r--usr/local/www/services_captiveportal_vouchers.php123
-rw-r--r--usr/local/www/services_captiveportal_vouchers_edit.php31
-rwxr-xr-xusr/local/www/services_dhcp.php196
-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.php16
-rw-r--r--usr/local/www/services_rfc2136_edit.php62
-rwxr-xr-xusr/local/www/services_snmp.php64
-rwxr-xr-xusr/local/www/services_wol.php42
-rwxr-xr-xusr/local/www/services_wol_edit.php26
60 files changed, 1305 insertions, 1297 deletions
diff --git a/usr/local/www/diag_arp.php b/usr/local/www/diag_arp.php
index 3aff783..4a6e92c 100755
--- a/usr/local/www/diag_arp.php
+++ b/usr/local/www/diag_arp.php
@@ -205,15 +205,15 @@ if(count($pools) > 0) {
// Put this in an easy to use form
$dhcpmac = array();
$dhcpip = array();
-
+
foreach ($leases as $value) {
- $dhcpmac[$value['mac']] = $value['hostname'];
- $dhcpip[$value['ip']] = $value['hostname'];
+ $dhcpmac[$value['mac']] = $value['hostname'];
+ $dhcpip[$value['ip']] = $value['hostname'];
}
exec("/usr/sbin/arp -an",$rawdata);
-$i = 0;
+$i = 0;
/* if list */
$ifdescrs = get_configured_interface_with_descr();
@@ -225,7 +225,7 @@ foreach ($ifdescrs as $key =>$interface) {
$data = array();
foreach ($rawdata as $line) {
$elements = explode(' ',$line);
-
+
if ($elements[3] != "(incomplete)") {
$arpent = array();
$arpent['ip'] = trim(str_replace(array('(',')'),'',$elements[1]));
@@ -238,28 +238,28 @@ foreach ($rawdata as $line) {
function getHostName($mac,$ip)
{
global $dhcpmac, $dhcpip;
-
+
if ($dhcpmac[$mac])
return $dhcpmac[$mac];
else if ($dhcpip[$ip])
return $dhcpip[$ip];
else if(gethostbyaddr($ip) <> "" and gethostbyaddr($ip) <> $ip)
return gethostbyaddr($ip);
- else
- return "";
+ else
+ return "";
}
-$pgtitle = array(gettext("Diagnostics"),gettext("ARP Table"));
+$pgtitle = array("Diagnostics","ARP Table");
include("head.inc");
?>
<body link="#000000" vlink="#000000" alink="#000000">
-
+
<?php include("fbegin.inc"); ?>
<div id="loading">
- <img src="/themes/{$g['theme']}/images/misc/loader.gif"><?= gettext("Loading, please wait..."); ?>
+ <img src="/themes/{$g['theme']}/images/misc/loader.gif"> Loading, please wait...
<p/>&nbsp;
</div>
@@ -276,7 +276,7 @@ foreach ($data as &$entry) {
$dns = trim(getHostName($entry['mac'], $entry['ip']));
if(trim($dns))
$entry['dnsresolve'] = "$dns";
- else
+ else
$entry['dnsresolve'] = "Z_ ";
}
@@ -289,10 +289,10 @@ $data = msort($data, "dnsresolve");
<td>
<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td class="listhdrr"><?= gettext("IP address"); ?></td>
- <td class="listhdrr"><?= gettext("MAC address"); ?></td>
- <td class="listhdrr"><?= gettext("Hostname"); ?></td>
- <td class="listhdr"><?= gettext("Interface"); ?></td>
+ <td class="listhdrr">IP address</td>
+ <td class="listhdrr">MAC address</td>
+ <td class="listhdrr">Hostname</td>
+ <td class="listhdr">Interface</td>
<td class="list"></td>
</tr>
<?php foreach ($data as $entry): ?>
diff --git a/usr/local/www/diag_authentication.php b/usr/local/www/diag_authentication.php
index 91874d4..f6ed771 100755
--- a/usr/local/www/diag_authentication.php
+++ b/usr/local/www/diag_authentication.php
@@ -49,30 +49,30 @@ if ($_POST) {
$authcfg = auth_get_authserver($_POST['authmode']);
if (!$authcfg)
- $input_errors[] = $_POST['authmode'] . " " . gettext("is not a valid authentication server");
+ $input_errors[] = "{$_POST['authmode']} is not a valid authentication server ";
if (empty($_POST['username']) || empty($_POST['password']))
- $input_errors[] = gettext("A username and password must be specified.");
+ $input_errors[] = "A username and password must be specified.";
if (!$input_errors) {
if (authenticate_user($_POST['username'], $_POST['password'], $authcfg)) {
- $savemsg = gettext("User") . ": " . $_POST['username'] . " " . gettext("authenticated sucessfully.");
+ $savemsg = "User: {$_POST['username']} authenticated sucessfully.";
$groups = getUserGroups($_POST['username'], $authcfg);
- $savemsg .= "<br />" + gettext("This user is member of this groups") + ": <br />";
+ $savemsg .= "<br />This user is member of this groups: <br />";
foreach ($groups as $group)
$savemsg .= "{$group} ";
} else {
- $input_errors[] = gettext("Authentication failed.");
+ $input_errors[] = "Authentication failed.";
}
}
}
-$pgtitle = array(gettext("Diagnostics"),gettext("Authentication"));
+$pgtitle = array("Diagnostics","Authentication");
include("head.inc");
?>
<body link="#000000" vlink="#000000" alink="#000000">
-
+
<?php include("fbegin.inc"); ?>
<?php if ($input_errors) print_input_errors($input_errors);?>
<?php if ($savemsg) print_info_box($savemsg);?>
@@ -87,7 +87,7 @@ include("head.inc");
<form id="iform" name="iform" action="diag_authentication.php" method="post">
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Authentication Server"); ?></td>
+ <td width="22%" valign="top" class="vncell">Authentication Server</td>
<td width="78%" class="vtable">
<select name='authmode' id='authmode' class="formselect" >
<?php
@@ -103,13 +103,13 @@ include("head.inc");
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Username"); ?></td>
+ <td width="22%" valign="top" class="vncell">Username</td>
<td width="78%" class="vtable">
<input class="formfld unknown" size='20' id='username' name='username' value='<?=$pconfig['username'];?>' />
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Password"); ?></td>
+ <td width="22%" valign="top" class="vncell">Password</td>
<td width="78%" class="vtable">
<input class="formfld pwd" type='password' size='20' id='password' name='password' value='<?=$pconfig['password'];?>' />
</td>
diff --git a/usr/local/www/diag_confbak.php b/usr/local/www/diag_confbak.php
index 393f771..5d0458b 100755
--- a/usr/local/www/diag_confbak.php
+++ b/usr/local/www/diag_confbak.php
@@ -28,7 +28,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-/*
+/*
pfSense_MODULE: config
*/
@@ -45,10 +45,9 @@ if($_GET['newver'] != "") {
conf_mount_rw();
$confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache'));
if(config_restore($g['conf_path'] . '/backup/config-' . $_GET['newver'] . '.xml') == 0)
-
- $savemsg = sprintf(gettext("Successfully reverted to timestamp %s with description \"%s\"."), date(gettext("n/j/y H:i:s"), $_GET['newver']), $confvers[$_GET['newver']]['description']);
+ $savemsg = "Successfully reverted to timestamp " . date("n/j/y H:i:s", $_GET['newver']) . " with description \"" . $confvers[$_GET['newver']]['description'] . "\".";
else
- $savemsg = gettext("Unable to revert to the selected configuration.");
+ $savemsg = "Unable to revert to the selected configuration.";
conf_mount_ro();
}
@@ -56,7 +55,7 @@ if($_GET['rmver'] != "") {
conf_mount_rw();
$confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache'));
unlink_if_exists($g['conf_path'] . '/backup/config-' . $_GET['rmver'] . '.xml');
- $savemsg = sprintf(gettext("Deleted backup with timestamp %s and description \"%s\"."), date(gettext("n/j/y H:i:s"), $_GET['rmver']),$confvers[$_GET['rmver']]['description']);
+ $savemsg = "Deleted backup with timestamp " . date("n/j/y H:i:s", $_GET['rmver']) . " and description \"" . $confvers[$_GET['rmver']]['description'] . "\".";
conf_mount_ro();
}
@@ -95,7 +94,7 @@ cleanup_backupcache();
$confvers = get_backups();
unset($confvers['versions']);
-$pgtitle = array(gettext("Diagnostics"),gettext("Configuration History"));
+$pgtitle = array("Diagnostics","Configuration History");
include("head.inc");
?>
@@ -108,7 +107,7 @@ include("head.inc");
?>
<? if ($diff) { ?>
<table align="center" valign="middle" width="100%" border="0" cellspacing="0" style="padding-top: 4px; padding-bottom: 4px;">
- <tr><td><?=gettext("Configuration diff from");?> <?php echo date(gettext("n/j/y H:i:s"), $oldtime); ?> <?=gettext("to");?> <?php echo date(gettext("n/j/y H:i:s"), $newtime); ?></td></tr>
+ <tr><td>Configuration diff from <?php echo date("n/j/y H:i:s", $oldtime); ?> to <?php echo date("n/j/y H:i:s", $newtime); ?></td></tr>
<?php foreach ($diff as $line) {
switch (substr($line, 0, 1)) {
case "+":
@@ -136,10 +135,10 @@ include("head.inc");
<td>
<?php
$tab_array = array();
- $tab_array[0] = array(gettext("Config History"), true, "diag_confbak.php");
- $tab_array[1] = array(gettext("Backup/Restore"), false, "diag_backup.php");
+ $tab_array[0] = array("Config History", true, "diag_confbak.php");
+ $tab_array[1] = array("Backup/Restore", false, "diag_backup.php");
display_top_tabs($tab_array);
- ?>
+ ?>
</td>
</tr>
<tr>
@@ -150,25 +149,25 @@ include("head.inc");
<?php if (is_array($confvers)): ?>
<tr>
<td colspan="2" valign="middle" align="center" class="list" nowrap><input type="submit" name="diff" value="Diff"></td>
- <td width="30%" class="listhdrr"><?=gettext("Date");?></td>
- <td width="70%" class="listhdrr"><?=gettext("Configuration Change");?></td>
+ <td width="30%" class="listhdrr">Date</td>
+ <td width="70%" class="listhdrr">Configuration Change</td>
</tr>
<tr valign="top">
<td valign="middle" class="list" nowrap></td>
<td class="list">
<input type="radio" name="newtime" value="current">
</td>
- <td class="listlr"> <?= date(gettext("n/j/y H:i:s"), $config['revision']['time']) ?></td>
+ <td class="listlr"> <?= date("n/j/y H:i:s", $config['revision']['time']) ?></td>
<td class="listr"> <?= $config['revision']['description'] ?></td>
- <td colspan="3" valign="middle" class="list" nowrap><b><?=gettext("Current");?></b></td>
+ <td colspan="3" valign="middle" class="list" nowrap><b>Current</b></td>
</tr>
<?php
$c = 0;
foreach($confvers as $version):
if($version['time'] != 0)
- $date = date(gettext("n/j/y H:i:s"), $version['time']);
+ $date = date("n/j/y H:i:s", $version['time']);
else
- $date = gettext("Unknown");
+ $date = "Unknown";
$desc = $version['description'];
?>
<tr valign="top">
@@ -180,24 +179,24 @@ include("head.inc");
<input type="radio" name="newtime" value="<?php echo $version['time'];?>">
<? } else { ?>
&nbsp;
- <? }
+ <? }
$c++; ?>
</td>
<td class="listlr"> <?= $date ?></td>
<td class="listr"> <?= $desc ?></td>
<td valign="middle" class="list" nowrap>
- <a href="diag_confbak.php?newver=<?=$version['time'];?>" onclick="return confirm('<?=gettext("Revert to this configuration?");?>'")>
- <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="<?=gettext("Revert to this configuration");?>" title="<?=gettext("Revert to this configuration");?>">
+ <a href="diag_confbak.php?newver=<?=$version['time'];?>" onclick="return confirm('Revert to this configuration?')">
+ <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="Revert to this configuration" title="Revert to this configuration">
</a>
</td>
<td valign="middle" class="list" nowrap>
- <a href="diag_confbak.php?rmver=<?=$version['time'];?>" onclick="return confirm('<?=gettext("Delete this configuration backup?");?>')">
- <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="<?=gettext("Remove this backup");?>" title="<?=gettext("Remove this backup");?>">
+ <a href="diag_confbak.php?rmver=<?=$version['time'];?>" onclick="return confirm('Delete this configuration backup?')">
+ <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="Remove this backup" title="Remove this backup">
</a>
</td>
<td valign="middle" class="list" nowrap>
<a href="diag_confbak.php?getcfg=<?=$version['time'];?>">
- <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_down.gif" width="17" height="17" border="0" alt="<?=gettext("Download this backup");?>" title="<?=gettext("Download this backup");?>">
+ <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_down.gif" width="17" height="17" border="0" alt="Download this backup" title="Download this backup">
</a>
</td>
</tr>
@@ -209,7 +208,7 @@ include("head.inc");
<?php else: ?>
<tr>
<td>
- <?php print_info_box(gettext("No backups found.")); ?>
+ <?php print_info_box("No backups found."); ?>
</td>
</tr>
<?php endif; ?>
diff --git a/usr/local/www/diag_defaults.php b/usr/local/www/diag_defaults.php
index cde9d54..c462abd 100755
--- a/usr/local/www/diag_defaults.php
+++ b/usr/local/www/diag_defaults.php
@@ -48,14 +48,14 @@ if ($_POST) {
if ($_POST['Submit'] != " No ") {
reset_factory_defaults();
system_reboot();
- $rebootmsg = gettext("The system has been reset to factory defaults and is now rebooting. This may take one minute.");
+ $rebootmsg = "The system has been reset to factory defaults and is now rebooting. This may take one minute.";
} else {
header("Location: index.php");
exit;
}
}
-$pgtitle = array(gettext("Diagnostics"),gettext("Factory defaults"));
+$pgtitle = array("Diagnostics","Factory defaults");
include("head.inc");
?>
@@ -64,22 +64,21 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<?php if ($rebootmsg): echo print_info_box($rebootmsg); else: ?>
<form action="diag_defaults.php" method="post">
- <p><strong> <?=gettext("If you click") . " &quot;" . gettext("Yes") . "&quot;, " . gettext("the firewall will")?>:
-
+ <p><strong>If you click &quot;Yes&quot;, the firewall will:
+
<ul>
- <li><?=gettext("Reset to factory defaults");?></li>
- <li><?=gettext("LAN IP address will be reset to 192.168.1.1");?></li>
- <li><?=gettext("System will be configured as a DHCP server on the default LAN interface");?></li>
- <li><?=gettext("Reboot after changes are installed");?></li>
- <li><?=gettext("WAN interface will be set to obtain an address automatically from a DHCP server");?></li>
- <li><?=gettext("webConfigurator admin username will be reset to 'admin'");?></li>
- <li><?=gettext("webConfigurator admin password will be reset to");?> '<?=$g['product_name']?>'</li>
-
+ <li>Reset to factory defaults</li>
+ <li>LAN IP address will be reset to 192.168.1.1</li>
+ <li>System will be configured as a DHCP server on the default LAN interface</li>
+ <li>Reboot after changes are installed</li>
+ <li>WAN interface will be set to obtain an address automatically from a DHCP server</li>
+ <li>webConfigurator admin username will be reset to 'admin'</li>
+ <li>webConfigurator admin password will be reset to '<?=$g['product_name']?>'</li>
</ul>
- <?=gettext("Are you sure you want to proceed?");?></strong></p>
+ Are you sure you want to proceed?</strong></p>
<p>
- <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("Yes");?> ">
- <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("No");?> ">
+ <input name="Submit" type="submit" class="formbtn" value=" Yes ">
+ <input name="Submit" type="submit" class="formbtn" value=" No ">
</p>
</form>
<?php endif; ?>
diff --git a/usr/local/www/diag_dump_states.php b/usr/local/www/diag_dump_states.php
index a98b943..50cdb32 100755
--- a/usr/local/www/diag_dump_states.php
+++ b/usr/local/www/diag_dump_states.php
@@ -50,7 +50,7 @@ if($_GET['action']) {
$retval = mwexec("/sbin/pfctl -k '{$srcip}' -k '{$dstip}'");
echo htmlentities("|{$srcip}|{$dstip}|{$retval}|");
} else {
- echo gettext("invalid input");
+ echo "invalid input";
}
exit;
}
@@ -132,7 +132,7 @@ include("head.inc");
<form action="<?=$_SERVER['SCRIPT_NAME'];?>" method="get">
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
- <td><?=gettext("Current state count");?>: <?=$current_statecount?></td>
+ <td>Current state count: <?=$current_statecount?></td>
<td style="font-weight:bold;" align="right">
<?=gettext("Filter expression");?>:
<input type="text" name="filter" class="formfld search" value="<?=$_GET['filter'];?>" size="30" />
diff --git a/usr/local/www/diag_ipsec.php b/usr/local/www/diag_ipsec.php
index 99b9864..a77d261 100644
--- a/usr/local/www/diag_ipsec.php
+++ b/usr/local/www/diag_ipsec.php
@@ -45,7 +45,7 @@
global $g;
-$pgtitle = array(gettext("Status"),gettext("IPsec"));
+$pgtitle = array("Status","IPsec");
require("guiconfig.inc");
include("head.inc");
@@ -69,10 +69,10 @@ $sad = ipsec_dump_sad();
<td>
<?php
$tab_array = array();
- $tab_array[0] = array(gettext("Overview"), true, "diag_ipsec.php");
- $tab_array[1] = array(gettext("SAD"), false, "diag_ipsec_sad.php");
- $tab_array[2] = array(gettext("SPD"), false, "diag_ipsec_spd.php");
- $tab_array[3] = array(gettext("Logs"), false, "diag_logs_ipsec.php");
+ $tab_array[0] = array("Overview", true, "diag_ipsec.php");
+ $tab_array[1] = array("SAD", false, "diag_ipsec_sad.php");
+ $tab_array[2] = array("SPD", false, "diag_ipsec_spd.php");
+ $tab_array[3] = array("Logs", false, "diag_logs_ipsec.php");
display_top_tabs($tab_array);
?>
</td>
@@ -82,12 +82,12 @@ $sad = ipsec_dump_sad();
<div id="mainarea">
<table width="100%" border="0" cellpadding="6" cellspacing="0" class="tabcont sortable">
<tr>
- <td nowrap class="listhdrr"><?=gettext("Local IP");?></td>
- <td nowrap class="listhdrr"><?=gettext("Remote IP");?></a></td>
- <td nowrap class="listhdrr"><?=gettext("Local Network");?></td>
- <td nowrap class="listhdrr"><?=gettext("Remote Network");?></a></td>
- <td nowrap class="listhdrr"><?=gettext("Description");?></a></td>
- <td nowrap class="listhdrr"><?=gettext("Status");?></td>
+ <td nowrap class="listhdrr">Local IP</td>
+ <td nowrap class="listhdrr">Remote IP</a></td>
+ <td nowrap class="listhdrr">Local Network</td>
+ <td nowrap class="listhdrr">Remote Network</a></td>
+ <td nowrap class="listhdrr">Description</a></td>
+ <td nowrap class="listhdrr">Status</td>
</tr>
<?php
foreach ($a_phase2 as $ph2ent) {
@@ -132,9 +132,9 @@ $sad = ipsec_dump_sad();
<span class="vexpl">
<span class="red">
- <strong><?=gettext("Note");?>:<br /></strong>
+ <strong>Note:<br /></strong>
</span>
- <?=gettext("You can configure your IPsec");?>
+ You can configure your IPsec
<a href="vpn_ipsec.php">here</a>.
</span>
diff --git a/usr/local/www/diag_ipsec_spd.php b/usr/local/www/diag_ipsec_spd.php
index 8621e59..3d44b62 100755
--- a/usr/local/www/diag_ipsec_spd.php
+++ b/usr/local/www/diag_ipsec_spd.php
@@ -46,7 +46,7 @@
require("guiconfig.inc");
require("ipsec.inc");
-$pgtitle = array(gettext("Status"),gettext("IPsec"),gettext("SPD"));
+$pgtitle = array("Status","IPsec","SPD");
include("head.inc");
/* delete any SP? */
@@ -69,10 +69,10 @@ $spd = ipsec_dump_spd();
<td>
<?php
$tab_array = array();
- $tab_array[0] = array(gettext("Overview"), false, "diag_ipsec.php");
- $tab_array[1] = array(gettext("SAD"), false, "diag_ipsec_sad.php");
- $tab_array[2] = array(gettext("SPD"), true, "diag_ipsec_spd.php");
- $tab_array[3] = array(gettext("Logs"), false, "diag_logs_ipsec.php");
+ $tab_array[0] = array("Overview", false, "diag_ipsec.php");
+ $tab_array[1] = array("SAD", false, "diag_ipsec_sad.php");
+ $tab_array[2] = array("SPD", true, "diag_ipsec_spd.php");
+ $tab_array[3] = array("Logs", false, "diag_logs_ipsec.php");
display_top_tabs($tab_array);
?>
</td>
@@ -83,11 +83,11 @@ $spd = ipsec_dump_spd();
<table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0">
<?php if (count($spd)): ?>
<tr>
- <td nowrap class="listhdrr"><?= gettext("Source"); ?></td>
- <td nowrap class="listhdrr"><?= gettext("Destination"); ?></td>
- <td nowrap class="listhdrr"><?= gettext("Direction"); ?></td>
- <td nowrap class="listhdrr"><?= gettext("Protocol"); ?></td>
- <td nowrap class="listhdrr"><?= gettext("Tunnel endpoints"); ?></td>
+ <td nowrap class="listhdrr">Source</td>
+ <td nowrap class="listhdrr">Destination</td>
+ <td nowrap class="listhdrr">Direction</td>
+ <td nowrap class="listhdrr">Protocol</td>
+ <td nowrap class="listhdrr">Tunnel endpoints</td>
<td nowrap class="list"></td>
</tr>
<?php foreach ($spd as $sp): ?>
@@ -105,7 +105,7 @@ $spd = ipsec_dump_spd();
$args .= "&dstid=".rawurlencode($sp['dstid']);
$args .= "&dir=".rawurlencode($sp['dir']);
?>
- <a href="diag_ipsec_spd.php?act=del&<?=$args;?>" onclick="return confirm('<?= gettext("Do you really want to delete this security policy?"); ?>')">
+ <a href="diag_ipsec_spd.php?act=del&<?=$args;?>" onclick="return confirm('Do you really want to delete this security policy?')">
<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0">
</a>
</td>
@@ -116,19 +116,19 @@ $spd = ipsec_dump_spd();
<table class="tabcont" border="0" cellspacing="0" cellpadding="6">
<tr>
<td width="16"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_in.gif" width="11" height="11"></td>
- <td><?= gettext("incoming (as seen by firewall)"); ?></td>
+ <td>incoming (as seen by firewall)</td>
</tr>
<tr>
<td colspan="5" height="4"></td>
</tr>
<tr>
<td><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_out.gif" width="11" height="11"></td>
- <td><?= gettext("outgoing (as seen by firewall)"); ?></td>
+ <td>outgoing (as seen by firewall)</td>
</tr>
<?php else: ?>
<tr>
<td>
- <p><strong><?= gettext("No IPsec security policies."); ?></strong></p>
+ <p><strong>No IPsec security policies.</strong></p>
</td>
</tr>
<?php endif; ?>
@@ -140,8 +140,8 @@ $spd = ipsec_dump_spd();
<p>
<span class="vexpl">
-<span class="red"><strong><?= gettext("Note"); ?>:<br></strong></span>
-<?= gettext("You can configure your IPsec"); ?> <a href="vpn_ipsec.php"><?= gettext("here"); ?></a>.
+<span class="red"><strong>Note:<br></strong></span>
+You can configure your IPsec <a href="vpn_ipsec.php">here</a>.
</span>
<?php include("fend.inc"); ?>
diff --git a/usr/local/www/diag_logs.php b/usr/local/www/diag_logs.php
index 145d480..85b61df 100755
--- a/usr/local/www/diag_logs.php
+++ b/usr/local/www/diag_logs.php
@@ -62,7 +62,7 @@ if ($_POST['filtertext'])
if ($filtertext)
$filtertextmeta="?filtertext=$filtertext";
-$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("System"));
+$pgtitle = array("Status","System logs","System");
include("head.inc");
?>
@@ -74,17 +74,17 @@ include("head.inc");
<td>
<?php
$tab_array = array();
- $tab_array[] = array(gettext("System"), true, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
+ $tab_array[] = array("System", true, "diag_logs.php");
+ $tab_array[] = array("Firewall", false, "diag_logs_filter.php");
+ $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php");
+ $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php");
+ $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php");
+ $tab_array[] = array("PPP", false, "diag_logs_ppp.php");
+ $tab_array[] = array("VPN", false, "diag_logs_vpn.php");
+ $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php");
+ $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php");
+ $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php");
+ $tab_array[] = array("Settings", false, "diag_logs_settings.php");
display_top_tabs($tab_array);
?>
</td>
@@ -94,7 +94,7 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
- <td colspan="2" class="listtopic"><?php printf(gettext("Last %s system log entries"),$nentries); ?></td>
+ <td colspan="2" class="listtopic">Last <?=$nentries;?> system log entries</td>
</tr>
<?php
if($filtertext)
@@ -110,7 +110,7 @@ include("head.inc");
</td>
<td align="right" valign="top" >
<form id="clearform" name="clearform" action="diag_logs.php" method="post" style="margin-top: 14px;">
- <input id="filtertext" name="filtertext" value="<?=$filtertext;?>" />
+ <input id="filtertext" name="filtertext" value="<?=gettext($filtertext);?>" />
<input id="filtersubmit" name="filtersubmit" type="submit" class="formbtn" value="<?=gettext("Filter");?>" />
</form>
</td>
diff --git a/usr/local/www/diag_logs_auth.php b/usr/local/www/diag_logs_auth.php
index a6e9730..700b6dc 100755
--- a/usr/local/www/diag_logs_auth.php
+++ b/usr/local/www/diag_logs_auth.php
@@ -51,7 +51,7 @@ if (!$nentries)
if ($_POST['clear'])
clear_log_file($portal_logfile);
-$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Portal Auth"));
+$pgtitle = array("Status","System logs","Portal Auth");
include("head.inc");
?>
@@ -62,17 +62,17 @@ include("head.inc");
<tr><td>
<?php
$tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), true, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
+ $tab_array[] = array("System", false, "diag_logs.php");
+ $tab_array[] = array("Firewall", false, "diag_logs_filter.php");
+ $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php");
+ $tab_array[] = array("Portal Auth", true, "diag_logs_auth.php");
+ $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php");
+ $tab_array[] = array("PPP", false, "diag_logs_ppp.php");
+ $tab_array[] = array("VPN", false, "diag_logs_vpn.php");
+ $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php");
+ $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php");
+ $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php");
+ $tab_array[] = array("Settings", false, "diag_logs_settings.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -82,11 +82,11 @@ include("head.inc");
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" class="listtopic">
- <?php printf(gettext("Last %s Portal Auth log entries"),$nentries);?></td>
+ Last <?=$nentries;?> Portal Auth log entries</td>
</tr>
<?php dump_clog($portal_logfile, $nentries, true); ?>
<tr><td><br><form action="diag_logs_auth.php" method="post">
- <input name="clear" type="submit" class="formbtn" value="<?= gettext("Clear log"); ?>"></td></tr>
+ <input name="clear" type="submit" class="formbtn" value="Clear log"></td></tr>
</table>
</div>
</form>
diff --git a/usr/local/www/diag_logs_dhcp.php b/usr/local/www/diag_logs_dhcp.php
index ffc51c4..b95b969 100755
--- a/usr/local/www/diag_logs_dhcp.php
+++ b/usr/local/www/diag_logs_dhcp.php
@@ -53,7 +53,7 @@ if (!$nentries)
if ($_POST['clear'])
clear_log_file($dhcpd_logfile);
-$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("DHCP"));
+$pgtitle = array("Status","System logs","DHCP");
include("head.inc");
?>
@@ -64,17 +64,17 @@ include("head.inc");
<tr><td>
<?php
$tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), true, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
+ $tab_array[] = array("System", false, "diag_logs.php");
+ $tab_array[] = array("Firewall", false, "diag_logs_filter.php");
+ $tab_array[] = array("DHCP", true, "diag_logs_dhcp.php");
+ $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php");
+ $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php");
+ $tab_array[] = array("PPP", false, "diag_logs_ppp.php");
+ $tab_array[] = array("VPN", false, "diag_logs_vpn.php");
+ $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php");
+ $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php");
+ $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php");
+ $tab_array[] = array("Settings", false, "diag_logs_settings.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -84,11 +84,11 @@ include("head.inc");
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" class="listtopic">
- <?php printf(gettext("Last %s DHCP service log entries"), $nentries);?></td>
+ Last <?=$nentries;?> DHCP service log entries</td>
</tr>
<?php dump_clog($dhcpd_logfile, $nentries); ?>
<tr><td><br><form action="diag_logs_dhcp.php" method="post">
- <input name="clear" type="submit" class="formbtn" value="<?= gettext("Clear log");?>"></td></tr>
+ <input name="clear" type="submit" class="formbtn" value="Clear log"></td></tr>
</table>
</div>
</form>
diff --git a/usr/local/www/diag_logs_filter.php b/usr/local/www/diag_logs_filter.php
index 02b2591..9d8d9cd 100755
--- a/usr/local/www/diag_logs_filter.php
+++ b/usr/local/www/diag_logs_filter.php
@@ -53,7 +53,7 @@ if($_GET['getrulenum'] or $_POST['getrulenum']) {
$rulenum = $_POST['getrulenum'];
list($rulenum, $type) = explode(',', $rulenum);
$rule = find_rule_by_number($rulenum, $type);
- echo gettext("The rule that triggered this action is") . ":\n\n{$rule}";
+ echo "The rule that triggered this action is:\n\n{$rule}";
exit;
}
@@ -87,7 +87,7 @@ if (!$nentries)
if ($_POST['clear'])
clear_log_file($filter_logfile);
-$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Firewall"));
+$pgtitle = array("Status","System logs","Firewall");
include("head.inc");
?>
@@ -98,17 +98,17 @@ include("head.inc");
<tr><td>
<?php
$tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), true, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
+ $tab_array[] = array("System", false, "diag_logs.php");
+ $tab_array[] = array("Firewall", true, "diag_logs_filter.php");
+ $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php");
+ $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php");
+ $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php");
+ $tab_array[] = array("PPP", false, "diag_logs_ppp.php");
+ $tab_array[] = array("VPN", false, "diag_logs_vpn.php");
+ $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php");
+ $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php");
+ $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php");
+ $tab_array[] = array("Settings", false, "diag_logs_settings.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -117,7 +117,7 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="6" align="left">
- <?=gettext("Normal View");?> | <a href="diag_logs_filter_dynamic.php"><?=gettext("Dynamic View");?></a> | <a href="diag_logs_filter_summary.php"><?=gettext("Summary View");?></a><br/><br/>
+ Normal View | <a href="diag_logs_filter_dynamic.php">Dynamic View</a> | <a href="diag_logs_filter_summary.php">Summary View</a><br/><br/>
</td></tr>
<?php if (!isset($config['syslog']['rawfilter'])):
$filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 100, $filtertext);
@@ -125,19 +125,19 @@ include("head.inc");
<tr>
<td colspan="6" class="listtopic">
<?php if (!$filtertext) { ?>
- <?php printf(gettext("Last %s firewall log entries."),count($filterlog));?>
+ Last <?php echo count($filterlog);?> firewall log entries.
<?php } else { ?>
- <?php echo count($filterlog). ' ' . gettext("matched log entries."); ?>
+ <?php echo count($filterlog);?> matched log entries.
<?php } ?>
- <?php printf(gettext("Max(%s)"),$nentries);?>
+ (Max <?php echo $nentries;?>)
</tr>
<tr>
- <td width="10%" class="listhdrr"><?=gettext("Act");?></td>
- <td width="10%" class="listhdrr"><?=gettext("Time");?></td>
- <td width="15%" class="listhdrr"><?=gettext("If");?></td>
- <td width="25%" class="listhdrr"><?=gettext("Source");?></td>
- <td width="25%" class="listhdrr"><?=gettext("Destination");?></td>
- <td width="15%" class="listhdrr"><?=gettext("Proto");?></td>
+ <td width="10%" class="listhdrr">Act</td>
+ <td width="10%" class="listhdrr">Time</td>
+ <td width="15%" class="listhdrr">If</td>
+ <td width="25%" class="listhdrr">Source</td>
+ <td width="25%" class="listhdrr">Destination</td>
+ <td width="15%" class="listhdrr">Proto</td>
</tr><?php foreach ($filterlog as $filterent): ?>
<tr>
<td class="listlr" nowrap align="middle">
@@ -155,13 +155,13 @@ include("head.inc");
$dststr = $filterent['dstip'] . get_port_with_service($filterent['dstport'], $proto);
?>
<td class="listr" nowrap>
- <a href="diag_dns.php?host=<?php echo $filterent['srcip']; ?>" title="<?=gettext("Reverse Resolve with DNS");?>"><img border="0" src="/themes/nervecenter/images/icons/icon_log.gif"></a>
- <a href="easyrule.php?<?php echo "action=block&int={$int}&src={$filterent['srcip']}"; ?>" title="<?=gettext("Easy Rule: Add to Block List");?>" onclick="return confirm('<?=gettext("Do you really want to add this BLOCK rule?")."\n\n".gettext("Easy Rule is still experimental.")."\n".gettext("Continue at risk of your own peril.")."\n".gettext("Backups are also nice.")?>')"><img border="0" src="/themes/nervecenter/images/icons/icon_block_add.gif"></a>
+ <a href="diag_dns.php?host=<?php echo $filterent['srcip']; ?>" title="Reverse Resolve with DNS"><img border="0" src="/themes/nervecenter/images/icons/icon_log.gif"></a>
+ <a href="easyrule.php?<?php echo "action=block&int={$int}&src={$filterent['srcip']}"; ?>" title="Easy Rule: Add to Block List" onclick="return confirm('Do you really want to add this BLOCK rule?\n\nEasy Rule is still experimental.\nContinue at risk of your own peril.\nBackups are also nice.')"><img border="0" src="/themes/nervecenter/images/icons/icon_block_add.gif"></a>
<?php echo $srcstr;?>
</td>
<td class="listr" nowrap>
- <a href="diag_dns.php?host=<?php echo $filterent['dstip']; ?>" title="<?=gettext("Reverse Resolve with DNS");?>"><img border="0" src="/themes/nervecenter/images/icons/icon_log.gif"></a>
- <a href="easyrule.php?<?php echo "action=pass&int={$int}&proto={$proto}&src={$filterent['srcip']}&dst={$filterent['dstip']}&dstport={$filterent['dstport']}"; ?>" title="<?=gettext("Easy Rule: Pass this traffic");?>" onclick="return confirm('<?=gettext("Do you really want to add this PASS rule?")."\n\n".gettext("Easy Rule is still experimental.")."\n".gettext("Continue at risk of your own peril.")."\n".gettext("Backups are also nice.");?>')"><img border="0" src="/themes/nervecenter/images/icons/icon_pass_add.gif"></a>
+ <a href="diag_dns.php?host=<?php echo $filterent['dstip']; ?>" title="Reverse Resolve with DNS"><img border="0" src="/themes/nervecenter/images/icons/icon_log.gif"></a>
+ <a href="easyrule.php?<?php echo "action=pass&int={$int}&proto={$proto}&src={$filterent['srcip']}&dst={$filterent['dstip']}&dstport={$filterent['dstport']}"; ?>" title="Easy Rule: Pass this traffic" onclick="return confirm('Do you really want to add this PASS rule?\n\nEasy Rule is still experimental.\nContinue at risk of your own peril.\nBackups are also nice.')"><img border="0" src="/themes/nervecenter/images/icons/icon_pass_add.gif"></a>
<?php echo $dststr;?>
</td>
<?php
@@ -173,7 +173,7 @@ include("head.inc");
<?php else: ?>
<tr>
<td colspan="2" class="listtopic">
- <?php printf(gettext("Last %s firewall log entries"),$nentries);?></td>
+ Last <?php echo $nentries;?> firewall log entries</td>
</tr>
<?php
if($filtertext)
diff --git a/usr/local/www/diag_logs_filter_dynamic.php b/usr/local/www/diag_logs_filter_dynamic.php
index 52a2076..a07b52b 100755
--- a/usr/local/www/diag_logs_filter_dynamic.php
+++ b/usr/local/www/diag_logs_filter_dynamic.php
@@ -58,7 +58,7 @@ if ($_POST['clear'])
$filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 100);
-$pgtitle = array(gettext("Diagnostics"),gettext("System logs"),gettext("Firewall"));
+$pgtitle = array("Diagnostics","System logs","Firewall");
include("head.inc");
?>
@@ -97,17 +97,17 @@ include("head.inc");
<tr><td>
<?php
$tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), true, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
+ $tab_array[] = array("System", false, "diag_logs.php");
+ $tab_array[] = array("Firewall", true, "diag_logs_filter.php");
+ $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php");
+ $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php");
+ $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php");
+ $tab_array[] = array("PPP", false, "diag_logs_ppp.php");
+ $tab_array[] = array("VPN", false, "diag_logs_vpn.php");
+ $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php");
+ $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php");
+ $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php");
+ $tab_array[] = array("Settings", false, "diag_logs_settings.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -115,19 +115,19 @@ include("head.inc");
<td>
<div id="mainarea">
<div class="tabcont">
- <a href="diag_logs_filter.php"><?=gettext("Normal View");?></a> | <?=gettext("Dynamic View");?> | <a href="diag_logs_filter_summary.php"><?=gettext("Summary View");?></a>
+ <a href="diag_logs_filter.php">Normal View</a> | Dynamic View | <a href="diag_logs_filter_summary.php">Summary View</a>
</div>
<div class="listtopic">
- <?php printf(gettext("Last %s records"),$nentries);?>; <?=gettext("Pause");?>:<input valign="middle" type="checkbox" onClick="javascript:toggle_pause();">
+ Last <?php echo $nentries; ?> records; Pause:<input valign="middle" type="checkbox" onClick="javascript:toggle_pause();">
</div>
<div id="log">
<div class="log-header">
- <span class="log-action"><?=gettext("Act");?></span>
- <span class="log-time"><?=gettext("Time");?></span>
- <span class="log-interface"><?=gettext("If");?></span>
- <span class="log-source"><?=gettext("Source");?></span>
- <span class="log-destination"><?=gettext("Destination");?></span>
- <span class="log-protocol"><?=gettext("Proto");?></span>
+ <span class="log-action">Act</span>
+ <span class="log-time">Time</span>
+ <span class="log-interface">If</span>
+ <span class="log-source">Source</span>
+ <span class="log-destination">Destination</span>
+ <span class="log-protocol">Proto</span>
</div>
<?php $counter=0; foreach ($filterlog as $filterent): ?>
<div class="log-entry"<?php echo is_first_row($counter, count($filterlog)); ?>>
diff --git a/usr/local/www/diag_logs_filter_summary.php b/usr/local/www/diag_logs_filter_summary.php
index 1171b89..4904127 100644
--- a/usr/local/www/diag_logs_filter_summary.php
+++ b/usr/local/www/diag_logs_filter_summary.php
@@ -31,7 +31,7 @@
pfSense_MODULE: filter
*/
-$pgtitle = gettext("Diagnostics").": ".gettext("System logs").": ".gettext("Firewall Log Summary");
+$pgtitle = "Diagnostics: System logs: Firewall Log Summary";
require_once("guiconfig.inc");
include_once("filter_log.inc");
@@ -42,13 +42,13 @@ $entriesperblock = 5;
$filterlog = conv_log_filter($filter_logfile, $lines, $lines);
$gotlines = count($filterlog);
$fields = array(
- 'act' => gettext("Actions"),
- 'interface' => gettext("Interfaces"),
- 'proto' => gettext("Protocols"),
- 'srcip' => gettext("Source IPs"),
- 'dstip' => gettext("Destination IPs"),
- 'srcport' => gettext("Source Ports"),
- 'dstport' => gettext("Destination Ports"));
+ 'act' => "Actions",
+ 'interface' => "Interfaces",
+ 'proto' => "Protocols",
+ 'srcip' => "Source IPs",
+ 'dstip' => "Destination IPs",
+ 'srcport' => "Source Ports",
+ 'dstport' => "Destination Ports");
$summary = array();
foreach (array_keys($fields) as $f) {
@@ -68,7 +68,7 @@ function stat_block($summary, $stat, $num) {
global $gotlines, $fields;
uasort($summary[$stat] , 'cmp');
print '<table width="200px" cellpadding="3" cellspacing="0" border="1">';
- print "<tr><th colspan='2'>{$fields[$stat]} ".gettext("data")."</th></tr>";
+ print "<tr><th colspan='2'>{$fields[$stat]} data</th></tr>";
$k = array_keys($summary[$stat]);
$total = 0;
$numentries = 0;
@@ -78,7 +78,7 @@ function stat_block($summary, $stat, $num) {
$numentries++;
$outstr = $k[$i];
if (is_ipaddr($outstr)) {
- $outstr = "<a href=\"diag_dns.php?host={$outstr}\" title=\"".gettext("Reverse Resolve with DNS")."\"><img border=\"0\" src=\"/themes/nervecenter/images/icons/icon_log.gif\"></a> {$outstr}";
+ $outstr = "<a href=\"diag_dns.php?host={$outstr}\" title=\"Reverse Resolve with DNS\"><img border=\"0\" src=\"/themes/nervecenter/images/icons/icon_log.gif\"></a> {$outstr}";
} elseif (substr_count($outstr, '/') == 1) {
list($proto, $port) = explode('/', $outstr);
$service = getservbyport($port, strtolower($proto));
@@ -181,17 +181,17 @@ include("head.inc"); ?>
<tr><td>
<?php
$tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), true, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
+ $tab_array[] = array("System", false, "diag_logs.php");
+ $tab_array[] = array("Firewall", true, "diag_logs_filter.php");
+ $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php");
+ $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php");
+ $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php");
+ $tab_array[] = array("PPP", false, "diag_logs_ppp.php");
+ $tab_array[] = array("VPN", false, "diag_logs_vpn.php");
+ $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php");
+ $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php");
+ $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php");
+ $tab_array[] = array("Settings", false, "diag_logs_settings.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -200,12 +200,12 @@ include("head.inc"); ?>
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr><td colspan="6" align="left">
- <a href="diag_logs_filter.php"><?=gettext("Normal View");?></a> | <a href="diag_logs_filter_dynamic.php"><?=gettext("Dynamic View");?></a> | <?=gettext("Summary View");?><br/><br/>
+ <a href="diag_logs_filter.php">Normal View</a> | <a href="diag_logs_filter_dynamic.php">Dynamic View</a> | Summary View<br/><br/>
</td></tr>
<tr><td align="center">
-<?php printf (gettext("This is a firewall log summary, of the last %s lines of the firewall log (Max %s)."), $gotlines, $lines)?><br />
-<?=gettext("NOTE: IE8 users must enable compatibility view.")?>
+This is a firewall log summary, of the last <?php echo $gotlines; ?> lines of the firewall log (Max <?php echo $lines; ?>).<br />
+NOTE: IE8 users must enable compatibility view.
<?php
foreach(array_keys($fields) as $field) {
diff --git a/usr/local/www/diag_logs_ipsec.php b/usr/local/www/diag_logs_ipsec.php
index 9de5494..039193b 100755
--- a/usr/local/www/diag_logs_ipsec.php
+++ b/usr/local/www/diag_logs_ipsec.php
@@ -73,7 +73,7 @@ if ($_POST['clear'])
$ipsec_logarr = return_clog($ipsec_logfile, $nentries);
-$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("IPsec VPN"));
+$pgtitle = array("Status","System logs","IPsec VPN");
include("head.inc");
?>
@@ -84,17 +84,17 @@ include("head.inc");
<td>
<?php
$tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), true, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
+ $tab_array[] = array("System", false, "diag_logs.php");
+ $tab_array[] = array("Firewall", false, "diag_logs_filter.php");
+ $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php");
+ $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php");
+ $tab_array[] = array("IPsec", true, "diag_logs_ipsec.php");
+ $tab_array[] = array("PPP", false, "diag_logs_ppp.php");
+ $tab_array[] = array("VPN", false, "diag_logs_vpn.php");
+ $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php");
+ $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php");
+ $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php");
+ $tab_array[] = array("Settings", false, "diag_logs_settings.php");
display_top_tabs($tab_array);
?>
</td>
@@ -104,7 +104,7 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
- <td colspan="2" class="listtopic"><?php printf(gettext("Last %s IPsec log entries"),$nentries);?></td>
+ <td colspan="2" class="listtopic">Last <?=$nentries;?> IPsec log entries</td>
</tr>
<?php
foreach($ipsec_logarr as $logent){
@@ -116,7 +116,7 @@ include("head.inc");
$logent = preg_replace($search, $replace, $logent);
} else {
$searchs = "/(racoon: )([A-Z:].*?)([0-9].+\.[0-9].+.[0-9].+.[0-9].+\[[0-9].+\])(.*)/i";
- $replaces = "$1<strong><font color=red>[".gettext("Unknown Gateway/Dynamic")."]</font></strong>: $2$3$4";
+ $replaces = "$1<strong><font color=red>[Unknown Gateway/Dynamic]</font></strong>: $2$3$4";
$logent = preg_replace($searchs, $replaces, $logent);
}
$logent = preg_split("/\s+/", $logent, 6);
diff --git a/usr/local/www/diag_logs_ntpd.php b/usr/local/www/diag_logs_ntpd.php
index 588c0e2..d168f70 100644
--- a/usr/local/www/diag_logs_ntpd.php
+++ b/usr/local/www/diag_logs_ntpd.php
@@ -51,7 +51,7 @@ if (!$nentries)
if ($_POST['clear'])
clear_log_file($ntpd_logfile);
-$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("OpenNTPD"));
+$pgtitle = array("Status","System logs","OpenNTPD");
include("head.inc");
?>
@@ -62,17 +62,17 @@ include("head.inc");
<tr><td>
<?php
$tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("OpenNTPD"), true, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
+ $tab_array[] = array("System", false, "diag_logs.php");
+ $tab_array[] = array("Firewall", false, "diag_logs_filter.php");
+ $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php");
+ $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php");
+ $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php");
+ $tab_array[] = array("PPP", false, "diag_logs_ppp.php");
+ $tab_array[] = array("VPN", false, "diag_logs_vpn.php");
+ $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php");
+ $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php");
+ $tab_array[] = array("OpenNTPD", true, "diag_logs_ntpd.php");
+ $tab_array[] = array("Settings", false, "diag_logs_settings.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -82,7 +82,7 @@ include("head.inc");
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" class="listtopic">
- <?php printf(gettext("Last %s OpenNTPD log entries"), $nentries);?></td>
+ Last <?=$nentries;?> OpenNTPD log entries</td>
</tr>
<?php dump_clog($ntpd_logfile, $nentries); ?>
<tr><td><br>
diff --git a/usr/local/www/diag_logs_openvpn.php b/usr/local/www/diag_logs_openvpn.php
index f052ad9..aa50856 100644
--- a/usr/local/www/diag_logs_openvpn.php
+++ b/usr/local/www/diag_logs_openvpn.php
@@ -42,7 +42,7 @@
##|*MATCH=diag_logs_openvpn.php*
##|-PRIV
-$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("OpenVPN"));
+$pgtitle = array("Status","System logs","OpenVPN");
require("guiconfig.inc");
require_once("vpn.inc");
@@ -66,17 +66,17 @@ include("head.inc");
<td>
<?php
$tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), true, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
+ $tab_array[] = array("System", false, "diag_logs.php");
+ $tab_array[] = array("Firewall", false, "diag_logs_filter.php");
+ $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php");
+ $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php");
+ $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php");
+ $tab_array[] = array("PPP", false, "diag_logs_ppp.php");
+ $tab_array[] = array("VPN", false, "diag_logs_vpn.php");
+ $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php");
+ $tab_array[] = array("OpenVPN", true, "diag_logs_openvpn.php");
+ $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php");
+ $tab_array[] = array("Settings", false, "diag_logs_settings.php");
display_top_tabs($tab_array);
?>
</td>
@@ -86,7 +86,7 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
- <td colspan="2" class="listtopic"><?php printf(gettext("Last %s OpenVPN log entries"),$nentries)?></td>
+ <td colspan="2" class="listtopic">Last <?=$nentries;?> OpenVPN log entries</td>
</tr>
<?php dump_clog($openvpn_logfile, $nentries); ?>
<tr>
diff --git a/usr/local/www/diag_logs_ppp.php b/usr/local/www/diag_logs_ppp.php
index 52eb40b..470d33d 100755
--- a/usr/local/www/diag_logs_ppp.php
+++ b/usr/local/www/diag_logs_ppp.php
@@ -56,7 +56,7 @@ if ($_POST['clear'])
$ppp_logarr = return_clog($ppp_logfile, $nentries);
-$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("PPP"));
+$pgtitle = array("Status","System logs","PPP");
include("head.inc");
?>
@@ -67,17 +67,17 @@ include("head.inc");
<td>
<?php
$tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), true, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
+ $tab_array[] = array("System", false, "diag_logs.php");
+ $tab_array[] = array("Firewall", false, "diag_logs_filter.php");
+ $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php");
+ $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php");
+ $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php");
+ $tab_array[] = array("PPP", true, "diag_logs_ppp.php");
+ $tab_array[] = array("VPN", false, "diag_logs_vpn.php");
+ $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php");
+ $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php");
+ $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php");
+ $tab_array[] = array("Settings", false, "diag_logs_settings.php");
display_top_tabs($tab_array);
?>
</td>
@@ -87,7 +87,7 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
- <td colspan="2" class="listtopic"><?php printf (gettext("Last <?=$nentries;?> PPP log entries"),$nentries);?></td>
+ <td colspan="2" class="listtopic">Last <?=$nentries;?> PPP log entries</td>
</tr>
<?php
foreach($ppp_logarr as $logent){
@@ -95,7 +95,7 @@ include("head.inc");
$logent = preg_replace($search, $replace, $logent);
} else {
$searchs = "/(racoon: )([A-Z:].*?)([0-9].+\.[0-9].+.[0-9].+.[0-9].+\[[0-9].+\])(.*)/i";
- $replaces = "$1<strong><font color=red>[".gettext("Unknown Gateway/Dynamic")."]</font></strong>: $2$3$4";
+ $replaces = "$1<strong><font color=red>[Unknown Gateway/Dynamic]</font></strong>: $2$3$4";
$logent = preg_replace($searchs, $replaces, $logent);
}
$logent = preg_split("/\s+/", $logent, 6);
diff --git a/usr/local/www/diag_logs_relayd.php b/usr/local/www/diag_logs_relayd.php
index 8ce35b8..f267c74 100755
--- a/usr/local/www/diag_logs_relayd.php
+++ b/usr/local/www/diag_logs_relayd.php
@@ -52,7 +52,7 @@ if (!$nentries)
if ($_POST['clear'])
clear_log_file($relayd_logfile);
-$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Load Balancer"));
+$pgtitle = array("Status","System logs","Load Balancer");
include("head.inc");
?>
@@ -63,17 +63,17 @@ include("head.inc");
<tr><td>
<?php
$tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), true, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
+ $tab_array[] = array("System", false, "diag_logs.php");
+ $tab_array[] = array("Firewall", false, "diag_logs_filter.php");
+ $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php");
+ $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php");
+ $tab_array[] = array("PPP", false, "diag_logs_ppp.php");
+ $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php");
+ $tab_array[] = array("VPN", false, "diag_logs_vpn.php");
+ $tab_array[] = array("Load Balancer", true, "diag_logs_relayd.php");
+ $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php");
+ $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php");
+ $tab_array[] = array("Settings", false, "diag_logs_settings.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -83,7 +83,7 @@ include("head.inc");
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" class="listtopic">
- <?php printf(gettext("Last %s Load Balancer log entries"),$nentries);?></td>
+ Last <?=$nentries;?> Load Balancer log entries</td>
</tr>
<?php dump_clog($relayd_logfile, $nentries); ?>
<tr><td><br><form action="diag_logs_relayd.php" method="post">
diff --git a/usr/local/www/diag_logs_settings.php b/usr/local/www/diag_logs_settings.php
index b86da2c..f2b7861 100755
--- a/usr/local/www/diag_logs_settings.php
+++ b/usr/local/www/diag_logs_settings.php
@@ -73,20 +73,20 @@ if ($_POST) {
/* input validation */
if ($_POST['enable'] && !is_ipaddr($_POST['remoteserver'])) {
- $input_errors[] = gettext("A valid IP address must be specified for remote syslog server #1.");
+ $input_errors[] = "A valid IP address must be specified for remote syslog server #1.";
}
if ($_POST['enable'] && $_POST['remoteserver2'] && !is_ipaddr($_POST['remoteserver2'])) {
- $input_errors[] = gettext("A valid IP address must be specified for remote syslog server #2.");
+ $input_errors[] = "A valid IP address must be specified for remote syslog server #2.";
}
if ($_POST['enable'] && $_POST['remoteserver3'] && !is_ipaddr($_POST['remoteserver3'])) {
- $input_errors[] = gettext("A valid IP address must be specified for remote syslog server #3.");
+ $input_errors[] = "A valid IP address must be specified for remote syslog server #3.";
}
if ($_POST['enable'] && !is_ipaddr($_POST['remoteserver'])) {
- $input_errors[] = gettext("A valid IP address must be specified.");
+ $input_errors[] = "A valid IP address must be specified.";
}
if (($_POST['nentries'] < 5) || ($_POST['nentries'] > 2000)) {
- $input_errors[] = gettext("Number of log entries to show must be between 5 and 2000.");
+ $input_errors[] = "Number of log entries to show must be between 5 and 2000.";
}
if (!$input_errors) {
@@ -123,7 +123,7 @@ if ($_POST) {
}
}
-$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("Settings"));
+$pgtitle = array("Status","System logs","Settings");
include("head.inc");
?>
@@ -166,17 +166,17 @@ function enable_change(enable_over) {
<tr><td>
<?php
$tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), true, "diag_logs_settings.php");
+ $tab_array[] = array("System", false, "diag_logs.php");
+ $tab_array[] = array("Firewall", false, "diag_logs_filter.php");
+ $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php");
+ $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php");
+ $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php");
+ $tab_array[] = array("PPP", false, "diag_logs_ppp.php");
+ $tab_array[] = array("VPN", false, "diag_logs_vpn.php");
+ $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php");
+ $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php");
+ $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php");
+ $tab_array[] = array("Settings", true, "diag_logs_settings.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -187,44 +187,46 @@ function enable_change(enable_over) {
<tr>
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable"> <input name="reverse" type="checkbox" id="reverse" value="yes" <?php if ($pconfig['reverse']) echo "checked"; ?>>
- <strong><?=gettext("Show log entries in reverse order (newest entries on top)");?></strong></td>
+ <strong>Show log entries in reverse order (newest entries
+ on top)</strong></td>
</tr>
<tr>
<td width="22%" valign="top" class="vtable">&nbsp;</td>
- <td width="78%" class="vtable"><?=gettext("Number of log entries to show") . ":"?>
+ <td width="78%" class="vtable">Number of log entries to
+ show:
<input name="nentries" id="nentries" type="text" class="formfld unknown" size="4" value="<?=htmlspecialchars($pconfig['nentries']);?>"></td>
</tr>
<tr>
<td valign="top" class="vtable">&nbsp;</td>
<td class="vtable"> <input name="logdefaultblock" type="checkbox" id="logdefaultblock" value="yes" <?php if ($pconfig['logdefaultblock']) echo "checked"; ?>>
- <strong><?=gettext("Log packets blocked by the default rule");?></strong><br>
- <?=gettext("Hint: packets that are blocked by the " .
- "implicit default block rule will not be logged anymore " .
- "if you uncheck this option. Per-rule logging options are not affected.");?></td>
+ <strong>Log packets blocked by the default rule</strong><br>
+ Hint: packets that are blocked by the
+ implicit default block rule will not be logged anymore
+ if you uncheck this option. Per-rule logging options are not affected.</td>
</tr>
<tr>
<td valign="top" class="vtable">&nbsp;</td>
<td class="vtable"> <input name="rawfilter" type="checkbox" id="rawfilter" value="yes" <?php if ($pconfig['rawfilter']) echo "checked"; ?>>
- <strong><?=gettext("Show raw filter logs");?></strong><br>
- <?=gettext("Hint: If this is checked, filter logs are shown as generated by the packet filter, without any formatting. This will reveal more detailed information.");?></td>
+ <strong>Show raw filter logs</strong><br>
+ Hint: If this is checked, filter logs are shown as generated by the packet filter, without any formatting. This will reveal more detailed information. </td>
</tr>
<tr>
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable"> <input name="disablelocallogging" type="checkbox" id="disablelocallogging" value="yes" <?php if ($pconfig['disablelocallogging']) echo "checked"; ?> onClick="enable_change(false)">
- <strong><?=gettext("Disable writing log files to the local RAM disk");?></strong></td>
+ <strong>Disable writing log files to the local RAM disk</strong></td>
</tr>
<tr>
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable"> <input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(false)">
- <strong><?=gettext("Enable syslog'ing to remote syslog server");?></strong></td>
+ <strong>Enable syslog'ing to remote syslog server</strong></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Remote syslog servers");?></td>
+ <td width="22%" valign="top" class="vncell">Remote syslog servers</td>
<td width="78%" class="vtable">
<table>
<tr>
<td>
- <?=gettext("Server") . " 1";?>
+ Server 1
</td>
<td>
<input name="remoteserver" id="remoteserver" type="text" class="formfld host" size="20" value="<?=htmlspecialchars($pconfig['remoteserver']);?>">
@@ -232,7 +234,7 @@ function enable_change(enable_over) {
</tr>
<tr>
<td>
- <?=gettext("Server") . " 2";?>
+ Server 2
</td>
<td>
<input name="remoteserver2" id="remoteserver2" type="text" class="formfld host" size="20" value="<?=htmlspecialchars($pconfig['remoteserver2']);?>">
@@ -240,7 +242,7 @@ function enable_change(enable_over) {
</tr>
<tr>
<td>
- <?=gettext("Server") . " 3";?>
+ Server 3
</td>
<td>
<input name="remoteserver3" id="remoteserver3" type="text" class="formfld host" size="20" value="<?=htmlspecialchars($pconfig['remoteserver3']);?>">
@@ -251,17 +253,17 @@ function enable_change(enable_over) {
&nbsp;
</td>
<td>
- <?=gettext("IP addresses of remote syslog servers");?>
+ IP addresses of remote syslog servers
</td>
</table>
<input name="system" id="system" type="checkbox" value="yes" onclick="enable_change(false)" <?php if ($pconfig['system']) echo "checked"; ?>>
- <?=gettext("system events");?><br> <input name="filter" id="filter" type="checkbox" value="yes" <?php if ($pconfig['filter']) echo "checked"; ?>>
- <?=gettext("firewall events");?><br> <input name="dhcp" id="dhcp" type="checkbox" value="yes" <?php if ($pconfig['dhcp']) echo "checked"; ?>>
- <?=gettext("DHCP service events");?><br> <input name="portalauth" id="portalauth" type="checkbox" value="yes" <?php if ($pconfig['portalauth']) echo "checked"; ?>>
- <?=gettext("Portal Auth");?><br> <input name="vpn" id="vpn" type="checkbox" value="yes" <?php if ($pconfig['vpn']) echo "checked"; ?>>
- <?=gettext("PPTP VPN events");?>
+ system events <br> <input name="filter" id="filter" type="checkbox" value="yes" <?php if ($pconfig['filter']) echo "checked"; ?>>
+ firewall events<br> <input name="dhcp" id="dhcp" type="checkbox" value="yes" <?php if ($pconfig['dhcp']) echo "checked"; ?>>
+ DHCP service events<br> <input name="portalauth" id="portalauth" type="checkbox" value="yes" <?php if ($pconfig['portalauth']) echo "checked"; ?>>
+ Portal Auth<br> <input name="vpn" id="vpn" type="checkbox" value="yes" <?php if ($pconfig['vpn']) echo "checked"; ?>>
+ PPTP VPN events
<br> <input name="logall" id="logall" type="checkbox" value="yes" <?php if ($pconfig['logall']) echo "checked"; ?>>
- <?=gettext("Everything");?>
+ Everything
</td>
</tr>
<tr>
@@ -271,10 +273,10 @@ function enable_change(enable_over) {
</tr>
<tr>
<td width="22%" height="53" valign="top">&nbsp;</td>
- <td width="78%"><strong><span class="red"><?=gettext("Note") . ":"?></span></strong><br>
- <?=gettext("syslog sends UDP datagrams to port 514 on the specified " .
- "remote syslog server. Be sure to set syslogd on the " .
- "remote server to accept syslog messages from");?> <?=$g['product_name']?>.
+ <td width="78%"><strong><span class="red">Note:</span></strong><br>
+ syslog sends UDP datagrams to port 514 on the specified
+ remote syslog server. Be sure to set syslogd on the
+ remote server to accept syslog messages from <?=$g['product_name']?>.
</td>
</tr>
</table>
diff --git a/usr/local/www/diag_nanobsd.php b/usr/local/www/diag_nanobsd.php
index 3409a34..3e9bed1 100755
--- a/usr/local/www/diag_nanobsd.php
+++ b/usr/local/www/diag_nanobsd.php
@@ -46,7 +46,7 @@ ini_set('max_input_time', '9999');
require_once("guiconfig.inc");
require_once("config.inc");
-$pgtitle = array(gettext("Diagnostics"), gettext("NanoBSD"));
+$pgtitle = array("Diagnostics","NanoBSD");
include("head.inc");
// Survey slice info
@@ -70,12 +70,12 @@ if($_POST['bootslice']) {
echo <<<EOF
<div id="loading">
<img src="/themes/metallic/images/misc/loader.gif">
- gettext("Setting slice information, please wait...")
+ Setting slice information, please wait...
<p/>&nbsp;
</div>
EOF;
nanobsd_switch_boot_slice();
- $savemsg = gettext("The boot slice has been set to") . " " . nanobsd_get_active_slice();
+ $savemsg = "The boot slice has been set to " . nanobsd_get_active_slice();
// Survey slice info
nanobsd_detect_slice_info();
@@ -85,14 +85,14 @@ if($_POST['destslice']) {
echo <<<EOF
<div id="loading">
<img src="/themes/metallic/images/misc/loader.gif">
- gettext("Duplicating slice. Please wait, this will take a moment...")
+ Duplicating slice. Please wait, this will take a moment...
<p/>&nbsp;
</div>
EOF;
if(nanobsd_clone_slice($_POST['destslice'])) {
- $savemsg = gettext("The slice has been duplicated.") . "<p/>" . gettext("If you would like to boot from this newly duplicated slice please set it using the bootup information area.");
+ $savemsg = "The slice has been duplicated.<p/>If you would like to boot from this newly duplicated slice please set it using the bootup information area.";
} else {
- $savemsg = gettext("There was an error while duplicating the slice. Operation aborted.");
+ $savemsg = "There was an error while duplicating the slice. Operation aborted.";
}
// Re-Survey slice info
nanobsd_detect_slice_info();
@@ -113,28 +113,28 @@ if ($savemsg)
<div class="tabcont">
<span class="vexpl">
<span class="red">
- <strong><?=gettext("NOTE") . ":"?>&nbsp;</strong>
+ <strong>NOTE:&nbsp</strong>
</span>
- <?=gettext("The options on this page are intended for use by advanced users only.")?>
+ The options on this page are intended for use by advanced users only.
<br/>&nbsp;
</span>
<p/>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic"><?=gettext("Bootup information");?></td>
+ <td colspan="2" valign="top" class="listtopic">Bootup information</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("NanoBSD Image size");?></td>
+ <td width="22%" valign="top" class="vncell">NanoBSD Image size</td>
<td width="78%" class="vtable">
<?php echo $NANOBSD_SIZE; ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Bootup");?></td>
+ <td width="22%" valign="top" class="vncell">Bootup</td>
<td width="78%" class="vtable">
<form action="diag_nanobsd.php" method="post" name="iform">
- <?=gettext("Bootup slice is currently");?>: <?php echo $ACTIVE_SLICE; ?>
- <br/><br/><?=gettext("This will switch the bootup slice to the alternate slice.");?>
+ Bootup slice is currently: <?php echo $ACTIVE_SLICE; ?>
+ <br/><br/>This will switch the bootup slice to the alternate slice.
<br/>
<input type='hidden' name='bootslice' value='switch'>
<input type='submit' value='Switch Slice'></form>
@@ -144,20 +144,20 @@ if ($savemsg)
<td colspan="2" valign="top" class="">&nbsp;</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic"><?=gettext("Duplicate bootup slice to alternate");?></td>
+ <td colspan="2" valign="top" class="listtopic">Duplicate bootup slice to alternate</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Duplicate bootup slice");?></td>
+ <td width="22%" valign="top" class="vncell">Duplicate bootup slice</td>
<td width="78%" class="vtable">
<form action="diag_nanobsd.php" method="post" name="iform">
- <?=gettext("Destination slice");?>:
+ Destination slice:
<select name='destslice'>
<option value='<?php echo $COMPLETE_PATH; ?>'>
<?php echo "{$COMPLETE_BOOT_PATH} -> {$TOFLASH}"; ?>
</option>
</select>
<br/>
- <?=gettext("This will duplicate the bootup slice to the alternate slice. Use this if you would like to duplicate the known good working boot partition to the alternate.");?>
+ This will duplicate the bootup slice to the alternate slice. Use this if you would like to duplicate the known good working boot partition to the alternate.
</td>
</tr>
<tr>
@@ -168,10 +168,10 @@ if ($savemsg)
<td colspan="2" valign="top" class="">&nbsp;</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic"><?=gettext("View upgrade log");?></td>
+ <td colspan="2" valign="top" class="listtopic">View upgrade log</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("View previous upgrade log");?></td>
+ <td width="22%" valign="top" class="vncell">View previous upgrade log</td>
<td width="78%" class="vtable">
<?php
if($_POST['viewupgradelog']) {
diff --git a/usr/local/www/diag_overload_tables.php b/usr/local/www/diag_overload_tables.php
index 4bb470d..235e868 100644
--- a/usr/local/www/diag_overload_tables.php
+++ b/usr/local/www/diag_overload_tables.php
@@ -41,7 +41,7 @@
##|*MATCH=diag_overload_tables.php*
##|-PRIV
-$pgtitle = array(gettext("Diagnostics"), gettext("Overload tables"));
+$pgtitle = array("Diagnostics", "Overload tables");
require_once("guiconfig.inc");
@@ -96,7 +96,7 @@ include("fbegin.inc");
}
</script>
-<?=gettext("Table");?>:
+Table:
<select id='type' onChange='method_change($F("type"));' name='type'>
<option name='<?=$tablename?>' value='<?=$tablename?>'><?=$tablename?></option>
<option name='virusprot' value='virusprot'>virusprot</option>
@@ -107,7 +107,7 @@ include("fbegin.inc");
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
- <td class="listhdrr"><?=gettext("IP Address");?></td>
+ <td class="listhdrr">IP Address</td>
</tr>
<?php $count = 0; foreach($entries as $entryA): ?>
<?php $entry = trim($entryA); ?>
@@ -124,14 +124,14 @@ include("fbegin.inc");
<?php $count++; endforeach; ?>
<?php
if($count == 0)
- echo "<tr><td>" . gettext("No entries exist in this table.") . "</td></tr>";
+ echo "<tr><td>No entries exist in this table.</td></tr>";
?>
</table>
<?php
if($count > 0)
- echo "<p/>" . gettext("Delete") . " <a href='diag_overload_tables.php?deleteall=true&type={$tablename}'>" . gettext("all") . "</a> " . gettext("entries in this table.");
+ echo "<p/>Delete <a href='diag_overload_tables.php?deleteall=true&type={$tablename}'>all</a> entries in this table."
?>
diff --git a/usr/local/www/diag_packet_capture.php b/usr/local/www/diag_packet_capture.php
index e49d969..68248ea 100644
--- a/usr/local/www/diag_packet_capture.php
+++ b/usr/local/www/diag_packet_capture.php
@@ -35,7 +35,7 @@
##|*MATCH=diag_packet_capture.php*
##|-PRIV
-$pgtitle = array(gettext("Diagnostics"), gettext("Packet Capture"));
+$pgtitle = array("Diagnostics", "Packet Capture");
require_once("guiconfig.inc");
require_once("pfsense-utils.inc");
@@ -64,14 +64,14 @@ if ($_POST) {
}
if ($_POST['startbtn'] != "" ) {
- $action = gettext("Start");
+ $action = "Start";
//delete previous packet capture if it exists
if (file_exists($fp.$fn))
unlink ($fp.$fn);
} elseif ($_POST['stopbtn']!= "") {
- $action = gettext("Stop");
+ $action = "Stop";
$processes_running = trim(shell_exec('/bin/ps axw -O pid= | /usr/bin/grep tcpdump | /usr/bin/grep $fn | /usr/bin/grep -v pflog'));
//explode processes into an array, (delimiter is new line)
@@ -95,6 +95,7 @@ if ($_POST) {
} else {
$do_tcpdump = false;
}
+$pgtitle = "Diagnostics: Packet Capture";
include("head.inc"); ?>
<body link="#000000" vlink="#0000CC" alink="#0000CC">
@@ -109,10 +110,10 @@ include("fbegin.inc");
<form action="diag_packet_capture.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic"><?=gettext("Packet capture");?></td>
+ <td colspan="2" valign="top" class="listtopic">Packet capture</td>
</tr>
<tr>
- <td width="17%" valign="top" class="vncellreq"><?=gettext("Interface");?></td>
+ <td width="17%" valign="top" class="vncellreq">Interface</td>
<td width="83%" class="vtable">
<select name="interface">
<?php
@@ -124,58 +125,56 @@ include("fbegin.inc");
</option>
<?php endforeach;?>
</select>
- <br/><?=gettext("Select the interface the traffic will be passing through. Typically this will be the WAN interface.");?>
+ <br/>Select the interface the traffic will be passing through. Typically this will be the WAN interface.
</td>
</tr>
<tr>
- <td width="17%" valign="top" class="vncellreq"><?=gettext("Host Address");?></td>
+ <td width="17%" valign="top" class="vncellreq">Host Address</td>
<td width="83%" class="vtable">
<input name="host" type="text" class="formfld host" id="host" size="20" value="<?=htmlspecialchars($host);?>">
- <br/><?=gettext("This value is either the Source or Destination IP address. The packet capture will look for this address in either field.");?>
- <br/><?=gettext("This value can be a domain name or IP address.");?>
- <br/><?=gettext("If you leave this field blank, all packets on the specified interface will be captured. ");?>
+ <br/>This value is either the Source or Destination IP address. The packet capture will look for this address in either field.
+ <br/>This value can be a domain name or IP address.
+ <br/>If you leave this field blank, all packets on the specified interface will be captured.
</td>
</tr>
<tr>
- <td width="17%" valign="top" class="vncellreq"><?=gettext("Port");?></td>
+ <td width="17%" valign="top" class="vncellreq">Port</td>
<td width="83%" class="vtable">
<input name="port" type="text" class="formfld unknown" id="port" size="5" value="<?=$port;?>">
- <br/><?=gettext("The port can be either the source or destination port. The packet capture will look for this port in either field.");?>
- <br/><?=gettext("Leave blank if you do not want to filter by port.");?>
+ <br/>The port can be either the source or destination port. The packet capture will look for this port in either field.
+ <br/>Leave blank if you do not want to filter by port.
</td>
</tr>
<tr>
- <td width="17%" valign="top" class="vncellreq"><?=gettext("Packet Length");?></td>
+ <td width="17%" valign="top" class="vncellreq">Packet Length</td>
<td width="83%" class="vtable">
<input name="snaplen" type="text" class="formfld unknown" id="snaplen" size="5" value="<?=$snaplen;?>">
- <br/><?=gettext("The Packet length is the number of bytes the packet will capture for each payload. Default value is 1500.");?>
+ <br/>The Packet length is the number of bytes the packet will capture for each payload. Default value is 1500.
</td>
</tr>
<tr>
- <td width="17%" valign="top" class="vncellreq"><?=gettext("Count");?></td>
+ <td width="17%" valign="top" class="vncellreq">Count</td>
<td width="83%" class="vtable">
<input name="count" type="text" class="formfld unknown" id="count" size="5" value="<?=$count;?>">
- <br/><?=gettext("This is the number of packets the packet capture will grab. Default value is 100.") . "<br/>" . gettext("Enter 0 (zero) for no count limit.");?>
+ <br/>This is the number of packets the packet capture will grab. Default value is 100. <br/>Enter 0 (zero) for no count limit.
</tr>
<tr>
- <td width="17%" valign="top" class="vncellreq"><?=gettext("Level of Detail");?></td>
+ <td width="17%" valign="top" class="vncellreq">Level of Detail</td>
<td width="83%" class="vtable">
<select name="detail" type="text" class="formselect" id="detail" size="1">
- <option value="-q" <?php if ($detail == "-q") echo "selected"; ?>><?=gettext("Normal");?></option>
- <option value="-v" <?php if ($detail == "-v") echo "selected"; ?>><?=gettext("Medium");?></option>
- <option value="-vv" <?php if ($detail == "-vv") echo "selected"; ?>><?=gettext("High");?></option>
- <option value="-vv -e" <?php if ($detail == "-vv -e") echo "selected"; ?>><?=gettext("Full");?></option>
+ <option value="-q" <?php if ($detail == "-q") echo "selected"; ?>>Normal</option>
+ <option value="-v" <?php if ($detail == "-v") echo "selected"; ?>>Medium</option>
+ <option value="-vv" <?php if ($detail == "-vv") echo "selected"; ?>>High</option>
+ <option value="-vv -e" <?php if ($detail == "-vv -e") echo "selected"; ?>>Full</option>
</select>
- <br/><?=gettext("This is the level of detail that will be displayed after hitting 'Stop' when the packets have been captured.") . "<br/><b>" .
- gettext("Note") . ":</b> " .
- gettext("This option does not affect the level of detail when downloading the packet capture.");?>
+ <br/>This is the level of detail that will be displayed after hitting 'Stop' when the packets have been captured. <br/><b>Note:</b> This option does not affect the level of detail when downloading the packet capture.
</tr>
<tr>
- <td width="17%" valign="top" class="vncellreq"><?=gettext("Reverse DNS Lookup");?></td>
+ <td width="17%" valign="top" class="vncellreq">Reverse DNS Lookup</td>
<td width="83%" class="vtable">
<input name="dnsquery" type="checkbox"<?php if($_POST['dnsquery']) echo " CHECKED"; ?>>
- <br/><?=gettext("This check box will cause the packet capture to perform a reverse DNS lookup associated with all IP addresses.");?>
- <br/><b><?=gettext("Note");?>: </b><?=gettext("This option can cause delays for large packet captures.");?>
+ <br/>This check box will cause the packet capture to perform a reverse DNS lookup associated with all IP addresses.
+ <br/><b>Note: </b>This option can cause delays for large packet captures.
</td>
</tr>
<tr>
@@ -191,14 +190,14 @@ include("fbegin.inc");
if ($processcheck != false)
$processisrunning = true;
- if (($action == gettext("Stop") or $action == "") and $processisrunning != true)
- echo "<input type=\"submit\" name=\"startbtn\" value=\"" . gettext("Start") . "\">&nbsp;";
+ if (($action == "Stop" or $action == "") and $processisrunning != true)
+ echo "<input type=\"submit\" name=\"startbtn\" value=\"Start\">&nbsp;";
else {
- echo "<input type=\"submit\" name=\"stopbtn\" value=\"" . gettext("Stop") . "\">&nbsp;";
+ echo "<input type=\"submit\" name=\"stopbtn\" value=\"Stop\">&nbsp;";
}
if (file_exists($fp.$fn) and $processisrunning != true) {
- echo "<input type=\"submit\" name=\"downloadbtn\" value=\"" . gettext("Download Capture") . "\">";
- echo "&nbsp;&nbsp;(" . gettext("The packet capture file was last updated") . ": " . date("F jS, Y g:i:s a.", filemtime($fp.$fn)) . ")";
+ echo "<input type=\"submit\" name=\"downloadbtn\" value=\"Download Capture\">";
+ echo "&nbsp;&nbsp;(The packet capture file was last updated: " . date("F jS, Y g:i:s a.", filemtime($fp.$fn)) . ")";
}
?>
</td>
@@ -208,7 +207,7 @@ include("fbegin.inc");
<?php
echo "<font face='terminal' size='2'>";
if ($processisrunning == true)
- echo("<strong>" . gettext("Packet Capture is running.") . "</strong><br/>");
+ echo("<strong>Packet Capture is running.</strong><br/>");
if ($do_tcpdump) {
@@ -235,12 +234,12 @@ include("fbegin.inc");
$selectedif = convert_friendly_interface_to_real_interface_name($selectedif);
- if ($action == gettext("Start")) {
- echo("<strong>" . gettext("Packet Capture is running.") . "</strong><br/>");
+ if ($action == "Start") {
+ echo("<strong>Packet Capture is running.</strong><br/>");
mwexec_bg ("/usr/sbin/tcpdump -i $selectedif $searchcount -s $packetlength -w $fp$fn $searchhost $searchport");
} else {
//action = stop
- echo("<strong>" . gettext("Packet Capture stopped.") . "<br/><br/>" . gettext("Packets Captured") . ":</strong><br/>");
+ echo("<strong>Packet Capture stopped. <br/><br/>Packets Captured:</strong><br/>");
?>
<textarea style="width:98%" name="code" rows="15" cols="66" wrap="off" readonly="readonly">
<?php
diff --git a/usr/local/www/diag_patterns.php b/usr/local/www/diag_patterns.php
index 09f5472..2e1d264 100755
--- a/usr/local/www/diag_patterns.php
+++ b/usr/local/www/diag_patterns.php
@@ -40,13 +40,13 @@
require("guiconfig.inc");
//Move the upload file to /usr/local/share/protocols (is_uploaded_file must use tmp_name as argument)
-if (($_POST['submit'] == gettext("Upload")) && is_uploaded_file($_FILES['ulfile']['tmp_name'])) {
+if (($_POST['submit'] == "Upload") && is_uploaded_file($_FILES['ulfile']['tmp_name'])) {
if(fileExtension($_FILES['ulfile']['name'])) {
move_uploaded_file($_FILES['ulfile']['tmp_name'], "/usr/local/share/protocols/" . $_FILES['ulfile']['name']);
- $ulmsg = gettext("Uploaded file to") . " /usr/local/share/protocols/" . htmlentities($_FILES['ulfile']['name']);
+ $ulmsg = "Uploaded file to /usr/local/share/protocols/" . htmlentities($_FILES['ulfile']['name']);
}
else
- $ulmsg = gettext("Warning: You must upload a file with .pat extension.");
+ $ulmsg = "Warning: You must upload a file with .pat extension.";
}
//Check if file has correct extension (.pat)
@@ -55,7 +55,7 @@ function fileExtension($nameFile) {
return ($format == ".pat");
}
-$pgtitle = array(gettext("Diagnostics"), gettext("Add layer7 pattern"));
+$pgtitle = array("Diagnostics","Add layer7 pattern");
include("head.inc");
?>
@@ -95,24 +95,24 @@ pre {
</head>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
-<p><strong><?=gettext("You can upload new layer7 patterns to your system!");?></strong></p>
+<p><strong>You can upload new layer7 patterns to your system!</strong></p>
<?php if ($ulmsg) echo "<p class=\"red\"><strong>" . $ulmsg . "</strong></p>\n"; ?>
<div id="niftyOutter">
<form action="diag_patterns.php" method="POST" enctype="multipart/form-data" name="frmPattern">
<table>
<tr>
- <td colspan="2" valign="top" class="vnsepcell"><?=gettext("Upload");?></td>
+ <td colspan="2" valign="top" class="vnsepcell">Upload</td>
</tr>
<tr>
- <td align="right"><?=gettext("File to upload");?>:</td>
+ <td align="right">File to upload:</td>
<td valign="top" class="label">
<input name="ulfile" type="file" class="formfld file" id="ulfile">
</td></tr>
<tr>
<td valign="top">&nbsp;&nbsp;&nbsp;</td>
<td valign="top" class="label">
- <input name="submit" type="submit" class="button" id="upload" value="<?=gettext("Upload");?>"></td>
+ <input name="submit" type="submit" class="button" id="upload" value="Upload"></td>
</tr>
<tr>
<td colspan="2" valign="top" height="16"></td>
diff --git a/usr/local/www/diag_resetstate.php b/usr/local/www/diag_resetstate.php
index f56a65b..04819d0 100755
--- a/usr/local/www/diag_resetstate.php
+++ b/usr/local/www/diag_resetstate.php
@@ -51,11 +51,11 @@ if ($_POST) {
filter_flush_state_table();
if ($savemsg)
$savemsg .= " ";
- $savemsg .= gettext("The state table has been flushed successfully.");
+ $savemsg .= "The state table has been flushed successfully.";
}
}
-$pgtitle = array(gettext("Diagnostics"), gettext("Reset state"));
+$pgtitle = array("Diagnostics","Reset state");
include("head.inc");
?>
@@ -68,8 +68,8 @@ include("head.inc");
<tr><td>
<?php
$tab_array = array();
- $tab_array[0] = array(gettext("States"), false, "diag_dump_states.php");
- $tab_array[1] = array(gettext("Reset States"), true, "diag_resetstate.php");
+ $tab_array[0] = array("States", false, "diag_dump_states.php");
+ $tab_array[1] = array("Reset States", true, "diag_resetstate.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -80,27 +80,27 @@ include("head.inc");
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable"> <p>
<input name="statetable" type="checkbox" id="statetable" value="yes" checked>
- <strong><?= gettext("Firewall state table"); ?></strong><br>
+ <strong>Firewall state table</strong><br>
<span class="vexpl"><br>
- <?=gettext("Resetting the state tables will remove all entries from " .
- "the corresponding tables. This means that all open connections " .
- "will be broken and will have to be re-established. This " .
- "may be necessary after making substantial changes to the " .
- "firewall and/or NAT rules, especially if there are IP protocol " .
- "mappings (e.g. for PPTP or IPv6) with open connections."); ?><br>
+ Resetting the state tables will remove all entries from
+ the corresponding tables. This means that all open connections
+ will be broken and will have to be re-established. This
+ may be necessary after making substantial changes to the
+ firewall and/or NAT rules, especially if there are IP protocol
+ mappings (e.g. for PPTP or IPv6) with open connections.<br>
<br>
- </span><span class="vexpl"><?=gettext("The firewall will normally leave " .
- "the state tables intact when changing rules."); ?><br>
+ </span><span class="vexpl">The firewall will normally leave
+ the state tables intact when changing rules.<br>
<br>
- <?=gettext("NOTE: If you reset the firewall state table, the browser " .
- "session may appear to be hung after clicking &quot;Reset&quot;. " .
- "Simply refresh the page to continue."); ?></span></p>
+ NOTE: If you reset the firewall state table, the browser
+ session may appear to be hung after clicking &quot;Reset&quot;.
+ Simply refresh the page to continue.</span></p>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Reset"); ?>">
+ <input name="Submit" type="submit" class="formbtn" value="Reset">
</td>
</tr>
</table>
diff --git a/usr/local/www/diag_routes.php b/usr/local/www/diag_routes.php
index 5adc7b3..94b94fd 100644
--- a/usr/local/www/diag_routes.php
+++ b/usr/local/www/diag_routes.php
@@ -33,6 +33,7 @@
pfSense_BUILDER_BINARIES: /usr/bin/netstat
pfSense_MODULE: routing
*/
+
##|+PRIV
##|*IDENT=page-diagnostics-routingtables
##|*NAME=Diagnostics: Routing tables page
@@ -42,7 +43,7 @@
include('guiconfig.inc');
-$pgtitle = array(gettext("Diagnostics"),gettext("Routing tables"));
+$pgtitle = array("Diagnostics","Routing tables");
include('head.inc');
@@ -55,11 +56,11 @@ include('head.inc');
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
-<td class="vncellreq" width="22%"><?=gettext("Name resolution");?></td>
+<td class="vncellreq" width="22%">Name resolution</td>
<td class="vtable" width="78%">
-<input type="checkbox" class="formfld" name="resolve" value="yes" <?php if ($_POST['resolve'] == 'yes') echo 'checked'; ?>><?=gettext("Enable");?></input>
+<input type="checkbox" class="formfld" name="resolve" value="yes" <?php if ($_POST['resolve'] == 'yes') echo 'checked'; ?>> Enable</input>
<br />
-<span class="expl"><?=gettext("Enable this to attempt to resolve names when displaying the tables.");?></span>
+<span class="expl">Enable this to attempt to resolve names when displaying the tables.</span>
</td>
</tr>
@@ -69,7 +70,7 @@ include('head.inc');
<input type="submit" class="formbtn" name="submit" value="<?=gettext("Show"); ?>" />
<br />
<br />
-<span class="vexpl"><span class="red"><strong><?=gettext("Note")?>:</strong></span><?=gettext("By enabling name resolution, the query should take a bit longer. You can stop it at"."any time by clicking the Stop button in your browser");?>.</span>
+<span class="vexpl"><span class="red"><strong>Note:</strong></span> By enabling name resolution, the query should take a bit longer. You can stop it at any time by clicking the Stop button in your browser.</span>
</td>
</tr>
diff --git a/usr/local/www/diag_system_activity.php b/usr/local/www/diag_system_activity.php
index b94dc92..18e6842 100644
--- a/usr/local/www/diag_system_activity.php
+++ b/usr/local/www/diag_system_activity.php
@@ -43,7 +43,7 @@ require("guiconfig.inc");
$pfSversion = str_replace("\n", "", file_get_contents("/etc/version"));
-$pgtitle = gettext("Diagnostics: System Activity");
+$pgtitle = "Diagnostics: System Activity";
if($_REQUEST['getactivity']) {
$text = `/usr/bin/top -HS`;
@@ -98,7 +98,7 @@ include("head.inc");
<table>
<tr><td>
<div name='cpuactivitydiv' id='cpuactivitydiv'>
- <b><?=gettext("Gathering CPU activity, please wait...");?>
+ <b>Gathering CPU activity, please wait...
</div>
</td></tr>
</table>
diff --git a/usr/local/www/diag_system_pftop.php b/usr/local/www/diag_system_pftop.php
index 4818534..9778e8a 100644
--- a/usr/local/www/diag_system_pftop.php
+++ b/usr/local/www/diag_system_pftop.php
@@ -42,7 +42,7 @@ require("guiconfig.inc");
$pfSversion = str_replace("\n", "", file_get_contents("/etc/version"));
-$pgtitle = gettext("Diagnostics: PFTop");
+$pgtitle = "Diagnostics: PFTop";
if($_REQUEST['getactivity']) {
if($_REQUEST['sorttype'])
@@ -99,18 +99,18 @@ else
<?=gettext("Sort type"); ?>:
<select name='sorttype' id='sorttype' onChange='this.form.submit();'>
<option value='<?=$sorttype?>'><?=$sorttype?></option>
- <option value='age'><?=gettext("age");?></option>
- <option value='bytes'><?=gettext("bytes");?></option>
- <option value='dest'><?=gettext("dest");?></option>
- <option value='dport'><?=gettext("dport");?></option>
- <option value='exp'><?=gettext("exp");?></option>
- <option value='none'><?=gettext("none");?></option>
- <option value='peak'><?=gettext("peak");?></option>
- <option value='pkt'><?=gettext("pkt");?></option>
- <option value='rate'><?=gettext("rate");?></option>
- <option value='size'><?=gettext("size");?></option>
- <option value='sport'><?=gettext("sport");?></option>
- <option value='src'><?=gettext("src");?></option>
+ <option value='age'>age</option>
+ <option value='bytes'>bytes</option>
+ <option value='dest'>dest</option>
+ <option value='dport'>dport</option>
+ <option value='exp'>exp</option>
+ <option value='none'>none</option>
+ <option value='peak'>peak</option>
+ <option value='pkt'>pkt</option>
+ <option value='rate'>rate</option>
+ <option value='size'>size</option>
+ <option value='sport'>sport</option>
+ <option value='src'>src</option>
</select>
<p/>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
@@ -123,7 +123,7 @@ else
<table>
<tr><td>
<div name='cpuactivitydiv' id='cpuactivitydiv'>
- <b><?=gettext("Gathering pfTOP activity, please wait...");?>
+ <b>Gathering pfTOP activity, please wait...
</div>
</td></tr>
</table>
diff --git a/usr/local/www/load_balancer_monitor.php b/usr/local/www/load_balancer_monitor.php
index 86f7530..5cb4ec7 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>
diff --git a/usr/local/www/load_balancer_monitor_edit.php b/usr/local/www/load_balancer_monitor_edit.php
index 934be05..630e31d 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="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..2cb4ff8 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(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", 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>
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..f93397b 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>" 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("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>
diff --git a/usr/local/www/load_balancer_relay_action_edit.php b/usr/local/www/load_balancer_relay_action_edit.php
index d623fef..5942ca1 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..673bc63 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>
diff --git a/usr/local/www/load_balancer_relay_protocol_edit.php b/usr/local/www/load_balancer_relay_protocol_edit.php
index 519dd0b..1a9e9f9 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..0390678 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>
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..512dbf9 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">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
+ <?=getetxt("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>
+ <?=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 29acb1c..505169e 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();
@@ -83,11 +84,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>
@@ -95,13 +96,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>
@@ -120,8 +121,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>
@@ -130,27 +131,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>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>
</table></td>
<td class="list">&nbsp;</td>
diff --git a/usr/local/www/services_captiveportal_ip_edit.php b/usr/local/www/services_captiveportal_ip_edit.php
index 419327d..f630afa 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();
@@ -83,24 +84,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 ;
}
}
@@ -149,11 +150,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);?>
@@ -161,39 +162,39 @@ 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']);?>">
<br>
- <span class="vexpl">IP address</span></td>
+ <span class="vexpl"><?=gettext("IP address"); ?></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 b55e750..1ac2e86 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;
}
}
@@ -129,8 +130,8 @@ if ($_POST) {
$ruleno = captiveportal_get_ipfw_passthru_ruleno($oldmac);
if ($ruleno) {
captiveportal_free_ipfw_ruleno($ruleno);
- $rules = "delete {$ruleno}\n";
- $rules .= "delete " . ++$ruleno . "\n";
+ $rules = sprintf("%s %s\n", gettext("delete"), $ruleno);
+ $rules .= gettext("delete") . " " . ++$ruleno . "\n";
$rules .= captiveportal_passthrumac_configure_entry($mac);
file_put_contents("{$g['tmp_path']}/tmpmacedit{$id}", $rules);
mwexec("/sbin/ipfw -q {$g['tmp_path']}/tmpmacedit{$id}");
@@ -149,35 +150,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..7381f90 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"),getext("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) {
@@ -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 79fd1d8..95d3c06 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']);
}
}
@@ -259,15 +259,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]);
}
}
@@ -372,7 +372,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";
@@ -466,7 +466,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>";
@@ -474,7 +474,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>
@@ -513,31 +513,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)));
@@ -554,7 +554,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
@@ -571,115 +571,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']);?>">
</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>
@@ -688,56 +688,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">
@@ -745,13 +745,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
@@ -770,7 +770,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++; ?>
@@ -780,7 +780,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;
@@ -796,29 +796,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><?php printf(gettext("The DNS servers entered in"); ?><a href="system.php">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>
@@ -848,7 +848,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 02a7315..202f4e5 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_map_enabled && !$_POST['ipaddr']) {
- $input_errors[] = "Static map is enabled. You must specify an IP address.";
+ $input_errors[] = gettext("Static map 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..25fa4bf 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("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..3d45e74 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 80edc0b..f0eaabb 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>
@@ -105,9 +105,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>
- Add something meaningful here.
+ <?=gettext("Add something meaningful here.");?>
</td>
<td class="list">&nbsp;</td>
</tr>
diff --git a/usr/local/www/services_rfc2136_edit.php b/usr/local/www/services_rfc2136_edit.php
index 97f8770..57dfdc6 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 9540d98..119be42 100755
--- a/usr/local/www/services_snmp.php
+++ b/usr/local/www/services_snmp.php
@@ -84,11 +84,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 +96,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 +149,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Services","SNMP");
+$pgtitle = array(gettext("Services"),gettext("SNMP"));
include("head.inc");
?>
@@ -259,38 +259,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>In most cases, &quot;public&quot; is used here</br>
+ <br><?=gettext("In most cases"); ?>, &quot;<?=gettext("public"); ?>&quot; <?=gettext("is used here");?></br>
</td>
</tr>
@@ -319,33 +319,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 +354,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