summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato.botelho@bluepex.com>2010-06-30 10:14:03 -0300
committerRenato Botelho <renato.botelho@bluepex.com>2010-06-30 10:14:03 -0300
commit912fca454276710cb7a54548048ccca34034273f (patch)
tree4adf30b37bd7d7f755589b00cbd502c6933487df
parent0b3abd3b5639676b27a78e651c6753c38e6c8bbe (diff)
downloadpfsense-912fca454276710cb7a54548048ccca34034273f.zip
pfsense-912fca454276710cb7a54548048ccca34034273f.tar.gz
Reset firewall_ files
-rwxr-xr-xusr/local/www/firewall_aliases.php22
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php70
-rwxr-xr-xusr/local/www/firewall_aliases_import.php36
-rwxr-xr-xusr/local/www/firewall_nat.php28
-rwxr-xr-xusr/local/www/firewall_nat_1to1.php28
-rwxr-xr-xusr/local/www/firewall_nat_1to1_edit.php30
-rwxr-xr-xusr/local/www/firewall_nat_edit.php198
-rwxr-xr-xusr/local/www/firewall_nat_out.php60
-rwxr-xr-xusr/local/www/firewall_nat_out_edit.php78
-rwxr-xr-xusr/local/www/firewall_rules.php130
-rwxr-xr-xusr/local/www/firewall_rules_edit.php300
-rw-r--r--usr/local/www/firewall_schedule.php16
-rw-r--r--usr/local/www/firewall_schedule_edit.php74
-rwxr-xr-xusr/local/www/firewall_shaper.php26
-rwxr-xr-xusr/local/www/firewall_shaper_layer7.php40
-rwxr-xr-xusr/local/www/firewall_shaper_queues.php14
-rw-r--r--usr/local/www/firewall_shaper_vinterface.php28
-rwxr-xr-xusr/local/www/firewall_shaper_wizards.php8
-rwxr-xr-xusr/local/www/firewall_virtual_ip.php24
-rwxr-xr-xusr/local/www/firewall_virtual_ip_edit.php70
20 files changed, 640 insertions, 640 deletions
diff --git a/usr/local/www/firewall_aliases.php b/usr/local/www/firewall_aliases.php
index 1e69efd..bc210a1 100755
--- a/usr/local/www/firewall_aliases.php
+++ b/usr/local/www/firewall_aliases.php
@@ -147,7 +147,7 @@ if ($_GET['act'] == "del") {
}
}
if($is_alias_referenced == true) {
- $savemsg = sprintf(gettext("Cannot delete rule. Currently in use by %s"), $referenced_by);
+ $savemsg = "Cannot delete rule. Currently in use by {$referenced_by}";
} else {
unset($a_aliases[$_GET['id']]);
write_config();
@@ -169,19 +169,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 gettext("The alias list has been changed.<br>You must apply the changes in order for them to take effect.");?>
+<?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 endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <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="25%" class="listhdrr">Name</td>
+ <td width="25%" class="listhdrr">Values</td>
+ <td width="25%" class="listhdr">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="<?=gettext("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="add a new alias"></a></td>
</tr>
</table>
</td>
@@ -213,8 +213,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="<?=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>
+ <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>
</tr>
</table>
</td>
@@ -227,10 +227,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="<?=gettext("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="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>
@@ -238,7 +238,7 @@ include("head.inc");
</tr>
<tr>
<td class="tabcont" colspan="3">
- <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>
+ <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>
</td>
</tr>
</table>
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index a7e50b6..dca3d12 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -44,7 +44,7 @@
##|*MATCH=firewall_aliases_edit.php*
##|-PRIV
-$pgtitle = array(gettext("Firewall"),gettext("Aliases"),gettext("Edit"));
+$pgtitle = array("Firewall","Aliases","Edit");
// Keywords not allowed in names
$reserved_keywords = array("pass", "out", "queue", "max", "min", "pptp", "pppoe", "l2tp", "openvpn");
@@ -101,7 +101,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[] = sprintf(gettext("Sorry, an interface is already named %s."), $pconfig['descr']);
+ $input_errors[] = "Sorry, an interface is already named {$pconfig['descr']}.";
if($a_aliases[$id]['type'] == "urltable") {
$pconfig['address'] = $a_aliases[$id]['url'];
@@ -130,24 +130,24 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "name");
- $reqdfieldsn = array(",", gettext("Name"));
+ $reqdfieldsn = explode(",", "Name");
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
$x = is_validaliasname($_POST['name']);
if (!isset($x)) {
- $input_errors[] = gettext("Reserved word used for alias name.");
+ $input_errors[] = "Reserved word used for alias name.";
} else if ($_POST['type'] == "port" && (getservbyname($_POST['name'], "tcp") || getservbyname($_POST['name'], "udp"))) {
- $input_errors[] = gettext("Reserved word used for alias name.)";
+ $input_errors[] = "Reserved word used for alias name.";
} else {
if (is_validaliasname($_POST['name']) == false)
- $input_errors[] = gettext("The alias name may only consist of the characters a-z, A-Z, 0-9, _.");
+ $input_errors[] = "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[] = gettext("An alias with this name already exists.");
+ $input_errors[] = "An alias with this name already exists.";
break;
}
}
@@ -156,12 +156,12 @@ if ($_POST) {
/* Check for reserved keyword names */
foreach($reserved_keywords as $rk)
if($rk == $_POST['name'])
- $input_errors[] = sprintf(gettext("Cannot use a reserved keyword as alias name %s"), $rk);
+ $input_errors[] = "Cannot use a reserved keyword as alias name $rk";
/* check for name interface description conflicts */
foreach($config['interfaces'] as $interface) {
if($interface['descr'] == $_POST['name']) {
- $input_errors[] = gettext("An interface description with this name already exists.");
+ $input_errors[] = "An interface description with this name already exists.";
break;
}
}
@@ -183,10 +183,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[] = gettext("You must provide a valid URL.");
+ $input_errors[] = "You must provide a valid URL.";
$dont_update = true;
} elseif (! process_alias_urltable($alias['name'], $alias['url'], 0, true)) {
- $input_errors[] = gettext("Unable to fetch usable data.");
+ $input_errors[] = "Unable to fetch usable data.";
$dont_update = true;
}
}
@@ -231,14 +231,14 @@ if ($_POST) {
}
if($isfirst == 0) {
/* nothing was found */
- $input_errors[] = gettext("You must provide a valid URL. Could not fetch usable data.");
+ $input_errors[] = "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[] = gettext("You must provide a valid URL.");
+ $input_errors[] = "You must provide a valid URL.";
$dont_update = true;
break;
}
@@ -254,12 +254,12 @@ if ($_POST) {
$wrongaliases .= " " . $_POST["address{$x}"];
} else if ($_POST['type'] == "port") {
if (!is_port($_POST["address{$x}"]))
- $input_errors[] = $_POST["address{$x}"] . " " . gettext("is not a valid port or alias.");
+ $input_errors[] = $_POST["address{$x}"] . " 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[] = sprintf(gettext("%s is not a valid %s alias."), $_POST["address{$x}"], $_POST['type'];
+ $input_errors[] = $_POST["address{$x}"] . " is not a valid {$_POST['type']} alias.";
}
if (is_iprange($_POST["address{$x}"])) {
list($startip, $endip) = explode('-', $_POST["address{$x}"]);
@@ -274,11 +274,11 @@ if ($_POST) {
if ($_POST["detail{$x}"] <> "")
$final_address_details[] = $_POST["detail{$x}"];
else
- $final_address_details[] = sprintf(gettext("Entry added %s"), date('r'));
+ $final_address_details[] = "Entry added " . date('r');
}
}
if ($wrongaliases <> "")
- $input_errors[] = sprintf(gettext("The alias(es): %s \ncannot be nested cause they are not of the same type."), $wrongaliases);
+ $input_errors[] = "The alias(es): {$wrongaliases} \ncannot be nested cause they are not of the same type.";
}
if (!$input_errors) {
@@ -444,8 +444,8 @@ $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 = 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']);
+$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.");
$openvpn_str = gettext("Username");
$openvpn_user_str = gettext("OpenVPN Users");
@@ -549,10 +549,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"><?=gettext("Alias Edit"); ?></td>
+ <td colspan="2" valign="top" class="listtopic">Alias Edit</td>
</tr>
<tr>
- <td valign="top" class="vncellreq"><?=gettext("Name"); ?></td>
+ <td valign="top" class="vncellreq">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,30 +561,30 @@ EOD;
<?php endif; ?>
<br />
<span class="vexpl">
- <?=gettext("The name of the alias may only consist of the characters a-z, A-Z and 0-9."); ?>
+ 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"><?=gettext("Description"); ?></td>
+ <td width="22%" valign="top" class="vncell">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">
- <?=gettext("You may enter a description here for your reference (not parsed)."); ?>
+ You may enter a description here for your reference (not parsed).
</span>
</td>
</tr>
<tr>
- <td valign="top" class="vncellreq"><?=gettext("Type"); ?></td>
+ <td valign="top" class="vncellreq">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"; ?>><?=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="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"; ?>><?=gettext("URL Table"); ?></option>
+ <option value="urltable" <?php if ($pconfig['type'] == "urltable") echo "selected"; ?>>URL Table</option>
</select>
</td>
</tr>
@@ -595,13 +595,13 @@ EOD;
<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"><?=gettext("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">Item information</div>
</td>
</tr>
<tr>
- <td><div id="onecolumn"><?=gettext("Network"); ?></div></td>
+ <td><div id="onecolumn">Network</div></td>
<td><div id="twocolumn">CIDR</div></td>
- <td><div id="threecolumn"><?=gettext("Description"); ?></div></td>
+ <td><div id="threecolumn">Description</div></td>
</tr>
<?php
@@ -640,7 +640,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="<?=gettext("Delete"); ?>" />
+ <input type="image" src="/themes/<?echo $g['theme'];?>/images/icons/icon_x.gif" onclick="removeRow(this); return false;" value="Delete" />
</td>
</tr>
<?php
@@ -662,8 +662,8 @@ EOD;
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <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>
+ <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>
</td>
</tr>
</table>
diff --git a/usr/local/www/firewall_aliases_import.php b/usr/local/www/firewall_aliases_import.php
index 47a22d0..760688d 100755
--- a/usr/local/www/firewall_aliases_import.php
+++ b/usr/local/www/firewall_aliases_import.php
@@ -37,7 +37,7 @@
##|*MATCH=firewall_aliases_import.php*
##|-PRIV
-$pgtitle = array(gettext("Firewall"),gettext("Aliases"),gettext("Bulk import"));
+$pgtitle = array("Firewall","Aliases","Bulk import");
$reserved_keywords = array("pass", "out", "queue", "max", "min", "pptp");
@@ -55,27 +55,27 @@ $a_aliases = &$config['aliases']['alias'];
if($_POST['aliasimport'] <> "") {
$reqdfields = explode(" ", "name aliasimport");
- $reqdfieldsn = array(",", gettext("Name,Aliases"));
+ $reqdfieldsn = explode(",", "Name,Aliases");
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (is_validaliasname($_POST['name']) == false)
- $input_errors[] = gettext("The alias name may only consist of the characters a-z, A-Z, 0-9, _.");
+ $input_errors[] = "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[] = gettext("An alias with this name already exists.");
+ $input_errors[] = "An alias with this name already exists.";
/* Check for reserved keyword names */
foreach($reserved_keywords as $rk)
if ($rk == $_POST['name'])
- $input_errors[] = sprintf(gettext("Cannot use a reserved keyword as alias name %s"), $rk);
+ $input_errors[] = "Cannot use a reserved keyword as alias name $rk";
/* check for name interface description conflicts */
foreach($config['interfaces'] as $interface) {
if($interface['descr'] == $_POST['name']) {
- $input_errors[] = gettext("An interface description with this name already exists.");
+ $input_errors[] = "An interface description with this name already exists.";
break;
}
}
@@ -90,7 +90,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[] = sprintf(gettext("%s is not an IP address. Please correct the error to continue"), $impip);
+ $input_errors[] = "$impip is not an IP address. Please correct the error to continue";
} elseif (!empty($impip)) {
$imported[] = $impip;
}
@@ -127,31 +127,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"><?=gettext("Alias Import"); ?></td>
+ <td colspan="2" valign="top" class="listtopic">Alias Import</td>
</tr>
<tr>
- <td valign="top" class="vncellreq"><?=gettext("Alias Name"); ?></td>
+ <td valign="top" class="vncellreq">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">
- <?=gettext("The name of the alias may only consist of the characters a-z, A-Z and 0-9."); ?></span></td>
+ 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"><?=gettext("Description"); ?></td>
+ <td width="22%" valign="top" class="vncell">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"><?=gettext("You may enter a description here " .
- "for your reference (not parsed)"); ?>.</span></td>
+ <br /> <span class="vexpl">You may enter a description here
+ for your reference (not parsed).</span></td>
</tr>
<tr>
- <td valign="top" class="vncellreq"><?=gettext("Aliases to import"); ?></td>
+ <td valign="top" class="vncellreq">Aliases to import</td>
<td class="vtable"><textarea name="aliasimport" ROWS="15" COLS="40"><?php echo $_POST['aliasimport']; ?></textarea>
- <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>
+ <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>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input id="submit" name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" />
- <input class="formbtn" type="button" value="<?=gettext("Cancel"); ?>" onclick="history.back()" />
+ <input id="submit" name="Submit" type="submit" class="formbtn" value="Save" />
+ <input class="formbtn" type="button" value="Cancel" onclick="history.back()" />
</tr>
</table>
diff --git a/usr/local/www/firewall_nat.php b/usr/local/www/firewall_nat.php
index 55e73df..84fc0e8 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(gettext("Firewall","NAT","Port Forward"));
+$pgtitle = array("Firewall","NAT","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>" . 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.") );
+ 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.");
?>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
<?php
$tab_array = array();
- $tab_array[] = array(gettext("Port Forward"), true, "firewall_nat.php");
+ $tab_array[] = array("Port Forward", true, "firewall_nat.php");
$tab_array[] = array("1:1", false, "firewall_nat_1to1.php");
- $tab_array[] = array(gettext("Outbound"), false, "firewall_nat_out.php");
+ $tab_array[] = array("Outbound", false, "firewall_nat_out.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -210,7 +210,7 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<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=gettext("delete selected rules") border="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; ?>
@@ -312,12 +312,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=gettext("move selected rules before this rule") height="17" type="image" width="17" border="0"></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="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>
</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=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>
+ <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>
</tr>
</table>
</tr>
@@ -330,14 +330,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=gettext("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="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>
</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=gettext("delete selected rules") border="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(gettext('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="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>
@@ -352,7 +352,7 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
</tr>
<tr>
<td width="14"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_chain.png" width="11" height="11"></td>
- <td colspan="3">gettext("linked rule")</td>
+ <td colspan="3">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 96a29e1..52a1268 100755
--- a/usr/local/www/firewall_nat_1to1.php
+++ b/usr/local/www/firewall_nat_1to1.php
@@ -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(gettext("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("The NAT configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td>
<?php
$tab_array = array();
- $tab_array[] = array(gettext("Port Forward"), false, "firewall_nat.php");
+ $tab_array[] = array("Port Forward", false, "firewall_nat.php");
$tab_array[] = array("1:1", true, "firewall_nat_1to1.php");
- $tab_array[] = array(gettext("Outbound"), false, "firewall_nat_out.php");
+ $tab_array[] = array("Outbound", false, "firewall_nat_out.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -101,14 +101,14 @@ include("head.inc");
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="10%" class="listhdrr">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="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="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="<?=gettext("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="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="<?=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>
+ <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>
</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="<?=gettext("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="add rule"></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="4">
- <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>
+ <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>
</td>
<tr>
</table>
diff --git a/usr/local/www/firewall_nat_1to1_edit.php b/usr/local/www/firewall_nat_1to1_edit.php
index dde6e4b..d7ed094 100755
--- a/usr/local/www/firewall_nat_1to1_edit.php
+++ b/usr/local/www/firewall_nat_1to1_edit.php
@@ -89,15 +89,15 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "interface external internal");
- $reqdfieldsn = array(",", gettext("Interface,External subnet,Internal subnet"));
+ $reqdfieldsn = explode(",", "Interface,External subnet,Internal subnet");
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['external'] && !is_ipaddr($_POST['external']))) {
- $input_errors[] = gettext("A valid external subnet must be specified.");
+ $input_errors[] = "A valid external subnet must be specified.";
}
if (($_POST['internal'] && !is_ipaddr($_POST['internal']))) {
- $input_errors[] = gettext("A valid internal subnet must be specified.");
+ $input_errors[] = "A valid internal subnet must be specified.";
}
/* check for overlaps with other 1:1 */
@@ -138,7 +138,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Firewall","NAT","1:1",gettext("Edit"));
+$pgtitle = array("Firewall","NAT","1:1","Edit");
include("head.inc");
?>
@@ -149,7 +149,7 @@ 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"><?=gettext("Edit NAT 1:1 entry"); ?></td>
+ <td colspan="2" valign="top" class="listtopic">Edit NAT 1:1 entry</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq">Interface</td>
@@ -164,11 +164,11 @@ include("head.inc");
</option>
<?php endforeach; ?>
</select><br>
- <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>
+ <span class="vexpl">Choose which interface this rule applies to.<br>
+ Hint: in most cases, you'll want to use WAN here.</span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("External subnet"); ?></td>
+ <td width="22%" valign="top" class="vncellreq">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" >
@@ -179,26 +179,26 @@ include("head.inc");
<?php endfor; ?>
</select>
<br>
- <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>
+ <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>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Internal subnet"); ?></td>
+ <td width="22%" valign="top" class="vncellreq">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"><?=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>
+ <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>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
+ <td width="22%" valign="top" class="vncell">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"><?=gettext("You may enter a description here " .
- "for your reference (not parsed)."); ?></span></td>
+ <br> <span class="vexpl">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="<?=gettext("Cancel"); ?>" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="Save"> <input type="button" class="formbtn" value="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 93210e9..719e32f 100755
--- a/usr/local/www/firewall_nat_edit.php
+++ b/usr/local/www/firewall_nat_edit.php
@@ -104,7 +104,7 @@ foreach ($_POST as $key => $value) {
$temp = $value;
$newpost = htmlentities($temp);
if($newpost <> $temp)
- $input_errors[] = sprintf(gettext("Invalid characters detected %s. Please remove invalid characters and save again."), $temp);
+ $input_errors[] = "Invalid characters detected ($temp). Please remove invalid characters and save again.";
}
if ($_POST) {
@@ -178,19 +178,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 = array(",", gettext("Interface,Protocol,Destination port from,Destination port to,NAT IP"));
+ $reqdfieldsn = explode(",", "Interface,Protocol,Destination port from,Destination port to,NAT IP");
} else {
$reqdfields = explode(" ", "interface proto localip");
- $reqdfieldsn = array(",", gettext("Interface,Protocol,NAT IP"));
+ $reqdfieldsn = explode(",", "Interface,Protocol,NAT IP");
}
if ($_POST['srctype'] == "single" || $_POST['srctype'] == "network") {
$reqdfields[] = "src";
- $reqdfieldsn[] = gettext("Source address");
+ $reqdfieldsn[] = "Source address";
}
if ($_POST['dsttype'] == "single" || $_POST['dsttype'] == "network") {
$reqdfields[] = "dst";
- $reqdfieldsn[] = gettext("Destination address");
+ $reqdfieldsn[] = "Destination address";
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -205,42 +205,42 @@ if ($_POST) {
}
if (($_POST['localip'] && !is_ipaddroralias($_POST['localip']))) {
- $input_errors[] = sprintf(gettext("\"%s\" is not valid NAT IP address or host alias."), $_POST['localip']);
+ $input_errors[] = "\"{$_POST['localip']}\" is not valid NAT IP address or host alias.";
}
if ($_POST['srcbeginport'] && !is_portoralias($_POST['srcbeginport']))
- $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']);
+ $input_errors[] = "{$_POST['srcbeginport']} is not a valid start source port. It must be a port alias or integer between 1 and 65535.";
if ($_POST['srcendport'] && !is_portoralias($_POST['srcendport']))
- $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']);
+ $input_errors[] = "{$_POST['srcendport']} is not a valid end source port. It must be a port alias or integer between 1 and 65535.";
if ($_POST['dstbeginport'] && !is_portoralias($_POST['dstbeginport']))
- $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']);
+ $input_errors[] = "{$_POST['dstbeginport']} is not a valid start destination port. It must be a port alias or integer between 1 and 65535.";
if ($_POST['dstendport'] && !is_portoralias($_POST['dstendport']))
- $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']);
+ $input_errors[] = "{$_POST['dstendport']} is not a valid end destination port. It must be a port alias or integer between 1 and 65535.";
if ($_POST['localbeginport'] && !is_portoralias($_POST['localbeginport'])) {
- $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']);
+ $input_errors[] = "{$_POST['localbeginport']} is not a valid local port. It must be a port alias or integer between 1 and 65535.";
}
/* 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[] = gettext("You must specify single host or alias for alias entries.");
+ $input_errors[] = "You must specify single host or alias for alias entries.";
}
if (!is_specialnet($_POST['srctype'])) {
if (($_POST['src'] && !is_ipaddroralias($_POST['src']))) {
- $input_errors[] = sprintf(gettext("%s is not a valid source IP address or alias."), $_POST['src']);
+ $input_errors[] = "{$_POST['src']} is not a valid source IP address or alias.";
}
if (($_POST['srcmask'] && !is_numericint($_POST['srcmask']))) {
- $input_errors[] = gettext("A valid source bit count must be specified.");
+ $input_errors[] = "A valid source bit count must be specified.";
}
}
if (!is_specialnet($_POST['dsttype'])) {
if (($_POST['dst'] && !is_ipaddroralias($_POST['dst']))) {
- $input_errors[] = sprintf(gettext("%s is not a valid destination IP address or alias."), $_POST['dst']);
+ $input_errors[] = "{$_POST['dst']} is not a valid destination IP address or alias.";
}
if (($_POST['dstmask'] && !is_numericint($_POST['dstmask']))) {
- $input_errors[] = gettext("A valid destination bit count must be specified.");
+ $input_errors[] = "A valid destination bit count must be specified.";
}
}
@@ -259,7 +259,7 @@ if ($_POST) {
if (!$input_errors) {
if (($_POST['dstendport'] - $_POST['dstbeginport'] + $_POST['localbeginport']) > 65535)
- $input_errors[] = gettext("The target port range must be an integer between 1 and 65535.");
+ $input_errors[] = "The target port range must be an integer between 1 and 65535.";
}
/* check for overlaps */
@@ -280,7 +280,7 @@ if ($_POST) {
if (!( (($_POST['beginport'] < $begp) && ($_POST['endport'] < $begp))
|| (($_POST['beginport'] > $endp) && ($_POST['endport'] > $endp)))) {
- $input_errors[] = gettext("The destination port range overlaps with an existing entry.");
+ $input_errors[] = "The destination port range overlaps with an existing entry.";
break;
}
}
@@ -415,7 +415,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Firewall","NAT",gettext("Port Forward: Edit"));
+$pgtitle = array("Firewall","NAT","Port Forward: Edit");
include("head.inc");
?>
@@ -427,22 +427,22 @@ 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"><?=gettext("Edit Redirect entry"); ?></td>
+ <td colspan="2" valign="top" class="listtopic">Edit Redirect entry</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled"); ?></td>
+ <td width="22%" valign="top" class="vncellreq">Disabled</td>
<td width="78%" class="vtable">
<input name="disabled" type="checkbox" id="disabled" value="yes" <?php if ($pconfig['disabled']) echo "checked"; ?>>
- <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>
+ <strong>Disable this rule</strong><br />
+ <span class="vexpl">Set this option to disable this rule without removing it from the list.</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("No RDR (NOT)"); ?></td>
+ <td width="22%" valign="top" class="vncell">No RDR (NOT)</td>
<td width="78%" class="vtable">
<input type="checkbox" name="nordr"<?php if($pconfig['nordr']) echo " CHECKED"; ?>>
- <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>
+ <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>
</td>
</tr>
<tr>
@@ -475,58 +475,58 @@ include("fbegin.inc"); ?>
</option>
<?php endforeach; ?>
</select><br>
- <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>
+ <span class="vexpl">Choose which interface this rule applies to.<br>
+ Hint: in most cases, you'll want to use WAN here.</span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Protocol"); ?></td>
+ <td width="22%" valign="top" class="vncellreq">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"><?=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>
+ </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>
</tr>
<tr id="showadvancedboxsrc" name="showadvancedboxsrc">
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Source"); ?></td>
+ <td width="22%" valign="top" class="vncellreq">Source</td>
<td width="78%" class="vtable">
- <input type="button" onClick="show_source()" value="Advanced"></input> - <?=gettext("Show source address and port range"); ?></a>
+ <input type="button" onClick="show_source()" value="Advanced"></input> - Show source address and port range</a>
</td>
</tr>
<tr style="display: none;" id="srctable" name="srctable">
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Source"); ?></td>
+ <td width="22%" valign="top" class="vncellreq">Source</td>
<td width="78%" class="vtable">
- <input name="srcnot" type="checkbox" id="srcnot" value="<?=gettext("yes"); ?>" <?php if ($pconfig['srcnot']) echo "checked"; ?>>
- <strong><?=gettext("not"); ?></strong>
+ <input name="srcnot" type="checkbox" id="srcnot" value="yes" <?php if ($pconfig['srcnot']) echo "checked"; ?>>
+ <strong>not</strong>
<br />
- <?=gettext("Use this option to invert the sense of the match"); ?>.
+ Use this option to invert the sense of the match.
<br />
<br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td><?=gettext("Type"); ?>:&nbsp;&nbsp;</td>
+ <td>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"; } ?>><?=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>
+ <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>
<?php if(have_ruleint_access("pptp")): ?>
- <option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo gettext("selected"); } ?>>PPTP <?=gettext("clients"); ?></option>
+ <option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo "selected"; } ?>>PPTP clients</option>
<?php endif; ?>
<?php if(have_ruleint_access("pppoe")): ?>
- <option value="pppoe" <?php if ($pconfig['src'] == "pppoe") { echo gettext("selected"); } ?>>PPPoE <?=gettext("clients"); ?></option>
+ <option value="pppoe" <?php if ($pconfig['src'] == "pppoe") { echo "selected"; } ?>>PPPoE clients</option>
<?php endif; ?>
<?php if(have_ruleint_access("l2tp")): ?>
- <option value="l2tp" <?php if ($pconfig['src'] == "l2tp") { echo gettext("selected"); } ?>>L2TP <?=gettext("clients"); ?></option>
+ <option value="l2tp" <?php if ($pconfig['src'] == "l2tp") { echo "selected"; } ?>>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);?> <?=gettext("subnet"); ?></option>
+ <option value="<?=$ifent;?>" <?php if ($pconfig['src'] == $ifent) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?> subnet</option>
<option value="<?=$ifent;?>ip"<?php if ($pconfig['src'] == $ifent . "ip") { echo "selected"; } ?>>
<?=$ifdesc?> address
</option>
@@ -536,7 +536,7 @@ include("fbegin.inc"); ?>
</td>
</tr>
<tr>
- <td><?=gettext("Address"); ?>:&nbsp;&nbsp;</td>
+ <td>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">
@@ -550,15 +550,15 @@ include("fbegin.inc"); ?>
</td>
</tr>
<tr style="display:none" id="sprtable" name="sprtable">
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Source port range"); ?></td>
+ <td width="22%" valign="top" class="vncellreq">Source port range</td>
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td><?=gettext("from"); ?>:&nbsp;&nbsp;</td>
+ <td>from:&nbsp;&nbsp;</td>
<td>
<select name="srcbeginport" class="formselect" onchange="src_rep_change();ext_change()">
- <option value="">(<?=gettext("other"); ?>)</option>
- <option value="any" <?php $bfound = 0; if ($pconfig['srcbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any"); ?></option>
+ <option value="">(other)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['srcbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>>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; ?>
@@ -567,11 +567,11 @@ include("fbegin.inc"); ?>
</td>
</tr>
<tr>
- <td><?=gettext("to"); ?>:</td>
+ <td>to:</td>
<td>
<select name="srcendport" class="formselect" onchange="ext_change()">
- <option value="">(<?=gettext("other"); ?>)</option>
- <option value="any" <?php $bfound = 0; if ($pconfig['srcendport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any"); ?></option>
+ <option value="">(other)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['srcendport'] == "any") { echo "selected"; $bfound = 1; } ?>>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; ?>
@@ -581,41 +581,41 @@ include("fbegin.inc"); ?>
</tr>
</table>
<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/>
+ <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/>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Destination"); ?></td>
+ <td width="22%" valign="top" class="vncellreq">Destination</td>
<td width="78%" class="vtable">
<input name="dstnot" type="checkbox" id="dstnot" value="yes" <?php if ($pconfig['dstnot']) echo "checked"; ?>>
- <strong><?=gettext("not"); ?></strong>
+ <strong>not</strong>
<br />
- <?=gettext("Use this option to invert the sense of the match"); ?>.
+ Use this option to invert the sense of the match.
<br />
<br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td><?=gettext("Type"); ?>:&nbsp;&nbsp;</td>
+ <td>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"; } ?>><?=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>
+ <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>
<?php if(have_ruleint_access("pptp")): ?>
- <option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo "selected"; } ?>>PPTP <?=gettext("clients"); ?></option>
+ <option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo "selected"; } ?>>PPTP clients</option>
<?php endif; ?>
<?php if(have_ruleint_access("pppoe")): ?>
- <option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo "selected"; } ?>>PPPoE <?=gettext("clients"); ?></option>
+ <option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo "selected"; } ?>>PPPoE clients</option>
<?php endif; ?>
<?php if(have_ruleint_access("l2tp")): ?>
- <option value="l2tp" <?php if ($pconfig['dst'] == "l2tp") { echo "selected"; } ?>>L2TP <?=gettext("clients"); ?></option>
+ <option value="l2tp" <?php if ($pconfig['dst'] == "l2tp") { echo "selected"; } ?>>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);?> <?=gettext("subnet"); ?></option>
+ <option value="<?=$if;?>" <?php if ($pconfig['dst'] == $if) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?> subnet</option>
<option value="<?=$if;?>ip"<?php if ($pconfig['dst'] == $if . "ip") { echo "selected"; } ?>>
<?=$ifdesc;?> address
</option>
@@ -644,7 +644,7 @@ include("fbegin.inc"); ?>
</td>
</tr>
<tr>
- <td><?=gettext("Address"); ?>:&nbsp;&nbsp;</td>
+ <td>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']);?>">
/
@@ -660,14 +660,14 @@ include("fbegin.inc"); ?>
</td>
</tr>
<tr id="dprtr" name="dprtr">
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Destination port range"); ?> </td>
+ <td width="22%" valign="top" class="vncellreq">Destination port range </td>
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td><?=gettext("from"); ?>:&nbsp;&nbsp;</td>
+ <td>from:&nbsp;&nbsp;</td>
<td>
<select name="dstbeginport" class="formselect" onchange="dst_rep_change();ext_change()">
- <option value="">(<?=gettext("other"); ?>)</option>
+ <option value="">(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>
@@ -677,10 +677,10 @@ include("fbegin.inc"); ?>
</td>
</tr>
<tr>
- <td><?=gettext("to"); ?>:</td>
+ <td>to:</td>
<td>
<select name="dstendport" class="formselect" onchange="ext_change()">
- <option value="">(<?=gettext("other"); ?>)</option>
+ <option value="">(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>
@@ -692,25 +692,25 @@ include("fbegin.inc"); ?>
</table>
<br />
<span class="vexpl">
- <?=gettext("Specify the port or port range for the destination of the packet for this mapping"); ?>.
+ Specify the port or port range for the destination of the packet for this mapping.
<br />
- <?=gettext("Hint: you can leave the"); ?> <em>'<?=gettext("to"); ?>'</em> <?=gettext("field empty if you only want to map a single port"); ?>
+ Hint: you can leave the <em>'to'</em> field empty if you only want to map a single port
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Redirect target IP"); ?></td>
+ <td width="22%" valign="top" class="vncellreq">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"><?=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>
+ <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>
</tr>
<tr name="lprtr" id="lprtr">
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Redirect target port"); ?></td>
+ <td width="22%" valign="top" class="vncellreq">Redirect target port</td>
<td width="78%" class="vtable">
<select name="localbeginport" class="formselect" onChange="ext_change();check_for_aliases();">
- <option value="">(<?=gettext("other"); ?>)</option>
+ <option value="">(other)</option>
<?php $bfound = 0; foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['localbeginport']) {
echo "selected";
@@ -721,32 +721,32 @@ 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"><?=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>
+ <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>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
+ <td width="22%" valign="top" class="vncell">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"><?=gettext("You may enter a description here " .
- "for your reference (not parsed)"); ?>.</span></td>
+ <br> <span class="vexpl">You may enter a description here
+ for your reference (not parsed).</span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("No XMLRPC Sync"); ?></td>
+ <td width="22%" valign="top" class="vncell">No XMLRPC Sync</td>
<td width="78%" class="vtable">
- <input type="checkbox" value="<?=gettext("yes"); ?>" name="nosync"<?php if($pconfig['nosync']) echo " CHECKED"; ?>><br>
- <?=gettext("HINT: This prevents the rule from automatically syncing to other CARP members"); ?>.
+ <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.
</td>
</tr>
<?php if (isset($id) && $a_nat[$id] && !isset($_GET['dup'])): ?>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Filter rule association"); ?></td>
+ <td width="22%" valign="top" class="vncell">Filter rule association</td>
<td width="78%" class="vtable">
<select name="associated-rule-id">
- <option value=""><?=gettext("None"); ?></option>
+ <option value="">None</option>
<option value="pass" <?php if($pconfig['associated-rule-id'] == "pass") echo " SELECTED"; ?>>Pass</option>
<?php
$linkedrule = "";
@@ -767,7 +767,7 @@ include("fbegin.inc"); ?>
}
}
if (isset($pconfig['associated-rule-id']))
- echo "<option value=\"new\">" . gettext("Create new associated filter rule") . "</option>\n";
+ echo "<option value=\"new\">Create new associated filter rule</option>\n";
echo "</select>\n";
echo $linkedrule;
?>
@@ -776,12 +776,12 @@ include("fbegin.inc"); ?>
<?php endif; ?>
<?php if ((!(isset($id) && $a_nat[$id])) || (isset($_GET['dup']))): ?>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Filter rule association"); ?></td>
+ <td width="22%" valign="top" class="vncell">Filter rule association</td>
<td width="78%" class="vtable">
<select name="filter-rule-association" id="filter-rule-association">
- <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="">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>
</select>
</td>
@@ -793,7 +793,7 @@ include("fbegin.inc"); ?>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"> <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="Save"> <input type="button" class="formbtn" value="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 9017bee..c4f21c1 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'] = gettext("Auto created rule for ISAKMP - {$ifdesc} to {$ifdesc2}");
+ $natent['descr'] = "Auto created rule for ISAKMP - {$ifdesc} to {$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'] = gettext("Auto created rule for SIP - {$ifdesc} to {$ifdesc2}");
+ $natent['descr'] = "Auto created rule for SIP - {$ifdesc} to {$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'] = gettext("Auto created rule for {$ifdesc} to {$ifdesc2}");
+ $natent['descr'] = "Auto created rule for {$ifdesc} to {$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'] = gettext("Auto created rule for PPTP server");
+ $natent['descr'] = "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'] = gettext("Auto created rule for PPPoE server");
+ $natent['descr'] = "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'] = gettext("Auto created rule for L2TP server");
+ $natent['descr'] = "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'] = gettext("Auto created rule for OpenVPN server");
+ $natent['descr'] = "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 = gettext("Default rules for each interface have been created.");
+ $savemsg = "Default rules for each interface have been created.";
}
break;
}
@@ -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 gettext(("The NAT configuration has been changed.")<br>gettext("You must apply the changes in order for them to take effect."));?><br>
+<?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 endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td>
<?php
$tab_array = array();
- $tab_array[] = array(gettext("Port Forward"), false, "firewall_nat.php");
+ $tab_array[] = array("Port Forward", false, "firewall_nat.php");
$tab_array[] = array("1:1", false, "firewall_nat_1to1.php");
- $tab_array[] = array(gettext("Outbound"), true, "firewall_nat_out.php");
+ $tab_array[] = array("Outbound", true, "firewall_nat_out.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -323,15 +323,15 @@ include("head.inc");
</tr>
<tr>
<td colspan="2"><p><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>gettext("If advanced outbound NAT is enabled, no outbound NAT
- rules will be automatically generated any longer.") gettext("Instead, only the mappings
- you specify below will be used.") gettext("With advanced outbound NAT disabled,
+ </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).") gettext("If you use target addresses other than the WAN interface's
+ (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>
+ may also need a <a href="firewall_virtual_ip.php">Virtual IP</a>.</span><br>
<br>
- gettext("You may enter your own mappings below.")</p>
+ You may enter your own mappings below.</p>
</td>
</tr>
</table>
@@ -339,20 +339,20 @@ include("head.inc");
<tr id="frheader">
<td width="3%" class="list">&nbsp;</td>
<td width="3%" class="list">&nbsp;</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="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="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=gettext("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="add new mapping"></a></td>
</tr>
</table>
</td>
@@ -437,7 +437,7 @@ include("head.inc");
<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>
</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=gettext("move selected rules before this rule") height="17" type="image" width="17" border="0"></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="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>
</tr>
</table>
@@ -447,11 +447,11 @@ 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=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><?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>
</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=gettext("delete selected mappings") onclick="return confirm(gettext('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="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>
</tr>
</table></td>
</tr>
diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php
index 5b22a00..df0487f 100755
--- a/usr/local/www/firewall_nat_out_edit.php
+++ b/usr/local/www/firewall_nat_out_edit.php
@@ -108,51 +108,51 @@ if ($_POST) {
$pconfig = $_POST;
/* input validation */
- $reqdfields = explode(" ", gettext("interface protocol source source_subnet destination destination_subnet"));
- $reqdfieldsn = explode(",", gettext("Interface,Protocol,Source,Source bit count,Destination,Destination bit count"));
+ $reqdfields = explode(" ", "interface protocol source source_subnet destination destination_subnet");
+ $reqdfieldsn = explode(",", "Interface,Protocol,Source,Source bit count,Destination,Destination bit count");
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if($_POST['sourceport'] <> "" && !is_port($_POST['sourceport']))
- $input_errors[] = gettext("You must supply either a valid port for the source port entry.");
+ $input_errors[] = "You must supply either a valid port for the source port entry.";
if($_POST['dstport'] <> "" and !is_port($_POST['dstport']))
- $input_errors[] = gettext("You must supply either a valid port for the destination port entry.");
+ $input_errors[] = "You must supply either a valid port for the destination port entry.";
if($_POST['natport'] <> "" and !is_port($_POST['natport']))
- $input_errors[] = gettext("You must supply either a valid port for the nat port entry.");
+ $input_errors[] = "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[] = gettext("A valid source must be specified.");
+ $input_errors[] = "A valid source must be specified.";
}
}
if ($_POST['source_subnet'] && !is_numericint($_POST['source_subnet'])) {
- $input_errors[] = gettext("A valid source bit count must be specified.");
+ $input_errors[] = "A valid source bit count must be specified.";
}
if ($_POST['sourceport'] && !is_numericint($_POST['sourceport'])) {
- $input_errors[] = gettext("A valid source port must be specified.");
+ $input_errors[] = "A valid source port must be specified.";
}
if ($_POST['destination_type'] != "any") {
if ($_POST['destination'] && !is_ipaddr($_POST['destination'])) {
- $input_errors[] = gettext("A valid destination must be specified.");
+ $input_errors[] = "A valid destination must be specified.";
}
}
if ($_POST['destination_subnet'] && !is_numericint($_POST['destination_subnet'])) {
- $input_errors[] = gettext("A valid destination bit count must be specified.");
+ $input_errors[] = "A valid destination bit count must be specified.";
}
if ($_POST['destination_type'] == "any") {
if ($_POST['destination_not']) {
- $input_errors[] = gettext("Negating destination address of \"any\" is invalid.");
+ $input_errors[] = "Negating destination address of \"any\" is invalid.";
}
}
if ($_POST['nonat'] && $_POST['staticnatport']) {
- $input_errors[] = gettext("Static port cannot be used with No NAT.");
+ $input_errors[] = "Static port cannot be used with No NAT.";
}
if ($_POST['target'] && !is_ipaddr($_POST['target'])) {
- $input_errors[] = gettext("A valid target IP address must be specified.");
+ $input_errors[] = "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(gettext("Firewall","NAT","Outbound","Edit"));
+$pgtitle = array("Firewall","NAT","Outbound","Edit");
$closehead = false;
include("head.inc");
@@ -304,14 +304,14 @@ 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">gettext("Edit Advanced Outbound NAT entry")</td>
+ <td colspan="2" valign="top" class="listtopic">Edit Advanced Outbound NAT entry</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell">Do not NAT</td>
<td width="78%" class="vtable">
<input type="checkbox" name="nonat"<?php if(isset($pconfig['nonat'])) echo " CHECKED"; ?>>
- <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>
+ <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>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq">Interface</td>
@@ -325,8 +325,8 @@ function sourcesel_change() {
</option>
<?php endforeach; ?>
</select><br>
- <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>
+ <span class="vexpl">Choose which interface this rule applies to.<br>
+ Hint: in most cases, you'll want to use WAN here.</span></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq">Protocol</td>
@@ -336,8 +336,8 @@ function sourcesel_change() {
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">gettext("Choose which protocol this rule should match.")<br />
- gettext("Hint: in most cases, you should specify <em>any</em> &nbsp;here.")</span>
+ </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>
</td>
</tr>
<tr>
@@ -355,13 +355,13 @@ function sourcesel_change() {
<td>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>
+ <option value="<?=$i;?>"<?php if ($i == $pconfig['source_subnet']) echo " selected"; ?>><?=$i;?></option>
<?php endfor; ?>
</select></td>
</tr>
<tr>
<td>&nbsp;</td>
- <td><span class="vexpl">gettext("Enter the source network for the outbound NAT mapping.")</span></td>
+ <td><span class="vexpl">Enter the source network for the outbound NAT mapping.</span></td>
</tr>
<tr>
<td>Source port:&nbsp;&nbsp;</td>
@@ -371,11 +371,11 @@ blank for any)</td>
</table></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">gettext("Destination")</td>
+ <td width="22%" valign="top" class="vncellreq">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>
- gettext("Use this option to invert the sense of the match.")<br>
+ Use this option to invert the sense of the match.<br>
<br>
<table border="0" cellspacing="1" cellpadding="1">
<tr>
@@ -399,8 +399,8 @@ blank for any)</td>
</tr>
<tr>
<td>&nbsp;</td>
- <td><span class="vexpl">gettext("Enter the destination network for
- the outbound NAT mapping.")</span></td>
+ <td><span class="vexpl">Enter the destination network for
+ the outbound NAT mapping.</span></td>
</tr>
<tr>
<td>Destination port:&nbsp;&nbsp;</td>
@@ -411,13 +411,13 @@ any)</td>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">gettext("Translation")</td>
+ <td width="22%" valign="top" class="vncell">Translation</td>
<td width="78%" class="vtable">
<table border="0" cellspacing="1" cellpadding="1">
<tr>
<td>Address:&nbsp;&nbsp;</td>
<td><select name="target" class="formselect">
- <option value=""<?php if (!$pconfig['target']) echo " selected"; ?>>gettext("Interface address")</option>
+ <option value=""<?php if (!$pconfig['target']) echo " selected"; ?>>Interface address</option>
<?php if (is_array($config['virtualip']['vip'])):
foreach ($config['virtualip']['vip'] as $sn):
if ($sn['mode'] == "proxyarp" && $sn['type'] == "network"):
@@ -440,10 +440,10 @@ any)</td>
</td>
</tr>
<tr><td>&nbsp;</td><td>
- <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">Virtual IP</a> addresses on the first)").
- gettext("Also note that if you are trying to redirect connections on the LAN select the "any" option.")
+ <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>
</td></tr>
<tr>
@@ -451,7 +451,7 @@ any)</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">gettext("Enter the source port for the outbound NAT mapping.")</span>
+ <span class="vexpl">Enter the source port for the outbound NAT mapping.</span>
</td></tr>
<tr>
<td>Static-port:&nbsp;&nbsp;</td>
@@ -461,18 +461,18 @@ any)</td>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">gettext("No XMLRPC Sync")</td>
+ <td width="22%" valign="top" class="vncell">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>
- gettext("HINT: This prevents the rule from automatically syncing to other CARP members.")
+ HINT: This prevents the rule from automatically syncing to other CARP members.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">gettext("Description")</td>
+ <td width="22%" valign="top" class="vncell">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">gettext("You may enter a description here
- for your reference (not parsed).")</span></td>
+ <br> <span class="vexpl">You may enter a description here
+ for your reference (not parsed).</span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php
index 4809d2f..b9888e6 100755
--- a/usr/local/www/firewall_rules.php
+++ b/usr/local/www/firewall_rules.php
@@ -41,7 +41,7 @@
##|*MATCH=firewall_rules.php*
##|-PRIV
-$pgtitle = array(gettext("Firewall"),gettext("Rules"));
+$pgtitle = array("Firewall", "Rules");
$statusurl = "status_filter_reload.php";
$logurl = "diag_logs_filter.php";
@@ -146,7 +146,7 @@ if ($_POST) {
clear_subsystem_dirty('filter');
- $savemsg = gettext("The settings have been applied").". ".gettext("The firewall rules are now reloading in the background").". ".gettext("You can also ")."<a href='status_filter_reload.php'>".gettext("monitor")."</a>".gettext("the reload progress").".";
+ $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.";
}
}
@@ -249,7 +249,7 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
</script>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('filter')): ?><p>
-<?php print_info_box_np(gettext("The firewall rule configuration has been changed").".<br>".gettext("You must apply the changes in order for them to take effect").".");?><br>
+<?php print_info_box_np("The firewall rule configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="tabnavtbl">
@@ -260,7 +260,7 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
$active = true;
else
$active = false;
- $tab_array[] = array(gettext("Floating"), $active, "firewall_rules.php?if=FloatingRules");
+ $tab_array[] = array("Floating", $active, "firewall_rules.php?if=FloatingRules");
$tabscounter = 0; $i = 0; foreach ($iflist as $ifent => $ifname) {
if ($ifent == $if)
$active = true;
@@ -278,16 +278,16 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<tr id="frheader">
<td width="3%" class="list">&nbsp;</td>
<td width="5%" class="list">&nbsp;</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="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="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -305,9 +305,9 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<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="<?=gettext("delete selected rules");?>" onclick="return confirm(<?=gettext('Do you really want to delete the selected rules?');?>)"><?php endif; ?>
+ <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; ?>
</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>
+ <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>
</tr>
</table>
</td>
@@ -317,24 +317,24 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<td class="list">&nbsp;</td>
<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"><?=gettext("*");?></td>
- <td class="listr" style="background-color: #e0e0e0"><?=gettext("RFC 1918 networks");?></td>
- <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></td>
- <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></td>
- <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></td>
- <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></td>
- <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></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">*</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"><?=gettext("Block private networks");?></td>
+ <td class="listbg">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="<?=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>
+ <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>
</tr>
<tr>
<td align="center" valign="middle"></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>
+ <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>
</tr>
</table>
</td>
@@ -345,24 +345,24 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<td class="list">&nbsp;</td>
<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"><?=gettext("*");?></td>
- <td class="listr" style="background-color: #e0e0e0"><?=gettext("Reserved/not assigned by IANA");?></td>
- <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></td>
- <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></td>
- <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></td>
- <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></td>
- <td class="listr" style="background-color: #e0e0e0"><?=gettext("*");?></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">*</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"><?=gettext("Block bogon networks");?></td>
+ <td class="listbg">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="<?=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>
+ <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>
</tr>
<tr>
<td align="center" valign="middle"></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>
+ <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>
</tr>
</table>
</td>
@@ -400,7 +400,7 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
$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="<?=gettext("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="click to toggle enabled/disabled status"></a>
<?php if (isset($filterent['log'])):
$iconfnlog = "log_s";
if (isset($filterent['disabled']))
@@ -436,8 +436,8 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
$sched_caption_escaped = "";
$sched_content = "";
$schedstatus = false;
- $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'));
+ $dayArray = array ('Mon','Tues','Wed','Thur','Fri','Sat','Sun');
+ $monthArray = array ('January','February','March','April','May','June','July','August','September','October','November','December');
if($config['schedules']['schedule'] <> "" and is_array($config['schedules']['schedule'])){
foreach ($a_schedules as $schedule)
{
@@ -548,12 +548,12 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
if ($iconfn == "block" || $iconfn == "reject")
{
$image = "icon_block";
- $alttext = gettext("Traffic matching this rule is currently being denied");
+ $alttext = "Traffic matching this rule is currently being denied";
}
else
{
$image = "icon_pass";
- $alttext = gettext("Traffic matching this rule is currently being allowed");
+ $alttext = "Traffic matching this rule is currently being allowed";
}
$printicon = true;
}
@@ -563,7 +563,7 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
$image = "icon_block_d";
else
$image = "icon_block";
- $alttext = gettext("This rule is not currently active because its period has expired");
+ $alttext = "This rule is not currently active because its period has expired";
$printicon = true;
}
}
@@ -627,9 +627,9 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<td class="listt"></td>
<td class="listlr" colspan="10" align="center" valign="middle">
<span class="gray">
- <?=gettext("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="<?=gettext("add new rule");?>" border="0" width="17" height="17" align="absmiddle"></a><?=gettext(" button to add a new rule.");?></span>
+ 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>
</td>
<?php endif; ?>
<tr id="fr<?=$nrules;?>">
@@ -649,16 +649,16 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<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="<?=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>
+ <?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>
<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="<?=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; ?>
+ <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; ?>
</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>
+ <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>
</tr>
</table>
</td>
@@ -667,39 +667,39 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<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><?=gettext("pass");?></td>
+ <td>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><?=gettext("block");?></td>
+ <td>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><?=gettext("reject");?></td>
+ <td>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><?=gettext("log");?></td>
+ <td>log</td>
</tr>
<tr>
<td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass_d.gif" width="11" height="11"></td>
- <td nowrap><?=gettext("pass (disabled)");?></td>
+ <td nowrap>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><?=gettext("block (disabled)");?></td>
+ <td nowrap>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><?=gettext("reject (disabled)");?></td>
+ <td nowrap>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><?=gettext("log (disabled)");?></td>
+ <td nowrap>log (disabled)</td>
</tr>
<tr>
<td colspan="10">
<p>
- <strong><span class="red"><?=gettext("Hint:");?><br>
- </span></strong><?=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.");?></p>
+ <strong><span class="red">Hint:<br>
+ </span></strong>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.</p>
</td>
</tr>
</table>
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index 067098c..342b689 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -45,7 +45,7 @@ require("guiconfig.inc");
require("filter.inc");
require("shaper.inc");
-$specialsrcdst = explode(" ", gettext("any pptp pppoe l2tp openvpn"););
+$specialsrcdst = explode(" ", "any pptp pppoe l2tp openvpn");
$ifdisp = get_configured_interface_with_descr();
foreach ($ifdisp as $kif => $kdescr) {
$specialsrcdst[] = "{$kif}";
@@ -174,9 +174,9 @@ if (isset($id) && $a_filter[$id]) {
/* defaults */
if ($_GET['if'])
$pconfig['interface'] = $_GET['if'];
- $pconfig['type'] = gettext("pass");
- $pconfig['src'] = gettext("any");
- $pconfig['dst'] = gettext("any");
+ $pconfig['type'] = "pass";
+ $pconfig['src'] = "any";
+ $pconfig['dst'] = "any";
}
/* Allow the FlotingRules to work */
$if = $pconfig['interface'];
@@ -187,7 +187,7 @@ if (isset($_GET['dup']))
if ($_POST) {
if ($_POST['type'] == "reject" && $_POST['proto'] <> "tcp")
- $input_errors[] = gettext("Reject type rules only works when the protocol is set to TCP.");
+ $input_errors[] = "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;
@@ -253,7 +253,7 @@ if ($_POST) {
continue;
$newpost = htmlentities($temp);
if($newpost <> $temp)
- $input_errors[] = sprintf(gettext("Invalid characters detected (%s). Please remove invalid characters and save again."),$temp);
+ $input_errors[] = "Invalid characters detected ($temp). Please remove invalid characters and save again.";
}
/* input validation */
@@ -270,9 +270,9 @@ if ($_POST) {
if($_POST['statetype'] == "modulate state" or $_POST['statetype'] == "synproxy state") {
if( $_POST['proto'] != "tcp" )
- $input_errors[] = sprintf(gettext("%s is only valid with protocol tcp."),$_POST['statetype']);
+ $input_errors[] = "{$_POST['statetype']} is only valid with protocol tcp.";
if(($_POST['statetype'] == "synproxy state") && ($_POST['gateway'] != ""))
- $input_errors[] = sprintf(gettext("%s is only valid if the gateway is set to 'default'."),$_POST['statetype']);
+ $input_errors[] = "{$_POST['statetype']} is only valid if the gateway is set to 'default'.";
}
if ( isset($a_filter[$id]['associated-rule-id'])===false &&
@@ -283,7 +283,7 @@ if ($_POST) {
if ( isset($a_filter[$id]['associated-rule-id'])===false &&
(!(is_specialnet($_POST['dsttype']) || ($_POST['dsttype'] == "single"))) ) {
$reqdfields[] = "dstmask";
- $reqdfieldsn[] = gettext("Destination bit count");
+ $reqdfieldsn[] = "Destination bit count";
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -298,38 +298,38 @@ if ($_POST) {
}
if ($_POST['srcbeginport'] && !is_portoralias($_POST['srcbeginport']))
- $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']);
+ $input_errors[] = "{$_POST['srcbeginport']} is not a valid start source port. It must be a port alias or integer between 1 and 65535.";
if ($_POST['srcendport'] && !is_portoralias($_POST['srcendport']))
- $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']);
+ $input_errors[] = "{$_POST['srcendport']} is not a valid end source port. It must be a port alias or integer between 1 and 65535.";
if ($_POST['dstbeginport'] && !is_portoralias($_POST['dstbeginport']))
- $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']);
+ $input_errors[] = "{$_POST['dstbeginport']} is not a valid start destination port. It must be a port alias or integer between 1 and 65535.";
if ($_POST['dstendport'] && !is_portoralias($_POST['dstendport']))
- $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']);
+ $input_errors[] = "{$_POST['dstendport']} is not a valid end destination port. It must be a port alias or integer between 1 and 65535.";
/* if user enters an alias and selects "network" then disallow. */
if($_POST['srctype'] == "network") {
if(is_alias($_POST['src']))
- $input_errors[] = gettext("You must specify single host or alias for alias entries.");
+ $input_errors[] = "You must specify single host or alias for alias entries.";
}
if($_POST['dsttype'] == "network") {
if(is_alias($_POST['dst']))
- $input_errors[] = gettext("You must specify single host or alias for alias entries.");
+ $input_errors[] = "You must specify single host or alias for alias entries.";
}
if (!is_specialnet($_POST['srctype'])) {
if (($_POST['src'] && !is_ipaddroralias($_POST['src']))) {
- $input_errors[] = sprintf(gettext("%s is not a valid source IP address or alias."),$_POST['src']);
+ $input_errors[] = "{$_POST['src']} is not a valid source IP address or alias.";
}
if (($_POST['srcmask'] && !is_numericint($_POST['srcmask']))) {
- $input_errors[] = gettext("A valid source bit count must be specified.");
+ $input_errors[] = "A valid source bit count must be specified.";
}
}
if (!is_specialnet($_POST['dsttype'])) {
if (($_POST['dst'] && !is_ipaddroralias($_POST['dst']))) {
- $input_errors[] = sprintf(gettext("%s is not a valid destination IP address or alias."),$_POST['dst']);
+ $input_errors[] = "{$_POST['dst']} is not a valid destination IP address or alias.";
}
if (($_POST['dstmask'] && !is_numericint($_POST['dstmask']))) {
- $input_errors[] = gettext("A valid destination bit count must be specified.");
+ $input_errors[] = "A valid destination bit count must be specified.";
}
}
@@ -347,31 +347,31 @@ if ($_POST) {
}
if ($_POST['os'])
if( $_POST['proto'] != "tcp" )
- $input_errors[] = gettext("OS detection is only valid with protocol tcp.");
+ $input_errors[] = "OS detection is only valid with protocol tcp.";
if ($_POST['ackqueue'] && $_POST['ackqueue'] != "none") {
if ($_POST['defaultqueue'] == "none" )
- $input_errors[] = gettext("You have to select a queue when you select an acknowledge queue too.");
+ $input_errors[] = "You have to select a queue when you select an acknowledge queue too.";
else if ($_POST['ackqueue'] == $_POST['defaultqueue'])
- $input_errors[] = gettext("Acknowledge queue and Queue cannot be the same.");
+ $input_errors[] = "Acknowledge queue and Queue cannot be the same.";
}
if ($_POST['pdnpipe'] && $_POST['pdnpipe'] != "none") {
if ($_POST['dnpipe'] == "none" )
- $input_errors[] = gettext("You must select a queue for the In direction before selecting one for Out too.");
+ $input_errors[] = "You must select a queue for the In direction before selecting one for Out too.";
else if ($_POST['pdnpipe'] == $_POST['dnpipe'])
- $input_errors[] = gettext("In and Out Queue cannot be the same.");
+ $input_errors[] = "In and Out Queue cannot be the same.";
else if ($pdnpipe[0] == "?" && $dnpipe[0] <> "?")
- $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.");
+ $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.";
}
if( !empty($_POST['ruleid']) && !ctype_digit($_POST['ruleid']))
- $input_errors[] = gettext('ID must be an integer');
+ $input_errors[] = 'ID must be an integer';
if($_POST['l7container'] && $_POST['l7container'] != "none") {
if(!($_POST['proto'] == "tcp" || $_POST['proto'] == "udp" || $_POST['proto'] == "tcp/udp"))
- $input_errors[] = gettext("You can only select a layer7 container for TCP and/or UDP protocols");
+ $input_errors[] = "You can only select a layer7 container for TCP and/or UDP protocols";
if ($_POST['type'] <> "pass")
- $input_errors[] = gettext("You can only select a layer7 container for Pass type rules.");
+ $input_errors[] = "You can only select a layer7 container for Pass type rules.";
}
if (!$_POST['tcpflags_any']) {
@@ -384,7 +384,7 @@ if ($_POST) {
$outoftcpflags[] = $tcpflag;
}
if (empty($outoftcpflags) && !empty($settcpflags))
- $input_errors[] = gettext("If you specify TCP flags that should be set you should specify out of which flags as well.");
+ $input_errors[] = "If you specify TCP flags that should be set you should specify out of which flags as well.";
}
if (!$input_errors) {
@@ -548,7 +548,7 @@ $dnqlist =& get_unique_dnqueue_list();
read_layer7_config();
$l7clist =& get_l7_unique_list();
-$pgtitle = array(gettext("Firewall"),gettext("Rules"),gettext("Edit"));
+$pgtitle = array("Firewall","Rules","Edit");
$statusurl = "status_filter_reload.php";
$logurl = "diag_logs_filter.php";
@@ -570,13 +570,13 @@ include("head.inc");
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Firewall rule");?></td>
+ <td colspan="2" valign="top" class="listtopic">Edit Firewall rule</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Action");?></td>
+ <td width="22%" valign="top" class="vncellreq">Action</td>
<td width="78%" class="vtable">
<select name="type" class="formselect">
- <?php $types = explode(" ", gettext("Pass Block Reject")); foreach ($types as $type): ?>
+ <?php $types = explode(" ", "Pass Block Reject"); foreach ($types as $type): ?>
<option value="<?=strtolower($type);?>" <?php if (strtolower($type) == strtolower($pconfig['type'])) echo "selected"; ?>>
<?=htmlspecialchars($type);?>
</option>
@@ -584,17 +584,17 @@ include("head.inc");
</select>
<br/>
<span class="vexpl">
- <?=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.");?>
+ 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.
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled");?></td>
+ <td width="22%" valign="top" class="vncellreq">Disabled</td>
<td width="78%" class="vtable">
<input name="disabled" type="checkbox" id="disabled" value="yes" <?php if ($pconfig['disabled']) echo "checked"; ?>>
- <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>
+ <strong>Disable this rule</strong><br />
+ <span class="vexpl">Set this option to disable this rule without removing it from the list.</span>
</td>
</tr>
<?php if ($if == "FloatingRules" || isset($pconfig['floating'])): ?>
@@ -610,7 +610,7 @@ include("head.inc");
</tr>
<? endif; ?>
<tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface");?></td>
+ <td width="22%" valign="top" class="vncellreq">Interface</td>
<td width="78%" class="vtable">
<?php if ($if == "FloatingRules" || isset($pconfig['floating'])): ?>
<select name="interface[]" multiple="true" class="formselect" size="3">
@@ -649,7 +649,7 @@ include("head.inc");
<?php endforeach; ?>
</select>
<br />
- <span class="vexpl"><?=gettext("Choose on which interface packets must come in to match this rule.");?></span>
+ <span class="vexpl">Choose on which interface packets must come in to match this rule.</span>
</td>
</tr>
<?php if ($if == "FloatingRules" || isset($pconfig['floating'])): ?>
@@ -659,7 +659,7 @@ include("head.inc");
</td>
<td width="78%" class="vtable">
<select name="direction" class="formselect">
- <?php $directions = array(gettext('any'),gettext('in'),gettext('out'));
+ <?php $directions = array('any', 'in', 'out');
foreach ($directions as $direction): ?>
<option value="<?=$direction;?>"
<?php if ($direction == $pconfig['direction']): ?>
@@ -673,21 +673,21 @@ include("head.inc");
<tr>
<?php endif; ?>
<tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Protocol");?></td>
+ <td width="22%" valign="top" class="vncellreq">Protocol</td>
<td width="78%" class="vtable">
<select name="proto" class="formselect" onchange="proto_change()">
<?php
- $protocols = explode(" ", gettext("TCP UDP TCP/UDP ICMP ESP AH GRE IGMP any carp pfsync"));
+ $protocols = explode(" ", "TCP UDP TCP/UDP ICMP ESP AH GRE IGMP any carp pfsync");
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"><?=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>
+ <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>
</tr>
<tr id="icmpbox" name="icmpbox">
- <td valign="top" class="vncell"><?=gettext("ICMP type");?></td>
+ <td valign="top" class="vncell">ICMP type</td>
<td class="vtable">
<select name="icmptype" class="formselect">
<?php
@@ -716,16 +716,16 @@ include("head.inc");
<?php endforeach; ?>
</select>
<br />
- <span class="vexpl"><?=gettext("If you selected ICMP for the protocol above, you may specify an ICMP type here.");?></span>
+ <span class="vexpl">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"><?=gettext("Source");?></td>
+ <td width="22%" valign="top" class="vncellreq">Source</td>
<td width="78%" class="vtable">
<?php $edit_disabled=false; ?>
<?php if( isset($pconfig['associated-rule-id']) ): ?>
- <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 />
+ <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 />
<br />
<?php
$edit_disabled=true;
@@ -744,36 +744,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><?=gettext("not");?></strong>
+ <strong>not</strong>
<br />
- <?=gettext("Use this option to invert the sense of the match.");?>
+ Use this option to invert the sense of the match.
<br />
<br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td><?=gettext("Type:");?>&nbsp;&nbsp;</td>
+ <td>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"; } ?>><?=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>
+ <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>
<?php if(have_ruleint_access("pptp")): ?>
- <option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo "selected"; } ?>><?=gettext("PPTP clients");?></option>
+ <option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo "selected"; } ?>>PPTP clients</option>
<?php endif; ?>
<?php if(have_ruleint_access("pppoe")): ?>
- <option value="pppoe" <?php if ($pconfig['src'] == "pppoe") { echo "selected"; } ?>><?=gettext("PPPoE clients");?></option>
+ <option value="pppoe" <?php if ($pconfig['src'] == "pppoe") { echo "selected"; } ?>>PPPoE clients</option>
<?php endif; ?>
<?php if(have_ruleint_access("l2tp")): ?>
- <option value="l2tp" <?php if ($pconfig['src'] == "l2tp") { echo "selected"; } ?>><?=gettext("L2TP clients");?></option>
+ <option value="l2tp" <?php if ($pconfig['src'] == "l2tp") { echo "selected"; } ?>>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);?><?=gettext(" subnet");?></option>
+ <option value="<?=$ifent;?>" <?php if ($pconfig['src'] == $ifent) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?> subnet</option>
<option value="<?=$ifent;?>ip"<?php if ($pconfig['src'] == $ifent . "ip") { echo "selected"; } ?>>
- <?=$ifdesc?> <?=gettext("address");?>
+ <?=$ifdesc?> address
</option>
<?php endif; ?>
<?php endforeach; ?>
@@ -781,7 +781,7 @@ include("head.inc");
</td>
</tr>
<tr>
- <td><?=gettext("Address:");?>&nbsp;&nbsp;</td>
+ <td>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">
@@ -794,20 +794,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><?=gettext(" - Show source port range");?></a>
+ <input<?php echo ($edit_disabled===true?' DISABLED':''); ?> type="button" onClick="show_source_port_range()" value="Advanced"></input> - Show source port range</a>
</div>
</td>
</tr>
<tr style="display:none" id="sprtable" name="sprtable">
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Source port range");?></td>
+ <td width="22%" valign="top" class="vncellreq">Source port range</td>
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td><?=gettext("from:");?>&nbsp;&nbsp;</td>
+ <td>from:&nbsp;&nbsp;</td>
<td>
<select<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="srcbeginport" class="formselect" onchange="src_rep_change();ext_change()">
- <option value=""><?=gettext("(other)");?></option>
- <option value="any" <?php $bfound = 0; if ($pconfig['srcbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any");?></option>
+ <option value="">(other)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['srcbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>>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; ?>
@@ -816,11 +816,11 @@ include("head.inc");
</td>
</tr>
<tr>
- <td><?=gettext("to:");?></td>
+ <td>to:</td>
<td>
<select<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="srcendport" class="formselect" onchange="ext_change()">
- <option value=""><?=gettext("(other)");?></option>
- <option value="any" <?php $bfound = 0; if ($pconfig['srcendport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any");?></option>
+ <option value="">(other)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['srcendport'] == "any") { echo "selected"; $bfound = 1; } ?>>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; ?>
@@ -834,39 +834,39 @@ include("head.inc");
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Destination");?></td>
+ <td width="22%" valign="top" class="vncellreq">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><?=gettext("not");?></strong>
+ <strong>not</strong>
<br />
- <?=gettext("Use this option to invert the sense of the match.");?>
+ Use this option to invert the sense of the match.
<br />
<br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td><?=gettext("Type:");?>&nbsp;&nbsp;</td>
+ <td>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"; } ?>><?=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>
+ <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>
<?php if(have_ruleint_access("pptp")): ?>
- <option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo "selected"; } ?>><?=gettext("PPTP clients");?></option>
+ <option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo "selected"; } ?>>PPTP clients</option>
<?php endif; ?>
<?php if(have_ruleint_access("pppoe")): ?>
- <option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo "selected"; } ?>><?=gettext("PPPoE clients");?></option>
+ <option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo "selected"; } ?>>PPPoE clients</option>
<?php endif; ?>
<?php if(have_ruleint_access("l2tp")): ?>
- <option value="l2tp" <?php if ($pconfig['dst'] == "l2tp") { echo "selected"; } ?>><?=gettext("L2TP clients");?></option>
+ <option value="l2tp" <?php if ($pconfig['dst'] == "l2tp") { echo "selected"; } ?>>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);?> <?=gettext("subnet");?></option>
+ <option value="<?=$if;?>" <?php if ($pconfig['dst'] == $if) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?> subnet</option>
<option value="<?=$if;?>ip"<?php if ($pconfig['dst'] == $if . "ip") { echo "selected"; } ?>>
- <?=$ifdesc;?> <?=gettext("address");?>
+ <?=$ifdesc;?> address
</option>
<?php endif; ?>
<?php endforeach; ?>
@@ -874,7 +874,7 @@ include("head.inc");
</td>
</tr>
<tr>
- <td><?=gettext("Address:");?>&nbsp;&nbsp;</td>
+ <td>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']);?>">
/
@@ -890,15 +890,15 @@ include("head.inc");
</td>
</tr>
<tr id="dprtr" name="dprtr">
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Destination port range ");?></td>
+ <td width="22%" valign="top" class="vncellreq">Destination port range </td>
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td><?=gettext("from:");?>&nbsp;&nbsp;</td>
+ <td>from:&nbsp;&nbsp;</td>
<td>
<select<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="dstbeginport" class="formselect" onchange="dst_rep_change();ext_change()">
- <option value=""><?=gettext("(other)");?></option>
- <option value="any" <?php $bfound = 0; if ($pconfig['dstbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any");?></option>
+ <option value="">(other)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['dstbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>>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; ?>
@@ -907,11 +907,11 @@ include("head.inc");
</td>
</tr>
<tr>
- <td><?=gettext("to:");?></td>
+ <td>to:</td>
<td>
<select<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="dstendport" class="formselect" onchange="ext_change()">
- <option value=""><?=gettext("(other)"?></option>
- <option value="any" <?php $bfound = 0; if ($pconfig['dstendport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any");?></option>
+ <option value="">(other)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['dstendport'] == "any") { echo "selected"; $bfound = 1; } ?>>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; ?>
@@ -922,27 +922,27 @@ include("head.inc");
</table>
<br />
<span class="vexpl">
- <?=gettext("Specify the port or port range for the destination of the packet for this rule.");?>
+ Specify the port or port range for the destination of the packet for this rule.
<br />
- <?=gettext("Hint: you can leave the <em>'to'</em> field empty if you only want to filter a single port");?>
+ Hint: you can leave the <em>'to'</em> field empty if you only want to filter a single port
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Log");?></td>
+ <td width="22%" valign="top" class="vncellreq">Log</td>
<td width="78%" class="vtable">
<input name="log" type="checkbox" id="log" value="yes" <?php if ($pconfig['log']) echo "checked"; ?>>
- <strong><?=gettext("Log packets that are handled by this rule");?></strong>
+ <strong>Log packets that are handled by this rule</strong>
<br />
- <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 (see the <a href="diag_logs_settings.php">Diagnostics: System logs: Settings</a> page).");?></span>
+ <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>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
+ <td width="22%" valign="top" class="vncell">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"><?=gettext("You may enter a description here for your reference.");?></span>
+ <span class="vexpl">You may enter a description here for your reference.</span>
</td>
</tr>
<tr>
@@ -960,16 +960,16 @@ include("head.inc");
<td>&nbsp;</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic"><?=gettext("Advanced features");?></td>
+ <td colspan="2" valign="top" class="listtopic">Advanced features</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Source OS");?></td>
+ <td width="22%" valign="top" class="vncell">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><?=gettext(" - Show advanced option");?></a>
+ <input type="button" onClick="show_advanced_sourceos()" value="Advanced"></input> - Show advanced option</a>
</div>
<div id="showsourceosadv" <? if (empty($pconfig['os'])) echo "style='display:none'"; ?>>
- <?=gettext("OS Type:");?>&nbsp;
+ OS Type:&nbsp;
<select name="os" id="os" class="formselect">
<?php
$ostypes = array(
@@ -992,15 +992,15 @@ include("head.inc");
?>
</select>
<br />
- <?=gettext("Note: this only works for TCP rules");?>
+ Note: this only works for TCP rules
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Diffserv Code Point");?></td>
+ <td width="22%" valign="top" class="vncell">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"><?=gettext(" - Show advanced option");?>
+ <input type="button" onClick="show_dsdiv();" value="Advanced"> - Show advanced option
</div>
<div id="dsdivmain" name="dsdivmain" <? if (empty($pconfig['dscp'])) echo "style='display:none'"; ?>>
<select name="dscp" id="dscp">
@@ -1013,10 +1013,10 @@ include("head.inc");
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Advanced Options");?></td>
+ <td width="22%" valign="top" class="vncell">Advanced Options</td>
<td width="78%" class="vtable">
<div id="aoadv" name="aoadv">
- <input type="button" onClick="show_aodiv();" value="Advanced"><?=gettext(" - Show advanced option");?>
+ <input type="button" onClick="show_aodiv();" value="Advanced"> - 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"; ?>>
@@ -1031,10 +1031,10 @@ include("head.inc");
<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><?=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" 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-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>
@@ -1043,22 +1043,22 @@ include("head.inc");
echo "<option value=\"{$x}\"{$selected}>{$x}</option>\n";
} ?>
</select><br />
- <?=gettext("Maximum new connections / per second(s)");?>
+ Maximum new connections / per second(s)
<p>
<input name="statetimeout" value="<?php echo $pconfig['statetimeout'] ?>"><br>
- <?=gettext("State Timeout in seconds");?>
+ State Timeout in seconds
<p />
- <p><strong><?=gettext("NOTE: Leave fields blank to disable that feature.");?></strong>
+ <p><strong>NOTE: Leave fields blank to disable that feature.</strong>
</div>
</td>
</tr>
<tr id="tcpflags" name="tcpflags">
- <td width="22%" valign="top" class="vncell"><?=gettext("TCP flags");?></td>
+ <td width="22%" valign="top" class="vncell">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><?=gettext(" - Show advanced option");?></a>
+ <input type="button" onClick="show_advanced_tcpflags()" value="Advanced"></input> - 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">
@@ -1089,46 +1089,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><?=gettext("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>Any flags.</strong><br/></center>
<br/>
- <span class="vexpl"><?=gettext("Use this to choose TCP flags that must".
- "be set or cleared for this rule to match.");?></span>
+ <span class="vexpl">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"><?=gettext("State Type");?></td>
+ <td width="22%" valign="top" class="vncell">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><?=gettext(" - Show advanced option");?></a>
+ <input type="button" onClick="show_advanced_state()" value="Advanced"></input> - 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"; ?>><?=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.");?>
+ <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.
<p>
<table width="90%">
- <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>
+ <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>
</table>
</p>
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("No XMLRPC Sync");?></td>
+ <td width="22%" valign="top" class="vncell">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><?=gettext(" - Show advanced option");?></a>
+ <input type="button" onClick="show_advanced_noxmlrpc()" value="Advanced"></input> - 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>
- <?=gettext("HINT: This prevents the rule from automatically syncing to other CARP members.");?>
+ HINT: This prevents the rule from automatically syncing to other CARP members.
</div>
</td>
</tr>
@@ -1144,10 +1144,10 @@ include("head.inc");
}
?>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Schedule");?></td>
+ <td width="22%" valign="top" class="vncell">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><?=gettext(" - Show advanced option");?></a>
+ <input type="button" onClick="show_advanced_schedule()" value="Advanced"></input> - Show advanced option</a>
</div>
<div id="showscheduleadv" <? if (empty($pconfig['sched'])) echo "style='display:none'"; ?>>
<select name='sched'>
@@ -1166,19 +1166,19 @@ include("head.inc");
}
?>
</select>
- <p><?=gettext("Leave as 'none' to leave the rule enabled all the time.");?></p>
+ <p>Leave as 'none' to leave the rule enabled all the time.</p>
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Gateway");?></td>
+ <td width="22%" valign="top" class="vncell">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><?=gettext(" - Show advanced option");?></a>
+ <input type="button" onClick="show_advanced_gateway()" value="Advanced"></input> - Show advanced option</a>
</div>
<div id="showgatewayadv" <? if (empty($pconfig['gateway'])) echo "style='display:none'"; ?>>
<select name='gateway'>
- <option value="" ><?=gettext("default");?></option>
+ <option value="" >default</option>
<?php
/* build a list of gateways */
$gateways = return_gateways_array();
@@ -1207,15 +1207,15 @@ include("head.inc");
}
?>
</select>
- <p><strong><?=gettext("Leave as 'default' to use the system routing table. Or choose a gateway to utilize policy based routing.");?></strong></p>
+ <p><strong>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"><?=gettext("In/Out");?></td>
+ <td width="22%" valign="top" class="vncell">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><?=gettext(" - Show advanced option");?></a>
+ <input type="button" onClick="show_advanced_inout()" value="Advanced"></input> - Show advanced option</a>
</div>
<div id="showinoutadv" <? if (empty($pconfig['dnpipe'])) echo "style='display:none'"; ?>>
<select name="dnpipe">
@@ -1256,16 +1256,16 @@ include("head.inc");
?>
</select>
<br />
- <span class="vexpl"><?=gettext("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">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>
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Ackqueue/Queue");?></td>
+ <td width="22%" valign="top" class="vncell">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><?=gettext(" - Show advanced option");?></a>
+ <input type="button" onClick="show_advanced_ackqueue()" value="Advanced"></input> - Show advanced option</a>
</div>
<div id="showackqueueadv" <? if (empty($pconfig['defaultqueue'])) echo "style='display:none'"; ?>>
<select name="ackqueue">
@@ -1306,14 +1306,14 @@ include("head.inc");
?>
</select>
<br />
- <span class="vexpl"><?=gettext("Choose the Acknowledge Queue only if you have selected Queue.");?></span>
+ <span class="vexpl">Choose the Acknowledge Queue only if you have selected Queue.</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Layer7");?></td>
+ <td width="22%" valign="top" class="vncell">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><?=gettext(" - Show advanced option");?></a>
+ <input type="button" onClick="show_advanced_layer7()" value="Advanced"></input> - Show advanced option</a>
</div>
<div id="showlayer7adv" <? if (empty($pconfig['l7container'])) echo "style='display:none'"; ?>>
<select name="l7container">
@@ -1333,8 +1333,8 @@ include("head.inc");
</select>
<br/>
<span class="vexpl">
- <?=gettext("Choose a Layer7 container to apply application protocol inspection rules.
- These are valid for TCP and UDP protocols only.");?>
+ Choose a Layer7 container to apply application protocol inspection rules.
+ These are valid for TCP and UDP protocols only.
</span>
</div>
</td>
diff --git a/usr/local/www/firewall_schedule.php b/usr/local/www/firewall_schedule.php
index 51df38a..f204497 100644
--- a/usr/local/www/firewall_schedule.php
+++ b/usr/local/www/firewall_schedule.php
@@ -39,10 +39,10 @@
##|*MATCH=firewall_schedule.php*
##|-PRIV
-$pgtitle = array(gettext("Firewall"),gettext("Schedules"));
+$pgtitle = array("Firewall","Schedules");
-$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'));
+$dayArray = array ('Mon','Tues','Wed','Thur','Fri','Sat','Sun');
+$monthArray = array ('January','February','March','April','May','June','July','August','September','October','November','December');
require("guiconfig.inc");
require("filter.inc");
@@ -73,7 +73,7 @@ if ($_GET['act'] == "del") {
}
if($is_schedule_referenced == true) {
- $savemsg = sprintf(gettext("Cannot delete Schedule. Currently in use by %s"),$referenced_by);
+ $savemsg = "Cannot delete Schedule. Currently in use by {$referenced_by}";
} else {
unset($a_schedules[$_GET['id']]);
write_config();
@@ -110,7 +110,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="<?=gettext("Schedule is currently active");?>" width="17" height="17" border="0">
+ &nbsp;<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_frmfld_time.png" title="Schedule is currently active" width="17" height="17" border="0">
<?php } ?>
</td>
@@ -215,8 +215,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="<?=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>
+ <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>
</tr>
</table>
</td>
@@ -235,7 +235,7 @@ include("head.inc");
</tr>
<tr>
<td class="tabcont" colspan="3">
- <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>
+ <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>
</td>
</tr>
</table>
diff --git a/usr/local/www/firewall_schedule_edit.php b/usr/local/www/firewall_schedule_edit.php
index cfbf7d9..62f0d99 100644
--- a/usr/local/www/firewall_schedule_edit.php
+++ b/usr/local/www/firewall_schedule_edit.php
@@ -53,7 +53,7 @@ function schedule_sort(){
usort($config['schedules']['schedule'], "schedulecmp");
}
-$pgtitle = array(gettext("Firewall"),gettext("Schedules"),gettext("Edit"));
+$pgtitle = array("Firewall","Schedules","Edit");
require("guiconfig.inc");
require_once("functions.inc");
require_once("filter.inc");
@@ -65,8 +65,8 @@ $starttimemin = 00;
$stoptimehr = 23;
$stoptimemin = 59;
-$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'));
+$dayArray = array ('Mon','Tues','Wed','Thur','Fri','Sat','Sun');
+$monthArray = array ('January','February','March','April','May','June','July','August','September','October','November','December');
if (!is_array($config['schedules']['schedule']))
$config['schedules']['schedule'] = array();
@@ -89,18 +89,18 @@ if (isset($id) && $a_schedules[$id]) {
if ($_POST) {
if(strtolower($_POST['name']) == "lan")
- $input_errors[] = gettext("Schedule may not be named LAN.");
+ $input_errors[] = "Schedule may not be named LAN.";
if(strtolower($_POST['name']) == "wan")
- $input_errors[] = gettext("Schedule may not be named WAN.");
+ $input_errors[] = "Schedule may not be named WAN.";
if(strtolower($_POST['name']) == "")
- $input_errors[] = gettext("Schedule name cannot be blank.");
+ $input_errors[] = "Schedule name cannot be blank.";
$x = is_validaliasname($_POST['name']);
if (!isset($x)) {
- $input_errors[] = gettext("Reserved word used for schedule name.");
+ $input_errors[] = "Reserved word used for schedule name.";
} else {
if (is_validaliasname($_POST['name']) == false)
- $input_errors[] = gettext("The schedule name may only consist of the characters a-z, A-Z, 0-9");
+ $input_errors[] = "The schedule name may only consist of the characters a-z, A-Z, 0-9";
}
/* check for name conflicts */
@@ -109,7 +109,7 @@ if ($_POST) {
continue;
if ($schedule['name'] == $_POST['name']) {
- $input_errors[] = gettext("A Schedule with this name already exists.");
+ $input_errors[] = "A Schedule with this name already exists.";
break;
}
}
@@ -166,7 +166,7 @@ if ($_POST) {
}
if (!$timerangeFound)
- $input_errors[] = gettext("The schedule must have at least one time range configured.");
+ $input_errors[] = "The schedule must have at least one time range configured.";
if (!$input_errors) {
@@ -186,7 +186,7 @@ if ($_POST) {
filter_configure();
- header(gettext("Location: firewall_schedule.php"));
+ header("Location: firewall_schedule.php");
exit;
}
@@ -766,33 +766,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"><?=gettext("Schedule information");?></td>
+ <td colspan="2" valign="top" class="listtopic">Schedule information</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td width="15%" valign="top" class="vncellreq"><?=gettext("Schedule Name");?></td>
+ <td width="15%" valign="top" class="vncellreq">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"><?=gettext("NOTE: This schedule is in use so the name may not be modified!");?></span>
+ <span class="vexpl">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">
- <?=gettext("The name of the alias may only consist of the characters a-z, A-Z and 0-9");?>
+ 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"><?=gettext("Description");?></td>
+ <td width="15%" valign="top" class="vncell">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">
- <?=gettext("You may enter a description here for your reference (not parsed).");?>
+ You may enter a description here for your reference (not parsed).
</span>
</td>
@@ -800,7 +800,7 @@ EOD;
<tr>
</tr>
<tr>
- <td width="15%" valign="top" class="vncellreq"><?=gettext("Month");?></td>
+ <td width="15%" valign="top" class="vncellreq">Month</td>
<td width="85%" class="vtable">
<select name="monthsel" class="formselect" id="monthsel" onchange="update_month();">
<?php
@@ -842,13 +842,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><?=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>
+ <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>
</TR>
<?php
$firstmonth = FALSE;
@@ -902,15 +902,15 @@ EOD;
} //end for loop
?>
<br/>
- <?=gettext)"Click individual date to select that date only. Click the appropriate weekday Header to select all occurences of that weekday.");?>
+ 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"><?=gettext("Time");?></td>
+ <td width="15%" valign="top" class="vncellreq">Time</td>
<td width="85%" class="vtable">
<table cellspacing=2 class="tabcont">
<tr>
- <td class="listhdrr" align="center"><?=gettext("Start Time");?></td><td></td><td class="listhdrr" align="center"><?=gettext("Stop Time");?></td>
+ <td class="listhdrr" align="center">Start Time</td><td></td><td class="listhdrr" align="center">Stop Time</td>
</tr>
<tr>
<td>
@@ -959,14 +959,14 @@ EOD;
</td>
</tr>
</table><br>
- <?=gettext("Select the time range for the day(s) selected on the Month(s) above. A full day is 0:00-23:59.")?>
+ 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"><?=gettext("Time Range Description")?></td>
+ <td width="15%" valign="top" class="vncell">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">
- <?=gettext("You may enter a description here for your reference (not parsed).")?>
+ You may enter a description here for your reference (not parsed).
</span>
</td>
</tr>
@@ -983,18 +983,18 @@ EOD;
</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic"><?=gettext("Schedule repeat");?></td>
+ <td colspan="2" valign="top" class="listtopic">Schedule repeat</td>
</tr>
<tr>
- <td width="15%" valign="top" class="vncellreq"><?=gettext("Configured Ranges");?></td>
+ <td width="15%" valign="top" class="vncellreq">Configured Ranges</td>
<td width="85%">
<table id="scheduletable">
<tbody>
<tr>
- <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>
+ <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>
</tr>
<?php
if ($getSchedule){
diff --git a/usr/local/www/firewall_shaper.php b/usr/local/www/firewall_shaper.php
index 7d47eb4..6618389 100755
--- a/usr/local/www/firewall_shaper.php
+++ b/usr/local/www/firewall_shaper.php
@@ -156,7 +156,7 @@ if ($_GET) {
} else if ($addnewaltq) {
$q = new altq_root_queue();
} else
- $input_errors[] = gettext("Could not create new queue/discipline!");
+ $input_errors[] = "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[] = gettext("Queue not found!");
+ $input_errors[] = "Queue not found!";
break;
case "enable":
if ($queue) {
@@ -181,7 +181,7 @@ if ($_GET) {
write_config();
mark_subsystem_dirty('shaper');
} else
- $input_errors[] = gettext("Queue not found!");
+ $input_errors[] = "Queue not found!";
break;
case "disable":
if ($queue) {
@@ -190,7 +190,7 @@ if ($_GET) {
write_config();
mark_subsystem_dirty('shaper');
} else
- $input_errors[] = gettext("Queue not found!");
+ $input_errors[] = "Queue not found!";
break;
default:
$output_form .= "<p class=\"pgtitle\">" . $default_shaper_msg."</p>";
@@ -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=\gettext("Delete this queue\")>";
+ $output_form .= " value=\"Delete this queue\">";
else
- $output_form .= " value=\gettext("Disable shaper on interface\")>";
+ $output_form .= " value=\"Disable shaper on interface\">";
$output_form .= "</a>";
}
$output_form .= "</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(gettext("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("The traffic shaper configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
<?php
$tab_array = array();
- $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");
+ $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");
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=gettext("Remove Shaper") class="formbtn">
+ <input type="button" value="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 368fd7a..3e2dc22 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",gettext("Traffic Shaper"), "Layer7");
+$pgtitle = array("Firewall","Traffic Shaper", "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>" . 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 .= "</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 .= "</td></tr>";
@@ -109,7 +109,7 @@ if ($_GET) {
}
else {
$show_proto_form = false;
- $input_errors[] = gettext("Layer7 Rules Container not found!");
+ $input_errors[] = "Layer7 Rules Container not found!";
}
break;
default:
@@ -159,7 +159,7 @@ else if ($_POST) {
}
else {
if(sizeof($dupes) > 0) {
- $dupe_error = gettext("Found the following repeated protocol definitions: ");
+ $dupe_error = "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(gettext("The traffic shaper configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?><br>
+<?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 endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
<?php
$tab_array = array();
- $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");
+ $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");
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="<?=gettext("Create new l7 rules group"); ?>" width="17" height="17" border="0"> <?=gettext("Create new l7 rules group"); ?>
+ <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
</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">
- <?=gettext("Rule(s)"); ?>
+ 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">
- <?=gettext("Add one or more rules"); ?>
+ 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">
- <?=gettext("Protocol"); ?>
+ Protocol
</div>
</td>
<td>
<div style = "font-size: 8pt; padding:5px;"
id = "twocolumn">
- <?=gettext("Structure"); ?>
+ Structure
</div>
</td>
<td>
<div style = "font-size: 8pt; padding:5px;"
id = "threecolumn">
- <?=gettext("Behaviour"); ?>
+ Behaviour
</div>
</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 = "<?=gettext("add another entry"); ?>" /> </a>
+ alt = "" title = "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 = "<?=gettext("Save"); ?>" />
+ name = "submit" type = "submit" class = "formbtn" value = "Save" />
<a href= "firewall_shaper_layer7.php">
<input id = "cancelbutton"
- name = "cancelbutton" type = "button" class = "formbtn" value = "<?=gettext("Cancel"); ?>" /></a>
+ name = "cancelbutton" type = "button" class = "formbtn" value = "Cancel" /></a>
<?php if($container): ?>
- <input id = "delete" type="submit" class="formbtn" name="delete" value="<?=gettext("Delete"); ?>"></a>
+ <input id = "delete" type="submit" class="formbtn" name="delete" value="Delete"></a>
<? endif ?>
</td>
</tr>
diff --git a/usr/local/www/firewall_shaper_queues.php b/usr/local/www/firewall_shaper_queues.php
index ac3213a..35b6f21 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 = gettext("Firewall: Shaper: By Queues View");
+$pgtitle = "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(gettext("The traffic shaper configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?><br>
+<?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 endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
<?php
$tab_array = array();
- $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");
+ $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");
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 3028e12..b6c8c76 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(gettext("Firewall"),gettext("Traffic Shaper"), gettext("Limiter"));
+$pgtitle = array("Firewall","Traffic Shaper", "Limiter");
$statusurl = "status_queues.php";
read_dummynet_config();
@@ -142,7 +142,7 @@ if ($_GET) {
$q = new dnpipe_class();
$q->SetQname($pipe);
} else
- $input_errors[] = gettext("Could not create new queue/discipline!");
+ $input_errors[] = "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[] = gettext("Queue not found!");
+ $input_errors[] = "Queue not found!";
break;
case "enable":
if ($queue) {
@@ -163,7 +163,7 @@ if ($_GET) {
write_config();
mark_subsystem_dirty('shaper');
} else
- $input_errors[] = gettext("Queue not found!");
+ $input_errors[] = "Queue not found!";
break;
case "disable":
if ($queue) {
@@ -172,7 +172,7 @@ if ($_GET) {
write_config();
mark_subsystem_dirty('shaper');
} else
- $input_errors[] = gettext("Queue not found!");
+ $input_errors[] = "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[] = gettext("Could not add new queue.");
+ $input_errors[] = "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 .= gettext("Queue Actions");
+$output_form .= "Queue Actions";
$output_form .= "</td><td valign=\"top\" class=\"vncellreq\" width=\"78%\">";
$output_form .= "<input type=\"submit\" name=\"Submit\" value=\"" . gettext("Save") . "\" class=\"formbtn\" />";
@@ -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(gettext("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("The traffic shaper configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
<?php
$tab_array = array();
- $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");
+ $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");
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="<?=gettext("Create new limiter");?>" width="17" height="17" border="0"><?=gettext("Create new limiter");?>
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="Create new limiter" width="17" height="17" border="0"> 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 1631e13..acd744c 100755
--- a/usr/local/www/firewall_shaper_wizards.php
+++ b/usr/local/www/firewall_shaper_wizards.php
@@ -73,10 +73,10 @@ if ($_POST['apply']) {
$pgtitle = array("Firewall", "Traffic Shaper", "Wizards");
$statusurl = "status_queues.php";
-$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",
+$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",
);
include("head.inc");
diff --git a/usr/local/www/firewall_virtual_ip.php b/usr/local/www/firewall_virtual_ip.php
index 91f1939..f4b4567 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[] = gettext("This entry cannot be deleted because it is still referenced by at least one NAT mapping.");
+ $input_errors[] = "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(gettext("Firewall"),gettext("Virtual IP Addresses"));
+$pgtitle = array("Firewall","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(gettext("The VIP configuration has been changed.<br>You must apply the changes in order for them to take effect."));
+ print_info_box_np("The VIP configuration has been changed.<br>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(gettext("Virtual IPs"), true, "firewall_virtual_ip.php");
- $tab_array[] = array(gettext("CARP Settings"), false, "pkg_edit.php?xml=carp_settings.xml&id=0");
+ $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");
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"><?=gettext("Virtual IP address");?></td>
- <td width="10%" class="listhdrr"><?=gettext("Type");?></td>
- <td width="40%" class="listhdr"><?=gettext("Description");?></td>
+ <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="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(<?=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>
+ <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>
</tr>
</table>
</td>
@@ -220,9 +220,9 @@ include("head.inc");
</tr>
<tr>
<td colspan="4">
- <p><span class="vexpl"><span class="red"><b><?=gettext("Note:");?><br>
- </b></span><?=gettext("The virtual IP addresses defined on this page may be used in ");?><a href="firewall_nat.php">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>
+ <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>
</td>
</tr>
</table>
diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php
index 44612c5..8970e33 100755
--- a/usr/local/www/firewall_virtual_ip_edit.php
+++ b/usr/local/www/firewall_virtual_ip_edit.php
@@ -100,21 +100,21 @@ if ($_POST) {
$pconfig = $_POST;
/* input validation */
- $reqdfields = explode(" ", gettext("mode"));
- $reqdfieldsn = explode(",", gettext("Type"));
+ $reqdfields = explode(" ", "mode");
+ $reqdfieldsn = explode(",", "Type");
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['subnet'] && !is_ipaddr($_POST['subnet'])))
- $input_errors[] = gettext("A valid IP address must be specified.");
+ $input_errors[] = "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[] = sprintf(gettext("The %s IP address may not be used in a virtual entry."),$natdescr);
+ $input_errors[] = "The {$natdescr} IP address may not be used in a virtual entry.";
if($_POST['subnet_bits'] == "32" and $_POST['type'] == "carp")
- $input_errors[] = gettext("The /32 subnet mask is invalid for CARP IPs.");
+ $input_errors[] = "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[] = gettext("There is already a virtual IP entry for the specified IP address.");
+ $input_errors[] = "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[] = sprintf(gettext("VHID %s is already in use. Pick a unique number."),$_POST['vhid']);
+ $input_errors[] = "VHID {$_POST['vhid']} is already in use. Pick a unique number.";
$idtracker++;
}
if($_POST['password'] == "")
- $input_errors[] = gettext("You must specify a CARP password that is shared between the two VHID members.");
+ $input_errors[] = "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[] = gettext("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[] = "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.";
} else if ($parent_sn != $_POST['subnet_bits'])
- $input_errors[] = gettext("Subnet bits needs to be the same as the parent interface.");
+ $input_errors[] = "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(gettext("Firewall"),gettext("Virtual IP Address","Edit"));
+$pgtitle = array("Firewall","Virtual IP Address","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(<?=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.");?>);
+ 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.");
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"><?=gettext("Edit Virtual IP");?></td>
+ <td colspan="2" valign="top" class="listtopic">Edit Virtual IP</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Type");?></td>
+ <td width="22%" valign="top" class="vncellreq">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
<input name="mode" type="radio" onclick="enable_change(false)" value="carp"
<?php if ($pconfig['mode'] == "carp") echo "checked";?>> CARP
<input name="mode" type="radio" onclick="enable_change(false)" value="other"
- <?php if ($pconfig['mode'] == "other") echo "checked";?>> <?=gettext("Other");?>
+ <?php if ($pconfig['mode'] == "other") echo "checked";?>> Other
<input name="mode" type="radio" onclick="enable_change(false)" value="ipalias"
- <?php if ($pconfig['mode'] == "ipalias") echo "checked";?>> <?=gettext("IP Alias");?>
+ <?php if ($pconfig['mode'] == "ipalias") echo "checked";?>> 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"><?=gettext("Interface");?></td>
+ <td width="22%" valign="top" class="vncellreq">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"><?=gettext("IP Address(es)");?></td>
+ <td valign="top" class="vncellreq">IP Address(es)</td>
<td class="vtable">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td><?=gettext("Type:");?>&nbsp;&nbsp;</td>
+ <td>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"; ?>>
- <?=gettext("Single address");?></option>
+ Single address</option>
<option value="network" <?php if (!$pconfig['range'] && $pconfig['subnet_bits'] != 32 && isset($pconfig['subnet'])) echo "selected"; ?>>
- <?=gettext("Network");?></option>
+ 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><?=gettext("Address:");?>&nbsp;&nbsp;</td>
+ <td>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"><?=gettext("Virtual IP Password");?></td>
+ <td width="22%" class="vncellreq">Virtual IP Password</td>
<td class="vtable"><input type='password' name='password' value="<?=htmlspecialchars($pconfig['password']);?>">
- <br><?=gettext("Enter the VHID group password.");?>
+ <br>Enter the VHID group password.
</td>
</tr>
<tr valign="top">
- <td width="22%" class="vncellreq"><?=gettext("VHID Group");?></td>
+ <td width="22%" class="vncellreq">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><?=gettext("Enter the VHID group that the machines will share");?>
+ <br>Enter the VHID group that the machines will share
</td>
</tr>
<tr valign="top">
- <td width="22%" class="vncellreq"><?=gettext("Advertising Frequency");?></td>
+ <td width="22%" class="vncellreq">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,14 +442,14 @@ function typesel_change() {
</option>
<?php endfor; ?>
</select>
- <br><?=gettext("The frequency that this machine will advertise. 0 = master. Anything above 0 designates a backup.");?>
+ <br>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"><?=gettext("Description");?></td>
+ <td width="22%" valign="top" class="vncell">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"><?=gettext("You may enter a description here for your reference (not parsed).");?></span></td>
+ <br> <span class="vexpl">You may enter a description here for your reference (not parsed).</span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
@@ -465,10 +465,10 @@ function typesel_change() {
<p>
<span class="vexpl">
<span class="red">
- <b><?=gettext("Note:");?><br></b>
+ <strong>Note:<br></strong>
</span>&nbsp;&nbsp;
- <?=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'>CARP FAQ</A>.
+ 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>.
</span>
</p>
</td>
OpenPOWER on IntegriCloud