summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www')
-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.php34
-rw-r--r--usr/local/www/diag_overload_tables.php10
-rw-r--r--usr/local/www/diag_packet_capture.php67
-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/firewall_aliases.php24
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php79
-rwxr-xr-xusr/local/www/firewall_aliases_import.php37
-rwxr-xr-xusr/local/www/firewall_nat.php58
-rwxr-xr-xusr/local/www/firewall_nat_1to1.php34
-rwxr-xr-xusr/local/www/firewall_nat_1to1_edit.php40
-rwxr-xr-xusr/local/www/firewall_nat_edit.php214
-rwxr-xr-xusr/local/www/firewall_nat_out.php86
-rwxr-xr-xusr/local/www/firewall_nat_out_edit.php122
-rwxr-xr-xusr/local/www/firewall_rules.php125
-rwxr-xr-xusr/local/www/firewall_rules_edit.php334
-rw-r--r--usr/local/www/firewall_schedule.php23
-rw-r--r--usr/local/www/firewall_schedule_edit.php89
-rwxr-xr-xusr/local/www/firewall_shaper.php34
-rwxr-xr-xusr/local/www/firewall_shaper_layer7.php44
-rwxr-xr-xusr/local/www/firewall_shaper_queues.php14
-rw-r--r--usr/local/www/firewall_shaper_vinterface.php34
-rwxr-xr-xusr/local/www/firewall_shaper_wizards.php28
-rwxr-xr-xusr/local/www/firewall_virtual_ip.php24
-rwxr-xr-xusr/local/www/firewall_virtual_ip_edit.php74
47 files changed, 1181 insertions, 1176 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 57df0e1..7bf67bf 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 db96484..4e64c8f 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
@@ -76,7 +76,7 @@ if($_POST['bootslice']) {
</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();
@@ -92,9 +92,9 @@ echo <<<EOF
</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();
@@ -115,28 +115,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>
@@ -146,20 +146,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>
@@ -170,10 +170,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 e4bba75..7b0ffe1 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");
@@ -94,7 +94,7 @@ include("fbegin.inc");
}
</script>
-<?=gettext("Table");?>:
+Table:
<select id='type' onChange='method_change($F("type"));' name='type'>
<?php foreach ($tables as $table) {
echo "<option name='{$table}' value='{$table}'";
@@ -109,7 +109,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); ?>
@@ -126,14 +126,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 de314a9..bfdb52d 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,7 +64,7 @@ if ($_POST) {
}
if ($_POST['startbtn'] != "" ) {
- $action = gettext("Start");
+ $action = "Start";
//delete previous packet capture if it exists
if (file_exists($fp.$fn))
@@ -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
@@ -128,54 +129,52 @@ include("fbegin.inc");
</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 of each packet that will be captured. Default value is 0, which will capture the entire frame regardless of its size.");?>
</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/firewall_aliases.php b/usr/local/www/firewall_aliases.php
index d6a9e37..8bcfcf6 100755
--- a/usr/local/www/firewall_aliases.php
+++ b/usr/local/www/firewall_aliases.php
@@ -150,7 +150,7 @@ if ($_GET['act'] == "del") {
}
}
if($is_alias_referenced == true) {
- $savemsg = "Cannot delete rule. Currently in use by {$referenced_by}";
+ $savemsg = sprintf(gettext("Cannot delete rule. Currently in use by %s"), $referenced_by);
} else {
unset($a_aliases[$_GET['id']]);
write_config();
@@ -162,7 +162,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("Firewall","Aliases");
+$pgtitle = array(gettext("Firewall"),gettext("Aliases"));
include("head.inc");
?>
@@ -172,19 +172,19 @@ include("head.inc");
<form action="firewall_aliases.php" method="post">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('aliases')): ?><p>
-<?php print_info_box_np("The alias list has been changed.<br>You must apply the changes in order for them to take effect.");?>
+<?php print_info_box_np(gettext("The alias list has been changed.") . "<br>" . gettext("You must apply the changes in order for them to take effect."));?>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="25%" class="listhdrr">Name</td>
- <td width="25%" class="listhdrr">Values</td>
- <td width="25%" class="listhdr">Description</td>
+ <td width="25%" class="listhdrr"><?=gettext("Name"); ?></td>
+ <td width="25%" class="listhdrr"><?=gettext("Values"); ?></td>
+ <td width="25%" class="listhdr"><?=gettext("Description"); ?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle" width="17">&nbsp;</td>
- <td valign="middle"><a href="firewall_aliases_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="add a new alias"></a></td>
+ <td valign="middle"><a href="firewall_aliases_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new alias"); ?>"></a></td>
</tr>
</table>
</td>
@@ -216,8 +216,8 @@ include("head.inc");
<td valign="middle" nowrap class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td valign="middle"><a href="firewall_aliases_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="edit alias"></a></td>
- <td><a href="firewall_aliases.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this alias? 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 alias"></a></td>
+ <td valign="middle"><a href="firewall_aliases_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit alias"); ?>"></a></td>
+ <td><a href="firewall_aliases.php?act=del&id=<?=$i;?>" onclick="return confirm(<?=gettext('Do you really want to delete this alias? 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 alias"); ?>"></a></td>
</tr>
</table>
</td>
@@ -230,10 +230,10 @@ include("head.inc");
<tr>
<td valign="middle" width="17">&nbsp;</td>
<td valign="middle">
- <a href="firewall_aliases_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="add a new alias"></a></td>
+ <a href="firewall_aliases_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new alias"); ?>"></a></td>
</td>
<td valign="middle">
- <a href="firewall_aliases_import.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_import_alias.gif" width="17" height="17" border="0" title="<?=gettext("Bulk import aliases from list");?>" alt="" /></a>
+ <a href="firewall_aliases_import.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_import_alias.gif" width="17" height="17" border="0" title="<?=gettext("Bulk import aliases from list"); ?>" alt="" /></a>
</td>
</tr>
</table>
@@ -241,7 +241,7 @@ include("head.inc");
</tr>
<tr>
<td class="tabcont" colspan="3">
- <p><span class="vexpl"><span class="red"><strong>Note:<br></strong></span>Aliases act as placeholders for real hosts, networks or ports. They can be used to minimize the number of changes that have to be made if a host, network or port changes. You can enter the name of an alias instead of the host, network or port in all fields that have a red background. The alias will be resolved according to the list above. If an alias cannot be resolved (e.g. because you deleted it), the corresponding element (e.g. filter/NAT/shaper rule) will be considered invalid and skipped.</span></p>
+ <p><span class="vexpl"><span class="red"><strong><?=gettext("Note"); ?>:<br></strong></span><?=gettext("Aliases act as placeholders for real hosts, networks or ports. They can be used to minimize the number of changes that have to be made if a host, network or port changes. You can enter the name of an alias instead of the host, network or port in all fields that have a red background. The alias will be resolved according to the list above. If an alias cannot be resolved (e.g. because you deleted it), the corresponding element (e.g. filter/NAT/shaper rule) will be considered invalid and skipped."); ?></span></p>
</td>
</tr>
</table>
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index 0f66c25..27b0e5c 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -44,7 +44,6 @@
##|*MATCH=firewall_aliases_edit.php*
##|-PRIV
-$pgtitle = array("Firewall","Aliases","Edit");
// Keywords not allowed in names
$reserved_keywords = array("pass", "out", "queue", "max", "min", "pptp", "pppoe", "L2TP", "OpenVPN", "IPsec");
@@ -54,6 +53,8 @@ require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
+$pgtitle = array(gettext("Firewall"),gettext("Aliases"),gettext("Edit"));
+
$reserved_ifs = get_configured_interface_list(false, true);
$reserved_keywords = array_merge($reserved_keywords, $reserved_ifs);
@@ -101,7 +102,7 @@ if (isset($id) && $a_aliases[$id]) {
$iflist = get_configured_interface_with_descr(true, true);
foreach ($iflist as $if => $ifdesc)
if($ifdesc == $pconfig['descr'])
- $input_errors[] = "Sorry, an interface is already named {$pconfig['descr']}.";
+ $input_errors[] = sprintf(gettext("Sorry, an interface is already named %s."), $pconfig['descr']);
if($a_aliases[$id]['type'] == "urltable") {
$pconfig['address'] = $a_aliases[$id]['url'];
@@ -130,24 +131,24 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "name");
- $reqdfieldsn = explode(",", "Name");
+ $reqdfieldsn = array(gettext("Name"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
$x = is_validaliasname($_POST['name']);
if (!isset($x)) {
- $input_errors[] = "Reserved word used for alias name.";
+ $input_errors[] = gettext("Reserved word used for alias name.");
} else if ($_POST['type'] == "port" && (getservbyname($_POST['name'], "tcp") || getservbyname($_POST['name'], "udp"))) {
- $input_errors[] = "Reserved word used for alias name.";
+ $input_errors[] = gettext("Reserved word used for alias name.");
} else {
if (is_validaliasname($_POST['name']) == false)
- $input_errors[] = "The alias name may only consist of the characters a-z, A-Z, 0-9, _.";
+ $input_errors[] = gettext("The alias name may only consist of the characters") . " a-z, A-Z, 0-9, _.";
}
/* check for name conflicts */
if (empty($a_aliases[$id])) {
foreach ($a_aliases as $alias) {
if ($alias['name'] == $_POST['name']) {
- $input_errors[] = "An alias with this name already exists.";
+ $input_errors[] = gettext("An alias with this name already exists.");
break;
}
}
@@ -156,12 +157,12 @@ if ($_POST) {
/* Check for reserved keyword names */
foreach($reserved_keywords as $rk)
if($rk == $_POST['name'])
- $input_errors[] = "Cannot use a reserved keyword as alias name $rk";
+ $input_errors[] = sprintf(gettext("Cannot use a reserved keyword as alias name %s"), $rk);
/* check for name interface description conflicts */
foreach($config['interfaces'] as $interface) {
if($interface['descr'] == $_POST['name']) {
- $input_errors[] = "An interface description with this name already exists.";
+ $input_errors[] = gettext("An interface description with this name already exists.");
break;
}
}
@@ -183,10 +184,10 @@ if ($_POST) {
$alias['url'] = $_POST['address0'];
$alias['updatefreq'] = $_POST['address_subnet0'] ? $_POST['address_subnet0'] : 7;
if (!is_URL($alias['url']) || empty($alias['url'])) {
- $input_errors[] = "You must provide a valid URL.";
+ $input_errors[] = gettext("You must provide a valid URL.");
$dont_update = true;
} elseif (! process_alias_urltable($alias['name'], $alias['url'], 0, true)) {
- $input_errors[] = "Unable to fetch usable data.";
+ $input_errors[] = gettext("Unable to fetch usable data.");
$dont_update = true;
}
}
@@ -231,14 +232,14 @@ if ($_POST) {
}
if($isfirst == 0) {
/* nothing was found */
- $input_errors[] = "You must provide a valid URL. Could not fetch usable data.";
+ $input_errors[] = gettext("You must provide a valid URL. Could not fetch usable data.");
$dont_update = true;
break;
}
$alias['aliasurl'][] = $_POST['address' . $x];
mwexec("/bin/rm -rf {$temp_filename}");
} else {
- $input_errors[] = "You must provide a valid URL.";
+ $input_errors[] = gettext("You must provide a valid URL.");
$dont_update = true;
break;
}
@@ -254,12 +255,12 @@ if ($_POST) {
$wrongaliases .= " " . $_POST["address{$x}"];
} else if ($_POST['type'] == "port") {
if (!is_port($_POST["address{$x}"]))
- $input_errors[] = $_POST["address{$x}"] . " is not a valid port or alias.";
+ $input_errors[] = $_POST["address{$x}"] . " " . gettext("is not a valid port or alias.");
} else if ($_POST['type'] == "host" || $_POST['type'] == "network") {
if (!is_ipaddr($_POST["address{$x}"])
&& !is_hostname($_POST["address{$x}"])
&& !is_iprange($_POST["address{$x}"]))
- $input_errors[] = $_POST["address{$x}"] . " is not a valid {$_POST['type']} alias.";
+ $input_errors[] = sprintf(gettext("%s is not a valid %s alias."), $_POST["address{$x}"], $_POST['type']);
}
if (is_iprange($_POST["address{$x}"])) {
list($startip, $endip) = explode('-', $_POST["address{$x}"]);
@@ -274,11 +275,11 @@ if ($_POST) {
if ($_POST["detail{$x}"] <> "")
$final_address_details[] = $_POST["detail{$x}"];
else
- $final_address_details[] = "Entry added " . date('r');
+ $final_address_details[] = sprintf(gettext("Entry added %s"), date('r'));
}
}
if ($wrongaliases <> "")
- $input_errors[] = "The alias(es): {$wrongaliases} \ncannot be nested cause they are not of the same type.";
+ $input_errors[] = sprintf(gettext("The alias(es): %s %scannot be nested cause they are not of the same type."), $wrongaliases, " \n");
}
if (!$input_errors) {
@@ -444,13 +445,13 @@ $update_freq_str = gettext("Update Freq.");
$networks_help = gettext("Networks are specified in CIDR format. Select the CIDR mask that pertains to each entry. /32 specifies a single host, /24 specifies 255.255.255.0, etc. Hostnames (FQDNs) may also be specified, using a /32 mask. You may also enter an IP range such as 192.168.1.1-192.168.1.254 and a list of CIDR networks will be derived to fill the range.");
$hosts_help = gettext("Enter as many hosts as you would like. Hosts must be specified by their IP address.");
$ports_help = gettext("Enter as many ports as you wish. Port ranges can be expressed by seperating with a colon.");
-$url_help = gettext("Enter as many URLs as you wish. After saving {$g['product_name']} will download the URL and import the items into the alias. Use only with small sets of IP addresses (less than 3000).");
-$urltable_help = gettext("Enter a single URL containing a large number of IPs and/or Subnets. After saving {$g['product_name']} will download the URL and create a table file containing these addresses. This will work with large numbers of addresses (30,000+) or small numbers.");
+$url_help = sprintf(gettext("Enter as many URLs as you wish. After saving %s will download the URL and import the items into the alias. Use only with small sets of IP addresses (less than 3000)."), $g['product_name']);
+$urltable_help = sprintf(gettext("Enter a single URL containing a large number of IPs and/or Subnets. After saving %s will download the URL and create a table file containing these addresses. This will work with large numbers of addresses (30,000+) or small numbers."), $g['product_name']);
$openvpn_str = gettext("Username");
$openvpn_user_str = gettext("OpenVPN Users");
$openvpn_help = gettext("Enter as many usernames as you wish.");
-$openvpn_freq = gettext("");
+$openvpn_freq = "";
$jscriptstr .= <<<EOD
@@ -549,10 +550,10 @@ EOD;
<form action="firewall_aliases_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">Alias Edit</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Alias Edit"); ?></td>
</tr>
<tr>
- <td valign="top" class="vncellreq">Name</td>
+ <td valign="top" class="vncellreq"><?=gettext("Name"); ?></td>
<td class="vtable">
<input name="origname" type="hidden" id="origname" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['name']);?>" />
<input name="name" type="text" id="name" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['name']);?>" />
@@ -561,47 +562,47 @@ EOD;
<?php endif; ?>
<br />
<span class="vexpl">
- The name of the alias may only consist of the characters a-z, A-Z and 0-9.
+ <?=gettext("The name of the alias may only consist of the characters \"a-z, A-Z and 0-9\"."); ?>
</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="<?=$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" onchange="update_box_type(); typesel_change();">
- <option value="host" <?php if ($pconfig['type'] == "host") echo "selected"; ?>>Host(s)</option>
- <option value="network" <?php if ($pconfig['type'] == "network") echo "selected"; ?>>Network(s)</option>
- <option value="port" <?php if ($pconfig['type'] == "port") echo "selected"; ?>>Port(s)</option>
- <option value="openvpn" <?php if ($pconfig['type'] == "openvpn") echo "selected"; ?>>OpenVPN Users</option>
- <option value="url" <?php if ($pconfig['type'] == "url") echo "selected"; ?>>URL</option>
- <option value="urltable" <?php if ($pconfig['type'] == "urltable") echo "selected"; ?>>URL Table</option>
+ <option value="host" <?php if ($pconfig['type'] == "host") echo "selected"; ?>><?=gettext("Host(s)"); ?></option>
+ <option value="network" <?php if ($pconfig['type'] == "network") echo "selected"; ?>><?=gettext("Network(s)"); ?></option>
+ <option value="port" <?php if ($pconfig['type'] == "port") echo "selected"; ?>><?=gettext("Port(s)"); ?></option>
+ <option value="openvpn" <?php if ($pconfig['type'] == "openvpn") echo "selected"; ?>><?=gettext("OpenVPN Users"); ?></option>
+ <option value="url" <?php if ($pconfig['type'] == "url") echo "selected"; ?>><?=gettext("URL");?></option>
+ <option value="urltable" <?php if ($pconfig['type'] == "urltable") echo "selected"; ?>><?=gettext("URL Table"); ?></option>
</select>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"><div id="addressnetworkport">Host(s)</div></td>
+ <td width="22%" valign="top" class="vncellreq"><div id="addressnetworkport"><?=gettext("Host(s)"); ?></div></td>
<td width="78%" class="vtable">
<table id="maintable">
<tbody>
<tr>
<td colspan="4">
- <div style="padding:5px; margin-top: 16px; margin-bottom: 16px; border:1px dashed #000066; background-color: #ffffff; color: #000000; font-size: 8pt;" id="itemhelp">Item information</div>
+ <div style="padding:5px; margin-top: 16px; margin-bottom: 16px; border:1px dashed #000066; background-color: #ffffff; color: #000000; font-size: 8pt;" id="itemhelp"><?=gettext("Item information"); ?></div>
</td>
</tr>
<tr>
- <td><div id="onecolumn">Network</div></td>
+ <td><div id="onecolumn"><?=gettext("Network"); ?></div></td>
<td><div id="twocolumn">CIDR</div></td>
- <td><div id="threecolumn">Description</div></td>
+ <td><div id="threecolumn"><?=gettext("Description"); ?></div></td>
</tr>
<?php
@@ -640,7 +641,7 @@ EOD;
<input name="detail<?php echo $tracker; ?>" type="text" class="formfld unknown" id="detail<?php echo $tracker; ?>" size="50" value="<?=$item4;?>" />
</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
@@ -662,8 +663,8 @@ EOD;
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input id="submit" name="submit" type="submit" class="formbtn" value="Save" />
- <a href="firewall_aliases.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="firewall_aliases.php"><input id="cancelbutton" name="cancelbutton" type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" /></a>
</td>
</tr>
</table>
diff --git a/usr/local/www/firewall_aliases_import.php b/usr/local/www/firewall_aliases_import.php
index 402cc3d..39311c4 100755
--- a/usr/local/www/firewall_aliases_import.php
+++ b/usr/local/www/firewall_aliases_import.php
@@ -37,7 +37,6 @@
##|*MATCH=firewall_aliases_import.php*
##|-PRIV
-$pgtitle = array("Firewall","Aliases","Bulk import");
$reserved_keywords = array("pass", "out", "queue", "max", "min", "pptp", "pppoe", "L2TP", "OpenVPN", "IPsec");
@@ -46,6 +45,8 @@ require_once("util.inc");
require("filter.inc");
require("shaper.inc");
+$pgtitle = array(gettext("Firewall"),gettext("Aliases"),gettext("Bulk import"));
+
$reserved_ifs = get_configured_interface_list(false, true);
$reserved_keywords = array_merge($reserved_keywords, $reserved_ifs);
@@ -55,27 +56,27 @@ $a_aliases = &$config['aliases']['alias'];
if($_POST['aliasimport'] <> "") {
$reqdfields = explode(" ", "name aliasimport");
- $reqdfieldsn = explode(",", "Name,Aliases");
+ $reqdfieldsn = array(gettext("Name"),gettext("Aliases"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (is_validaliasname($_POST['name']) == false)
- $input_errors[] = "The alias name may only consist of the characters a-z, A-Z, 0-9, _.";
+ $input_errors[] = gettext("The alias name may only consist of the characters") . " a-z, A-Z, 0-9, _.";
/* check for name duplicates */
if (is_alias($_POST['name']))
- $input_errors[] = "An alias with this name already exists.";
+ $input_errors[] = gettext("An alias with this name already exists.");
/* Check for reserved keyword names */
foreach($reserved_keywords as $rk)
if ($rk == $_POST['name'])
- $input_errors[] = "Cannot use a reserved keyword as alias name $rk";
+ $input_errors[] = sprintf(gettext("Cannot use a reserved keyword as alias name %s"), $rk);
/* check for name interface description conflicts */
foreach($config['interfaces'] as $interface) {
if($interface['descr'] == $_POST['name']) {
- $input_errors[] = "An interface description with this name already exists.";
+ $input_errors[] = gettext("An interface description with this name already exists.");
break;
}
}
@@ -90,7 +91,7 @@ if($_POST['aliasimport'] <> "") {
$rangesubnets = ip_range_to_subnet_array($startip, $endip);
$address .= implode(" ", $rangesubnets);
} else if (!is_ipaddr($impip) && !is_subnet($impip) && !empty($impip)) {
- $input_errors[] = "$impip is not an IP address. Please correct the error to continue";
+ $input_errors[] = sprintf(gettext("%s is not an IP address. Please correct the error to continue"), $impip);
} elseif (!empty($impip)) {
$imported[] = $impip;
}
@@ -127,31 +128,31 @@ include("head.inc");
<div id="inputerrors"></div>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Alias Import</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Alias Import"); ?></td>
</tr>
<tr>
- <td valign="top" class="vncellreq">Alias Name</td>
+ <td valign="top" class="vncellreq"><?=gettext("Alias Name"); ?></td>
<td class="vtable"> <input name="name" type="text" class="formfld unknown" id="name" size="40" value="<?=htmlspecialchars($_POST['name']);?>" />
<br /> <span class="vexpl">
- The name of the alias may only consist of the characters a-z, A-Z and 0-9.</span></td>
+ <?=gettext("The name of the alias may only consist of the characters \"a-z, A-Z and 0-9\"."); ?></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($_POST['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 valign="top" class="vncellreq">Aliases to import</td>
+ <td valign="top" class="vncellreq"><?=gettext("Aliases to import"); ?></td>
<td class="vtable"><textarea name="aliasimport" ROWS="15" COLS="40"><?php echo $_POST['aliasimport']; ?></textarea>
- <br /> <span class="vexpl">Paste in the aliases to import separated by a carriage return. Common examples are lists of IPs, networks, blacklists, etc.
- <br /> The list may contain only IP addresses. </span></td>
+ <br /> <span class="vexpl"><?=gettext("Paste in the aliases to import separated by a carriage return. Common examples are lists of IPs, networks, blacklists, etc."); ?>
+ <br /> <?=gettext("The list may contain only IP addresses."); ?> </span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input id="submit" name="Submit" type="submit" class="formbtn" value="Save" />
- <input class="formbtn" type="button" value="Cancel" onclick="history.back()" />
+ <input id="submit" name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" />
+ <input class="formbtn" type="button" value="<?=gettext("Cancel"); ?>" onclick="history.back()" />
</tr>
</table>
diff --git a/usr/local/www/firewall_nat.php b/usr/local/www/firewall_nat.php
index 02a2595..9646f52 100755
--- a/usr/local/www/firewall_nat.php
+++ b/usr/local/www/firewall_nat.php
@@ -158,7 +158,7 @@ if (isset($_POST['del_x'])) {
}
}
-$pgtitle = array("Firewall","NAT","Port Forward");
+$pgtitle = array(gettext("Firewall"),gettext("NAT"),gettext("Port Forward"));
include("head.inc");
echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript/domTT/domLib.js\"></script>";
@@ -174,18 +174,18 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<?php if (is_subsystem_dirty('natconf')): ?><p>
<?php
if($savemsg)
- print_info_box_np("{$savemsg}<br>The NAT configuration has been changed.<br>You must apply the changes in order for them to take effect.");
- else
- print_info_box_np("The NAT configuration has been changed.<br>You must apply the changes in order for them to take effect.");
+ print_info_box_np("{$savemsg}<br>" . gettext("The NAT configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect.") );
+ else
+ print_info_box_np( gettext("The NAT configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect.") );
?>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
<?php
$tab_array = array();
- $tab_array[] = array("Port Forward", true, "firewall_nat.php");
- $tab_array[] = array("1:1", false, "firewall_nat_1to1.php");
- $tab_array[] = array("Outbound", false, "firewall_nat_out.php");
+ $tab_array[] = array(gettext("Port Forward"), true, "firewall_nat.php");
+ $tab_array[] = array(gettext("1:1"), false, "firewall_nat_1to1.php");
+ $tab_array[] = array(gettext("Outbound"), false, "firewall_nat_out.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -196,23 +196,23 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<tr id="frheader">
<td width="3%" class="list">&nbsp;</td>
<td width="3%" class="list">&nbsp;</td>
- <td width="5%" class="listhdrr">If</td>
- <td width="5%" class="listhdrr">Proto</td>
- <td width="11%" class="listhdrr">Src. addr</td>
- <td width="11%" class="listhdrr">Src. ports</td>
- <td width="11%" class="listhdrr">Dest. addr</td>
- <td width="11%" class="listhdrr">Dest. ports</td>
- <td width="11%" class="listhdrr">NAT IP</td>
- <td width="11%" class="listhdrr">NAT Ports</td>
- <td width="11%" class="listhdr">Description</td>
+ <td width="5%" class="listhdrr"><?=gettext("If");?></td>
+ <td width="5%" class="listhdrr"><?=gettext("Proto");?></td>
+ <td width="11%" class="listhdrr"><?=gettext("Src. addr");?></td>
+ <td width="11%" class="listhdrr"><?=gettext("Src. ports");?></td>
+ <td width="11%" class="listhdrr"><?=gettext("Dest. addr");?></td>
+ <td width="11%" class="listhdrr"><?=gettext("Dest. ports");?></td>
+ <td width="11%" class="listhdrr"><?=gettext("NAT IP");?></td>
+ <td width="11%" class="listhdrr"><?=gettext("NAT Ports");?></td>
+ <td width="11%" class="listhdr"><?=gettext("Description");?></td>
<td width="5%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17">
<?php if (count($a_nat) == 0): ?>
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="delete selected rules" border="0">
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" border="0">
<?php else: ?>
- <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="delete selected rules" onclick="return confirm('Do you really want to delete the selected rules?')">
+ <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="<?=gettext("delete selected rules"); ?>" onclick="return confirm('Do you really want to delete the selected rules?')">
<?php endif; ?>
</td>
<td><a href="firewall_nat_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
@@ -253,9 +253,9 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<td class="listt"><input type="checkbox" id="frc<?=$nnats;?>" name="rule[]" value="<?=$i;?>" onClick="fr_bgcolor('<?=$nnats;?>')" style="margin: 0; padding: 0; width: 15px; height: 15px;"></td>
<td class="listt" align="center">
<?php if($natent['associated-rule-id'] == "pass"): ?>
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass.gif" title="All traffic matching this NAT entry is passed" border="0">
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass.gif" title="<?=gettext("All traffic matching this NAT entry is passed"); ?>" border="0">
<?php elseif (!empty($natent['associated-rule-id'])): ?>
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_chain.png" width="17" height="17" title="Firewall rule ID <?=htmlspecialchars($nnatid); ?> is managed with this rule" border="0">
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_chain.png" width="17" height="17" title="<?=gettext("Firewall rule ID"); ?> <?=htmlspecialchars($nnatid); ?> <?=gettext("is managed with this rule"); ?>" border="0">
<?php endif; ?>
</td>
<td class="listlr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';">
@@ -310,12 +310,12 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<td valign="middle" class="list" nowrap>
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td><input onmouseover="fr_insline(<?=$nnats;?>, true)" onmouseout="fr_insline(<?=$nnats;?>, false)" name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" title="move selected rules before this rule" height="17" type="image" width="17" border="0"></td>
- <td><a href="firewall_nat_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="edit rule"></a></td>
+ <td><input onmouseover="fr_insline(<?=$nnats;?>, true)" onmouseout="fr_insline(<?=$nnats;?>, false)" name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" title="<?=gettext("move selected rules before this rule");?>" height="17" type="image" width="17" border="0"></td>
+ <td><a href="firewall_nat_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit rule"); ?>"></a></td>
</tr>
<tr>
- <td align="center" valign="middle"><a href="firewall_nat.php?act=del&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="delete rule" onclick="return confirm('Do you really want to delete this rule?')"></a></td>
- <td><a href="firewall_nat_edit.php?dup=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add a new nat based on this one" width="17" height="17" border="0"></a></td>
+ <td align="center" valign="middle"><a href="firewall_nat.php?act=del&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete rule");?> onclick="return confirm(<?=gettext('Do you really want to delete this rule?');?>)"></a></td>
+ <td><a href="firewall_nat_edit.php?dup=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new nat based on this one");?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</tr>
@@ -328,14 +328,14 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<td class="list" valign="middle" nowrap>
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected rules to end" border="0"><?php else: ?><input name="move_<?=$i;?>" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="move selected rules to end" border="0"><?php endif; ?></td>
+ <td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected rules to end"); ?>" border="0"><?php else: ?><input name="move_<?=$i;?>" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="<?=gettext("move selected rules to end");?>" border="0"><?php endif; ?></td>
</tr>
<tr>
<td width="17">
<?php if (count($a_nat) == 0): ?>
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="delete selected rules" border="0">
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" border="0">
<?php else: ?>
- <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="delete selected rules" onclick="return confirm('Do you really want to delete the selected rules?')">
+ <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="<?=gettext("delete selected rules"); ?>" onclick="return confirm(<?=gettext('Do you really want to delete the selected rules?');?>)">
<?php endif; ?>
</td>
<td><a href="firewall_nat_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
@@ -346,11 +346,11 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<tr><td>&nbsp;</td></tr>
<tr>
<td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass.gif" width="11" height="11"></td>
- <td colspan="3">pass</td>
+ <td colspan="3"><?=gettext("pass"); ?></td>
</tr>
<tr>
<td width="14"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_chain.png" width="11" height="11"></td>
- <td colspan="3">linked rule</td>
+ <td colspan="3"><?=gettext("linked rule");?></td>
</tr>
</table>
</div>
diff --git a/usr/local/www/firewall_nat_1to1.php b/usr/local/www/firewall_nat_1to1.php
index 15788da..74e0ce8 100755
--- a/usr/local/www/firewall_nat_1to1.php
+++ b/usr/local/www/firewall_nat_1to1.php
@@ -75,7 +75,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("Firewall","NAT","1:1");
+$pgtitle = array(gettext("Firewall"),gettext("NAT"),gettext("1:1"));
include("head.inc");
?>
@@ -84,14 +84,14 @@ include("head.inc");
<form action="firewall_nat_1to1.php" method="post">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('natconf')): ?><p>
-<?php print_info_box_np("The NAT 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 NAT 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>
<?php
$tab_array = array();
- $tab_array[] = array("Port Forward", false, "firewall_nat.php");
- $tab_array[] = array("1:1", true, "firewall_nat_1to1.php");
- $tab_array[] = array("Outbound", false, "firewall_nat_out.php");
+ $tab_array[] = array(gettext("Port Forward"), false, "firewall_nat.php");
+ $tab_array[] = array(gettext("1:1"), true, "firewall_nat_1to1.php");
+ $tab_array[] = array(gettext("Outbound"), false, "firewall_nat_out.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -100,15 +100,15 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="10%" class="listhdrr">Interface</td>
- <td width="20%" class="listhdrr">External IP</td>
- <td width="20%" class="listhdrr">Internal IP</td>
- <td width="40%" class="listhdr">Description</td>
+ <td width="10%" class="listhdrr"><?=gettext("Interface"); ?></td>
+ <td width="20%" class="listhdrr"><?=gettext("External IP"); ?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Internal IP"); ?></td>
+ <td width="40%" class="listhdr"><?=gettext("Description"); ?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17"></td>
- <td valign="middle"><a href="firewall_nat_1to1_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="add rule"></a></td>
+ <td valign="middle"><a href="firewall_nat_1to1_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add rule"); ?>"></a></td>
</tr>
</table>
</td>
@@ -137,8 +137,8 @@ include("head.inc");
<td class="list" nowrap>
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td valign="middle"><a href="firewall_nat_1to1_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="edit rule"></a></td>
- <td valign="middle"><a href="firewall_nat_1to1.php?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" title="delete rule"></a></td>
+ <td valign="middle"><a href="firewall_nat_1to1_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit rule"); ?>"></a></td>
+ <td valign="middle"><a href="firewall_nat_1to1.php?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" title="<?=gettext("delete rule"); ?>"></a></td>
</tr>
</table>
</td>
@@ -150,17 +150,17 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17"></td>
- <td valign="middle"><a href="firewall_nat_1to1_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="add rule"></a></td>
+ <td valign="middle"><a href="firewall_nat_1to1_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add rule"); ?>"></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="4">
- <p><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>Depending on the way your WAN connection is setup, you may also need a <a href="firewall_virtual_ip.php">Virtual IP</a>.<br/>
- If you add a 1:1 NAT entry for any of the interface IPs on this system, it will make this system inaccessible on that IP address. i.e. if
- you use your WAN IP address, any services on this system (IPsec, OpenVPN server, etc.) using the WAN IP address will no longer function.</span></p>
+ <p><span class="vexpl"><span class="red"><strong><?=gettext("Note"); ?>:<br>
+ </strong></span><?=gettext("Depending on the way your WAN connection is setup, you may also need a"); ?> <a href="firewall_virtual_ip.php"><?=gettext("Virtual IP"); ?></a>.<br/>
+ <?=gettext("If you add a 1:1 NAT entry for any of the interface IPs on this system, it will make this system inaccessible on that IP address. i.e. if " .
+ "you use your WAN IP address, any services on this system (IPsec, OpenVPN server, etc.) using the WAN IP address will no longer function."); ?></span></p>
</td>
<tr>
</table>
diff --git a/usr/local/www/firewall_nat_1to1_edit.php b/usr/local/www/firewall_nat_1to1_edit.php
index 4966e14..5057959 100755
--- a/usr/local/www/firewall_nat_1to1_edit.php
+++ b/usr/local/www/firewall_nat_1to1_edit.php
@@ -90,15 +90,15 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "interface external internal");
- $reqdfieldsn = explode(",", "Interface,External subnet,Internal subnet");
+ $reqdfieldsn = array(gettext("Interface"),gettext("External subnet"),gettext("Internal subnet"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['external'] && !is_ipaddr($_POST['external']))) {
- $input_errors[] = "A valid external subnet must be specified.";
+ $input_errors[] = gettext("A valid external subnet must be specified.");
}
if (($_POST['internal'] && !is_ipaddr($_POST['internal']))) {
- $input_errors[] = "A valid internal subnet must be specified.";
+ $input_errors[] = gettext("A valid internal subnet must be specified.");
}
/* check for overlaps with other 1:1 */
@@ -144,7 +144,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Firewall","NAT","1:1","Edit");
+$pgtitle = array(gettext("Firewall"),gettext("NAT"),gettext("1:1"),gettext("Edit"));
include("head.inc");
?>
@@ -155,10 +155,10 @@ include("head.inc");
<form action="firewall_nat_1to1_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 NAT 1:1 entry</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit NAT 1:1 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="formselect">
<?php
@@ -195,11 +195,11 @@ include("head.inc");
</option>
<?php endforeach; ?>
</select><br>
- <span class="vexpl">Choose which interface this rule applies to.<br>
- Hint: in most cases, you'll want to use WAN here.</span></td>
+ <span class="vexpl"><?=gettext("Choose which interface this rule applies to"); ?>.<br>
+ <?=gettext("Hint: in most cases, you'll want to use WAN here"); ?>.</span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">External subnet</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("External subnet"); ?></td>
<td width="78%" class="vtable">
<input name="external" type="text" class="formfld unknown" id="external" size="20" value="<?=htmlspecialchars($pconfig['external']);?>">
<select name="subnet" class="formselect" id="subnet" >
@@ -210,36 +210,36 @@ include("head.inc");
<?php endfor; ?>
</select>
<br>
- <span class="vexpl">Enter the external (WAN) subnet for the 1:1 mapping. You may map single IP addresses by specifying a /32 subnet.</span></td>
+ <span class="vexpl"><?=gettext("Enter the external (WAN) subnet for the 1:1 mapping. You may map single IP addresses by specifying a /32 subnet."); ?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Internal subnet</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Internal subnet"); ?></td>
<td width="78%" class="vtable">
<input name="internal" type="text" class="formfld unknown" id="internal" size="20" value="<?=htmlspecialchars($pconfig['internal']);?>">
<br>
- <span class="vexpl">Enter the internal (LAN) subnet for the 1:1 mapping. The subnet size specified for the external subnet also applies to the internal subnet (they have to be the same).</span></td>
+ <span class="vexpl"><?=gettext("Enter the internal (LAN) subnet for the 1:1 mapping. The subnet size specified for the external subnet also applies to the internal subnet (they have to be the same)."); ?></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">NAT reflection</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("NAT reflection"); ?></td>
<td width="78%" class="vtable">
<select name="natreflection" class="formselect">
- <option value="default" <?php if ($pconfig['natreflection'] != "enable" && $pconfig['natreflection'] != "disable") echo "selected"; ?>>use system default</option>
- <option value="enable" <?php if ($pconfig['natreflection'] == "enable") echo "selected"; ?>>enable</option>
- <option value="disable" <?php if ($pconfig['natreflection'] == "disable") echo "selected"; ?>>disable</option>
+ <option value="default" <?php if ($pconfig['natreflection'] != "enable" && $pconfig['natreflection'] != "disable") echo "selected"; ?>><?=gettext("use system default"); ?></option>
+ <option value="enable" <?php if ($pconfig['natreflection'] == "enable") echo "selected"; ?>><?=gettext("enable"); ?></option>
+ <option value="disable" <?php if ($pconfig['natreflection'] == "disable") echo "selected"; ?>><?=gettext("disable"); ?></option>
</select>
</td>
</tr>
<tr>
<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_1to1[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/firewall_nat_edit.php b/usr/local/www/firewall_nat_edit.php
index 3f06928..7a7b807 100755
--- a/usr/local/www/firewall_nat_edit.php
+++ b/usr/local/www/firewall_nat_edit.php
@@ -105,7 +105,7 @@ foreach ($_POST as $key => $value) {
$temp = $value;
$newpost = htmlentities($temp);
if($newpost <> $temp)
- $input_errors[] = "Invalid characters detected ($temp). Please remove invalid characters and save again.";
+ $input_errors[] = sprintf(gettext("Invalid characters detected %s. Please remove invalid characters and save again."), $temp);
}
if ($_POST) {
@@ -179,19 +179,19 @@ if ($_POST) {
/* input validation */
if(strtoupper($_POST['proto']) == "TCP" or strtoupper($_POST['proto']) == "UDP" or strtoupper($_POST['proto']) == "TCP/UDP") {
$reqdfields = explode(" ", "interface proto dstbeginport dstendport localip");
- $reqdfieldsn = explode(",", "Interface,Protocol,Destination port from,Destination port to,NAT IP");
+ $reqdfieldsn = array(gettext("Interface"),gettext("Protocol"),gettext("Destination port from"),gettext("Destination port to"),gettext("NAT IP"));
} else {
$reqdfields = explode(" ", "interface proto localip");
- $reqdfieldsn = explode(",", "Interface,Protocol,NAT IP");
+ $reqdfieldsn = array(gettext("Interface"),gettext("Protocol"),gettext("NAT IP"));
}
if ($_POST['srctype'] == "single" || $_POST['srctype'] == "network") {
$reqdfields[] = "src";
- $reqdfieldsn[] = "Source address";
+ $reqdfieldsn[] = gettext("Source address");
}
if ($_POST['dsttype'] == "single" || $_POST['dsttype'] == "network") {
$reqdfields[] = "dst";
- $reqdfieldsn[] = "Destination address";
+ $reqdfieldsn[] = gettext("Destination address");
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -206,42 +206,42 @@ if ($_POST) {
}
if (($_POST['localip'] && !is_ipaddroralias($_POST['localip']))) {
- $input_errors[] = "\"{$_POST['localip']}\" is not valid NAT IP address or host alias.";
+ $input_errors[] = sprintf(gettext("\"%s\" is not valid NAT IP address or host alias."), $_POST['localip']);
}
if ($_POST['srcbeginport'] && !is_portoralias($_POST['srcbeginport']))
- $input_errors[] = "{$_POST['srcbeginport']} is not a valid start source port. It must be a port alias or integer between 1 and 65535.";
+ $input_errors[] = sprintf(gettext("%s is not a valid start source port. It must be a port alias or integer between 1 and 65535."), $_POST['srcbeginport']);
if ($_POST['srcendport'] && !is_portoralias($_POST['srcendport']))
- $input_errors[] = "{$_POST['srcendport']} is not a valid end source port. It must be a port alias or integer between 1 and 65535.";
+ $input_errors[] = sprintf(gettext("%s is not a valid end source port. It must be a port alias or integer between 1 and 65535."), $_POST['srcendport']);
if ($_POST['dstbeginport'] && !is_portoralias($_POST['dstbeginport']))
- $input_errors[] = "{$_POST['dstbeginport']} is not a valid start destination port. It must be a port alias or integer between 1 and 65535.";
+ $input_errors[] = sprintf(gettext("%s is not a valid start destination port. It must be a port alias or integer between 1 and 65535."), $_POST['dstbeginport']);
if ($_POST['dstendport'] && !is_portoralias($_POST['dstendport']))
- $input_errors[] = "{$_POST['dstendport']} is not a valid end destination port. It must be a port alias or integer between 1 and 65535.";
+ $input_errors[] = sprintf(gettext("%s is not a valid end destination port. It must be a port alias or integer between 1 and 65535."), $_POST['dstendport']);
if ($_POST['localbeginport'] && !is_portoralias($_POST['localbeginport'])) {
- $input_errors[] = "{$_POST['localbeginport']} is not a valid local port. It must be a port alias or integer between 1 and 65535.";
+ $input_errors[] = sprintf(gettext("%s is not a valid local port. It must be a port alias or integer between 1 and 65535."), $_POST['localbeginport']);
}
/* if user enters an alias and selects "network" then disallow. */
if( ($_POST['srctype'] == "network" && is_alias($_POST['src']) )
|| ($_POST['dsttype'] == "network" && is_alias($_POST['dst']) ) ) {
- $input_errors[] = "You must specify single host or alias for alias entries.";
+ $input_errors[] = gettext("You must specify single host or alias for alias entries.");
}
if (!is_specialnet($_POST['srctype'])) {
if (($_POST['src'] && !is_ipaddroralias($_POST['src']))) {
- $input_errors[] = "{$_POST['src']} is not a valid source IP address or alias.";
+ $input_errors[] = sprintf(gettext("%s is not a valid source IP address or alias."), $_POST['src']);
}
if (($_POST['srcmask'] && !is_numericint($_POST['srcmask']))) {
- $input_errors[] = "A valid source bit count must be specified.";
+ $input_errors[] = gettext("A valid source bit count must be specified.");
}
}
if (!is_specialnet($_POST['dsttype'])) {
if (($_POST['dst'] && !is_ipaddroralias($_POST['dst']))) {
- $input_errors[] = "{$_POST['dst']} is not a valid destination IP address or alias.";
+ $input_errors[] = sprintf(gettext("%s is not a valid destination IP address or alias."), $_POST['dst']);
}
if (($_POST['dstmask'] && !is_numericint($_POST['dstmask']))) {
- $input_errors[] = "A valid destination bit count must be specified.";
+ $input_errors[] = gettext("A valid destination bit count must be specified.");
}
}
@@ -260,7 +260,7 @@ if ($_POST) {
if (!$input_errors) {
if (($_POST['dstendport'] - $_POST['dstbeginport'] + $_POST['localbeginport']) > 65535)
- $input_errors[] = "The target port range must be an integer between 1 and 65535.";
+ $input_errors[] = gettext("The target port range must be an integer between 1 and 65535.");
}
/* check for overlaps */
@@ -281,7 +281,7 @@ if ($_POST) {
if (!( (($_POST['beginport'] < $begp) && ($_POST['endport'] < $begp))
|| (($_POST['beginport'] > $endp) && ($_POST['endport'] > $endp)))) {
- $input_errors[] = "The destination port range overlaps with an existing entry.";
+ $input_errors[] = gettext("The destination port range overlaps with an existing entry.");
break;
}
}
@@ -421,7 +421,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Firewall","NAT","Port Forward: Edit");
+$pgtitle = array(gettext("Firewall"),gettext("NAT"),gettext("Port Forward"),gettext("Edit"));
include("head.inc");
?>
@@ -433,26 +433,26 @@ include("fbegin.inc"); ?>
<form action="firewall_nat_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 Redirect entry</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Redirect entry"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Disabled</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled"); ?></td>
<td width="78%" class="vtable">
<input name="disabled" type="checkbox" id="disabled" value="yes" <?php if ($pconfig['disabled']) echo "checked"; ?>>
- <strong>Disable this rule</strong><br />
- <span class="vexpl">Set this option to disable this rule without removing it from the list.</span>
+ <strong><?=gettext("Disable this rule"); ?></strong><br />
+ <span class="vexpl"><?=gettext("Set this option to disable this rule without removing it from the list."); ?></span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">No RDR (NOT)</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("No RDR (NOT)"); ?></td>
<td width="78%" class="vtable">
<input type="checkbox" name="nordr"<?php if($pconfig['nordr']) echo " CHECKED"; ?>>
- <span class="vexpl">Enabling this option will disable redirection for traffic matching this rule.
- <br>Hint: this option is rarely needed, don't use this unless you know what you're doing.</span>
+ <span class="vexpl"><?=gettext("Enabling this option will disable redirection for traffic matching this rule."); ?>
+ <br><?=gettext("Hint: this option is rarely needed, don't use this unless you know what you're doing."); ?></span>
</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" onChange="dst_change(this.value,iface_old,document.iform.dsttype.value);iface_old = document.iform.interface.value;typesel_change();">
<?php
@@ -489,60 +489,60 @@ include("fbegin.inc"); ?>
</option>
<?php endforeach; ?>
</select><br>
- <span class="vexpl">Choose which interface this rule applies to.<br>
- Hint: in most cases, you'll want to use WAN here.</span></td>
+ <span class="vexpl"><?=gettext("Choose which interface this rule applies to."); ?><br>
+ <?=gettext("Hint: in most cases, you'll want to use WAN here."); ?></span></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">
<select name="proto" class="formselect" onChange="proto_change(); check_for_aliases();">
<?php $protocols = explode(" ", "TCP UDP TCP/UDP GRE ESP"); foreach ($protocols as $proto): ?>
<option value="<?=strtolower($proto);?>" <?php if (strtolower($proto) == $pconfig['proto']) echo "selected"; ?>><?=htmlspecialchars($proto);?></option>
<?php endforeach; ?>
- </select> <br> <span class="vexpl">Choose which IP protocol
- this rule should match.<br>
- Hint: in most cases, you should specify <em>TCP</em> &nbsp;here.</span></td>
+ </select> <br> <span class="vexpl"><?=gettext("Choose which IP protocol " .
+ "this rule should match."); ?><br>
+ <?=gettext("Hint: in most cases, you should specify"); ?> <em>TCP</em> &nbsp;<?=gettext("here"); ?>.</span></td>
</tr>
<tr id="showadvancedboxsrc" name="showadvancedboxsrc">
- <td width="22%" valign="top" class="vncellreq">Source</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Source"); ?></td>
<td width="78%" class="vtable">
- <input type="button" onClick="show_source()" value="Advanced"></input> - Show source address and port range</a>
+ <input type="button" onClick="show_source()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show source address and port range"); ?></a>
</td>
</tr>
<tr style="display: none;" id="srctable" name="srctable">
- <td width="22%" valign="top" class="vncellreq">Source</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Source"); ?></td>
<td width="78%" class="vtable">
<input name="srcnot" type="checkbox" id="srcnot" value="yes" <?php if ($pconfig['srcnot']) echo "checked"; ?>>
- <strong>not</strong>
+ <strong><?=gettext("not"); ?></strong>
<br />
- Use this option to invert the sense of the match.
+ <?=gettext("Use this option to invert the sense of the match"); ?>.
<br />
<br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td>Type:&nbsp;&nbsp;</td>
+ <td><?=gettext("Type"); ?>:&nbsp;&nbsp;</td>
<td>
<select name="srctype" class="formselect" onChange="typesel_change()">
<?php
$sel = is_specialnet($pconfig['src']); ?>
- <option value="any" <?php if ($pconfig['src'] == "any") { echo "selected"; } ?>>any</option>
- <option value="single" <?php if (($pconfig['srcmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>>Single host or alias</option>
- <option value="network" <?php if (!$sel) echo "selected"; ?>>Network</option>
+ <option value="any" <?php if ($pconfig['src'] == "any") { echo "selected"; } ?>><?=gettext("any"); ?></option>
+ <option value="single" <?php if (($pconfig['srcmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>><?=gettext("Single host or alias"); ?></option>
+ <option value="network" <?php if (!$sel) echo "selected"; ?>><?=gettext("Network"); ?></option>
<?php if(have_ruleint_access("pptp")): ?>
- <option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo "selected"; } ?>>PPTP clients</option>
+ <option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo "selected"; } ?>><?=gettext("PPTP clients"); ?></option>
<?php endif; ?>
<?php if(have_ruleint_access("pppoe")): ?>
- <option value="pppoe" <?php if ($pconfig['src'] == "pppoe") { echo "selected"; } ?>>PPPoE clients</option>
+ <option value="pppoe" <?php if ($pconfig['src'] == "pppoe") { echo "selected"; } ?>><?=gettext("PPPoE clients"); ?></option>
<?php endif; ?>
<?php if(have_ruleint_access("l2tp")): ?>
- <option value="l2tp" <?php if ($pconfig['src'] == "l2tp") { echo "selected"; } ?>>L2TP clients</option>
- <?php endif; ?>
+ <option value="l2tp" <?php if ($pconfig['src'] == "l2tp") { echo "selected"; } ?>><?=gettext("L2TP clients"); ?></option>
+ <?php endif; ?>
<?php
foreach ($ifdisp as $ifent => $ifdesc): ?>
<?php if(have_ruleint_access($ifent)): ?>
- <option value="<?=$ifent;?>" <?php if ($pconfig['src'] == $ifent) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?> subnet</option>
+ <option value="<?=$ifent;?>" <?php if ($pconfig['src'] == $ifent) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?> <?=gettext("subnet"); ?></option>
<option value="<?=$ifent;?>ip"<?php if ($pconfig['src'] == $ifent . "ip") { echo "selected"; } ?>>
- <?=$ifdesc?> address
+ <?=$ifdesc?> <?=gettext("address");?>
</option>
<?php endif; ?>
<?php endforeach; ?>
@@ -550,7 +550,7 @@ include("fbegin.inc"); ?>
</td>
</tr>
<tr>
- <td>Address:&nbsp;&nbsp;</td>
+ <td><?=gettext("Address"); ?>:&nbsp;&nbsp;</td>
<td>
<input autocomplete='off' name="src" type="text" class="formfldalias" id="src" size="20" value="<?php if (!is_specialnet($pconfig['src'])) echo htmlspecialchars($pconfig['src']);?>"> /
<select name="srcmask" class="formselect" id="srcmask">
@@ -564,15 +564,15 @@ include("fbegin.inc"); ?>
</td>
</tr>
<tr style="display:none" id="sprtable" name="sprtable">
- <td width="22%" valign="top" class="vncellreq">Source port range</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Source port range"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td>from:&nbsp;&nbsp;</td>
+ <td><?=gettext("from"); ?>:&nbsp;&nbsp;</td>
<td>
<select name="srcbeginport" class="formselect" onchange="src_rep_change();ext_change()">
- <option value="">(other)</option>
- <option value="any" <?php $bfound = 0; if ($pconfig['srcbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>>any</option>
+ <option value="">(<?=gettext("other"); ?>)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['srcbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any"); ?></option>
<?php foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcbeginport']) { echo "selected"; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
<?php endforeach; ?>
@@ -581,11 +581,11 @@ include("fbegin.inc"); ?>
</td>
</tr>
<tr>
- <td>to:</td>
+ <td><?=gettext("to"); ?>:</td>
<td>
<select name="srcendport" class="formselect" onchange="ext_change()">
- <option value="">(other)</option>
- <option value="any" <?php $bfound = 0; if ($pconfig['srcendport'] == "any") { echo "selected"; $bfound = 1; } ?>>any</option>
+ <option value="">(<?=gettext("other"); ?>)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['srcendport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any"); ?></option>
<?php foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcendport']) { echo "selected"; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
<?php endforeach; ?>
@@ -595,43 +595,43 @@ include("fbegin.inc"); ?>
</tr>
</table>
<br />
- <span class="vexpl"><?=gettext("Specify the source port or port range for this rule. <b>This is usually <em>random</em> and almost never equal to the destination port range (and should usually be &quot;any&quot;).</b> <br /> Hint: you can leave the <em>'to'</em> field empty if you only want to filter a single port.");?></span><br/>
+ <span class="vexpl"><?=gettext("Specify the source port or port range for this rule"); ?>. <b><?=gettext("This is usually"); ?> <em><?=gettext("random"); ?></em> <?=gettext("and almost never equal to the destination port range (and should usually be 'any')"); ?>.</b> <br /> <?=gettext("Hint: you can leave the"); ?> <em>'<?=gettext("to"); ?>'</em> <?=gettext("field empty if you only want to filter a single port."); ?></span><br/>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Destination</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Destination"); ?></td>
<td width="78%" class="vtable">
<input name="dstnot" type="checkbox" id="dstnot" value="yes" <?php if ($pconfig['dstnot']) echo "checked"; ?>>
- <strong>not</strong>
+ <strong><?=gettext("not"); ?></strong>
<br />
- Use this option to invert the sense of the match.
+ <?=gettext("Use this option to invert the sense of the match"); ?>.
<br />
<br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td>Type:&nbsp;&nbsp;</td>
+ <td><?=gettext("Type"); ?>:&nbsp;&nbsp;</td>
<td>
<select name="dsttype" class="formselect" onChange="typesel_change()">
<?php
$sel = is_specialnet($pconfig['dst']); ?>
- <option value="any" <?php if ($pconfig['dst'] == "any") { echo "selected"; } ?>>any</option>
- <option value="single" <?php if (($pconfig['dstmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>>Single host or alias</option>
- <option value="network" <?php if (!$sel) echo "selected"; ?>>Network</option>
+ <option value="any" <?php if ($pconfig['dst'] == "any") { echo "selected"; } ?>><?=gettext("any"); ?></option>
+ <option value="single" <?php if (($pconfig['dstmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>><?=gettext("Single host or alias"); ?></option>
+ <option value="network" <?php if (!$sel) echo "selected"; ?>><?=gettext("Network"); ?></option>
<?php if(have_ruleint_access("pptp")): ?>
- <option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo "selected"; } ?>>PPTP clients</option>
+ <option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo "selected"; } ?>><?=gettext("PPTP clients"); ?></option>
<?php endif; ?>
<?php if(have_ruleint_access("pppoe")): ?>
- <option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo "selected"; } ?>>PPPoE clients</option>
+ <option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo "selected"; } ?>><?=gettext("PPPoE clients"); ?></option>
<?php endif; ?>
<?php if(have_ruleint_access("l2tp")): ?>
- <option value="l2tp" <?php if ($pconfig['dst'] == "l2tp") { echo "selected"; } ?>>L2TP clients</option>
+ <option value="l2tp" <?php if ($pconfig['dst'] == "l2tp") { echo "selected"; } ?>><?=gettext("L2TP clients"); ?></option>
<?php endif; ?>
<?php foreach ($ifdisp as $if => $ifdesc): ?>
<?php if(have_ruleint_access($if)): ?>
- <option value="<?=$if;?>" <?php if ($pconfig['dst'] == $if) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?> subnet</option>
+ <option value="<?=$if;?>" <?php if ($pconfig['dst'] == $if) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?> <?=gettext("subnet"); ?></option>
<option value="<?=$if;?>ip"<?php if ($pconfig['dst'] == $if . "ip") { echo "selected"; } ?>>
- <?=$ifdesc;?> address
+ <?=$ifdesc;?> <?=gettext("address");?>
</option>
<?php endif; ?>
<?php endforeach; ?>
@@ -658,7 +658,7 @@ include("fbegin.inc"); ?>
</td>
</tr>
<tr>
- <td>Address:&nbsp;&nbsp;</td>
+ <td><?=gettext("Address"); ?>:&nbsp;&nbsp;</td>
<td>
<input name="dst" type="text" class="formfldalias" id="dst" size="20" value="<?php if (!is_specialnet($pconfig['dst'])) echo htmlspecialchars($pconfig['dst']);?>">
/
@@ -674,14 +674,14 @@ include("fbegin.inc"); ?>
</td>
</tr>
<tr id="dprtr" name="dprtr">
- <td width="22%" valign="top" class="vncellreq">Destination port range </td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Destination port range"); ?> </td>
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td>from:&nbsp;&nbsp;</td>
+ <td><?=gettext("from"); ?>:&nbsp;&nbsp;</td>
<td>
<select name="dstbeginport" class="formselect" onchange="dst_rep_change();ext_change()">
- <option value="">(other)</option>
+ <option value="">(<?=gettext("other"); ?>)</option>
<?php $bfound = 0;
foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstbeginport']) { echo "selected"; $bfound = 1; }?>><?=htmlspecialchars($wkportdesc);?></option>
@@ -691,10 +691,10 @@ include("fbegin.inc"); ?>
</td>
</tr>
<tr>
- <td>to:</td>
+ <td><?=gettext("to"); ?>:</td>
<td>
<select name="dstendport" class="formselect" onchange="ext_change()">
- <option value="">(other)</option>
+ <option value="">(<?=gettext("other"); ?>)</option>
<?php $bfound = 0;
foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstendport']) { echo "selected"; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
@@ -706,25 +706,25 @@ include("fbegin.inc"); ?>
</table>
<br />
<span class="vexpl">
- Specify the port or port range for the destination of the packet for this mapping.
+ <?=gettext("Specify the port or port range for the destination of the packet for this mapping"); ?>.
<br />
- Hint: you can leave the <em>'to'</em> field empty if you only want to map a single port
+ <?=gettext("Hint: you can leave the"); ?> <em>'<?=gettext("to"); ?>'</em> <?=gettext("field empty if you only want to map a single port"); ?>
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Redirect target IP</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Redirect target IP"); ?></td>
<td width="78%" class="vtable">
<input autocomplete='off' name="localip" type="text" class="formfldalias" id="localip" size="20" value="<?=htmlspecialchars($pconfig['localip']);?>">
- <br> <span class="vexpl">Enter the internal IP address of
- the server on which you want to map the ports.<br>
- e.g. <em>192.168.1.12</em></span></td>
+ <br> <span class="vexpl"><?=gettext("Enter the internal IP address of " .
+ "the server on which you want to map the ports"); ?>.<br>
+ <?=gettext("e.g."); ?> <em>192.168.1.12</em></span></td>
</tr>
<tr name="lprtr" id="lprtr">
- <td width="22%" valign="top" class="vncellreq">Redirect target port</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Redirect target port"); ?></td>
<td width="78%" class="vtable">
<select name="localbeginport" class="formselect" onChange="ext_change();check_for_aliases();">
- <option value="">(other)</option>
+ <option value="">(<?=gettext("other"); ?>)</option>
<?php $bfound = 0; foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['localbeginport']) {
echo "selected";
@@ -735,42 +735,42 @@ include("fbegin.inc"); ?>
<?php endforeach; ?>
</select> <input onChange="check_for_aliases();" autocomplete='off' class="formfldalias" name="localbeginport_cust" id="localbeginport_cust" type="text" size="5" value="<?php if (!$bfound) echo $pconfig['localbeginport']; ?>">
<br>
- <span class="vexpl">Specify the port on the machine with the
- IP address entered above. In case of a port range, specify
- the beginning port of the range (the end port will be calculated
- automatically).<br>
- Hint: this is usually identical to the 'from' port above</span></td>
+ <span class="vexpl"><?=gettext("Specify the port on the machine with the " .
+ "IP address entered above. In case of a port range, specify " .
+ "the beginning port of the range (the end port will be calculated " .
+ "automatically)"); ?>.<br>
+ <?=gettext("Hint: this is usually identical to the 'from' port above"); ?></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">No XMLRPC Sync</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("No XMLRPC Sync"); ?></td>
<td width="78%" class="vtable">
<input type="checkbox" value="yes" name="nosync"<?php if($pconfig['nosync']) echo " CHECKED"; ?>><br>
- HINT: This prevents the rule from automatically syncing to other CARP members.
+ <?=gettext("HINT: This prevents the rule from automatically syncing to other CARP members"); ?>.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">NAT reflection</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("NAT reflection"); ?></td>
<td width="78%" class="vtable">
<select name="natreflection" class="formselect">
- <option value="default" <?php if ($pconfig['natreflection'] != "enable" && $pconfig['natreflection'] != "disable") echo "selected"; ?>>use system default</option>
- <option value="enable" <?php if ($pconfig['natreflection'] == "enable") echo "selected"; ?>>enable</option>
- <option value="disable" <?php if ($pconfig['natreflection'] == "disable") echo "selected"; ?>>disable</option>
+ <option value="default" <?php if ($pconfig['natreflection'] != "enable" && $pconfig['natreflection'] != "disable") echo "selected"; ?>><?=gettext("use system default"); ?></option>
+ <option value="enable" <?php if ($pconfig['natreflection'] == "enable") echo "selected"; ?>><?=gettext("enable"); ?></option>
+ <option value="disable" <?php if ($pconfig['natreflection'] == "disable") echo "selected"; ?>><?=gettext("disable"); ?></option>
</select>
</td>
</tr>
<?php if (isset($id) && $a_nat[$id] && !isset($_GET['dup'])): ?>
<tr>
- <td width="22%" valign="top" class="vncell">Filter rule association</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Filter rule association"); ?></td>
<td width="78%" class="vtable">
<select name="associated-rule-id">
- <option value="">None</option>
+ <option value=""><?=gettext("None"); ?></option>
<option value="pass" <?php if($pconfig['associated-rule-id'] == "pass") echo " SELECTED"; ?>>Pass</option>
<?php
$linkedrule = "";
@@ -781,7 +781,7 @@ include("fbegin.inc"); ?>
echo "<option value=\"{$filter_rule['associated-rule-id']}\"";
if ($filter_rule['associated-rule-id']==$pconfig['associated-rule-id']) {
echo " SELECTED";
- $linkedrule = "<br /><a href=\"firewall_rules_edit.php?id={$filter_id}\">View the filter rule</a><br/>";
+ $linkedrule = sprintf("<br /><a href=\"firewall_rules_edit.php?id=%s\">%s</a><br/>", $filter_id, gettext("View the filter rule"));
}
echo ">". htmlspecialchars('Rule ' . $filter_rule['descr']) . "</option>\n";
@@ -791,7 +791,7 @@ include("fbegin.inc"); ?>
}
}
if (isset($pconfig['associated-rule-id']))
- echo "<option value=\"new\">Create new associated filter rule</option>\n";
+ echo "<option value=\"new\">" . gettext("Create new associated filter rule") . "</option>\n";
echo "</select>\n";
echo $linkedrule;
?>
@@ -800,13 +800,13 @@ include("fbegin.inc"); ?>
<?php endif; ?>
<?php if ((!(isset($id) && $a_nat[$id])) || (isset($_GET['dup']))): ?>
<tr>
- <td width="22%" valign="top" class="vncell">Filter rule association</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Filter rule association"); ?></td>
<td width="78%" class="vtable">
<select name="filter-rule-association" id="filter-rule-association">
- <option value="">None</option>
- <option value="add-associated" selected="selected">Add associated filter rule</option>
- <option value="add-unassociated">Add unassociated filter rule</option>
- <option value="pass">Pass</option>
+ <option value=""><?=gettext("None"); ?></option>
+ <option value="add-associated" selected="selected"><?=gettext("Add associated filter rule"); ?></option>
+ <option value="add-unassociated"><?=gettext("Add unassociated filter rule"); ?></option>
+ <option value="pass"><?=gettext("Pass"); ?></option>
</select>
</td>
</tr><?php endif; ?>
@@ -817,7 +817,7 @@ include("fbegin.inc"); ?>
<tr>
<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_nat[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/firewall_nat_out.php b/usr/local/www/firewall_nat_out.php
index e216516..2039848 100755
--- a/usr/local/www/firewall_nat_out.php
+++ b/usr/local/www/firewall_nat_out.php
@@ -108,7 +108,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
$natent = array();
$natent['source']['network'] = "{$osn}/{$ossubnet}";
$natent['dstport'] = "500";
- $natent['descr'] = "Auto created rule for ISAKMP - {$ifdesc} to {$ifdesc2}";
+ $natent['descr'] = sprintf(gettext("Auto created rule for ISAKMP - %s to %s"),$ifdesc,$ifdesc2);
$natent['target'] = "";
$natent['interface'] = $if2;
$natent['destination']['any'] = true;
@@ -118,7 +118,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
$natent = array();
$natent['source']['network'] = "{$osn}/{$ossubnet}";
$natent['dstport'] = "5060";
- $natent['descr'] = "Auto created rule for SIP - {$ifdesc} to {$ifdesc2}";
+ $natent['descr'] = sprintf(gettext("Auto created rule for SIP - %s to %s"),$ifdesc,$ifdesc2);
$natent['target'] = "";
$natent['interface'] = $if2;
$natent['destination']['any'] = true;
@@ -128,7 +128,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
$natent = array();
$natent['source']['network'] = "{$osn}/{$ossubnet}";
$natent['sourceport'] = "";
- $natent['descr'] = "Auto created rule for {$ifdesc} to {$ifdesc2}";
+ $natent['descr'] = sprintf(gettext("Auto created rule for %s to %s"),$ifdesc,$ifdesc2);
$natent['target'] = "";
$natent['interface'] = $if2;
$natent['destination']['any'] = true;
@@ -146,7 +146,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
$natent = array();
$natent['source']['network'] = "{$osn}/{$ossubnet}";
$natent['sourceport'] = "";
- $natent['descr'] = "Auto created rule for PPTP server";
+ $natent['descr'] = gettext("Auto created rule for PPTP server");
$natent['target'] = "";
$natent['interface'] = $if2;
$natent['destination']['any'] = true;
@@ -165,7 +165,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
$natent = array();
$natent['source']['network'] = "{$osn}/{$ossubnet}";
$natent['sourceport'] = "";
- $natent['descr'] = "Auto created rule for PPPoE server";
+ $natent['descr'] = gettext("Auto created rule for PPPoE server");
$natent['target'] = "";
$natent['interface'] = $if2;
$natent['destination']['any'] = true;
@@ -184,7 +184,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
$natent = array();
$natent['source']['network'] = "{$osn}/{$ossubnet}";
$natent['sourceport'] = "";
- $natent['descr'] = "Auto created rule for L2TP server";
+ $natent['descr'] = gettext("Auto created rule for L2TP server");
$natent['target'] = "";
$natent['interface'] = $if2;
$natent['destination']['any'] = true;
@@ -198,7 +198,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
$natent = array();
$natent['source']['network'] = $ovpnsrv['tunnel_network'];
$natent['sourceport'] = "";
- $natent['descr'] = "Auto created rule for OpenVPN server";
+ $natent['descr'] = gettext("Auto created rule for OpenVPN server");
$natent['target'] = "";
$natent['interface'] = $if2;
$natent['destination']['any'] = true;
@@ -209,7 +209,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
}
}
- $savemsg = "Default rules for each interface have been created.";
+ $savemsg = gettext("Default rules for each interface have been created.");
}
break;
}
@@ -280,7 +280,7 @@ if (isset($_POST['del_x'])) {
}
-$pgtitle = array("Firewall","NAT","Outbound");
+$pgtitle = array(gettext("Firewall"),gettext("NAT"),gettext("Outbound"));
include("head.inc");
?>
@@ -291,14 +291,14 @@ include("head.inc");
</script>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('natconf')): ?><p>
-<?php print_info_box_np("The NAT 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 NAT 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>
<?php
$tab_array = array();
- $tab_array[] = array("Port Forward", false, "firewall_nat.php");
+ $tab_array[] = array(gettext("Port Forward"), false, "firewall_nat.php");
$tab_array[] = array("1:1", false, "firewall_nat_1to1.php");
- $tab_array[] = array("Outbound", true, "firewall_nat_out.php");
+ $tab_array[] = array(gettext("Outbound"), true, "firewall_nat_out.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -306,17 +306,17 @@ include("head.inc");
<td>
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr><td align="right"><b>Mode:</b></td>
+ <tr><td align="right"><b><?=gettext("Mode"); ?>:</b></td>
<td>
&nbsp;&nbsp;<input name="advancedoripsec" type="radio" id="ipsecpassthru" value="ipsecpassthru" <?php if (isset($config['nat']['ipsecpassthru']['enable'])) echo "checked";?>>
- <strong><?=gettext("Automatic outbound NAT rule generation<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(IPsec passthrough included)");?></strong>
+ <strong><?=gettext("Automatic outbound NAT rule generation"); ?><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?=gettext("(IPsec passthrough included)");?></strong>
</td>
<td>
&nbsp;&nbsp;<input name="advancedoripsec" type="radio" id="advancedoutbound" value="advancedoutboundnat" <?php if (isset($config['nat']['advancedoutbound']['enable'])) echo "checked";?>>
- <strong><?=gettext("Manual Outbound NAT rule generation<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(AON - Advanced Outbound NAT)");?></strong></td>
+ <strong><?=gettext("Manual Outbound NAT rule generation") . "<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" . gettext("(AON - Advanced Outbound NAT)");?></strong></td>
<td valign="middle" align="left">
- <input name="save" type="submit" class="formbtn" value="Save">
+ <input name="save" type="submit" class="formbtn" value="<?=gettext("Save");?>">
&nbsp;<br/>&nbsp;
</td>
</tr>
@@ -332,25 +332,25 @@ include("head.inc");
</tr>
</table>
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr><td colspan="5"><b>&nbsp;Mappings:</b></td></tr>
+ <tr><td colspan="5"><b>&nbsp;<?=gettext("Mappings"); ?>:</b></td></tr>
<tr><td>&nbsp;</td></tr>
<tr id="frheader">
<td width="3%" class="list">&nbsp;</td>
<td width="3%" class="list">&nbsp;</td>
- <td width="10%" class="listhdrr">Interface</td>
- <td width="15%" class="listhdrr">Source</td>
- <td width="10%" class="listhdrr">Source Port</td>
- <td width="15%" class="listhdrr">Destination</td>
- <td width="10%" class="listhdrr">Destination Port</td>
- <td width="15%" class="listhdrr">NAT Address</td>
- <td width="10%" class="listhdrr">NAT Port</td>
- <td width="10%" class="listhdrr">Static Port</td>
- <td width="25%" class="listhdr">Description</td>
+ <td width="10%" class="listhdrr"><?=gettext("Interface");?></td>
+ <td width="15%" class="listhdrr"><?=gettext("Source");?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Source Port");?></td>
+ <td width="15%" class="listhdrr"><?=gettext("Destination");?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Destination Port");?></td>
+ <td width="15%" class="listhdrr"><?=gettext("NAT Address");?></td>
+ <td width="10%" class="listhdrr"><?=gettext("NAT Port");?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Static Port");?></td>
+ <td width="25%" class="listhdr"><?=gettext("Description");?></td>
<td width="5%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17"></td>
- <td><a href="firewall_nat_out_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="add new mapping"></a></td>
+ <td><a href="firewall_nat_out_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add new mapping");?>"></a></td>
</tr>
</table>
</td>
@@ -417,9 +417,9 @@ include("head.inc");
<td class="listr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
<?php
if(isset($natent['staticnatport']))
- echo "<CENTER>YES</CENTER>";
+ echo "<CENTER>" . gettext("YES") . "</CENTER>";
else
- echo "<CENTER>NO</CENTER>";
+ echo "<CENTER>" . gettext("NO") . "</CENTER>";
?>
</td>
<td class="listbg" onClick="fr_toggle(<?=$nnats;?>)" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
@@ -428,11 +428,11 @@ include("head.inc");
<td class="list" valign="middle" nowrap>
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td><a href="firewall_nat_out_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="edit mapping"></a></td>
+ <td><a href="firewall_nat_out_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit mapping");?>"></a></td>
</tr>
<tr>
- <td><input onmouseover="fr_insline(<?=$nnats;?>, true)" onmouseout="fr_insline(<?=$nnats;?>, false)" name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" title="move selected rules before this rule" height="17" type="image" width="17" border="0"></td>
- <td><a href="firewall_nat_out_edit.php?dup=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add a new nat based on this one" width="17" height="17" border="0"></a></td>
+ <td><input onmouseover="fr_insline(<?=$nnats;?>, true)" onmouseout="fr_insline(<?=$nnats;?>, false)" name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" title="<?=gettext("move selected rules before this rule");?>" height="17" type="image" width="17" border="0"></td>
+ <td><a href="firewall_nat_out_edit.php?dup=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new nat based on this one");?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
<?php $i++; $nnats++; endforeach; ?>
@@ -441,24 +441,24 @@ include("head.inc");
<td class="list" valign="middle" nowrap>
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected mappings to end" border="0"><?php else: ?><input name="move_<?=$i;?>" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="move selected mappings to end" border="0"><?php endif; ?></td>
- <td><a href="firewall_nat_out_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="add new mapping"></a></td>
+ <td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected mappings to end");?>" border="0"><?php else: ?><input name="move_<?=$i;?>" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="<?=gettext("move selected mappings to end");?>" border="0"><?php endif; ?></td>
+ <td><a href="firewall_nat_out_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add new mapping");?>"></a></td>
</tr>
<tr>
- <td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="delete selected rules" border="0"><?php else: ?><input name="del" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="delete selected mappings" onclick="return confirm('Do you really want to delete the selected mappings?')"><?php endif; ?></td>
+ <td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" border="0"><?php else: ?><input name="del" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="<?=gettext("delete selected mappings");?>" onclick="return confirm('<?=gettext("Do you really want to delete the selected mappings?");?>')"><?php endif; ?></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="12">
- <p><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>If advanced outbound NAT is enabled, no outbound NAT
- rules will be automatically generated any longer. Instead, only the mappings
- you specify below will be used. With advanced outbound NAT disabled,
- a mapping is automatically created for each interface's subnet
- (except WAN). If you use target addresses other than the WAN interface's
- IP address, then depending on the way your WAN connection is setup, you
- may also need a <a href="firewall_virtual_ip.php">Virtual IP</a>.</span><br>
+ <p><span class="vexpl"><span class="red"><strong><?=gettext("Note"); ?>:<br>
+ </strong></span><?=gettext("If advanced outbound NAT is enabled, no outbound NAT " .
+ "rules will be automatically generated any longer. Instead, only the mappings " .
+ "you specify below will be used. With advanced outbound NAT disabled, " .
+ "a mapping is automatically created for each interface's subnet " .
+ "(except WAN). If you use target addresses other than the WAN interface's " .
+ "IP address, then depending on the way your WAN connection is setup, you " .
+ "may also need a"); ?> <a href="firewall_virtual_ip.php"><?=gettext("Virtual IP"); ?></a>.</span><br>
</td>
</tr>
diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php
index b1e7a64..01af830 100755
--- a/usr/local/www/firewall_nat_out_edit.php
+++ b/usr/local/www/firewall_nat_out_edit.php
@@ -109,50 +109,50 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "interface protocol source source_subnet destination destination_subnet");
- $reqdfieldsn = explode(",", "Interface,Protocol,Source,Source bit count,Destination,Destination bit count");
+ $reqdfieldsn = array(gettext("Interface"),gettext("Protocol"),gettext("Source"),gettext("Source bit count"),gettext("Destination"),gettext("Destination bit count"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if($_POST['sourceport'] <> "" && !is_port($_POST['sourceport']))
- $input_errors[] = "You must supply either a valid port for the source port entry.";
+ $input_errors[] = gettext("You must supply either a valid port for the source port entry.");
if($_POST['dstport'] <> "" and !is_port($_POST['dstport']))
- $input_errors[] = "You must supply either a valid port for the destination port entry.";
+ $input_errors[] = gettext("You must supply either a valid port for the destination port entry.");
if($_POST['natport'] <> "" and !is_port($_POST['natport']))
- $input_errors[] = "You must supply either a valid port for the nat port entry.";
+ $input_errors[] = gettext("You must supply either a valid port for the nat port entry.");
if ($_POST['source_type'] != "any") {
if ($_POST['source'] && !is_ipaddr($_POST['source']) && $_POST['source'] <> "any") {
- $input_errors[] = "A valid source must be specified.";
+ $input_errors[] = gettext("A valid source must be specified.");
}
}
if ($_POST['source_subnet'] && !is_numericint($_POST['source_subnet'])) {
- $input_errors[] = "A valid source bit count must be specified.";
+ $input_errors[] = gettext("A valid source bit count must be specified.");
}
if ($_POST['sourceport'] && !is_numericint($_POST['sourceport'])) {
- $input_errors[] = "A valid source port must be specified.";
+ $input_errors[] = gettext("A valid source port must be specified.");
}
if ($_POST['destination_type'] != "any") {
if ($_POST['destination'] && !is_ipaddr($_POST['destination'])) {
- $input_errors[] = "A valid destination must be specified.";
+ $input_errors[] = gettext("A valid destination must be specified.");
}
}
if ($_POST['destination_subnet'] && !is_numericint($_POST['destination_subnet'])) {
- $input_errors[] = "A valid destination bit count must be specified.";
+ $input_errors[] = gettext("A valid destination bit count must be specified.");
}
if ($_POST['destination_type'] == "any") {
if ($_POST['destination_not']) {
- $input_errors[] = "Negating destination address of \"any\" is invalid.";
+ $input_errors[] = gettext("Negating destination address of \"any\" is invalid.");
}
}
if ($_POST['nonat'] && $_POST['staticnatport']) {
- $input_errors[] = "Static port cannot be used with No NAT.";
+ $input_errors[] = gettext("Static port cannot be used with No NAT.");
}
if ($_POST['target'] && !is_ipaddr($_POST['target'])) {
- $input_errors[] = "A valid target IP address must be specified.";
+ $input_errors[] = gettext("A valid target IP address must be specified.");
}
/* if user has selected any as source, set it here */
@@ -249,7 +249,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Firewall","NAT","Outbound","Edit");
+$pgtitle = array(gettext("Firewall"),gettext("NAT"),gettext("Outbound"),gettext("Edit"));
$closehead = false;
include("head.inc");
@@ -304,17 +304,17 @@ function sourcesel_change() {
<form action="firewall_nat_out_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="1">
<tr>
- <td colspan="2" valign="top" class="listtopic">Edit Advanced Outbound NAT entry</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Advanced Outbound NAT entry");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Do not NAT</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Do not NAT");?></td>
<td width="78%" class="vtable">
<input type="checkbox" name="nonat"<?php if(isset($pconfig['nonat'])) echo " CHECKED"; ?>>
- <span class="vexpl">Enabling this option will disable NAT for traffic matching this rule and stop processing Outbound NAT rules.
- <br>Hint: in most cases, you won't use this option.</span></td>
+ <span class="vexpl"><?=gettext("Enabling this option will disable NAT for traffic matching this rule and stop processing Outbound NAT rules.");?>
+ <br><?=gettext("Hint: in most cases, you won't use this option.");?></span></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
@@ -350,34 +350,34 @@ function sourcesel_change() {
</option>
<?php endforeach; ?>
</select><br>
- <span class="vexpl">Choose which interface this rule applies to.<br>
- Hint: in most cases, you'll want to use WAN here.</span></td>
+ <span class="vexpl"><?=gettext("Choose which interface this rule applies to.");?><br>
+ <?=gettext("Hint: in most cases, you'll want to use WAN here.");?></span></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">
<select name="protocol" class="formselect">
<?php $protocols = explode(" ", "any TCP UDP TCP/UDP ICMP ESP AH GRE IGMP carp pfsync");
foreach ($protocols as $proto): ?>
<option value="<?=strtolower($proto);?>" <?php if (strtolower($proto) == $pconfig['protocol']) echo "selected"; ?>><?=htmlspecialchars($proto);?></option>
<?php endforeach; ?>
- </select> <br> <span class="vexpl">Choose which protocol this rule should match.<br />
- Hint: in most cases, you should specify <em>any</em> &nbsp;here.</span>
+ </select> <br> <span class="vexpl"><?=gettext("Choose which protocol this rule should match.");?><br />
+ <?php printf(gettext("Hint: in most cases, you should specify %s any %s here."),"<em>","</em>&nbsp");?></span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Source</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Source");?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="1" cellpadding="1">
<tr>
- <td>Type:&nbsp;&nbsp;</td>
+ <td><?=gettext("Type");?>:&nbsp;&nbsp;</td>
<td>
<select name="source_type" class="formselect" onChange="sourcesel_change()">
- <option value="any" <?php if ($pconfig['source'] == "any") echo "selected"; ?>>any</option>
- <option value="network" <?php if ($pconfig['source'] != "any") echo "selected"; ?>>Network</option>
+ <option value="any" <?php if ($pconfig['source'] == "any") echo "selected"; ?>><?=gettext("any");?></option>
+ <option value="network" <?php if ($pconfig['source'] != "any") echo "selected"; ?>><?=gettext("Network");?></option>
</select>
</td></tr>
- <td>Address:&nbsp;&nbsp;</td>
+ <td><?=gettext("Address");?>:&nbsp;&nbsp;</td>
<td><input name="source" type="text" class="formfld unknown" id="source" size="20" value="<?=htmlspecialchars($pconfig['source']);?>">/<select name="source_subnet" class="formfld" id="source_subnet">
<?php for ($i = 32; $i >= 0; $i--): ?>
<option value="<?=$i;?>"<?php if ($i == $pconfig['source_subnet']) echo " selected"; ?>><?=$i;?></option>
@@ -386,34 +386,34 @@ function sourcesel_change() {
</tr>
<tr>
<td>&nbsp;</td>
- <td><span class="vexpl">Enter the source network for the outbound NAT mapping.</span></td>
+ <td><span class="vexpl"><?=gettext("Enter the source network for the outbound NAT mapping.");?></span></td>
</tr>
<tr>
- <td>Source port:&nbsp;&nbsp;</td>
- <td><input name="sourceport" type="text" class="formfld unknown" id="sourceport" size="5" value="<?=htmlspecialchars($pconfig['sourceport']);?>"> (leave
-blank for any)</td>
+ <td><?=gettext("Source port");?>:&nbsp;&nbsp;</td>
+ <td><input name="sourceport" type="text" class="formfld unknown" id="sourceport" size="5" value="<?=htmlspecialchars($pconfig['sourceport']);?>"> <?=gettext("(leave
+blank for any)");?></td>
</tr>
</table></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Destination</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Destination");?></td>
<td width="78%" class="vtable">
<input name="destination_not" type="checkbox" id="destination_not" value="yes" <?php if ($pconfig['destination_not']) echo "checked"; ?>>
- <strong>not</strong><br>
- Use this option to invert the sense of the match.<br>
+ <strong><?=gettext("not");?></strong><br>
+ <?=gettext("Use this option to invert the sense of the match.");?><br>
<br>
<table border="0" cellspacing="1" cellpadding="1">
<tr>
- <td>Type:&nbsp;&nbsp;</td>
+ <td><?=gettext("Type");?>:&nbsp;&nbsp;</td>
<td><select name="destination_type" class="formselect" onChange="typesel_change()">
<option value="any"<?php if ($pconfig['destination'] == "any") echo " selected"; ?>>
- any</option>
+ <?=gettext("any");?></option>
<option value="network"<?php if ($pconfig['destination'] != "any") echo " selected"; ?>>
- Network</option>
+ <?=gettext("Network");?></option>
</select></td>
</tr>
<tr>
- <td>Address:&nbsp;&nbsp;</td>
+ <td><?=gettext("Address");?>:&nbsp;&nbsp;</td>
<td><input name="destination" type="text" class="formfld unknown" id="destination" size="20" value="<?=htmlspecialchars($pconfig['destination']);?>">
/
<select name="destination_subnet" class="formselect" id="destination_subnet">
@@ -424,25 +424,25 @@ blank for any)</td>
</tr>
<tr>
<td>&nbsp;</td>
- <td><span class="vexpl">Enter the destination network for
- the outbound NAT mapping.</span></td>
+ <td><span class="vexpl"><?=gettext("Enter the destination network for ".
+ "the outbound NAT mapping.");?></span></td>
</tr>
<tr>
- <td>Destination port:&nbsp;&nbsp;</td>
- <td><input name="dstport" type="text" class="formfld unknown" id="dstport" size="5" value="<?=htmlspecialchars($pconfig['dstport']);?>"> (leave blank for
-any)</td>
+ <td><?=gettext("Destination port");?>:&nbsp;&nbsp;</td>
+ <td><input name="dstport" type="text" class="formfld unknown" id="dstport" size="5" value="<?=htmlspecialchars($pconfig['dstport']);?>"> <?=gettext("(leave blank for
+any)");?></td>
</tr>
</table>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Translation</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Translation");?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="1" cellpadding="1">
<tr>
- <td>Address:&nbsp;&nbsp;</td>
+ <td><?=gettext("Address");?>:&nbsp;&nbsp;</td>
<td><select name="target" class="formselect">
- <option value=""<?php if (!$pconfig['target']) echo " selected"; ?>>Interface address</option>
+ <option value=""<?php if (!$pconfig['target']) echo " selected"; ?>><?=gettext("Interface address");?></option>
<?php if (is_array($config['virtualip']['vip'])):
foreach ($config['virtualip']['vip'] as $sn):
if ($sn['mode'] == "proxyarp" && $sn['type'] == "network"):
@@ -460,49 +460,49 @@ any)</td>
<?php endif; endforeach;
endif;
?>
- <option value=""<?php if($pconfig['target'] == "any") echo " selected"; ?>>any</option>
+ <option value=""<?php if($pconfig['target'] == "any") echo " selected"; ?>><?=gettext("any");?></option>
</select>
</td>
</tr>
<tr><td>&nbsp;</td><td>
- <span class="vexpl">Packets matching this rule will be mapped to the IP address given here.<br>
- If you want this rule to apply to another IP address than the IP address of the interface chosen above,
- select it here (you need to define <a href="firewall_virtual_ip.php">Virtual IP</a> addresses on the first).
- Also note that if you are trying to redirect connections on the LAN select the "any" option.
+ <span class="vexpl"><?=gettext("Packets matching this rule will be mapped to the IP address given here.");?><br>
+ <?=gettext("If you want this rule to apply to another IP address than the IP address of the interface chosen above, ".
+ "select it here (you need to define");?> <a href="firewall_virtual_ip.php"><?=gettext("Virtual IP");?></a> <?=gettext("addresses on the first).");?>
+ <?=gettext("Also note that if you are trying to redirect connections on the LAN select the \"any\" option.");?>
</span>
</td></tr>
<tr>
- <td>Port:&nbsp;&nbsp;</td>
+ <td><?=gettext("Port");?>:&nbsp;&nbsp;</td>
<td><input name="natport" type="text" class="formfld unknown" id="natport" size="5" value="<?=htmlspecialchars($pconfig['natport']);?>"></td>
</tr>
<tr><td>&nbsp;</td><td>
- <span class="vexpl">Enter the source port for the outbound NAT mapping.</span>
+ <span class="vexpl"><?=gettext("Enter the source port for the outbound NAT mapping.");?></span>
</td></tr>
<tr>
- <td>Static-port:&nbsp;&nbsp;</td>
+ <td><?=gettext("Static-port");?>:&nbsp;&nbsp;</td>
<td><input onChange="staticportchange();" name="staticnatport" type="checkbox" class="formfld" id="staticnatport" size="5"<?php if($pconfig['staticnatport']) echo " CHECKED";?>></td>
</tr>
</table>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">No XMLRPC Sync</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("No XMLRPC Sync");?></td>
<td width="78%" class="vtable">
<input value="yes" name="nosync" type="checkbox" class="formfld" id="nosync"<?php if($pconfig['nosync']) echo " CHECKED"; ?>><br>
- HINT: This prevents the rule from automatically syncing to other CARP members.
+ <?=gettext("HINT: This prevents the rule from automatically syncing to other CARP members.");?>
</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 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_out[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php
index 704f394..19a6cdc 100755
--- a/usr/local/www/firewall_rules.php
+++ b/usr/local/www/firewall_rules.php
@@ -41,7 +41,6 @@
##|*MATCH=firewall_rules.php*
##|-PRIV
-$pgtitle = array("Firewall", "Rules");
$statusurl = "status_filter_reload.php";
$logurl = "diag_logs_filter.php";
@@ -50,6 +49,8 @@ require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
+$pgtitle = array(gettext("Firewall"),gettext("Rules"));
+
function check_for_advaned_options(&$item) {
$item_set = "";
if($item['max'])
@@ -188,7 +189,7 @@ if ($_POST) {
clear_subsystem_dirty('filter');
- $savemsg = "The settings have been applied. The firewall rules are now reloading in the background. You can also <a href='status_filter_reload.php'>monitor</a> the reload progress.";
+ $savemsg = sprintf(gettext("The settings have been applied. The firewall rules are now reloading in the background. You can also %s monitor %s the reload progress"),"<a href='status_filter_reload.php'>","</a>");
}
}
@@ -300,9 +301,9 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
if($_REQUEST['undodrag']) {
foreach($_REQUEST['dragtable'] as $dt)
$dragtable .= "&dragtable[]={$dt}";
- print_info_box_np_undo("The firewall rule configuration has been changed.<br>You must apply the changes in order for them to take effect.", "apply" , "Apply changes" , "firewall_rules.php?if={$_REQUEST['if']}&dragdroporder=true&{$dragtable}");
+ print_info_box_np_undo(gettext("The firewall rule configuration has been changed.<br>You must apply the changes in order for them to take effect."), "apply" , gettext("Apply changes") , "firewall_rules.php?if={$_REQUEST['if']}&dragdroporder=true&{$dragtable}");
} else {
- print_info_box_np("The firewall rule configuration has been changed.<br>You must apply the changes in order for them to take effect.");
+ print_info_box_np(gettext("The firewall rule configuration has been changed.<br>You must apply the changes in order for them to take effect."));
}
?>
<br>
@@ -320,7 +321,7 @@ if($_REQUEST['undodrag']) {
$active = true;
else
$active = false;
- $tab_array[] = array("Floating", $active, "firewall_rules.php?if=FloatingRules");
+ $tab_array[] = array(gettext("Floating"), $active, "firewall_rules.php?if=FloatingRules");
$tabscounter = 0; $i = 0; foreach ($iflist as $ifent => $ifname) {
if ($ifent == $if)
$active = true;
@@ -338,16 +339,16 @@ if($_REQUEST['undodrag']) {
<tr id="frheader">
<td width="3%" class="list">&nbsp;</td>
<td width="5%" class="list">&nbsp;</td>
- <td width="3%" class="listhdrr">ID</td>
- <td width="6%" class="listhdrr">Proto</td>
- <td width="12%" class="listhdrr">Source</td>
- <td width="6%" class="listhdrr">Port</td>
- <td width="12%" class="listhdrr">Destination</td>
- <td width="6%" class="listhdrr">Port</td>
- <td width="5%" class="listhdrr">Gateway</td>
- <td width="8%" class="listhdrr">Queue</td>
- <td width="5%" class="listhdrr">Schedule</td>
- <td width="19%" class="listhdr">Description</td>
+ <td width="3%" class="listhdrr"><?=gettext("ID");?></td>
+ <td width="6%" class="listhdrr"><?=gettext("Proto");?></td>
+ <td width="12%" class="listhdrr"><?=gettext("Source");?></td>
+ <td width="6%" class="listhdrr"><?=gettext("Port");?></td>
+ <td width="12%" class="listhdrr"><?=gettext("Destination");?></td>
+ <td width="6%" class="listhdrr"><?=gettext("Port");?></td>
+ <td width="5%" class="listhdrr"><?=gettext("Gateway");?></td>
+ <td width="8%" class="listhdrr"><?=gettext("Queue");?></td>
+ <td width="5%" class="listhdrr"><?=gettext("Schedule");?></td>
+ <td width="19%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -364,10 +365,10 @@ if($_REQUEST['undodrag']) {
?>
<td>
<?php if ($nrules == 0): ?>
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="delete selected rules" border="0"><?php else: ?>
- <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="delete selected rules" onclick="return confirm('Do you really want to delete the selected rules?')"><?php endif; ?>
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="<?gettext("delete selected rules"); ?>" border="0"><?php else: ?>
+ <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" onclick="return confirm('<?=gettext('Do you really want to delete the selected rules?');?>')"><?php endif; ?>
</td>
- <td align="center" valign="middle"><a href="firewall_rules_edit.php?if=<?=$if;?>&after=-1"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add new rule" width="17" height="17" border="0"></a></td>
+ <td align="center" valign="middle"><a href="firewall_rules_edit.php?if=<?=$if;?>&after=-1"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add new rule");?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
@@ -378,23 +379,23 @@ if($_REQUEST['undodrag']) {
<td class="listt" align="center"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" width="11" height="11" border="0"></td>
<td class="listlr" style="background-color: #e0e0e0"></td>
<td class="listr" style="background-color: #e0e0e0">*</td>
- <td class="listr" style="background-color: #e0e0e0">RFC 1918 networks</td>
+ <td class="listr" style="background-color: #e0e0e0"><?=gettext("RFC 1918 networks");?></td>
<td class="listr" style="background-color: #e0e0e0">*</td>
<td class="listr" style="background-color: #e0e0e0">*</td>
<td class="listr" style="background-color: #e0e0e0">*</td>
<td class="listr" style="background-color: #e0e0e0">*</td>
<td class="listr" style="background-color: #e0e0e0">*</td>
<td class="listr" style="background-color: #e0e0e0"></td>
- <td class="listbg">Block private networks</td>
+ <td class="listbg"><?=gettext("Block private networks");?></td>
<td valign="middle" nowrap class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected rules before this rule"></td>
- <td><a href="interfaces.php?if=<?=$if?>#rfc1918"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit rule" width="17" height="17" border="0"></a></td>
+ <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected rules before this rule");?>"></td>
+ <td><a href="interfaces.php?if=<?=$if?>#rfc1918"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit rule");?>" width="17" height="17" border="0"></a></td>
</tr>
<tr>
<td align="center" valign="middle"></td>
- <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus_d.gif" title="add a new rule based on this one" width="17" height="17" border="0"></td>
+ <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus_d.gif" title="<?=gettext("add a new rule based on this one");?>" width="17" height="17" border="0"></td>
</tr>
</table>
</td>
@@ -406,23 +407,23 @@ if($_REQUEST['undodrag']) {
<td class="listt" align="center"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" width="11" height="11" border="0"></td>
<td class="listlr" style="background-color: #e0e0e0"></td>
<td class="listr" style="background-color: #e0e0e0">*</td>
- <td class="listr" style="background-color: #e0e0e0">Reserved/not assigned by IANA</td>
+ <td class="listr" style="background-color: #e0e0e0"><?=gettext("Reserved/not assigned by IANA");?></td>
<td class="listr" style="background-color: #e0e0e0">*</td>
<td class="listr" style="background-color: #e0e0e0">*</td>
<td class="listr" style="background-color: #e0e0e0">*</td>
<td class="listr" style="background-color: #e0e0e0">*</td>
<td class="listr" style="background-color: #e0e0e0">*</td>
<td class="listr" style="background-color: #e0e0e0">*</td>
- <td class="listbg">Block bogon networks</td>
+ <td class="listbg"><?=gettext("Block bogon networks");?></td>
<td valign="middle" nowrap class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected rules before this rule"></td>
- <td><a href="interfaces.php?if=<?=$if?>#rfc1918"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit rule" width="17" height="17" border="0"></a></td>
+ <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected rules before this rule");?>"></td>
+ <td><a href="interfaces.php?if=<?=$if?>#rfc1918"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit rule");?>" width="17" height="17" border="0"></a></td>
</tr>
<tr>
<td align="center" valign="middle"></td>
- <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus_d.gif" title="add a new rule based on this one" width="17" height="17" border="0"></td>
+ <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus_d.gif" title="<?=gettext("add a new rule based on this one");?>" width="17" height="17" border="0"></td>
</tr>
</table>
</td>
@@ -437,7 +438,7 @@ if($_REQUEST['undodrag']) {
continue;
$isadvset = check_for_advaned_options($filterent);
if($isadvset)
- $advanced_set = "<img src=\"./themes/{$g['theme']}/images/icons/icon_advanced.gif\" title=\"advanced settings set: $isadvset\" border=\"0\">";
+ $advanced_set = sprintf("<img src=\"./themes/%s/images/icons/icon_advanced.gif\" title=\"%s: %s\" border=\"0\">", $g['theme'], gettext("advanced settings set"), $isadvset);
else
$advanced_set = ""
?>
@@ -461,7 +462,7 @@ if($_REQUEST['undodrag']) {
$textss = $textse = "";
}
?>
- <a href="?if=<?=$if;?>&act=toggle&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfn;?>.gif" width="11" height="11" border="0" title="click to toggle enabled/disabled status"></a>
+ <a href="?if=<?=$if;?>&act=toggle&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfn;?>.gif" width="11" height="11" border="0" title="<?=gettext("click to toggle enabled/disabled status");?>"></a>
<?php if (isset($filterent['log'])):
$iconfnlog = "log_s";
if (isset($filterent['disabled']))
@@ -497,8 +498,8 @@ if($_REQUEST['undodrag']) {
$sched_caption_escaped = "";
$sched_content = "";
$schedstatus = false;
- $dayArray = array ('Mon','Tues','Wed','Thur','Fri','Sat','Sun');
- $monthArray = array ('January','February','March','April','May','June','July','August','September','October','November','December');
+ $dayArray = array (gettext('Mon'),gettext('Tues'),gettext('Wed'),gettext('Thur'),gettext('Fri'),gettext('Sat'),gettext('Sun'));
+ $monthArray = array (gettext('January'),gettext('February'),gettext('March'),gettext('April'),gettext('May'),gettext('June'),gettext('July'),gettext('August'),gettext('September'),gettext('October'),gettext('November'),gettext('December'));
if($config['schedules']['schedule'] <> "" and is_array($config['schedules']['schedule'])){
foreach ($a_schedules as $schedule)
{
@@ -609,12 +610,12 @@ if($_REQUEST['undodrag']) {
if ($iconfn == "block" || $iconfn == "reject")
{
$image = "icon_block";
- $alttext = "Traffic matching this rule is currently being denied";
+ $alttext = gettext("Traffic matching this rule is currently being denied");
}
else
{
$image = "icon_pass";
- $alttext = "Traffic matching this rule is currently being allowed";
+ $alttext = gettext("Traffic matching this rule is currently being allowed");
}
$printicon = true;
}
@@ -624,7 +625,7 @@ if($_REQUEST['undodrag']) {
$image = "icon_block_d";
else
$image = "icon_block";
- $alttext = "This rule is not currently active because its period has expired";
+ $alttext = gettext("This rule is not currently active because its period has expired");
$printicon = true;
}
}
@@ -660,7 +661,7 @@ if($_REQUEST['undodrag']) {
} else if (isset($filterent['defaultqueue'])) {
$desc = $filterent['defaultqueue'];
echo "<a href=\"firewall_shaper_queues.php?queue={$filterent['defaultqueue']}&action=show\">{$desc}</a>"; }
- else echo "none";
+ else echo gettext("none");
?><?=$textse;?>
</td>
<td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';"><font color="black">
@@ -672,12 +673,12 @@ if($_REQUEST['undodrag']) {
<td valign="middle" nowrap class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td><input name="move_<?=$i;?>" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="move selected rules before this rule" onMouseOver="fr_insline(<?=$nrules;?>, true)" onMouseOut="fr_insline(<?=$nrules;?>, false)"></td>
- <td><a href="firewall_rules_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit rule" width="17" height="17" border="0"></a></td>
+ <td><input name="move_<?=$i;?>" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="<?=gettext("move selected rules before this rule"); ?>" onMouseOver="fr_insline(<?=$nrules;?>, true)" onMouseOut="fr_insline(<?=$nrules;?>, false)"></td>
+ <td><a href="firewall_rules_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit rule"); ?>" width="17" height="17" border="0"></a></td>
</tr>
<tr>
- <td align="center" valign="middle"><a href="firewall_rules.php?act=del&if=<?=$if;?>&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="delete rule" onclick="return confirm('Do you really want to delete this rule?')"></a></td>
- <td><a href="firewall_rules_edit.php?dup=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add a new rule based on this one" width="17" height="17" border="0"></a></td>
+ <td align="center" valign="middle"><a href="firewall_rules.php?act=del&if=<?=$if;?>&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete rule"); ?>" onclick="return confirm('Do you really want to delete this rule?')"></a></td>
+ <td><a href="firewall_rules_edit.php?dup=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new rule based on this one"); ?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
@@ -689,9 +690,9 @@ if($_REQUEST['undodrag']) {
<td class="listt"></td>
<td class="listlr" colspan="10" align="center" valign="middle">
<span class="gray">
- No rules are currently defined for this interface.<br>
- All incoming connections on this interface will be blocked until you add pass rules.<br><br>
- Click the <a href="firewall_rules_edit.php?if=<?=$if;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add new rule" border="0" width="17" height="17" align="absmiddle"></a> button to add a new rule.</span>
+ <?=gettext("No rules are currently defined for this interface"); ?><br>
+ <?=gettext("All incoming connections on this interface will be blocked until you add pass rules."); ?><br><br>
+ <?=gettext("Click the"); ?> <a href="firewall_rules_edit.php?if=<?=$if;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add new rule");?>" border="0" width="17" height="17" align="absmiddle"></a><?=gettext(" button to add a new rule.");?></span>
</td>
<?php endif; ?>
<tr id="fr<?=$nrules;?>">
@@ -711,16 +712,16 @@ if($_REQUEST['undodrag']) {
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td>
- <?php if ($nrules == 0): ?><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected rules to end" border="0"><?php else: ?><input name="move_<?=$i;?>" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="move selected rules to end" onMouseOver="fr_insline(<?=$nrules;?>, true)" onMouseOut="fr_insline(<?=$nrules;?>, false)"><?php endif; ?></td>
+ <?php if ($nrules == 0): ?><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected rules to end");?>" border="0"><?php else: ?><input name="move_<?=$i;?>" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="<?=gettext("move selected rules to end");?>" onMouseOver="fr_insline(<?=$nrules;?>, true)" onMouseOut="fr_insline(<?=$nrules;?>, false)"><?php endif; ?></td>
<td></td>
</tr>
<tr>
<td>
<?php if ($nrules == 0): ?>
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="delete selected rules" border="0"><?php else: ?>
- <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="delete selected rules" onclick="return confirm('Do you really want to delete the selected rules?')"><?php endif; ?>
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" border="0"><?php else: ?>
+ <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" onclick="return confirm('<?=gettext('Do you really want to delete the selected rules?');?>')"><?php endif; ?>
</td>
- <td><a href="firewall_rules_edit.php?if=<?=$if;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add new rule" width="17" height="17" border="0"></a></td>
+ <td><a href="firewall_rules_edit.php?if=<?=$if;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add new rule");?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
@@ -729,45 +730,45 @@ if($_REQUEST['undodrag']) {
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass.gif" width="11" height="11"></td>
- <td>pass</td>
+ <td><?=gettext("pass");?></td>
<td width="14"></td>
<td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" width="11" height="11"></td>
- <td>block</td>
+ <td><?=gettext("block");?></td>
<td width="14"></td>
<td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_reject.gif" width="11" height="11"></td>
- <td>reject</td>
+ <td><?=gettext("reject");?></td>
<td width="14"></td>
<td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_log.gif" width="11" height="11"></td>
- <td>log</td>
+ <td><?=gettext("log");?></td>
</tr>
<tr>
<td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass_d.gif" width="11" height="11"></td>
- <td nowrap>pass (disabled)</td>
+ <td nowrap><?=gettext("pass (disabled)");?></td>
<td>&nbsp;</td>
<td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block_d.gif" width="11" height="11"></td>
- <td nowrap>block (disabled)</td>
+ <td nowrap><?=gettext("block (disabled)");?></td>
<td>&nbsp;</td>
<td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_reject_d.gif" width="11" height="11"></td>
- <td nowrap>reject (disabled)</td>
+ <td nowrap><?=gettext("reject (disabled)");?></td>
<td>&nbsp;</td>
<td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_log_d.gif" width="11" height="11"></td>
- <td nowrap>log (disabled)</td>
+ <td nowrap><?=gettext("log (disabled)");?></td>
</tr>
<tr>
<td colspan="10">
&nbsp;<p/>
<strong>
- <span class="red">Hint:</span>
+ <span class="red"><?=gettext("Hint") . ":";?></span>
</strong><br>
<ul>
- <li>Rules are evaluated on a first-match basis (i.e.
- the action of the first rule to match a packet will be executed).
- This means that if you use block rules, you'll have to pay attention
- to the rule order. Everything that isn't explicitly passed is blocked
- by default.
+ <li><?=gettext("Rules are evaluated on a first-match basis (i.e. " .
+ "the action of the first rule to match a packet will be executed). " .
+ "This means that if you use block rules, you'll have to pay attention " .
+ "to the rule order. Everything that isn't explicitly passed is blocked " .
+ "by default. ");?>
</li>
<li>
- You may drag and drop rules using your mouse to reorder the rule ordering.
+ <?=gettext("You may drag and drop rules using your mouse to reorder the rule ordering.");?>
</li>
</ul>
</td>
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index 0823aec..c91b1a8 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -188,7 +188,7 @@ if (isset($_GET['dup']))
if ($_POST) {
if ($_POST['type'] == "reject" && $_POST['proto'] <> "tcp")
- $input_errors[] = "Reject type rules only works when the protocol is set to TCP.";
+ $input_errors[] = gettext("Reject type rules only works when the protocol is set to TCP.");
if (($_POST['proto'] != "tcp") && ($_POST['proto'] != "udp") && ($_POST['proto'] != "tcp/udp")) {
$_POST['srcbeginport'] = 0;
@@ -254,7 +254,7 @@ if ($_POST) {
continue;
$newpost = htmlentities($temp);
if($newpost <> $temp)
- $input_errors[] = "Invalid characters detected ($temp). Please remove invalid characters and save again.";
+ $input_errors[] = sprintf(gettext("Invalid characters detected (%s). Please remove invalid characters and save again."),$temp);
}
/* input validation */
@@ -271,9 +271,9 @@ if ($_POST) {
if($_POST['statetype'] == "modulate state" or $_POST['statetype'] == "synproxy state") {
if( $_POST['proto'] != "tcp" )
- $input_errors[] = "{$_POST['statetype']} is only valid with protocol tcp.";
+ $input_errors[] = sprintf(gettext("%s is only valid with protocol tcp."),$_POST['statetype']);
if(($_POST['statetype'] == "synproxy state") && ($_POST['gateway'] != ""))
- $input_errors[] = "{$_POST['statetype']} is only valid if the gateway is set to 'default'.";
+ $input_errors[] = sprintf(gettext("%s is only valid if the gateway is set to 'default'."),$_POST['statetype']);
}
if ( isset($a_filter[$id]['associated-rule-id'])===false &&
@@ -284,7 +284,7 @@ if ($_POST) {
if ( isset($a_filter[$id]['associated-rule-id'])===false &&
(!(is_specialnet($_POST['dsttype']) || ($_POST['dsttype'] == "single"))) ) {
$reqdfields[] = "dstmask";
- $reqdfieldsn[] = "Destination bit count";
+ $reqdfieldsn[] = gettext("Destination bit count");
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -299,38 +299,38 @@ if ($_POST) {
}
if ($_POST['srcbeginport'] && !is_portoralias($_POST['srcbeginport']))
- $input_errors[] = "{$_POST['srcbeginport']} is not a valid start source port. It must be a port alias or integer between 1 and 65535.";
+ $input_errors[] = sprintf(gettext("%s is not a valid start source port. It must be a port alias or integer between 1 and 65535."),$_POST['srcbeginposrt']);
if ($_POST['srcendport'] && !is_portoralias($_POST['srcendport']))
- $input_errors[] = "{$_POST['srcendport']} is not a valid end source port. It must be a port alias or integer between 1 and 65535.";
+ $input_errors[] = sprintf(gettext("%s is not a valid end source port. It must be a port alias or integer between 1 and 65535."),$_POST['srcendport']);
if ($_POST['dstbeginport'] && !is_portoralias($_POST['dstbeginport']))
- $input_errors[] = "{$_POST['dstbeginport']} is not a valid start destination port. It must be a port alias or integer between 1 and 65535.";
+ $input_errors[] = sprintf(gettext("%s is not a valid start destination port. It must be a port alias or integer between 1 and 65535."),$_POST['dstbeginport']);
if ($_POST['dstendport'] && !is_portoralias($_POST['dstendport']))
- $input_errors[] = "{$_POST['dstendport']} is not a valid end destination port. It must be a port alias or integer between 1 and 65535.";
+ $input_errors[] = sprintf(gettext("%s is not a valid end destination port. It must be a port alias or integer between 1 and 65535."),$_POST['dstendport']);
/* if user enters an alias and selects "network" then disallow. */
if($_POST['srctype'] == "network") {
if(is_alias($_POST['src']))
- $input_errors[] = "You must specify single host or alias for alias entries.";
+ $input_errors[] = gettext("You must specify single host or alias for alias entries.");
}
if($_POST['dsttype'] == "network") {
if(is_alias($_POST['dst']))
- $input_errors[] = "You must specify single host or alias for alias entries.";
+ $input_errors[] = gettext("You must specify single host or alias for alias entries.");
}
if (!is_specialnet($_POST['srctype'])) {
if (($_POST['src'] && !is_ipaddroralias($_POST['src']))) {
- $input_errors[] = "{$_POST['src']} is not a valid source IP address or alias.";
+ $input_errors[] = sprintf(gettext("%s is not a valid source IP address or alias."),$_POST['src']);
}
if (($_POST['srcmask'] && !is_numericint($_POST['srcmask']))) {
- $input_errors[] = "A valid source bit count must be specified.";
+ $input_errors[] = gettext("A valid source bit count must be specified.");
}
}
if (!is_specialnet($_POST['dsttype'])) {
if (($_POST['dst'] && !is_ipaddroralias($_POST['dst']))) {
- $input_errors[] = "{$_POST['dst']} is not a valid destination IP address or alias.";
+ $input_errors[] = sprintf(gettext("%s is not a valid destination IP address or alias."),$_POST['dst']);
}
if (($_POST['dstmask'] && !is_numericint($_POST['dstmask']))) {
- $input_errors[] = "A valid destination bit count must be specified.";
+ $input_errors[] = gettext("A valid destination bit count must be specified.");
}
}
@@ -348,31 +348,31 @@ if ($_POST) {
}
if ($_POST['os'])
if( $_POST['proto'] != "tcp" )
- $input_errors[] = "OS detection is only valid with protocol tcp.";
+ $input_errors[] = gettext("OS detection is only valid with protocol tcp.");
if ($_POST['ackqueue'] && $_POST['ackqueue'] != "none") {
if ($_POST['defaultqueue'] == "none" )
- $input_errors[] = "You have to select a queue when you select an acknowledge queue too.";
+ $input_errors[] = gettext("You have to select a queue when you select an acknowledge queue too.");
else if ($_POST['ackqueue'] == $_POST['defaultqueue'])
- $input_errors[] = "Acknowledge queue and Queue cannot be the same.";
+ $input_errors[] = gettext("Acknowledge queue and Queue cannot be the same.");
}
if ($_POST['pdnpipe'] && $_POST['pdnpipe'] != "none") {
if ($_POST['dnpipe'] == "none" )
- $input_errors[] = "You must select a queue for the In direction before selecting one for Out too.";
+ $input_errors[] = gettext("You must select a queue for the In direction before selecting one for Out too.");
else if ($_POST['pdnpipe'] == $_POST['dnpipe'])
- $input_errors[] = "In and Out Queue cannot be the same.";
+ $input_errors[] = gettext("In and Out Queue cannot be the same.");
else if ($pdnpipe[0] == "?" && $dnpipe[0] <> "?")
- $input_errors[] = "You cannot select one queue and one virtual interface for IN and Out. both must be from the same type.";
- else if ($dnpipe[0] == "?" && $pdnpipe[0] <> "?")
- $input_errors[] = "You cannot select one queue and one virtual interface for IN and Out. both must be from the same type.";
+ $input_errors[] = gettext("You cannot select one queue and one virtual interface for IN and Out. both must be from the same type.");
+ else if ($dnpipe[0] == "?" && $pdnpipe[0] <> "?")
+ $input_errors[] = gettext("You cannot select one queue and one virtual interface for IN and Out. both must be from the same type.");
}
if( !empty($_POST['ruleid']) && !ctype_digit($_POST['ruleid']))
- $input_errors[] = 'ID must be an integer';
+ $input_errors[] = gettext('ID must be an integer');
if($_POST['l7container'] && $_POST['l7container'] != "none") {
if(!($_POST['proto'] == "tcp" || $_POST['proto'] == "udp" || $_POST['proto'] == "tcp/udp"))
- $input_errors[] = "You can only select a layer7 container for TCP and/or UDP protocols";
+ $input_errors[] = gettext("You can only select a layer7 container for TCP and/or UDP protocols");
if ($_POST['type'] <> "pass")
- $input_errors[] = "You can only select a layer7 container for Pass type rules.";
+ $input_errors[] = gettext("You can only select a layer7 container for Pass type rules.");
}
if (!$_POST['tcpflags_any']) {
@@ -385,7 +385,7 @@ if ($_POST) {
$outoftcpflags[] = $tcpflag;
}
if (empty($outoftcpflags) && !empty($settcpflags))
- $input_errors[] = "If you specify TCP flags that should be set you should specify out of which flags as well.";
+ $input_errors[] = gettext("If you specify TCP flags that should be set you should specify out of which flags as well.");
}
if (!$input_errors) {
@@ -549,7 +549,7 @@ $dnqlist =& get_unique_dnqueue_list();
read_layer7_config();
$l7clist =& get_l7_unique_list();
-$pgtitle = array("Firewall","Rules","Edit");
+$pgtitle = array(gettext("Firewall"),gettext("Rules"),gettext("Edit"));
$statusurl = "status_filter_reload.php";
$logurl = "diag_logs_filter.php";
@@ -571,10 +571,10 @@ include("head.inc");
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Edit Firewall rule</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Firewall rule");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Action</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Action");?></td>
<td width="78%" class="vtable">
<select name="type" class="formselect">
<?php $types = explode(" ", "Pass Block Reject"); foreach ($types as $type): ?>
@@ -585,17 +585,17 @@ include("head.inc");
</select>
<br/>
<span class="vexpl">
- Choose what to do with packets that match the criteria specified below. <br/>
- Hint: the difference between block and reject is that with reject, a packet (TCP RST or ICMP port unreachable for UDP) is returned to the sender, whereas with block the packet is dropped silently. In either case, the original packet is discarded.
+ <?=gettext("Choose what to do with packets that match the criteria specified below.");?> <br/>
+ <?=gettext("Hint: the difference between block and reject is that with reject, a packet (TCP RST or ICMP port unreachable for UDP) is returned to the sender, whereas with block the packet is dropped silently. In either case, the original packet is discarded.");?>
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Disabled</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled");?></td>
<td width="78%" class="vtable">
<input name="disabled" type="checkbox" id="disabled" value="yes" <?php if ($pconfig['disabled']) echo "checked"; ?>>
- <strong>Disable this rule</strong><br />
- <span class="vexpl">Set this option to disable this rule without removing it from the list.</span>
+ <strong><?=gettext("Disable this rule");?></strong><br />
+ <span class="vexpl"><?=gettext("Set this option to disable this rule without removing it from the list.");?></span>
</td>
</tr>
<?php if ($if == "FloatingRules" || isset($pconfig['floating'])): ?>
@@ -611,7 +611,7 @@ include("head.inc");
</tr>
<? endif; ?>
<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">
<?php if ($if == "FloatingRules" || isset($pconfig['floating'])): ?>
<select name="interface[]" multiple="true" class="formselect" size="3">
@@ -651,7 +651,7 @@ include("head.inc");
<?php endforeach; ?>
</select>
<br />
- <span class="vexpl">Choose on which interface packets must come in to match this rule.</span>
+ <span class="vexpl"><?=gettext("Choose on which interface packets must come in to match this rule.");?></span>
</td>
</tr>
<?php if ($if == "FloatingRules" || isset($pconfig['floating'])): ?>
@@ -661,7 +661,7 @@ include("head.inc");
</td>
<td width="78%" class="vtable">
<select name="direction" class="formselect">
- <?php $directions = array('any', 'in', 'out');
+ <?php $directions = array('any','in','out');
foreach ($directions as $direction): ?>
<option value="<?=$direction;?>"
<?php if ($direction == $pconfig['direction']): ?>
@@ -675,7 +675,7 @@ include("head.inc");
<tr>
<?php endif; ?>
<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">
<select name="proto" class="formselect" onchange="proto_change()">
<?php
@@ -685,32 +685,32 @@ include("head.inc");
<?php endforeach; ?>
</select>
<br />
- <span class="vexpl">Choose which IP protocol this rule should match. <br /> Hint: in most cases, you should specify <em>TCP</em> &nbsp;here.</span>
+ <span class="vexpl"><?=gettext("Choose which IP protocol this rule should match.");?> <br /> <?=gettext("Hint: in most cases, you should specify ");?><em>TCP</em> &nbsp;<?=gettext("here.");?></span>
</td>
</tr>
<tr id="icmpbox" name="icmpbox">
- <td valign="top" class="vncell">ICMP type</td>
+ <td valign="top" class="vncell"><?=gettext("ICMP type");?></td>
<td class="vtable">
<select name="icmptype" class="formselect">
<?php
$icmptypes = array(
- "" => "any",
- "echorep" => "Echo reply",
- "unreach" => "Destination unreachable",
- "squench" => "Source quench",
- "redir" => "Redirect",
- "althost" => "Alternate Host",
- "echoreq" => "Echo",
- "routeradv" => "Router advertisement",
- "routersol" => "Router solicitation",
- "timex" => "Time exceeded",
- "paramprob" => "Invalid IP header",
- "timereq" => "Timestamp",
- "timerep" => "Timestamp reply",
- "inforeq" => "Information request",
- "inforep" => "Information reply",
- "maskreq" => "Address mask request",
- "maskrep" => "Address mask reply"
+ "" => gettext("any"),
+ "echorep" => gettext("Echo reply"),
+ "unreach" => gettext("Destination unreachable"),
+ "squench" => gettext("Source quench"),
+ "redir" => gettext("Redirect"),
+ "althost" => gettext("Alternate Host"),
+ "echoreq" => gettext("Echo"),
+ "routeradv" => gettext("Router advertisement"),
+ "routersol" => gettext("Router solicitation"),
+ "timex" => gettext("Time exceeded"),
+ "paramprob" => gettext("Invalid IP header"),
+ "timereq" => gettext("Timestamp"),
+ "timerep" => gettext("Timestamp reply"),
+ "inforeq" => gettext("Information request"),
+ "inforep" => gettext("Information reply"),
+ "maskreq" => gettext("Address mask request"),
+ "maskrep" => gettext("Address mask reply")
);
foreach ($icmptypes as $icmptype => $descr): ?>
@@ -718,23 +718,23 @@ include("head.inc");
<?php endforeach; ?>
</select>
<br />
- <span class="vexpl">If you selected ICMP for the protocol above, you may specify an ICMP type here.</span>
+ <span class="vexpl"><?=gettext("If you selected ICMP for the protocol above, you may specify an ICMP type here.");?></span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Source</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Source");?></td>
<td width="78%" class="vtable">
<?php $edit_disabled=false; ?>
<?php if( isset($pconfig['associated-rule-id']) ): ?>
- <span class="red"><strong>NOTE: </strong></span> This is associated to a NAT rule.<br />
- You cannot edit the source and destination of associated filter rules.<br />
+ <span class="red"><strong><?=gettext("NOTE: ");?></strong></span><?=gettext("This is associated to a NAT rule.");?><br />
+ <?=gettext("You cannot edit the source and destination of associated filter rules.");?><br />
<br />
<?php
$edit_disabled=true;
if (is_array($config['nat']['rule'])) {
foreach( $config['nat']['rule'] as $index => $nat_rule ) {
if( isset($nat_rule['associated-rule-id']) && $nat_rule['associated-rule-id']==$pconfig['associated-rule-id'] ) {
- echo "<a href=\"firewall_nat_edit.php?id={$index}\">View the NAT rule</a><br>";
+ printf("<a href=\"firewall_nat_edit.php?id=%s\">%s</a><br>", $index, gettext("View the NAT rule"));
break;
}
}
@@ -746,36 +746,36 @@ include("head.inc");
</script>
<?php endif; ?>
<input<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="srcnot" type="checkbox" id="srcnot" value="yes" <?php if ($pconfig['srcnot']) echo "checked"; ?>>
- <strong>not</strong>
+ <strong><?=gettext("not");?></strong>
<br />
- Use this option to invert the sense of the match.
+ <?=gettext("Use this option to invert the sense of the match.");?>
<br />
<br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td>Type:&nbsp;&nbsp;</td>
+ <td><?=gettext("Type");?>:&nbsp;&nbsp;</td>
<td>
<select<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="srctype" class="formselect" onChange="typesel_change()">
<?php
$sel = is_specialnet($pconfig['src']); ?>
- <option value="any" <?php if ($pconfig['src'] == "any") { echo "selected"; } ?>>any</option>
- <option value="single" <?php if (($pconfig['srcmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>>Single host or alias</option>
- <option value="network" <?php if (!$sel) echo "selected"; ?>>Network</option>
+ <option value="any" <?php if ($pconfig['src'] == "any") { echo "selected"; } ?>><?=gettext("any");?></option>
+ <option value="single" <?php if (($pconfig['srcmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>><?=gettext("Single host or alias");?></option>
+ <option value="network" <?php if (!$sel) echo "selected"; ?>><?=gettext("Network");?></option>
<?php if(have_ruleint_access("pptp")): ?>
- <option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo "selected"; } ?>>PPTP clients</option>
+ <option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo "selected"; } ?>><?=gettext("PPTP clients");?></option>
<?php endif; ?>
<?php if(have_ruleint_access("pppoe")): ?>
- <option value="pppoe" <?php if ($pconfig['src'] == "pppoe") { echo "selected"; } ?>>PPPoE clients</option>
+ <option value="pppoe" <?php if ($pconfig['src'] == "pppoe") { echo "selected"; } ?>><?=gettext("PPPoE clients");?></option>
<?php endif; ?>
<?php if(have_ruleint_access("l2tp")): ?>
- <option value="l2tp" <?php if ($pconfig['src'] == "l2tp") { echo "selected"; } ?>>L2TP clients</option>
+ <option value="l2tp" <?php if ($pconfig['src'] == "l2tp") { echo "selected"; } ?>><?=gettext("L2TP clients");?></option>
<?php endif; ?>
<?php
foreach ($ifdisp as $ifent => $ifdesc): ?>
<?php if(have_ruleint_access($ifent)): ?>
- <option value="<?=$ifent;?>" <?php if ($pconfig['src'] == $ifent) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?> subnet</option>
+ <option value="<?=$ifent;?>" <?php if ($pconfig['src'] == $ifent) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?><?=gettext(" subnet");?></option>
<option value="<?=$ifent;?>ip"<?php if ($pconfig['src'] == $ifent . "ip") { echo "selected"; } ?>>
- <?=$ifdesc?> address
+ <?=$ifdesc?> <?=gettext("address");?>
</option>
<?php endif; ?>
<?php endforeach; ?>
@@ -783,7 +783,7 @@ include("head.inc");
</td>
</tr>
<tr>
- <td>Address:&nbsp;&nbsp;</td>
+ <td><?=gettext("Address");?>:&nbsp;&nbsp;</td>
<td>
<input<?php echo ($edit_disabled===true?' DISABLED':''); ?> autocomplete='off' name="src" type="text" class="formfldalias" id="src" size="20" value="<?php if (!is_specialnet($pconfig['src'])) echo htmlspecialchars($pconfig['src']);?>"> /
<select<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="srcmask" class="formselect" id="srcmask">
@@ -796,20 +796,20 @@ include("head.inc");
</table>
<div id="showadvancedboxspr">
<p>
- <input<?php echo ($edit_disabled===true?' DISABLED':''); ?> type="button" onClick="show_source_port_range()" value="Advanced"></input> - Show source port range</a>
+ <input<?php echo ($edit_disabled===true?' DISABLED':''); ?> type="button" onClick="show_source_port_range()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show source port range");?></a>
</div>
</td>
</tr>
<tr style="display:none" id="sprtable" name="sprtable">
- <td width="22%" valign="top" class="vncellreq">Source port range</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Source port range");?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td>from:&nbsp;&nbsp;</td>
+ <td><?=gettext("from");?>:&nbsp;&nbsp;</td>
<td>
<select<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="srcbeginport" class="formselect" onchange="src_rep_change();ext_change()">
- <option value="">(other)</option>
- <option value="any" <?php $bfound = 0; if ($pconfig['srcbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>>any</option>
+ <option value="">(<?=gettext("other"); ?>)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['srcbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any");?></option>
<?php foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcbeginport']) { echo "selected"; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
<?php endforeach; ?>
@@ -818,11 +818,11 @@ include("head.inc");
</td>
</tr>
<tr>
- <td>to:</td>
+ <td><?=gettext("to");?>:</td>
<td>
<select<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="srcendport" class="formselect" onchange="ext_change()">
- <option value="">(other)</option>
- <option value="any" <?php $bfound = 0; if ($pconfig['srcendport'] == "any") { echo "selected"; $bfound = 1; } ?>>any</option>
+ <option value="">(<?=gettext("other"); ?>)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['srcendport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any");?></option>
<?php foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcendport']) { echo "selected"; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
<?php endforeach; ?>
@@ -832,43 +832,43 @@ include("head.inc");
</tr>
</table>
<br />
- <span class="vexpl"><?=gettext("Specify the source port or port range for this rule. <b>This is usually <em>random</em> and almost never equal to the destination port range (and should usually be &quot;any&quot;).</b> <br /> Hint: you can leave the <em>'to'</em> field empty if you only want to filter a single port.");?></span><br/>
+ <span class="vexpl"><?=gettext("Specify the source port or port range for this rule."); ?> <b><?=gettext("This is usually"); ?> <em><?=gettext("random"); ?></em> <?=gettext("and almost never equal to the destination port range (and should usually be"); ?> &quot;<?=gettext("any"); ?>&quot;).</b>")."<br />".<?=gettext("Hint: you can leave the"); ?> <em><?=gettext("\"to\""); ?></em> <?=gettext("field empty if you only want to filter a single port.");?></span><br/>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Destination</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Destination");?></td>
<td width="78%" class="vtable">
<input<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="dstnot" type="checkbox" id="dstnot" value="yes" <?php if ($pconfig['dstnot']) echo "checked"; ?>>
- <strong>not</strong>
+ <strong><?=gettext("not");?></strong>
<br />
- Use this option to invert the sense of the match.
+ <?=gettext("Use this option to invert the sense of the match.");?>
<br />
<br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td>Type:&nbsp;&nbsp;</td>
+ <td><?=gettext("Type");?>:&nbsp;&nbsp;</td>
<td>
<select<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="dsttype" class="formselect" onChange="typesel_change()">
<?php
$sel = is_specialnet($pconfig['dst']); ?>
- <option value="any" <?php if ($pconfig['dst'] == "any") { echo "selected"; } ?>>any</option>
- <option value="single" <?php if (($pconfig['dstmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>>Single host or alias</option>
- <option value="network" <?php if (!$sel) echo "selected"; ?>>Network</option>
+ <option value="any" <?php if ($pconfig['dst'] == "any") { echo "selected"; } ?>><?=gettext("any");?></option>
+ <option value="single" <?php if (($pconfig['dstmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>><?=gettext("Single host or alias");?></option>
+ <option value="network" <?php if (!$sel) echo "selected"; ?>><?=gettext("Network");?></option>
<?php if(have_ruleint_access("pptp")): ?>
- <option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo "selected"; } ?>>PPTP clients</option>
+ <option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo "selected"; } ?>><?=gettext("PPTP clients");?></option>
<?php endif; ?>
<?php if(have_ruleint_access("pppoe")): ?>
- <option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo "selected"; } ?>>PPPoE clients</option>
+ <option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo "selected"; } ?>><?=gettext("PPPoE clients");?></option>
<?php endif; ?>
<?php if(have_ruleint_access("l2tp")): ?>
- <option value="l2tp" <?php if ($pconfig['dst'] == "l2tp") { echo "selected"; } ?>>L2TP clients</option>
+ <option value="l2tp" <?php if ($pconfig['dst'] == "l2tp") { echo "selected"; } ?>><?=gettext("L2TP clients");?></option>
<?php endif; ?>
<?php foreach ($ifdisp as $if => $ifdesc): ?>
<?php if(have_ruleint_access($if)): ?>
- <option value="<?=$if;?>" <?php if ($pconfig['dst'] == $if) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?> subnet</option>
+ <option value="<?=$if;?>" <?php if ($pconfig['dst'] == $if) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?> <?=gettext("subnet");?></option>
<option value="<?=$if;?>ip"<?php if ($pconfig['dst'] == $if . "ip") { echo "selected"; } ?>>
- <?=$ifdesc;?> address
+ <?=$ifdesc;?> <?=gettext("address");?>
</option>
<?php endif; ?>
<?php endforeach; ?>
@@ -876,7 +876,7 @@ include("head.inc");
</td>
</tr>
<tr>
- <td>Address:&nbsp;&nbsp;</td>
+ <td><?=gettext("Address");?>:&nbsp;&nbsp;</td>
<td>
<input<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="dst" type="text" class="formfldalias" id="dst" size="20" value="<?php if (!is_specialnet($pconfig['dst'])) echo htmlspecialchars($pconfig['dst']);?>">
/
@@ -892,15 +892,15 @@ include("head.inc");
</td>
</tr>
<tr id="dprtr" name="dprtr">
- <td width="22%" valign="top" class="vncellreq">Destination port range </td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Destination port range ");?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td>from:&nbsp;&nbsp;</td>
+ <td><?=gettext("from");?>:&nbsp;&nbsp;</td>
<td>
<select<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="dstbeginport" class="formselect" onchange="dst_rep_change();ext_change()">
- <option value="">(other)</option>
- <option value="any" <?php $bfound = 0; if ($pconfig['dstbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>>any</option>
+ <option value="">(<?=gettext("other"); ?>)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['dstbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any");?></option>
<?php foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstbeginport']) { echo "selected"; $bfound = 1; }?>><?=htmlspecialchars($wkportdesc);?></option>
<?php endforeach; ?>
@@ -909,11 +909,11 @@ include("head.inc");
</td>
</tr>
<tr>
- <td>to:</td>
+ <td><?=gettext("to");?>:</td>
<td>
<select<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="dstendport" class="formselect" onchange="ext_change()">
- <option value="">(other)</option>
- <option value="any" <?php $bfound = 0; if ($pconfig['dstendport'] == "any") { echo "selected"; $bfound = 1; } ?>>any</option>
+ <option value="">(<?=gettext("other"); ?>)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['dstendport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any");?></option>
<?php foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstendport']) { echo "selected"; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
<?php endforeach; ?>
@@ -924,34 +924,34 @@ include("head.inc");
</table>
<br />
<span class="vexpl">
- Specify the port or port range for the destination of the packet for this rule.
+ <?=gettext("Specify the port or port range for the destination of the packet for this rule.");?>
<br />
- Hint: you can leave the <em>'to'</em> field empty if you only want to filter a single port
+ <?=gettext("Hint: you can leave the"); ?> <em><?=gettext("'to'"); ?></em> <?=gettext("field empty if you only want to filter a single port");?>
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Log</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Log");?></td>
<td width="78%" class="vtable">
<input name="log" type="checkbox" id="log" value="yes" <?php if ($pconfig['log']) echo "checked"; ?>>
- <strong>Log packets that are handled by this rule</strong>
+ <strong><?=gettext("Log packets that are handled by this rule");?></strong>
<br />
- <span class="vexpl">Hint: the firewall has limited local log space. Don't turn on logging for everything. If you want to do a lot of logging, consider using a remote syslog server (see the <a href="diag_logs_settings.php">Diagnostics: System logs: Settings</a> page).</span>
+ <span class="vexpl"><?=gettext("Hint: the firewall has limited local log space. Don't turn on logging for everything. If you want to do a lot of logging, consider using a remote syslog server"); ?> (<?=gettext("see the"); ?> <a href="diag_logs_settings.php"><?=gettext("Diagnostics: System logs: Settings"); ?></a> <?=gettext("page"); ?>).</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="52" maxlength="52" value="<?=htmlspecialchars($pconfig['descr']);?>">
<br />
- <span class="vexpl">You may enter a description here for your reference.</span>
+ <span class="vexpl"><?=gettext("You may enter a description here for your reference.");?></span>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
&nbsp;<br>&nbsp;
- <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_filter[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
@@ -962,20 +962,20 @@ include("head.inc");
<td>&nbsp;</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Advanced features</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Advanced features");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Source OS</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Source OS");?></td>
<td width="78%" class="vtable">
<div id="showadvsourceosbox" <? if ($pconfig['os']) echo "style='display:none'"; ?>>
- <input type="button" onClick="show_advanced_sourceos()" value="Advanced"></input> - Show advanced option</a>
+ <input type="button" onClick="show_advanced_sourceos()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
</div>
<div id="showsourceosadv" <? if (empty($pconfig['os'])) echo "style='display:none'"; ?>>
- OS Type:&nbsp;
+ <?=gettext("OS Type");?>:&nbsp;
<select name="os" id="os" class="formselect">
<?php
$ostypes = array(
- "" => "any",
+ "" => gettext("any"),
"AIX" => "AIX",
"Linux" => "Linux",
"FreeBSD" => "FreeBSD",
@@ -994,15 +994,15 @@ include("head.inc");
?>
</select>
<br />
- Note: this only works for TCP rules
+ <?=gettext("Note: this only works for TCP rules");?>
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Diffserv Code Point</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Diffserv Code Point");?></td>
<td width="78%" class="vtable">
<div id="dsadv" name="dsadv" <? if ($pconfig['dscp']) echo "style='display:none'"; ?>>
- <input type="button" onClick="show_dsdiv();" value="Advanced"> - Show advanced option
+ <input type="button" onClick="show_dsdiv();" value="<?=gettext("Advanced"); ?>"> - <?=gettext("Show advanced option");?>
</div>
<div id="dsdivmain" name="dsdivmain" <? if (empty($pconfig['dscp'])) echo "style='display:none'"; ?>>
<select name="dscp" id="dscp">
@@ -1015,10 +1015,10 @@ include("head.inc");
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Advanced Options</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Advanced Options");?></td>
<td width="78%" class="vtable">
<div id="aoadv" name="aoadv">
- <input type="button" onClick="show_aodiv();" value="Advanced"> - Show advanced option
+ <input type="button" onClick="show_aodiv();" value="<?=gettext("Advanced"); ?>"> - <?=gettext("Show advanced option");?>
</div>
<div id="aodivmain" name="aodivmain" style="display:none">
<input type="checkbox" id="allowopts" value="yes" name="allowopts"<?php if($pconfig['allowopts'] == true) echo " checked"; ?>>
@@ -1028,15 +1028,15 @@ include("head.inc");
<br/><span class="vexpl"><?=gettext("This will disable auto generated reply-to for this rule.");?>
</span><p>
<input name="tag" id="tag" value="<?=htmlspecialchars($pconfig['tag']);?>">
- <br /><span class="vexpl"><?=gettext("You can mark a packet matching this rule and use this mark to match on other NAT/filter rules. It is called <b>Policy filtering</b>");?>
+ <br /><span class="vexpl"><?=gettext("You can mark a packet matching this rule and use this mark to match on other NAT/filter rules. It is called"); ?> <b><?=gettext("Policy filtering"); ?></b>
</span><p>
<input name="tagged" id="tagged" value="<?=htmlspecialchars($pconfig['tagged']);?>">
<br /><span class="vexpl"><?=gettext("You can match packet on a mark placed before on another rule.")?>
</span> <p>
- <input name="max" id="max" value="<?php echo $pconfig['max'] ?>"><br> Maximum state entries this rule can create<p>
- <input name="max-src-nodes" id="max-src-nodes" value="<?php echo $pconfig['max-src-nodes'] ?>"><br> Maximum number of unique source hosts<p>
- <input name="max-src-conn" id="max-src-conn" value="<?php echo $pconfig['max-src-conn'] ?>"><br> Maximum number of established connections per host<p>
- <input name="max-src-states" id="max-src-states" value="<?php echo $pconfig['max-src-states'] ?>"><br> Maximum state entries per host<p>
+ <input name="max" id="max" value="<?php echo $pconfig['max'] ?>"><br><?=gettext(" Maximum state entries this rule can create");?><p>
+ <input name="max-src-nodes" id="max-src-nodes" value="<?php echo $pconfig['max-src-nodes'] ?>"><br><?=gettext(" Maximum number of unique source hosts");?><p>
+ <input name="max-src-conn" id="max-src-conn" value="<?php echo $pconfig['max-src-conn'] ?>"><br><?=gettext(" Maximum number of established connections per host");?><p>
+ <input name="max-src-states" id="max-src-states" value="<?php echo $pconfig['max-src-states'] ?>"><br><?=gettext(" Maximum state entries per host");?><p>
<input name="max-src-conn-rate" id="max-src-conn-rate" value="<?php echo $pconfig['max-src-conn-rate'] ?>"> /
<select name="max-src-conn-rates" id="max-src-conn-rates">
<option value=""<?php if(intval($pconfig['max-src-conn-rates']) < 1) echo " selected"; ?>></option>
@@ -1045,22 +1045,22 @@ include("head.inc");
echo "<option value=\"{$x}\"{$selected}>{$x}</option>\n";
} ?>
</select><br />
- Maximum new connections / per second(s)
+ <?=gettext("Maximum new connections / per second(s)");?>
<p>
<input name="statetimeout" value="<?php echo $pconfig['statetimeout'] ?>"><br>
- State Timeout in seconds
+ <?=gettext("State Timeout in seconds");?>
<p />
- <p><strong>NOTE: Leave fields blank to disable that feature.</strong>
+ <p><strong><?=gettext("NOTE: Leave fields blank to disable that feature.");?></strong>
</div>
</td>
</tr>
<tr id="tcpflags" name="tcpflags">
- <td width="22%" valign="top" class="vncell">TCP flags</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("TCP flags");?></td>
<td width="78%" class="vtable">
<div id="showtcpflagsbox" <? if ($pconfig['tcpflags_any'] || $pconfig['tcpflags1'] || $pconfig['tcpflags2']) echo "style='display:none'"; ?>>
- <input type="button" onClick="show_advanced_tcpflags()" value="Advanced"></input> - Show advanced option</a>
+ <input type="button" onClick="show_advanced_tcpflags()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
</div>
<div id="showtcpflagsadv" <? if (empty($pconfig['tcpflags_any']) && empty($pconfig['tcpflags1']) && empty($pconfig['tcpflags2'])) echo "style='display:none'"; ?>>
<div id="tcpheader" name="tcpheader">
@@ -1091,46 +1091,46 @@ include("head.inc");
<center>
</div>
<br/><center>
- <input onClick='tcpflags_anyclick(this);' type='checkbox' name='tcpflags_any' value='on' <?php if ($pconfig['tcpflags_any']) echo "checked"; ?>><strong>Any flags.</strong><br/></center>
+ <input onClick='tcpflags_anyclick(this);' type='checkbox' name='tcpflags_any' value='on' <?php if ($pconfig['tcpflags_any']) echo "checked"; ?>><strong><?=gettext("Any flags.");?></strong><br/></center>
<br/>
- <span class="vexpl">Use this to choose TCP flags that must
- be set or cleared for this rule to match.</span>
+ <span class="vexpl"><?=gettext("Use this to choose TCP flags that must".
+ "be set or cleared for this rule to match.");?></span>
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">State Type</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("State Type");?></td>
<td width="78%" class="vtable">
<div id="showadvstatebox" <? if (!empty($pconfig['statetype']) && $pconfig['statetype'] != "keep state") echo "style='display:none'"; ?>>
- <input type="button" onClick="show_advanced_state()" value="Advanced"></input> - Show advanced option</a>
+ <input type="button" onClick="show_advanced_state()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
</div>
<div id="showstateadv" <? if (empty($pconfig['statetype']) || $pconfig['statetype'] == "keep state") echo "style='display:none'"; ?>>
<select name="statetype">
- <option value="keep state" <?php if(!isset($pconfig['statetype']) or $pconfig['statetype'] == "keep state") echo "selected"; ?>>keep state</option>
- <option value="sloppy state" <?php if($pconfig['statetype'] == "sloppy state") echo "selected"; ?>>sloppy state</option>
- <option value="synproxy state"<?php if($pconfig['statetype'] == "synproxy state") echo "selected"; ?>>synproxy state</option>
- <option value="none"<?php if($pconfig['statetype'] == "none") echo "selected"; ?>>none</option>
- </select><br>HINT: Select which type of state tracking mechanism you would like to use. If in doubt, use keep state.
+ <option value="keep state" <?php if(!isset($pconfig['statetype']) or $pconfig['statetype'] == "keep state") echo "selected"; ?>><?=gettext("keep state");?></option>
+ <option value="sloppy state" <?php if($pconfig['statetype'] == "sloppy state") echo "selected"; ?>><?=gettext("sloppy state");?></option>
+ <option value="synproxy state"<?php if($pconfig['statetype'] == "synproxy state") echo "selected"; ?>><?=gettext("synproxy state");?></option>
+ <option value="none"<?php if($pconfig['statetype'] == "none") echo "selected"; ?>><?=gettext("none");?></option>
+ </select><br><?=gettext("HINT: Select which type of state tracking mechanism you would like to use. If in doubt, use keep state.");?>
<p>
<table width="90%">
- <tr><td width="25%"><ul><li>keep state</li></td><td>Works with all IP protocols.</ul></td></tr>
- <tr><td width="25%"><ul><li>sloppy state</li></td><td>Works with all IP protocols.</ul></td></tr>
- <tr><td width="25%"><ul><li>synproxy state</li></td><td>Proxies incoming TCP connections to help protect servers from spoofed TCP SYN floods. This option includes the functionality of keep state and modulate state combined.</ul></td></tr>
- <tr><td width="25%"><ul><li>none</li></td><td>Do not use state mechanisms to keep track. This is only useful if you're doing advanced queueing in certain situations. Please check the documentation.</ul></td></tr>
+ <tr><td width="25%"><ul><li><?=gettext("keep state");?></li></td><td><?=gettext("Works with all IP protocols.");?></ul></td></tr>
+ <tr><td width="25%"><ul><li><?=gettext("sloppy state");?></li></td><td><?=gettext("Works with all IP protocols.");?></ul></td></tr>
+ <tr><td width="25%"><ul><li><?=gettext("synproxy state");?></li></td><td><?=gettext("Proxies incoming TCP connections to help protect servers from spoofed TCP SYN floods. This option includes the functionality of keep state and modulate state combined.");?></ul></td></tr>
+ <tr><td width="25%"><ul><li><?=gettext("none");?></li></td><td><?=gettext("Do not use state mechanisms to keep track. This is only useful if you're doing advanced queueing in certain situations. Please check the documentation.");?></ul></td></tr>
</table>
</p>
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">No XMLRPC Sync</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("No XMLRPC Sync");?></td>
<td width="78%" class="vtable">
<div id="showadvnoxmlrpcsyncbox" <? if ($pconfig['nosync']) echo "style='display:none'"; ?>>
- <input type="button" onClick="show_advanced_noxmlrpc()" value="Advanced"></input> - Show advanced option</a>
+ <input type="button" onClick="show_advanced_noxmlrpc()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
</div>
<div id="shownoxmlrpcadv" <? if (empty($pconfig['nosync'])) echo "style='display:none'"; ?>>
<input type="checkbox" name="nosync"<?php if($pconfig['nosync']) echo " CHECKED"; ?>><br>
- HINT: This prevents the rule from automatically syncing to other CARP members.
+ <?=gettext("HINT: This prevents the rule from automatically syncing to other CARP members.");?>
</div>
</td>
</tr>
@@ -1146,10 +1146,10 @@ include("head.inc");
}
?>
<tr>
- <td width="22%" valign="top" class="vncell">Schedule</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Schedule");?></td>
<td width="78%" class="vtable">
<div id="showadvschedulebox" <? if (!empty($pconfig['sched'])) echo "style='display:none'"; ?>>
- <input type="button" onClick="show_advanced_schedule()" value="Advanced"></input> - Show advanced option</a>
+ <input type="button" onClick="show_advanced_schedule()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
</div>
<div id="showscheduleadv" <? if (empty($pconfig['sched'])) echo "style='display:none'"; ?>>
<select name='sched'>
@@ -1168,19 +1168,19 @@ include("head.inc");
}
?>
</select>
- <p>Leave as 'none' to leave the rule enabled all the time.</p>
+ <p><?=gettext("Leave as 'none' to leave the rule enabled all the time.");?></p>
</div>
</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">
<div id="showadvgatewaybox" <? if (!empty($pconfig['gateway'])) echo "style='display:none'"; ?>>
- <input type="button" onClick="show_advanced_gateway()" value="Advanced"></input> - Show advanced option</a>
+ <input type="button" onClick="show_advanced_gateway()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
</div>
<div id="showgatewayadv" <? if (empty($pconfig['gateway'])) echo "style='display:none'"; ?>>
<select name='gateway'>
- <option value="" >default</option>
+ <option value="" ><?=gettext("default");?></option>
<?php
/* build a list of gateways */
$gateways = return_gateways_array();
@@ -1209,15 +1209,15 @@ include("head.inc");
}
?>
</select>
- <p><strong>Leave as 'default' to use the system routing table. Or choose a gateway to utilize policy based routing.</strong></p>
+ <p><strong><?=gettext("Leave as 'default' to use the system routing table. Or choose a gateway to utilize policy based routing.");?></strong></p>
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">In/Out</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("In/Out");?></td>
<td width="78%" class="vtable">
<div id="showadvinoutbox" <? if (!empty($pconfig['dnpipe'])) echo "style='display:none'"; ?>>
- <input type="button" onClick="show_advanced_inout()" value="Advanced"></input> - Show advanced option</a>
+ <input type="button" onClick="show_advanced_inout()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
</div>
<div id="showinoutadv" <? if (empty($pconfig['dnpipe'])) echo "style='display:none'"; ?>>
<select name="dnpipe">
@@ -1258,16 +1258,16 @@ include("head.inc");
?>
</select>
<br />
- <span class="vexpl">Choose the Out queue/Virtual interface only if you have selected In too. <br/> The Out selection is applied to traffic going out the interface the rule is created, In is the incoming one. <br/> If you are creating a rule on the Floating tab if the direction is In then the same rules apply, if the direction is out the selections are reverted Out is for incoming and In is for outgoing and if you do not select any direction use only the In since the Out selection does not make sense in there to prevent oddities.</span>
+ <span class="vexpl"><?=gettext("Choose the Out queue/Virtual interface only if you have selected In too.")."<br/>".gettext("The Out selection is applied to traffic going out the interface the rule is created, In is the incoming one.")."<br/>".gettext("If you are creating a rule on the Floating tab if the direction is In then the same rules apply, if the direction is out the selections are reverted Out is for incoming and In is for outgoing and if you do not select any direction use only the In since the Out selection does not make sense in there to prevent oddities.");?></span>
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Ackqueue/Queue</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Ackqueue/Queue");?></td>
<td width="78%" class="vtable">
<div id="showadvackqueuebox" <? if (!empty($pconfig['defaultqueue'])) echo "style='display:none'"; ?>>
- <input type="button" onClick="show_advanced_ackqueue()" value="Advanced"></input> - Show advanced option</a>
+ <input type="button" onClick="show_advanced_ackqueue()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
</div>
<div id="showackqueueadv" <? if (empty($pconfig['defaultqueue'])) echo "style='display:none'"; ?>>
<select name="ackqueue">
@@ -1308,14 +1308,14 @@ include("head.inc");
?>
</select>
<br />
- <span class="vexpl">Choose the Acknowledge Queue only if you have selected Queue.</span>
+ <span class="vexpl"><?=gettext("Choose the Acknowledge Queue only if you have selected Queue.");?></span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Layer7</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Layer7");?></td>
<td width="78%" class="vtable">
<div id="showadvlayer7box" <? if (!empty($pconfig['l7container'])) echo "style='display:none'"; ?>>
- <input type="button" onClick="show_advanced_layer7()" value="Advanced"></input> - Show advanced option</a>
+ <input type="button" onClick="show_advanced_layer7()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
</div>
<div id="showlayer7adv" <? if (empty($pconfig['l7container'])) echo "style='display:none'"; ?>>
<select name="l7container">
@@ -1335,8 +1335,8 @@ include("head.inc");
</select>
<br/>
<span class="vexpl">
- Choose a Layer7 container to apply application protocol inspection rules.
- These are valid for TCP and UDP protocols only.
+ <?=gettext("Choose a Layer7 container to apply application protocol inspection rules. " .
+ "These are valid for TCP and UDP protocols only.");?>
</span>
</div>
</td>
@@ -1345,7 +1345,7 @@ include("head.inc");
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
&nbsp;<br>&nbsp;
- <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_filter[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/firewall_schedule.php b/usr/local/www/firewall_schedule.php
index f204497..cfa160b 100644
--- a/usr/local/www/firewall_schedule.php
+++ b/usr/local/www/firewall_schedule.php
@@ -39,15 +39,16 @@
##|*MATCH=firewall_schedule.php*
##|-PRIV
-$pgtitle = array("Firewall","Schedules");
-$dayArray = array ('Mon','Tues','Wed','Thur','Fri','Sat','Sun');
-$monthArray = array ('January','February','March','April','May','June','July','August','September','October','November','December');
+$dayArray = array (gettext('Mon'),gettext('Tues'),gettext('Wed'),gettext('Thur'),gettext('Fri'),gettext('Sat'),gettext('Sun'));
+$monthArray = array (gettext('January'),gettext('February'),gettext('March'),gettext('April'),gettext('May'),gettext('June'),gettext('July'),gettext('August'),gettext('September'),gettext('October'),gettext('November'),gettext('December'));
require("guiconfig.inc");
require("filter.inc");
require("shaper.inc");
+$pgtitle = array(gettext("Firewall"),gettext("Schedules"));
+
if (!is_array($config['schedules']['schedule']))
$config['schedules']['schedule'] = array();
@@ -73,7 +74,7 @@ if ($_GET['act'] == "del") {
}
if($is_schedule_referenced == true) {
- $savemsg = "Cannot delete Schedule. Currently in use by {$referenced_by}";
+ $savemsg = sprintf(gettext("Cannot delete Schedule. Currently in use by %s"),$referenced_by);
} else {
unset($a_schedules[$_GET['id']]);
write_config();
@@ -92,9 +93,9 @@ include("head.inc");
<form action="firewall_schedule.php" method="post">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="25%" class="listhdrr">Name</td>
- <td width="35%" class="listhdrr">Time Range(s)</td>
- <td width="35%" class="listhdr">Description</td>
+ <td width="25%" class="listhdrr"><?=gettext("Name");?></td>
+ <td width="35%" class="listhdrr"><?=gettext("Time Range(s)");?></td>
+ <td width="35%" class="listhdr"><?=gettext("Description");?></td>
<td width="5%" class="list sort_ignore">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -110,7 +111,7 @@ include("head.inc");
<?=htmlspecialchars($schedule['name']);
$schedstatus = filter_get_time_based_rule_status($schedule);
if ($schedstatus) { ?>
- &nbsp;<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_frmfld_time.png" title="Schedule is currently active" width="17" height="17" border="0">
+ &nbsp;<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_frmfld_time.png" title="<?=gettext("Schedule is currently active");?>" width="17" height="17" border="0">
<?php } ?>
</td>
@@ -215,8 +216,8 @@ include("head.inc");
<td valign="middle" nowrap class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td valign="middle"><a href="firewall_schedule_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="edit alias"></a></td>
- <td><a href="firewall_schedule.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this schedule?')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="delete alias"></a></td>
+ <td valign="middle"><a href="firewall_schedule_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit alias");?>"></a></td>
+ <td><a href="firewall_schedule.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext('Do you really want to delete this schedule?');?>')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete alias");?>"></a></td>
</tr>
</table>
</td>
@@ -235,7 +236,7 @@ include("head.inc");
</tr>
<tr>
<td class="tabcont" colspan="3">
- <p><span class="vexpl"><span class="red"><strong>Note:<br></strong></span>Schedules act as placeholders for time ranges to be used in Firewall Rules.</span></p>
+ <p><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br></strong></span><?=gettext("Schedules act as placeholders for time ranges to be used in Firewall Rules.");?></span></p>
</td>
</tr>
</table>
diff --git a/usr/local/www/firewall_schedule_edit.php b/usr/local/www/firewall_schedule_edit.php
index 62f0d99..74497c1 100644
--- a/usr/local/www/firewall_schedule_edit.php
+++ b/usr/local/www/firewall_schedule_edit.php
@@ -53,20 +53,21 @@ function schedule_sort(){
usort($config['schedules']['schedule'], "schedulecmp");
}
-$pgtitle = array("Firewall","Schedules","Edit");
require("guiconfig.inc");
require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
+$pgtitle = array(gettext("Firewall"),gettext("Schedules"),gettext("Edit"));
+
$starttimehr = 00;
$starttimemin = 00;
$stoptimehr = 23;
$stoptimemin = 59;
-$dayArray = array ('Mon','Tues','Wed','Thur','Fri','Sat','Sun');
-$monthArray = array ('January','February','March','April','May','June','July','August','September','October','November','December');
+$dayArray = array (gettext('Mon'),gettext('Tues'),gettext('Wed'),gettext('Thur'),gettext('Fri'),gettext('Sat'),gettext('Sun'));
+$monthArray = array (gettext('January'),gettext('February'),gettext('March'),gettext('April'),gettext('May'),gettext('June'),gettext('July'),gettext('August'),gettext('September'),gettext('October'),gettext('November'),gettext('December'));
if (!is_array($config['schedules']['schedule']))
$config['schedules']['schedule'] = array();
@@ -89,18 +90,18 @@ if (isset($id) && $a_schedules[$id]) {
if ($_POST) {
if(strtolower($_POST['name']) == "lan")
- $input_errors[] = "Schedule may not be named LAN.";
+ $input_errors[] = gettext("Schedule may not be named LAN.");
if(strtolower($_POST['name']) == "wan")
- $input_errors[] = "Schedule may not be named WAN.";
+ $input_errors[] = gettext("Schedule may not be named WAN.");
if(strtolower($_POST['name']) == "")
- $input_errors[] = "Schedule name cannot be blank.";
+ $input_errors[] = gettext("Schedule name cannot be blank.");
$x = is_validaliasname($_POST['name']);
if (!isset($x)) {
- $input_errors[] = "Reserved word used for schedule name.";
+ $input_errors[] = gettext("Reserved word used for schedule name.");
} else {
if (is_validaliasname($_POST['name']) == false)
- $input_errors[] = "The schedule name may only consist of the characters a-z, A-Z, 0-9";
+ $input_errors[] = gettext("The schedule name may only consist of the characters a-z, A-Z, 0-9");
}
/* check for name conflicts */
@@ -109,7 +110,7 @@ if ($_POST) {
continue;
if ($schedule['name'] == $_POST['name']) {
- $input_errors[] = "A Schedule with this name already exists.";
+ $input_errors[] = gettext("A Schedule with this name already exists.");
break;
}
}
@@ -166,7 +167,7 @@ if ($_POST) {
}
if (!$timerangeFound)
- $input_errors[] = "The schedule must have at least one time range configured.";
+ $input_errors[] = gettext("The schedule must have at least one time range configured.");
if (!$input_errors) {
@@ -766,33 +767,33 @@ EOD;
<form action="firewall_schedule_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Schedule information</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Schedule information");?></td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td width="15%" valign="top" class="vncellreq">Schedule Name</td>
+ <td width="15%" valign="top" class="vncellreq"><?=gettext("Schedule Name");?></td>
<td width="85%" class="vtable">
<?php if(is_schedule_inuse($pconfig['name']) == true): ?>
<input name="name" type="hidden" id="name" size="40" value="<?=htmlspecialchars($pconfig['name']);?>" />
<?php echo $pconfig['name']; ?>
<p>
- <span class="vexpl">NOTE: This schedule is in use so the name may not be modified!</span>
+ <span class="vexpl"><?=gettext("NOTE: This schedule is in use so the name may not be modified!");?></span>
</p>
<?php else: ?>
<input name="name" type="text" id="name" size="40" maxlength="40" class="formfld unknown" value="<?=htmlspecialchars($pconfig['name']);?>"><br>
<span class="vexpl">
- The name of the alias may only consist of the characters a-z, A-Z and 0-9
+ <?=gettext("The name of the alias may only consist of the characters a-z, A-Z and 0-9");?>
</span>
<?php endif; ?>
</td>
</tr>
<tr>
- <td width="15%" valign="top" class="vncell">Description</td>
+ <td width="15%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="85%" class="vtable"><input name="descr" type="text" id="descr" size="40" maxlength="40" class="formfld unknown" value="<?=htmlspecialchars($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>
@@ -800,7 +801,7 @@ EOD;
<tr>
</tr>
<tr>
- <td width="15%" valign="top" class="vncellreq">Month</td>
+ <td width="15%" valign="top" class="vncellreq"><?=gettext("Month");?></td>
<td width="85%" class="vtable">
<select name="monthsel" class="formselect" id="monthsel" onchange="update_month();">
<?php
@@ -842,13 +843,13 @@ EOD;
<TR><TD COLSPAN="7" ALIGN=center class="listbg"><B><?php echo date("F Y", mktime(0, 0, 0, date($monthcounter), 1, date($yearcounter)));?></B></TD>
</TR>
<TR>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p1');"><u><b>Mon</b></u></TD>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p2');"><u><b>Tue</b></u></TD>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p3');"><u><b>Wed</b></u></TD>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p4');"><u><b>Thu</b></u></TD>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p5');"><u><b>Fri</b></u></TD>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p6');"><u><b>Sat</b></u></TD>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p7');"><u><b>Sun</b></u></TD>
+ <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p1');"><u><b><?=gettext("Mon");?></b></u></TD>
+ <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p2');"><u><b><?=gettext("Tue");?></b></u></TD>
+ <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p3');"><u><b><?=gettext("Wed");?></b></u></TD>
+ <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p4');"><u><b><?=gettext("Thu");?></b></u></TD>
+ <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p5');"><u><b><?=gettext("Fri");?></b></u></TD>
+ <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p6');"><u><b><?=gettext("Sat");?></b></u></TD>
+ <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p7');"><u><b><?=gettext("Sun");?></b></u></TD>
</TR>
<?php
$firstmonth = FALSE;
@@ -902,15 +903,15 @@ EOD;
} //end for loop
?>
<br/>
- Click individual date to select that date only. Click the appropriate weekday Header to select all occurences of that weekday.
+ <?=gettext("Click individual date to select that date only. Click the appropriate weekday Header to select all occurences of that weekday.");?>
</td>
</tr>
<tr>
- <td width="15%" valign="top" class="vncellreq">Time</td>
+ <td width="15%" valign="top" class="vncellreq"><?=gettext("Time");?></td>
<td width="85%" class="vtable">
<table cellspacing=2 class="tabcont">
<tr>
- <td class="listhdrr" align="center">Start Time</td><td></td><td class="listhdrr" align="center">Stop Time</td>
+ <td class="listhdrr" align="center"><?=gettext("Start Time");?></td><td></td><td class="listhdrr" align="center"><?=gettext("Stop Time");?></td>
</tr>
<tr>
<td>
@@ -923,14 +924,14 @@ EOD;
echo "</option>";
}
?>
- </select>&nbsp;Hr&nbsp;&nbsp;
+ </select>&nbsp;<?=gettext("Hr"); ?>&nbsp;&nbsp;
<select name="starttimemin" class="formselect" id="starttimemin">
<option value="00">00</option>
<option value="15">15</option>
<option value="30">30</option>
<option value="45">45</option>
<option value="59">59</option>
- </select>&nbsp;Min
+ </select>&nbsp;<?=gettext("Min"); ?>
</td>
<td></td>
<td>
@@ -948,33 +949,33 @@ EOD;
echo "</option>";
}
?>
- </select>&nbsp;Hr&nbsp;&nbsp;
+ </select>&nbsp;<?=gettext("Hr");?>&nbsp;&nbsp;
<select name="stoptimemin" class="formselect" id="stoptimemin">
<option value="00">00</option>
<option value="15">15</option>
<option value="30">30</option>
<option value="45">45</option>
<option value="59" SELECTED>59</option>
- </select>&nbsp;Min
+ </select>&nbsp;<?=gettext("Min");?>
</td>
</tr>
</table><br>
- Select the time range for the day(s) selected on the Month(s) above. A full day is 0:00-23:59.
+ <?=gettext("Select the time range for the day(s) selected on the Month(s) above. A full day is 0:00-23:59.")?>
</td>
</tr>
<tr>
- <td width="15%" valign="top" class="vncell">Time Range Description</td>
+ <td width="15%" valign="top" class="vncell"><?=gettext("Time Range Description")?></td>
<td width="85%" class="vtable"><input name="timerangedescr" type="text" class="formfld unknown" id="timerangedescr" size="40" maxlength="40"><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 width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input type="button" value="Add Time" class="formbtn" onclick="javascript:processEntries();">&nbsp;&nbsp;&nbsp;
- <input type="button" value="Clear Selection" class="formbtn" onclick="javascript:clearCalendar(); clearTime(); clearDescr();">
+ <input type="button" value="<?=gettext("Add Time");?>" class="formbtn" onclick="javascript:processEntries();">&nbsp;&nbsp;&nbsp;
+ <input type="button" value="<?=gettext("Clear Selection");?>" class="formbtn" onclick="javascript:clearCalendar(); clearTime(); clearDescr();">
</td>
</tr>
<tr>
@@ -983,18 +984,18 @@ EOD;
</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Schedule repeat</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Schedule repeat");?></td>
</tr>
<tr>
- <td width="15%" valign="top" class="vncellreq">Configured Ranges</td>
+ <td width="15%" valign="top" class="vncellreq"><?=gettext("Configured Ranges");?></td>
<td width="85%">
<table id="scheduletable">
<tbody>
<tr>
- <TD ALIGN="center" class="listbg" width="35%">Day(s)</td>
- <TD ALIGN="center" class="listbg" width="12%">Start Time</td>
- <TD ALIGN="center" class="listbg" width="11%">Stop Time</td>
- <TD ALIGN="center" class="listbg" width="42%">Description</td>
+ <TD ALIGN="center" class="listbg" width="35%"><?=gettext("Day(s)");?></td>
+ <TD ALIGN="center" class="listbg" width="12%"><?=gettext("Start Time");?></td>
+ <TD ALIGN="center" class="listbg" width="11%"><?=gettext("Stop Time");?></td>
+ <TD ALIGN="center" class="listbg" width="42%"><?=gettext("Description");?></td>
</tr>
<?php
if ($getSchedule){
@@ -1152,8 +1153,8 @@ EOD;
<tr>
<td width="15%" valign="top">&nbsp;</td>
<td width="85%">
- <input id="submit" name="submit" type="submit" onclick="return checkForRanges();" class="formbtn" value="Save" />
- <input id="cancelbutton" name="cancelbutton" type="button" class="formbtn" value="Cancel" onclick="history.back()" />
+ <input id="submit" name="submit" type="submit" onclick="return checkForRanges();" class="formbtn" value="<?=gettext("Save"); ?>" />
+ <input id="cancelbutton" name="cancelbutton" type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()" />
<?php if (isset($id) && $a_schedules[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>" />
<?php endif; ?>
diff --git a/usr/local/www/firewall_shaper.php b/usr/local/www/firewall_shaper.php
index e456c61..26954c2 100755
--- a/usr/local/www/firewall_shaper.php
+++ b/usr/local/www/firewall_shaper.php
@@ -51,7 +51,7 @@ if($_GET['reset'] <> "") {
exit;
}
-$pgtitle = array("Firewall","Traffic Shaper");
+$pgtitle = array(gettext("Firewall"),gettext("Traffic Shaper"));
$statusurl = "status_queues.php";
$shaperIFlist = get_configured_interface_with_descr();
@@ -156,7 +156,7 @@ if ($_GET) {
} else if ($addnewaltq) {
$q = new altq_root_queue();
} else
- $input_errors[] = "Could not create new queue/discipline!";
+ $input_errors[] = gettext("Could not create new queue/discipline!");
if ($q) {
$q->SetInterface($interface);
@@ -172,7 +172,7 @@ if ($_GET) {
if ($queue)
$output_form .= $queue->build_form();
else
- $input_errors[] = "Queue not found!";
+ $input_errors[] = gettext("Queue not found!");
break;
case "enable":
if ($queue) {
@@ -181,7 +181,7 @@ if ($_GET) {
write_config();
mark_subsystem_dirty('shaper');
} else
- $input_errors[] = "Queue not found!";
+ $input_errors[] = gettext("Queue not found!");
break;
case "disable":
if ($queue) {
@@ -190,7 +190,7 @@ if ($_GET) {
write_config();
mark_subsystem_dirty('shaper');
} else
- $input_errors[] = "Queue not found!";
+ $input_errors[] = gettext("Queue not found!");
break;
default:
$output_form .= "<p class=\"pgtitle\">" . $default_shaper_msg."</p>";
@@ -267,7 +267,7 @@ if ($_GET) {
read_altq_config();
$output_form .= $tmp->build_form();
} else
- $input_errors[] = "Could not add new queue.";
+ $input_errors[] = gettext("Could not add new queue.");
} else if ($_POST['apply']) {
write_config();
@@ -342,7 +342,7 @@ $tree .= "</ul>";
if (!$dontshow || $newqueue) {
$output_form .= "<tr><td width=\"22%\" valign=\"center\" class=\"vncellreq\">";
-$output_form .= "<br />Queue Actions<br />";
+$output_form .= "<br />" . gettext("Queue Actions") . "<br />";
$output_form .= "</td><td valign=\"center\" class=\"vncellreq\" width=\"78%\"><br />";
$output_form .= "<input type=\"submit\" name=\"Submit\" value=\"" . gettext("Save") . "\" class=\"formbtn\" />";
@@ -353,7 +353,7 @@ if ($can_add || $addnewaltq) {
$output_form .= "&queue=" . $queue->GetQname();
}
$output_form .= "&action=add\">";
- $output_form .= "<input type=\"button\" class=\"formbtn\" name=\"add\" value=\"Add new queue\">";
+ $output_form .= "<input type=\"button\" class=\"formbtn\" name=\"add\" value=\"" . gettext("Add new queue") . "\">";
$output_form .= "</a>";
$output_form .= "<a href=\"firewall_shaper.php?interface=";
$output_form .= $interface . "&queue=";
@@ -363,9 +363,9 @@ if ($can_add || $addnewaltq) {
$output_form .= "&action=delete\">";
$output_form .= "<input type=\"button\" class=\"formbtn\" name=\"delete\"";
if ($queue)
- $output_form .= " value=\"Delete this queue\">";
+ $output_form .= " value=\"" . gettext("Delete this queue") . "\">";
else
- $output_form .= " value=\"Disable shaper on interface\">";
+ $output_form .= " value=\"" . gettext("Disable shaper on interface") . "\">";
$output_form .= "</a>";
}
$output_form .= "<br /></td></tr>";
@@ -402,17 +402,17 @@ include("fbegin.inc");
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('shaper')): ?><p>
-<?php print_info_box_np("The traffic shaper 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 traffic shaper 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>
<?php
$tab_array = array();
- $tab_array[0] = array("By Interface", true, "firewall_shaper.php");
- $tab_array[1] = array("By Queue", false, "firewall_shaper_queues.php");
- $tab_array[2] = array("Limiter", false, "firewall_shaper_vinterface.php");
- $tab_array[3] = array("Layer7", false, "firewall_shaper_layer7.php");
- $tab_array[4] = array("Wizards", false, "firewall_shaper_wizards.php");
+ $tab_array[0] = array(gettext("By Interface"), true, "firewall_shaper.php");
+ $tab_array[1] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
+ $tab_array[2] = array(gettext("Limiter"), false, "firewall_shaper_vinterface.php");
+ $tab_array[3] = array(gettext("Layer7"), false, "firewall_shaper_layer7.php");
+ $tab_array[4] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -423,7 +423,7 @@ include("fbegin.inc");
<?php if (count($altq_list_queues) > 0): ?>
<tr class="tabcont"><td width="25%" align="left">
<a href="firewall_shaper.php?action=resetall" >
- <input type="button" value="Remove Shaper" class="formbtn">
+ <input type="button" value="<?=gettext("Remove Shaper")?>" class="formbtn">
</a>
</td><td width="75%"> </td></tr>
<? endif; ?>
diff --git a/usr/local/www/firewall_shaper_layer7.php b/usr/local/www/firewall_shaper_layer7.php
index 3e2dc22..7a58e12 100755
--- a/usr/local/www/firewall_shaper_layer7.php
+++ b/usr/local/www/firewall_shaper_layer7.php
@@ -56,14 +56,14 @@ $avail_behaviours_limiter = get_dummynet_name_list();
$show_proto_form = false;
//More variables
-$pgtitle = array("Firewall","Traffic Shaper", "Layer7");
+$pgtitle = array(gettext("Firewall"),gettext("Traffic Shaper"), gettext("Layer7"));
$statusurl = "status_queues.php";
$output_form = "";
$default_layer7shaper_msg = "<tr><td colspan=\"4\">";
-$default_layer7shaper_msg .= "<p><span class=\"vexpl\"><span class=\"red\"><strong>Note:<br>";
-$default_layer7shaper_msg .= "</strong></span>You can add new layer7 protocol patterns by simply uploading the file <a href=\"diag_patterns.php\">here.</a><br>";
+$default_layer7shaper_msg .= sprintf("<p><span class=\"vexpl\"><span class=\"red\"><strong>%s:<br>", gettext("Note"));
+$default_layer7shaper_msg .= "</strong></span>" . gettext("You can add new layer7 protocol patterns by simply uploading the file") . " <a href=\"diag_patterns.php\">" . gettext("here") . ".</a><br>";
$default_layer7shaper_msg .= "</td></tr>";
@@ -109,7 +109,7 @@ if ($_GET) {
}
else {
$show_proto_form = false;
- $input_errors[] = "Layer7 Rules Container not found!";
+ $input_errors[] = gettext("Layer7 Rules Container not found!");
}
break;
default:
@@ -159,7 +159,7 @@ else if ($_POST) {
}
else {
if(sizeof($dupes) > 0) {
- $dupe_error = "Found the following repeated protocol definitions: ";
+ $dupe_error = gettext("Found the following repeated protocol definitions") . ": ";
foreach($dupes as $dupe)
$dupe_error .= "$dupe ";
$input_errors[] .= $dupe_error;
@@ -399,17 +399,17 @@ include("fbegin.inc");
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('shaper')): ?><p>
-<?php print_info_box_np("The traffic shaper 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 traffic shaper 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>
<?php
$tab_array = array();
- $tab_array[0] = array("By Interface", false, "firewall_shaper.php");
- $tab_array[1] = array("By Queue", false, "firewall_shaper_queues.php");
- $tab_array[2] = array("Limiter", false, "firewall_shaper_vinterface.php");
- $tab_array[3] = array("Layer7", true, "firewall_shaper_layer7.php");
- $tab_array[4] = array("Wizards", false, "firewall_shaper_wizards.php");
+ $tab_array[0] = array(gettext("By Interface"), false, "firewall_shaper.php");
+ $tab_array[1] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
+ $tab_array[2] = array(gettext("Limiter"), false, "firewall_shaper_vinterface.php");
+ $tab_array[3] = array(gettext("Layer7"), true, "firewall_shaper_layer7.php");
+ $tab_array[4] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -430,7 +430,7 @@ include("fbegin.inc");
?>
<br/><br/>
<a href="firewall_shaper_layer7.php?action=add">
- <img src="./themes/<?=$g['theme']; ?>/images/icons/icon_plus.gif" title="Create new l7 rules group" width="17" height="17" border="0"> Create new l7 rules group
+ <img src="./themes/<?=$g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("Create new l7 rules group"); ?>" width="17" height="17" border="0"> <?=gettext("Create new l7 rules group"); ?>
</a><br/>
</td>
<td width="75%" valign="top" align="center">
@@ -443,7 +443,7 @@ include("fbegin.inc");
<?php if($show_proto_form): ?>
<td width = "22%" valign = "top" class = "vncellreq">
<div id = "addressnetworkport">
- Rule(s)
+ <?=gettext("Rule(s)"); ?>
</div>
</td>
@@ -455,7 +455,7 @@ include("fbegin.inc");
<td colspan = "4">
<div style = "font-size: 8pt; padding:5px; margin-top: 16px; margin-bottom: 16px; border:1px dashed #000066;"
id = "itemhelp">
- Add one or more rules
+ <?=gettext("Add one or more rules"); ?>
</div>
</td>
</tr>
@@ -464,21 +464,21 @@ include("fbegin.inc");
<td>
<div style = "font-size: 8pt; padding:5px;"
id = "onecolumn">
- Protocol
+ <?=gettext("Protocol"); ?>
</div>
</td>
<td>
<div style = "font-size: 8pt; padding:5px;"
id = "twocolumn">
- Structure
+ <?=gettext("Structure"); ?>
</div>
</td>
<td>
<div style = "font-size: 8pt; padding:5px;"
id = "threecolumn">
- Behaviour
+ <?=gettext("Behaviour"); ?>
</div>
</td>
</tr>
@@ -540,7 +540,7 @@ include("fbegin.inc");
<? endif; ?>
</td>
<td>
- <input type="image" src="/themes/<? echo $g['theme'];?>/images/icons/icon_x.gif" onclick="removeRow('maintable',this.parentNode.parentNode); return false;" value="Delete" />
+ <input type="image" src="/themes/<? echo $g['theme'];?>/images/icons/icon_x.gif" onclick="removeRow('maintable',this.parentNode.parentNode); return false;" value="<?=gettext("Delete"); ?>" />
</td>
</tr>
@@ -556,7 +556,7 @@ include("fbegin.inc");
<a onclick = "javascript:addRow('maintable'); return false;" href="#"> <img border = "0"
src = "/themes/<?=$g['theme']; ?>/images/icons/icon_plus.gif"
- alt = "" title = "add another entry" /> </a>
+ alt = "" title = "<?=gettext("add another entry"); ?>" /> </a>
</td>
</tr>
@@ -567,14 +567,14 @@ include("fbegin.inc");
<td width = "78%">
<input id = "submit"
- name = "submit" type = "submit" class = "formbtn" value = "Save" />
+ name = "submit" type = "submit" class = "formbtn" value = "<?=gettext("Save"); ?>" />
<a href= "firewall_shaper_layer7.php">
<input id = "cancelbutton"
- name = "cancelbutton" type = "button" class = "formbtn" value = "Cancel" /></a>
+ name = "cancelbutton" type = "button" class = "formbtn" value = "<?=gettext("Cancel"); ?>" /></a>
<?php if($container): ?>
- <input id = "delete" type="submit" class="formbtn" name="delete" value="Delete"></a>
+ <input id = "delete" type="submit" class="formbtn" name="delete" value="<?=gettext("Delete"); ?>"></a>
<? endif ?>
</td>
</tr>
diff --git a/usr/local/www/firewall_shaper_queues.php b/usr/local/www/firewall_shaper_queues.php
index 35b6f21..ac3213a 100755
--- a/usr/local/www/firewall_shaper_queues.php
+++ b/usr/local/www/firewall_shaper_queues.php
@@ -169,7 +169,7 @@ if ($_POST['apply']) {
clear_subsystem_dirty('shaper');
}
-$pgtitle = "Firewall: Shaper: By Queues View";
+$pgtitle = gettext("Firewall: Shaper: By Queues View");
$statusurl = "status_queues.php";
include("head.inc");
@@ -184,17 +184,17 @@ include("head.inc");
<form action="firewall_shaper_queues.php" method="post" name="iform" id="iform">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('shaper')): ?><p>
-<?php print_info_box_np("The traffic shaper 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 traffic shaper 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>
<?php
$tab_array = array();
- $tab_array[0] = array("By Interface", false, "firewall_shaper.php");
- $tab_array[1] = array("By Queue", true, "firewall_shaper_queues.php");
- $tab_array[2] = array("Limiter", false, "firewall_shaper_vinterface.php");
- $tab_array[3] = array("Layer7", false, "firewall_shaper_layer7.php");
- $tab_array[4] = array("Wizards", false, "firewall_shaper_wizards.php");
+ $tab_array[0] = array(gettext("By Interface"), false, "firewall_shaper.php");
+ $tab_array[1] = array(gettext("By Queue"), true, "firewall_shaper_queues.php");
+ $tab_array[2] = array(gettext("Limiter"), false, "firewall_shaper_vinterface.php");
+ $tab_array[3] = array(gettext("Layer7"), false, "firewall_shaper_layer7.php");
+ $tab_array[4] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php");
display_top_tabs($tab_array);
?>
</td></tr>
diff --git a/usr/local/www/firewall_shaper_vinterface.php b/usr/local/www/firewall_shaper_vinterface.php
index b6c8c76..7ed4b02 100644
--- a/usr/local/www/firewall_shaper_vinterface.php
+++ b/usr/local/www/firewall_shaper_vinterface.php
@@ -51,7 +51,7 @@ if($_GET['reset'] <> "") {
exit;
}
-$pgtitle = array("Firewall","Traffic Shaper", "Limiter");
+$pgtitle = array(gettext("Firewall"),gettext("Traffic Shaper"), gettext("Limiter"));
$statusurl = "status_queues.php";
read_dummynet_config();
@@ -142,7 +142,7 @@ if ($_GET) {
$q = new dnpipe_class();
$q->SetQname($pipe);
} else
- $input_errors[] = "Could not create new queue/discipline!";
+ $input_errors[] = gettext("Could not create new queue/discipline!");
if ($q) {
$output_form .= $q->build_form();
@@ -154,7 +154,7 @@ if ($_GET) {
if ($queue)
$output_form .= $queue->build_form();
else
- $input_errors[] = "Queue not found!";
+ $input_errors[] = gettext("Queue not found!");
break;
case "enable":
if ($queue) {
@@ -163,7 +163,7 @@ if ($_GET) {
write_config();
mark_subsystem_dirty('shaper');
} else
- $input_errors[] = "Queue not found!";
+ $input_errors[] = gettext("Queue not found!");
break;
case "disable":
if ($queue) {
@@ -172,7 +172,7 @@ if ($_GET) {
write_config();
mark_subsystem_dirty('shaper');
} else
- $input_errors[] = "Queue not found!";
+ $input_errors[] = gettext("Queue not found!");
break;
default:
$output_form .= "<p class=\"pgtitle\">" . $dn_default_shaper_msg."</p>";
@@ -217,7 +217,7 @@ if ($_GET) {
read_dummynet_config();
$output_form .= $tmp->build_form();
} else
- $input_errors[] = "Could not add new queue.";
+ $input_errors[] = gettext("Could not add new queue.");
} else if ($_POST['apply']) {
write_config();
@@ -286,7 +286,7 @@ $tree .= "</ul>";
if (!$dontshow || $newqueue) {
$output_form .= "<tr><td width=\"22%\" valign=\"top\" class=\"vncellreq\">";
-$output_form .= "Queue Actions";
+$output_form .= gettext("Queue Actions");
$output_form .= "</td><td valign=\"top\" class=\"vncellreq\" width=\"78%\">";
$output_form .= "<input type=\"submit\" name=\"Submit\" value=\"" . gettext("Save") . "\" class=\"formbtn\" />";
@@ -297,7 +297,7 @@ if ($can_add || $addnewaltq) {
$output_form .= "&queue=" . $queue->GetQname();
}
$output_form .= "&action=add\">";
- $output_form .= "<input type=\"button\" class=\"formbtn\" name=\"add\" value=\"Add new queue\">";
+ $output_form .= "<input type=\"button\" class=\"formbtn\" name=\"add\" value=\"" . gettext("Add new queue") ."\">";
$output_form .= "</a>";
}
$output_form .= "<a href=\"firewall_shaper_vinterface.php?pipe=";
@@ -308,9 +308,9 @@ if ($queue) {
$output_form .= "&action=delete\">";
$output_form .= "<input type=\"button\" class=\"formbtn\" name=\"delete\"";
if ($queue)
- $output_form .= " value=\"Delete this queue\">";
+ $output_form .= " value=\"" . gettext("Delete this queue") ."\">";
else
- $output_form .= " value=\"Delete virtual interface\">";
+ $output_form .= " value=\"" . gettext("Delete virtual interface") ."\">";
$output_form .= "</a>";
$output_form .= "</td></tr>";
$output_form .= "</div>";
@@ -348,17 +348,17 @@ include("fbegin.inc");
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('shaper')): ?><p>
-<?php print_info_box_np("The traffic shaper 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 traffic shaper 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>
<?php
$tab_array = array();
- $tab_array[0] = array("By Interface", false, "firewall_shaper.php");
- $tab_array[1] = array("By Queue", false, "firewall_shaper_queues.php");
- $tab_array[2] = array("Limiter", true, "firewall_shaper_vinterface.php");
- $tab_array[3] = array("Layer7", false, "firewall_shaper_layer7.php");
- $tab_array[4] = array("Wizards", false, "firewall_shaper_wizards.php");
+ $tab_array[0] = array(gettext("By Interface"), false, "firewall_shaper.php");
+ $tab_array[1] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
+ $tab_array[2] = array(gettext("Limiter"), true, "firewall_shaper_vinterface.php");
+ $tab_array[3] = array(gettext("Layer7"), false, "firewall_shaper_layer7.php");
+ $tab_array[4] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -377,7 +377,7 @@ include("fbegin.inc");
?>
<br/><br/>
<a href="firewall_shaper_vinterface.php?pipe=new&action=add">
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="Create new limiter" width="17" height="17" border="0"> Create new limiter
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("Create new limiter");?>" width="17" height="17" border="0"><?=gettext("Create new limiter");?>
</a><br/>
</td>
<td width="75%" valign="top" align="center">
diff --git a/usr/local/www/firewall_shaper_wizards.php b/usr/local/www/firewall_shaper_wizards.php
index acd744c..ac6d00a 100755
--- a/usr/local/www/firewall_shaper_wizards.php
+++ b/usr/local/www/firewall_shaper_wizards.php
@@ -70,14 +70,14 @@ if ($_POST['apply']) {
clear_subsystem_dirty('shaper');
}
-$pgtitle = array("Firewall", "Traffic Shaper", "Wizards");
+$pgtitle = array(gettext("Firewall"),gettext("Traffic Shaper"),gettext("Wizards"));
$statusurl = "status_queues.php";
-$wizards = array("Single Lan multi Wan" => "traffic_shaper_wizard.xml",
- "Single Wan multi Lan" => "traffic_shaper_wizard_multi_lan.xml",
- "Multiple Lan/Wan" => "traffic_shaper_wizard_multi_all.xml",
- "Dedicated Links" => "traffic_shaper_wizard_dedicated.xml",
- );
+$wizards = array(gettext("Single Lan multi Wan") => "traffic_shaper_wizard.xml",
+ gettext("Single Wan multi Lan") => "traffic_shaper_wizard_multi_lan.xml",
+ gettext("Multiple Lan/Wan") => "traffic_shaper_wizard_multi_all.xml",
+ gettext("Dedicated Links") => "traffic_shaper_wizard_dedicated.xml",
+ );
include("head.inc");
?>
@@ -93,17 +93,17 @@ include("fbegin.inc");
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('shaper')): ?><p>
-<?php print_info_box_np("The traffic shaper 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 traffic shaper 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>
<?php
$tab_array = array();
- $tab_array[0] = array("By Interface", false, "firewall_shaper.php");
- $tab_array[1] = array("By Queue", false, "firewall_shaper_queues.php");
- $tab_array[2] = array("Limiter", false, "firewall_shaper_vinterface.php");
- $tab_array[3] = array("Layer7", false, "firewall_shaper_layer7.php");
- $tab_array[4] = array("Wizards", true, "firewall_shaper_wizards.php");
+ $tab_array[0] = array(gettext("By Interface"), false, "firewall_shaper.php");
+ $tab_array[1] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
+ $tab_array[2] = array(gettext("Limiter"), false, "firewall_shaper_vinterface.php");
+ $tab_array[3] = array(gettext("Layer7"), false, "firewall_shaper_layer7.php");
+ $tab_array[4] = array(gettext("Wizards"), true, "firewall_shaper_wizards.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -112,8 +112,8 @@ include("fbegin.inc");
<div id="mainarea">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td class="listhdrr" width="25%" align="center" >Wizard function</td>
- <td class="listhdrr" width="75%" align="center">Wizard Link</td>
+ <td class="listhdrr" width="25%" align="center" ><?=gettext("Wizard function");?></td>
+ <td class="listhdrr" width="75%" align="center"><?=gettext("Wizard Link");?></td>
</tr>
<?php foreach ($wizards as $key => $wizard): ?>
<tr class="tabcont"><td class="listlr" style="background-color: #e0e0e0" width="25%" align="center">
diff --git a/usr/local/www/firewall_virtual_ip.php b/usr/local/www/firewall_virtual_ip.php
index f4b4567..f39fbe7 100755
--- a/usr/local/www/firewall_virtual_ip.php
+++ b/usr/local/www/firewall_virtual_ip.php
@@ -101,7 +101,7 @@ if ($_GET['act'] == "del") {
foreach ($config['nat']['rule'] as $rule) {
if($rule['destination']['address'] <> "") {
if ($rule['destination']['address'] == $a_vip[$_GET['id']]['subnet']) {
- $input_errors[] = "This entry cannot be deleted because it is still referenced by at least one NAT mapping.";
+ $input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one NAT mapping.");
break;
}
}
@@ -128,7 +128,7 @@ if ($_GET['act'] == "del") {
} else if ($_GET['changes'] == "mods")
$id = $_GET['id'];
-$pgtitle = array("Firewall","Virtual IP Addresses");
+$pgtitle = array(gettext("Firewall"),gettext("Virtual IP Addresses"));
include("head.inc");
?>
@@ -143,7 +143,7 @@ include("head.inc");
print_info_box($savemsg);
else
if (is_subsystem_dirty('vip'))
- print_info_box_np("The VIP configuration has been changed.<br>You must apply the changes in order for them to take effect.");
+ print_info_box_np(gettext("The VIP configuration has been changed.")."<br>".gettext("You must apply the changes in order for them to take effect."));
?>
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
@@ -151,8 +151,8 @@ include("head.inc");
<?php
/* active tabs */
$tab_array = array();
- $tab_array[] = array("Virtual IPs", true, "firewall_virtual_ip.php");
- $tab_array[] = array("CARP Settings", false, "pkg_edit.php?xml=carp_settings.xml&id=0");
+ $tab_array[] = array(gettext("Virtual IPs"), true, "firewall_virtual_ip.php");
+ $tab_array[] = array(gettext("CARP Settings"), false, "pkg_edit.php?xml=carp_settings.xml&id=0");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -164,9 +164,9 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="30%" class="listhdrr">Virtual IP address</td>
- <td width="10%" class="listhdrr">Type</td>
- <td width="40%" class="listhdr">Description</td>
+ <td width="30%" class="listhdrr"><?=gettext("Virtual IP address");?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Type");?></td>
+ <td width="40%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -200,7 +200,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle"><a href="firewall_virtual_ip_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="firewall_virtual_ip.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="firewall_virtual_ip.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>
@@ -220,9 +220,9 @@ include("head.inc");
</tr>
<tr>
<td colspan="4">
- <p><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>The virtual IP addresses defined on this page may be used in <a href="firewall_nat.php">NAT</a> mappings.<br>
- You can check the status of your CARP Virtual IPs and interfaces <a href="carp_status.php">here</a>.</span></p>
+ <p><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br>
+ </strong></span><?=gettext("The virtual IP addresses defined on this page may be used in");?><a href="firewall_nat.php"> <?=gettext("NAT"); ?> </a><?=gettext("mappings.");?><br>
+ <?=gettext("You can check the status of your CARP Virtual IPs and interfaces ");?><a href="carp_status.php"><?=gettext("here");?></a>.</span></p>
</td>
</tr>
</table>
diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php
index 8970e33..1781518 100755
--- a/usr/local/www/firewall_virtual_ip_edit.php
+++ b/usr/local/www/firewall_virtual_ip_edit.php
@@ -101,20 +101,20 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "mode");
- $reqdfieldsn = explode(",", "Type");
+ $reqdfieldsn = array(gettext("Type"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['subnet'] && !is_ipaddr($_POST['subnet'])))
- $input_errors[] = "A valid IP address must be specified.";
+ $input_errors[] = gettext("A valid IP address must be specified.");
$natiflist = get_configured_interface_with_descr();
foreach ($natiflist as $natif => $natdescr)
if ($_POST['subnet'] == get_interface_ip($natif))
- $input_errors[] = "The {$natdescr} IP address may not be used in a virtual entry.";
+ $input_errors[] = sprintf(gettext("The %s IP address may not be used in a virtual entry."),$natdescr);
if($_POST['subnet_bits'] == "32" and $_POST['type'] == "carp")
- $input_errors[] = "The /32 subnet mask is invalid for CARP IPs.";
+ $input_errors[] = gettext("The /32 subnet mask is invalid for CARP IPs.");
/* check for overlaps with other virtual IP */
foreach ($a_vip as $vipent) {
@@ -122,7 +122,7 @@ if ($_POST) {
continue;
if (isset($_POST['subnet']) && $_POST['subnet'] == $vipent['subnet']) {
- $input_errors[] = "There is already a virtual IP entry for the specified IP address.";
+ $input_errors[] = gettext("There is already a virtual IP entry for the specified IP address.");
break;
}
}
@@ -135,19 +135,19 @@ if ($_POST) {
$idtracker = 0;
foreach($config['virtualip']['vip'] as $vip) {
if($vip['vhid'] == $_POST['vhid'] and $idtracker <> $id)
- $input_errors[] = "VHID {$_POST['vhid']} is already in use. Pick a unique number.";
+ $input_errors[] = sprintf(gettext("VHID %s is already in use. Pick a unique number."),$_POST['vhid']);
$idtracker++;
}
if($_POST['password'] == "")
- $input_errors[] = "You must specify a CARP password that is shared between the two VHID members.";
+ $input_errors[] = gettext("You must specify a CARP password that is shared between the two VHID members.");
$parent_ip = get_interface_ip($_POST['interface']);
$parent_sn = get_interface_subnet($_POST['interface']);
if (!ip_in_subnet($_POST['subnet'], gen_subnet($parent_ip, $parent_sn) . "/" . $parent_sn)) {
$cannot_find = $_POST['subnet'] . "/" . $_POST['subnet_bits'] ;
- $input_errors[] = "Sorry, we could not locate an interface with a matching subnet for {$cannot_find}. Please add an IP alias in this subnet on this interface.";
+ $input_errors[] = sprintf(gettext("Sorry, we could not locate an interface with a matching subnet for %s. Please add an IP alias in this subnet on this interface."),$cannot_find);
} else if ($parent_sn != $_POST['subnet_bits'])
- $input_errors[] = "Subnet bits needs to be the same as the parent interface.";
+ $input_errors[] = gettext("Subnet bits needs to be the same as the parent interface.");
if ($a_vip[$id]['vhid'] != $_POST['vhid'])
interface_vip_bring_down($a_vip[$id]);
@@ -229,7 +229,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Firewall","Virtual IP Address","Edit");
+$pgtitle = array(gettext("Firewall"),gettext("Virtual IP Address"),gettext("Edit"));
include("head.inc");
?>
@@ -248,9 +248,9 @@ function get_radio_value(obj)
}
function enable_change(enable_over) {
var note = document.getElementById("typenote");
- var carpnote = document.createTextNode("This must be the network's subnet mask. It does not specify a CIDR range.");
- var proxyarpnote = document.createTextNode("This is a CIDR block of proxy ARP addresses.");
- var ipaliasnote = document.createTextNode("This must be the network's subnet mask. It does not specify a CIDR range.");
+ var carpnote = document.createTextNode('<?=gettext("This must be the network's subnet mask. It does not specify a CIDR range.");?>');
+ var proxyarpnote = document.createTextNode('<?=gettext("This is a CIDR block of proxy ARP addresses.");?>');
+ var ipaliasnote = document.createTextNode('<?=gettext("This must be the network's subnet mask. It does not specify a CIDR range.");?>');
if ((get_radio_value(document.iform.mode) == "carp") || enable_over) {
document.iform.vhid.disabled = 0;
document.iform.password.disabled = 0;
@@ -338,19 +338,19 @@ function typesel_change() {
<form action="firewall_virtual_ip_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 Virtual IP</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Virtual IP");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Type</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Type");?></td>
<td width="78%" class="vtable">
<input name="mode" type="radio" onclick="enable_change(false)" value="proxyarp"
- <?php if ($pconfig['mode'] == "proxyarp" || $pconfig['type'] != "carp") echo "checked";?>> Proxy ARP
+ <?php if ($pconfig['mode'] == "proxyarp" || $pconfig['type'] != "carp") echo "checked";?>> <?=gettext("Proxy ARP"); ?>
<input name="mode" type="radio" onclick="enable_change(false)" value="carp"
- <?php if ($pconfig['mode'] == "carp") echo "checked";?>> CARP
+ <?php if ($pconfig['mode'] == "carp") echo "checked";?>> <?=gettext("CARP"); ?>
<input name="mode" type="radio" onclick="enable_change(false)" value="other"
- <?php if ($pconfig['mode'] == "other") echo "checked";?>> Other
+ <?php if ($pconfig['mode'] == "other") echo "checked";?>> <?=gettext("Other");?>
<input name="mode" type="radio" onclick="enable_change(false)" value="ipalias"
- <?php if ($pconfig['mode'] == "ipalias") echo "checked";?>> IP Alias
+ <?php if ($pconfig['mode'] == "ipalias") echo "checked";?>> <?=gettext("IP Alias");?>
<?php
/*
<input name="mode" type="radio" onclick="enable_change(false)" value="carpdev-dhcp"
@@ -361,7 +361,7 @@ function typesel_change() {
</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
@@ -375,22 +375,22 @@ function typesel_change() {
</td>
</tr>
<tr>
- <td valign="top" class="vncellreq">IP Address(es)</td>
+ <td valign="top" class="vncellreq"><?=gettext("IP Address(es)");?></td>
<td class="vtable">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td>Type:&nbsp;&nbsp;</td>
+ <td><?=gettext("Type");?>:&nbsp;&nbsp;</td>
<td><select name="type" class="formselect" onChange="typesel_change()">
<option value="single" <?php if ((!$pconfig['range'] && $pconfig['subnet_bits'] == 32) || (!isset($pconfig['subnet']))) echo "selected"; ?>>
- Single address</option>
+ <?=gettext("Single address");?></option>
<option value="network" <?php if (!$pconfig['range'] && $pconfig['subnet_bits'] != 32 && isset($pconfig['subnet'])) echo "selected"; ?>>
- Network</option>
+ <?=gettext("Network");?></option>
<!-- XXX: Billm, don't let anyone choose this until NAT configuration screens are ready for it <option value="range" <?php if ($pconfig['range']) echo "selected"; ?>>
Range</option> -->
</select></td>
</tr>
<tr>
- <td>Address:&nbsp;&nbsp;</td>
+ <td><?=gettext("Address");?>:&nbsp;&nbsp;</td>
<td><input name="subnet" type="text" class="formfld unknown" id="subnet" size="20" value="<?=htmlspecialchars($pconfig['subnet']);?>">
/<select name="subnet_bits" class="formselect" id="select">
<?php for ($i = 32; $i >= 1; $i--): ?>
@@ -416,13 +416,13 @@ function typesel_change() {
</td>
</tr>
<tr valign="top">
- <td width="22%" class="vncellreq">Virtual IP Password</td>
+ <td width="22%" class="vncellreq"><?=gettext("Virtual IP Password");?></td>
<td class="vtable"><input type='password' name='password' value="<?=htmlspecialchars($pconfig['password']);?>">
- <br>Enter the VHID group password.
+ <br><?=gettext("Enter the VHID group password.");?>
</td>
</tr>
<tr valign="top">
- <td width="22%" class="vncellreq">VHID Group</td>
+ <td width="22%" class="vncellreq"><?=gettext("VHID Group");?></td>
<td class="vtable"><select id='vhid' name='vhid'>
<?php for ($i = 1; $i <= 254; $i++): ?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['vhid']) echo "selected"; ?>>
@@ -430,11 +430,11 @@ function typesel_change() {
</option>
<?php endfor; ?>
</select>
- <br>Enter the VHID group that the machines will share
+ <br><?=gettext("Enter the VHID group that the machines will share");?>
</td>
</tr>
<tr valign="top">
- <td width="22%" class="vncellreq">Advertising Frequency</td>
+ <td width="22%" class="vncellreq"><?=gettext("Advertising Frequency");?></td>
<td class="vtable"><select id='advskew' name='advskew'>
<?php for ($i = 0; $i <= 254; $i++): ?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['advskew']) echo "selected"; ?>>
@@ -442,19 +442,19 @@ function typesel_change() {
</option>
<?php endfor; ?>
</select>
- <br>The frequency that this machine will advertise. 0 = master. Anything above 0 designates a backup.
+ <br><?=gettext("The frequency that this machine will advertise. 0 = master. Anything above 0 designates a backup.");?>
</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 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_vip[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
@@ -465,10 +465,10 @@ function typesel_change() {
<p>
<span class="vexpl">
<span class="red">
- <strong>Note:<br></strong>
+ <b><?=gettext("Note");?>:<br></b>
</span>&nbsp;&nbsp;
- ProxyARP type IP addresses *DO NOT* work with add on packages such as Squid. Use a CARP or IP Alias type address for these cases.
- <p>&nbsp;&nbsp;&nbsp;For more information on CARP and the above values, visit the OpenBSD <a href='http://www.openbsd.org/faq/pf/carp.html'>CARP FAQ</A>.
+ <?=gettext("ProxyARP type IP addresses *DO NOT* work with add on packages such as Squid. Use a CARP or IP Alias type address for these cases.");?>
+ <p>&nbsp;&nbsp;&nbsp;<?=gettext("For more information on CARP and the above values, visit the OpenBSD ");?><a href='http://www.openbsd.org/faq/pf/carp.html'> <?=gettext("CARP FAQ"); ?></A>.
</span>
</p>
</td>
OpenPOWER on IntegriCloud