summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorRenato Botelho <renato.botelho@bluepex.com>2010-08-03 12:53:57 -0300
committerRenato Botelho <renato.botelho@bluepex.com>2010-08-03 12:53:57 -0300
commit5f4fda7e8347ca44e6a8bb367c4f3b53cf556e3b (patch)
tree009b8f964e36675fe3f5f6365da578bad7e9e6c8 /usr/local/www
parent4daa45d861ab448da4fdc910619a4ab6b213bc50 (diff)
parentfbe58e0a3dde0867d5aa0d5d0885d538a67e747d (diff)
downloadpfsense-5f4fda7e8347ca44e6a8bb367c4f3b53cf556e3b.zip
pfsense-5f4fda7e8347ca44e6a8bb367c4f3b53cf556e3b.tar.gz
Merge remote branch 'mainline/master' into 4_load_balancer_and_services
Conflicts: usr/local/www/interfaces.php usr/local/www/interfaces_assign.php usr/local/www/interfaces_bridge_edit.php usr/local/www/interfaces_gif_edit.php usr/local/www/interfaces_gre.php usr/local/www/interfaces_groups.php usr/local/www/interfaces_groups_edit.php usr/local/www/interfaces_lagg.php usr/local/www/interfaces_lagg_edit.php usr/local/www/interfaces_ppps.php usr/local/www/interfaces_ppps_edit.php usr/local/www/interfaces_qinq.php usr/local/www/interfaces_vlan.php usr/local/www/interfaces_vlan_edit.php usr/local/www/interfaces_wireless.php usr/local/www/interfaces_wireless_edit.php
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/firewall_aliases.php24
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php79
-rwxr-xr-xusr/local/www/firewall_aliases_import.php37
-rwxr-xr-xusr/local/www/firewall_nat.php58
-rwxr-xr-xusr/local/www/firewall_nat_1to1.php34
-rwxr-xr-xusr/local/www/firewall_nat_1to1_edit.php40
-rwxr-xr-xusr/local/www/firewall_nat_edit.php214
-rwxr-xr-xusr/local/www/firewall_nat_out.php86
-rwxr-xr-xusr/local/www/firewall_nat_out_edit.php122
-rwxr-xr-xusr/local/www/firewall_rules.php125
-rwxr-xr-xusr/local/www/firewall_rules_edit.php334
-rw-r--r--usr/local/www/firewall_schedule.php23
-rw-r--r--usr/local/www/firewall_schedule_edit.php89
-rwxr-xr-xusr/local/www/firewall_shaper.php34
-rwxr-xr-xusr/local/www/firewall_shaper_layer7.php44
-rwxr-xr-xusr/local/www/firewall_shaper_queues.php14
-rw-r--r--usr/local/www/firewall_shaper_vinterface.php34
-rwxr-xr-xusr/local/www/firewall_shaper_wizards.php28
-rwxr-xr-xusr/local/www/firewall_virtual_ip.php24
-rwxr-xr-xusr/local/www/firewall_virtual_ip_edit.php74
-rwxr-xr-xusr/local/www/interfaces.php478
-rwxr-xr-xusr/local/www/interfaces_assign.php70
-rw-r--r--usr/local/www/interfaces_bridge.php36
-rw-r--r--usr/local/www/interfaces_bridge_edit.php204
-rw-r--r--usr/local/www/interfaces_gif.php36
-rw-r--r--usr/local/www/interfaces_gif_edit.php46
-rw-r--r--usr/local/www/interfaces_gre.php35
-rw-r--r--usr/local/www/interfaces_gre_edit.php3
-rwxr-xr-xusr/local/www/interfaces_groups.php37
-rwxr-xr-xusr/local/www/interfaces_groups_edit.php30
-rw-r--r--usr/local/www/interfaces_lagg.php34
-rw-r--r--usr/local/www/interfaces_lagg_edit.php82
-rw-r--r--usr/local/www/interfaces_ppps.php33
-rw-r--r--usr/local/www/interfaces_ppps_edit.php94
-rwxr-xr-xusr/local/www/interfaces_qinq.php39
-rwxr-xr-xusr/local/www/interfaces_vlan.php38
-rwxr-xr-xusr/local/www/interfaces_vlan_edit.php30
-rw-r--r--usr/local/www/interfaces_wireless.php36
-rw-r--r--usr/local/www/interfaces_wireless_edit.php34
39 files changed, 1462 insertions, 1450 deletions
diff --git a/usr/local/www/firewall_aliases.php b/usr/local/www/firewall_aliases.php
index d6a9e37..8bcfcf6 100755
--- a/usr/local/www/firewall_aliases.php
+++ b/usr/local/www/firewall_aliases.php
@@ -150,7 +150,7 @@ if ($_GET['act'] == "del") {
}
}
if($is_alias_referenced == true) {
- $savemsg = "Cannot delete rule. Currently in use by {$referenced_by}";
+ $savemsg = sprintf(gettext("Cannot delete rule. Currently in use by %s"), $referenced_by);
} else {
unset($a_aliases[$_GET['id']]);
write_config();
@@ -162,7 +162,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("Firewall","Aliases");
+$pgtitle = array(gettext("Firewall"),gettext("Aliases"));
include("head.inc");
?>
@@ -172,19 +172,19 @@ include("head.inc");
<form action="firewall_aliases.php" method="post">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('aliases')): ?><p>
-<?php print_info_box_np("The alias list has been changed.<br>You must apply the changes in order for them to take effect.");?>
+<?php print_info_box_np(gettext("The alias list has been changed.") . "<br>" . gettext("You must apply the changes in order for them to take effect."));?>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="25%" class="listhdrr">Name</td>
- <td width="25%" class="listhdrr">Values</td>
- <td width="25%" class="listhdr">Description</td>
+ <td width="25%" class="listhdrr"><?=gettext("Name"); ?></td>
+ <td width="25%" class="listhdrr"><?=gettext("Values"); ?></td>
+ <td width="25%" class="listhdr"><?=gettext("Description"); ?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle" width="17">&nbsp;</td>
- <td valign="middle"><a href="firewall_aliases_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="add a new alias"></a></td>
+ <td valign="middle"><a href="firewall_aliases_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new alias"); ?>"></a></td>
</tr>
</table>
</td>
@@ -216,8 +216,8 @@ include("head.inc");
<td valign="middle" nowrap class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td valign="middle"><a href="firewall_aliases_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="edit alias"></a></td>
- <td><a href="firewall_aliases.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this alias? All elements that still use it will become invalid (e.g. filter rules)!')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="delete alias"></a></td>
+ <td valign="middle"><a href="firewall_aliases_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit alias"); ?>"></a></td>
+ <td><a href="firewall_aliases.php?act=del&id=<?=$i;?>" onclick="return confirm(<?=gettext('Do you really want to delete this alias? All elements that still use it will become invalid (e.g. filter rules)!');?>)"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete alias"); ?>"></a></td>
</tr>
</table>
</td>
@@ -230,10 +230,10 @@ include("head.inc");
<tr>
<td valign="middle" width="17">&nbsp;</td>
<td valign="middle">
- <a href="firewall_aliases_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="add a new alias"></a></td>
+ <a href="firewall_aliases_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new alias"); ?>"></a></td>
</td>
<td valign="middle">
- <a href="firewall_aliases_import.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_import_alias.gif" width="17" height="17" border="0" title="<?=gettext("Bulk import aliases from list");?>" alt="" /></a>
+ <a href="firewall_aliases_import.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_import_alias.gif" width="17" height="17" border="0" title="<?=gettext("Bulk import aliases from list"); ?>" alt="" /></a>
</td>
</tr>
</table>
@@ -241,7 +241,7 @@ include("head.inc");
</tr>
<tr>
<td class="tabcont" colspan="3">
- <p><span class="vexpl"><span class="red"><strong>Note:<br></strong></span>Aliases act as placeholders for real hosts, networks or ports. They can be used to minimize the number of changes that have to be made if a host, network or port changes. You can enter the name of an alias instead of the host, network or port in all fields that have a red background. The alias will be resolved according to the list above. If an alias cannot be resolved (e.g. because you deleted it), the corresponding element (e.g. filter/NAT/shaper rule) will be considered invalid and skipped.</span></p>
+ <p><span class="vexpl"><span class="red"><strong><?=gettext("Note"); ?>:<br></strong></span><?=gettext("Aliases act as placeholders for real hosts, networks or ports. They can be used to minimize the number of changes that have to be made if a host, network or port changes. You can enter the name of an alias instead of the host, network or port in all fields that have a red background. The alias will be resolved according to the list above. If an alias cannot be resolved (e.g. because you deleted it), the corresponding element (e.g. filter/NAT/shaper rule) will be considered invalid and skipped."); ?></span></p>
</td>
</tr>
</table>
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index 0f66c25..27b0e5c 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -44,7 +44,6 @@
##|*MATCH=firewall_aliases_edit.php*
##|-PRIV
-$pgtitle = array("Firewall","Aliases","Edit");
// Keywords not allowed in names
$reserved_keywords = array("pass", "out", "queue", "max", "min", "pptp", "pppoe", "L2TP", "OpenVPN", "IPsec");
@@ -54,6 +53,8 @@ require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
+$pgtitle = array(gettext("Firewall"),gettext("Aliases"),gettext("Edit"));
+
$reserved_ifs = get_configured_interface_list(false, true);
$reserved_keywords = array_merge($reserved_keywords, $reserved_ifs);
@@ -101,7 +102,7 @@ if (isset($id) && $a_aliases[$id]) {
$iflist = get_configured_interface_with_descr(true, true);
foreach ($iflist as $if => $ifdesc)
if($ifdesc == $pconfig['descr'])
- $input_errors[] = "Sorry, an interface is already named {$pconfig['descr']}.";
+ $input_errors[] = sprintf(gettext("Sorry, an interface is already named %s."), $pconfig['descr']);
if($a_aliases[$id]['type'] == "urltable") {
$pconfig['address'] = $a_aliases[$id]['url'];
@@ -130,24 +131,24 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "name");
- $reqdfieldsn = explode(",", "Name");
+ $reqdfieldsn = array(gettext("Name"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
$x = is_validaliasname($_POST['name']);
if (!isset($x)) {
- $input_errors[] = "Reserved word used for alias name.";
+ $input_errors[] = gettext("Reserved word used for alias name.");
} else if ($_POST['type'] == "port" && (getservbyname($_POST['name'], "tcp") || getservbyname($_POST['name'], "udp"))) {
- $input_errors[] = "Reserved word used for alias name.";
+ $input_errors[] = gettext("Reserved word used for alias name.");
} else {
if (is_validaliasname($_POST['name']) == false)
- $input_errors[] = "The alias name may only consist of the characters a-z, A-Z, 0-9, _.";
+ $input_errors[] = gettext("The alias name may only consist of the characters") . " a-z, A-Z, 0-9, _.";
}
/* check for name conflicts */
if (empty($a_aliases[$id])) {
foreach ($a_aliases as $alias) {
if ($alias['name'] == $_POST['name']) {
- $input_errors[] = "An alias with this name already exists.";
+ $input_errors[] = gettext("An alias with this name already exists.");
break;
}
}
@@ -156,12 +157,12 @@ if ($_POST) {
/* Check for reserved keyword names */
foreach($reserved_keywords as $rk)
if($rk == $_POST['name'])
- $input_errors[] = "Cannot use a reserved keyword as alias name $rk";
+ $input_errors[] = sprintf(gettext("Cannot use a reserved keyword as alias name %s"), $rk);
/* check for name interface description conflicts */
foreach($config['interfaces'] as $interface) {
if($interface['descr'] == $_POST['name']) {
- $input_errors[] = "An interface description with this name already exists.";
+ $input_errors[] = gettext("An interface description with this name already exists.");
break;
}
}
@@ -183,10 +184,10 @@ if ($_POST) {
$alias['url'] = $_POST['address0'];
$alias['updatefreq'] = $_POST['address_subnet0'] ? $_POST['address_subnet0'] : 7;
if (!is_URL($alias['url']) || empty($alias['url'])) {
- $input_errors[] = "You must provide a valid URL.";
+ $input_errors[] = gettext("You must provide a valid URL.");
$dont_update = true;
} elseif (! process_alias_urltable($alias['name'], $alias['url'], 0, true)) {
- $input_errors[] = "Unable to fetch usable data.";
+ $input_errors[] = gettext("Unable to fetch usable data.");
$dont_update = true;
}
}
@@ -231,14 +232,14 @@ if ($_POST) {
}
if($isfirst == 0) {
/* nothing was found */
- $input_errors[] = "You must provide a valid URL. Could not fetch usable data.";
+ $input_errors[] = gettext("You must provide a valid URL. Could not fetch usable data.");
$dont_update = true;
break;
}
$alias['aliasurl'][] = $_POST['address' . $x];
mwexec("/bin/rm -rf {$temp_filename}");
} else {
- $input_errors[] = "You must provide a valid URL.";
+ $input_errors[] = gettext("You must provide a valid URL.");
$dont_update = true;
break;
}
@@ -254,12 +255,12 @@ if ($_POST) {
$wrongaliases .= " " . $_POST["address{$x}"];
} else if ($_POST['type'] == "port") {
if (!is_port($_POST["address{$x}"]))
- $input_errors[] = $_POST["address{$x}"] . " is not a valid port or alias.";
+ $input_errors[] = $_POST["address{$x}"] . " " . gettext("is not a valid port or alias.");
} else if ($_POST['type'] == "host" || $_POST['type'] == "network") {
if (!is_ipaddr($_POST["address{$x}"])
&& !is_hostname($_POST["address{$x}"])
&& !is_iprange($_POST["address{$x}"]))
- $input_errors[] = $_POST["address{$x}"] . " is not a valid {$_POST['type']} alias.";
+ $input_errors[] = sprintf(gettext("%s is not a valid %s alias."), $_POST["address{$x}"], $_POST['type']);
}
if (is_iprange($_POST["address{$x}"])) {
list($startip, $endip) = explode('-', $_POST["address{$x}"]);
@@ -274,11 +275,11 @@ if ($_POST) {
if ($_POST["detail{$x}"] <> "")
$final_address_details[] = $_POST["detail{$x}"];
else
- $final_address_details[] = "Entry added " . date('r');
+ $final_address_details[] = sprintf(gettext("Entry added %s"), date('r'));
}
}
if ($wrongaliases <> "")
- $input_errors[] = "The alias(es): {$wrongaliases} \ncannot be nested cause they are not of the same type.";
+ $input_errors[] = sprintf(gettext("The alias(es): %s %scannot be nested cause they are not of the same type."), $wrongaliases, " \n");
}
if (!$input_errors) {
@@ -444,13 +445,13 @@ $update_freq_str = gettext("Update Freq.");
$networks_help = gettext("Networks are specified in CIDR format. Select the CIDR mask that pertains to each entry. /32 specifies a single host, /24 specifies 255.255.255.0, etc. Hostnames (FQDNs) may also be specified, using a /32 mask. You may also enter an IP range such as 192.168.1.1-192.168.1.254 and a list of CIDR networks will be derived to fill the range.");
$hosts_help = gettext("Enter as many hosts as you would like. Hosts must be specified by their IP address.");
$ports_help = gettext("Enter as many ports as you wish. Port ranges can be expressed by seperating with a colon.");
-$url_help = gettext("Enter as many URLs as you wish. After saving {$g['product_name']} will download the URL and import the items into the alias. Use only with small sets of IP addresses (less than 3000).");
-$urltable_help = gettext("Enter a single URL containing a large number of IPs and/or Subnets. After saving {$g['product_name']} will download the URL and create a table file containing these addresses. This will work with large numbers of addresses (30,000+) or small numbers.");
+$url_help = sprintf(gettext("Enter as many URLs as you wish. After saving %s will download the URL and import the items into the alias. Use only with small sets of IP addresses (less than 3000)."), $g['product_name']);
+$urltable_help = sprintf(gettext("Enter a single URL containing a large number of IPs and/or Subnets. After saving %s will download the URL and create a table file containing these addresses. This will work with large numbers of addresses (30,000+) or small numbers."), $g['product_name']);
$openvpn_str = gettext("Username");
$openvpn_user_str = gettext("OpenVPN Users");
$openvpn_help = gettext("Enter as many usernames as you wish.");
-$openvpn_freq = gettext("");
+$openvpn_freq = "";
$jscriptstr .= <<<EOD
@@ -549,10 +550,10 @@ EOD;
<form action="firewall_aliases_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Alias Edit</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Alias Edit"); ?></td>
</tr>
<tr>
- <td valign="top" class="vncellreq">Name</td>
+ <td valign="top" class="vncellreq"><?=gettext("Name"); ?></td>
<td class="vtable">
<input name="origname" type="hidden" id="origname" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['name']);?>" />
<input name="name" type="text" id="name" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['name']);?>" />
@@ -561,47 +562,47 @@ EOD;
<?php endif; ?>
<br />
<span class="vexpl">
- The name of the alias may only consist of the characters a-z, A-Z and 0-9.
+ <?=gettext("The name of the alias may only consist of the characters \"a-z, A-Z and 0-9\"."); ?>
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=$pconfig['descr'];?>" />
<br />
<span class="vexpl">
- You may enter a description here for your reference (not parsed).
+ <?=gettext("You may enter a description here for your reference (not parsed)."); ?>
</span>
</td>
</tr>
<tr>
- <td valign="top" class="vncellreq">Type</td>
+ <td valign="top" class="vncellreq"><?=gettext("Type"); ?></td>
<td class="vtable">
<select name="type" class="formselect" id="type" onchange="update_box_type(); typesel_change();">
- <option value="host" <?php if ($pconfig['type'] == "host") echo "selected"; ?>>Host(s)</option>
- <option value="network" <?php if ($pconfig['type'] == "network") echo "selected"; ?>>Network(s)</option>
- <option value="port" <?php if ($pconfig['type'] == "port") echo "selected"; ?>>Port(s)</option>
- <option value="openvpn" <?php if ($pconfig['type'] == "openvpn") echo "selected"; ?>>OpenVPN Users</option>
- <option value="url" <?php if ($pconfig['type'] == "url") echo "selected"; ?>>URL</option>
- <option value="urltable" <?php if ($pconfig['type'] == "urltable") echo "selected"; ?>>URL Table</option>
+ <option value="host" <?php if ($pconfig['type'] == "host") echo "selected"; ?>><?=gettext("Host(s)"); ?></option>
+ <option value="network" <?php if ($pconfig['type'] == "network") echo "selected"; ?>><?=gettext("Network(s)"); ?></option>
+ <option value="port" <?php if ($pconfig['type'] == "port") echo "selected"; ?>><?=gettext("Port(s)"); ?></option>
+ <option value="openvpn" <?php if ($pconfig['type'] == "openvpn") echo "selected"; ?>><?=gettext("OpenVPN Users"); ?></option>
+ <option value="url" <?php if ($pconfig['type'] == "url") echo "selected"; ?>><?=gettext("URL");?></option>
+ <option value="urltable" <?php if ($pconfig['type'] == "urltable") echo "selected"; ?>><?=gettext("URL Table"); ?></option>
</select>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"><div id="addressnetworkport">Host(s)</div></td>
+ <td width="22%" valign="top" class="vncellreq"><div id="addressnetworkport"><?=gettext("Host(s)"); ?></div></td>
<td width="78%" class="vtable">
<table id="maintable">
<tbody>
<tr>
<td colspan="4">
- <div style="padding:5px; margin-top: 16px; margin-bottom: 16px; border:1px dashed #000066; background-color: #ffffff; color: #000000; font-size: 8pt;" id="itemhelp">Item information</div>
+ <div style="padding:5px; margin-top: 16px; margin-bottom: 16px; border:1px dashed #000066; background-color: #ffffff; color: #000000; font-size: 8pt;" id="itemhelp"><?=gettext("Item information"); ?></div>
</td>
</tr>
<tr>
- <td><div id="onecolumn">Network</div></td>
+ <td><div id="onecolumn"><?=gettext("Network"); ?></div></td>
<td><div id="twocolumn">CIDR</div></td>
- <td><div id="threecolumn">Description</div></td>
+ <td><div id="threecolumn"><?=gettext("Description"); ?></div></td>
</tr>
<?php
@@ -640,7 +641,7 @@ EOD;
<input name="detail<?php echo $tracker; ?>" type="text" class="formfld unknown" id="detail<?php echo $tracker; ?>" size="50" value="<?=$item4;?>" />
</td>
<td>
- <input type="image" src="/themes/<?echo $g['theme'];?>/images/icons/icon_x.gif" onclick="removeRow(this); return false;" value="Delete" />
+ <input type="image" src="/themes/<?echo $g['theme'];?>/images/icons/icon_x.gif" onclick="removeRow(this); return false;" value="<?=gettext("Delete"); ?>" />
</td>
</tr>
<?php
@@ -662,8 +663,8 @@ EOD;
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input id="submit" name="submit" type="submit" class="formbtn" value="Save" />
- <a href="firewall_aliases.php"><input id="cancelbutton" name="cancelbutton" type="button" class="formbtn" value="Cancel" /></a>
+ <input id="submit" name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" />
+ <a href="firewall_aliases.php"><input id="cancelbutton" name="cancelbutton" type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" /></a>
</td>
</tr>
</table>
diff --git a/usr/local/www/firewall_aliases_import.php b/usr/local/www/firewall_aliases_import.php
index 402cc3d..39311c4 100755
--- a/usr/local/www/firewall_aliases_import.php
+++ b/usr/local/www/firewall_aliases_import.php
@@ -37,7 +37,6 @@
##|*MATCH=firewall_aliases_import.php*
##|-PRIV
-$pgtitle = array("Firewall","Aliases","Bulk import");
$reserved_keywords = array("pass", "out", "queue", "max", "min", "pptp", "pppoe", "L2TP", "OpenVPN", "IPsec");
@@ -46,6 +45,8 @@ require_once("util.inc");
require("filter.inc");
require("shaper.inc");
+$pgtitle = array(gettext("Firewall"),gettext("Aliases"),gettext("Bulk import"));
+
$reserved_ifs = get_configured_interface_list(false, true);
$reserved_keywords = array_merge($reserved_keywords, $reserved_ifs);
@@ -55,27 +56,27 @@ $a_aliases = &$config['aliases']['alias'];
if($_POST['aliasimport'] <> "") {
$reqdfields = explode(" ", "name aliasimport");
- $reqdfieldsn = explode(",", "Name,Aliases");
+ $reqdfieldsn = array(gettext("Name"),gettext("Aliases"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (is_validaliasname($_POST['name']) == false)
- $input_errors[] = "The alias name may only consist of the characters a-z, A-Z, 0-9, _.";
+ $input_errors[] = gettext("The alias name may only consist of the characters") . " a-z, A-Z, 0-9, _.";
/* check for name duplicates */
if (is_alias($_POST['name']))
- $input_errors[] = "An alias with this name already exists.";
+ $input_errors[] = gettext("An alias with this name already exists.");
/* Check for reserved keyword names */
foreach($reserved_keywords as $rk)
if ($rk == $_POST['name'])
- $input_errors[] = "Cannot use a reserved keyword as alias name $rk";
+ $input_errors[] = sprintf(gettext("Cannot use a reserved keyword as alias name %s"), $rk);
/* check for name interface description conflicts */
foreach($config['interfaces'] as $interface) {
if($interface['descr'] == $_POST['name']) {
- $input_errors[] = "An interface description with this name already exists.";
+ $input_errors[] = gettext("An interface description with this name already exists.");
break;
}
}
@@ -90,7 +91,7 @@ if($_POST['aliasimport'] <> "") {
$rangesubnets = ip_range_to_subnet_array($startip, $endip);
$address .= implode(" ", $rangesubnets);
} else if (!is_ipaddr($impip) && !is_subnet($impip) && !empty($impip)) {
- $input_errors[] = "$impip is not an IP address. Please correct the error to continue";
+ $input_errors[] = sprintf(gettext("%s is not an IP address. Please correct the error to continue"), $impip);
} elseif (!empty($impip)) {
$imported[] = $impip;
}
@@ -127,31 +128,31 @@ include("head.inc");
<div id="inputerrors"></div>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Alias Import</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Alias Import"); ?></td>
</tr>
<tr>
- <td valign="top" class="vncellreq">Alias Name</td>
+ <td valign="top" class="vncellreq"><?=gettext("Alias Name"); ?></td>
<td class="vtable"> <input name="name" type="text" class="formfld unknown" id="name" size="40" value="<?=htmlspecialchars($_POST['name']);?>" />
<br /> <span class="vexpl">
- The name of the alias may only consist of the characters a-z, A-Z and 0-9.</span></td>
+ <?=gettext("The name of the alias may only consist of the characters \"a-z, A-Z and 0-9\"."); ?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable"> <input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($_POST['descr']);?>" />
- <br /> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br /> <span class="vexpl"><?=gettext("You may enter a description here " .
+ "for your reference (not parsed)"); ?>.</span></td>
</tr>
<tr>
- <td valign="top" class="vncellreq">Aliases to import</td>
+ <td valign="top" class="vncellreq"><?=gettext("Aliases to import"); ?></td>
<td class="vtable"><textarea name="aliasimport" ROWS="15" COLS="40"><?php echo $_POST['aliasimport']; ?></textarea>
- <br /> <span class="vexpl">Paste in the aliases to import separated by a carriage return. Common examples are lists of IPs, networks, blacklists, etc.
- <br /> The list may contain only IP addresses. </span></td>
+ <br /> <span class="vexpl"><?=gettext("Paste in the aliases to import separated by a carriage return. Common examples are lists of IPs, networks, blacklists, etc."); ?>
+ <br /> <?=gettext("The list may contain only IP addresses."); ?> </span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input id="submit" name="Submit" type="submit" class="formbtn" value="Save" />
- <input class="formbtn" type="button" value="Cancel" onclick="history.back()" />
+ <input id="submit" name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" />
+ <input class="formbtn" type="button" value="<?=gettext("Cancel"); ?>" onclick="history.back()" />
</tr>
</table>
diff --git a/usr/local/www/firewall_nat.php b/usr/local/www/firewall_nat.php
index 02a2595..9646f52 100755
--- a/usr/local/www/firewall_nat.php
+++ b/usr/local/www/firewall_nat.php
@@ -158,7 +158,7 @@ if (isset($_POST['del_x'])) {
}
}
-$pgtitle = array("Firewall","NAT","Port Forward");
+$pgtitle = array(gettext("Firewall"),gettext("NAT"),gettext("Port Forward"));
include("head.inc");
echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript/domTT/domLib.js\"></script>";
@@ -174,18 +174,18 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<?php if (is_subsystem_dirty('natconf')): ?><p>
<?php
if($savemsg)
- print_info_box_np("{$savemsg}<br>The NAT configuration has been changed.<br>You must apply the changes in order for them to take effect.");
- else
- print_info_box_np("The NAT configuration has been changed.<br>You must apply the changes in order for them to take effect.");
+ print_info_box_np("{$savemsg}<br>" . gettext("The NAT configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect.") );
+ else
+ print_info_box_np( gettext("The NAT configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect.") );
?>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
<?php
$tab_array = array();
- $tab_array[] = array("Port Forward", true, "firewall_nat.php");
- $tab_array[] = array("1:1", false, "firewall_nat_1to1.php");
- $tab_array[] = array("Outbound", false, "firewall_nat_out.php");
+ $tab_array[] = array(gettext("Port Forward"), true, "firewall_nat.php");
+ $tab_array[] = array(gettext("1:1"), false, "firewall_nat_1to1.php");
+ $tab_array[] = array(gettext("Outbound"), false, "firewall_nat_out.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -196,23 +196,23 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<tr id="frheader">
<td width="3%" class="list">&nbsp;</td>
<td width="3%" class="list">&nbsp;</td>
- <td width="5%" class="listhdrr">If</td>
- <td width="5%" class="listhdrr">Proto</td>
- <td width="11%" class="listhdrr">Src. addr</td>
- <td width="11%" class="listhdrr">Src. ports</td>
- <td width="11%" class="listhdrr">Dest. addr</td>
- <td width="11%" class="listhdrr">Dest. ports</td>
- <td width="11%" class="listhdrr">NAT IP</td>
- <td width="11%" class="listhdrr">NAT Ports</td>
- <td width="11%" class="listhdr">Description</td>
+ <td width="5%" class="listhdrr"><?=gettext("If");?></td>
+ <td width="5%" class="listhdrr"><?=gettext("Proto");?></td>
+ <td width="11%" class="listhdrr"><?=gettext("Src. addr");?></td>
+ <td width="11%" class="listhdrr"><?=gettext("Src. ports");?></td>
+ <td width="11%" class="listhdrr"><?=gettext("Dest. addr");?></td>
+ <td width="11%" class="listhdrr"><?=gettext("Dest. ports");?></td>
+ <td width="11%" class="listhdrr"><?=gettext("NAT IP");?></td>
+ <td width="11%" class="listhdrr"><?=gettext("NAT Ports");?></td>
+ <td width="11%" class="listhdr"><?=gettext("Description");?></td>
<td width="5%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17">
<?php if (count($a_nat) == 0): ?>
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="delete selected rules" border="0">
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" border="0">
<?php else: ?>
- <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="delete selected rules" onclick="return confirm('Do you really want to delete the selected rules?')">
+ <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="<?=gettext("delete selected rules"); ?>" onclick="return confirm('Do you really want to delete the selected rules?')">
<?php endif; ?>
</td>
<td><a href="firewall_nat_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
@@ -253,9 +253,9 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<td class="listt"><input type="checkbox" id="frc<?=$nnats;?>" name="rule[]" value="<?=$i;?>" onClick="fr_bgcolor('<?=$nnats;?>')" style="margin: 0; padding: 0; width: 15px; height: 15px;"></td>
<td class="listt" align="center">
<?php if($natent['associated-rule-id'] == "pass"): ?>
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass.gif" title="All traffic matching this NAT entry is passed" border="0">
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass.gif" title="<?=gettext("All traffic matching this NAT entry is passed"); ?>" border="0">
<?php elseif (!empty($natent['associated-rule-id'])): ?>
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_chain.png" width="17" height="17" title="Firewall rule ID <?=htmlspecialchars($nnatid); ?> is managed with this rule" border="0">
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_chain.png" width="17" height="17" title="<?=gettext("Firewall rule ID"); ?> <?=htmlspecialchars($nnatid); ?> <?=gettext("is managed with this rule"); ?>" border="0">
<?php endif; ?>
</td>
<td class="listlr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_edit.php?id=<?=$nnats;?>';">
@@ -310,12 +310,12 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<td valign="middle" class="list" nowrap>
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td><input onmouseover="fr_insline(<?=$nnats;?>, true)" onmouseout="fr_insline(<?=$nnats;?>, false)" name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" title="move selected rules before this rule" height="17" type="image" width="17" border="0"></td>
- <td><a href="firewall_nat_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="edit rule"></a></td>
+ <td><input onmouseover="fr_insline(<?=$nnats;?>, true)" onmouseout="fr_insline(<?=$nnats;?>, false)" name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" title="<?=gettext("move selected rules before this rule");?>" height="17" type="image" width="17" border="0"></td>
+ <td><a href="firewall_nat_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit rule"); ?>"></a></td>
</tr>
<tr>
- <td align="center" valign="middle"><a href="firewall_nat.php?act=del&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="delete rule" onclick="return confirm('Do you really want to delete this rule?')"></a></td>
- <td><a href="firewall_nat_edit.php?dup=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add a new nat based on this one" width="17" height="17" border="0"></a></td>
+ <td align="center" valign="middle"><a href="firewall_nat.php?act=del&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete rule");?> onclick="return confirm(<?=gettext('Do you really want to delete this rule?');?>)"></a></td>
+ <td><a href="firewall_nat_edit.php?dup=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new nat based on this one");?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</tr>
@@ -328,14 +328,14 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<td class="list" valign="middle" nowrap>
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected rules to end" border="0"><?php else: ?><input name="move_<?=$i;?>" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="move selected rules to end" border="0"><?php endif; ?></td>
+ <td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected rules to end"); ?>" border="0"><?php else: ?><input name="move_<?=$i;?>" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="<?=gettext("move selected rules to end");?>" border="0"><?php endif; ?></td>
</tr>
<tr>
<td width="17">
<?php if (count($a_nat) == 0): ?>
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="delete selected rules" border="0">
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" border="0">
<?php else: ?>
- <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="delete selected rules" onclick="return confirm('Do you really want to delete the selected rules?')">
+ <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="<?=gettext("delete selected rules"); ?>" onclick="return confirm(<?=gettext('Do you really want to delete the selected rules?');?>)">
<?php endif; ?>
</td>
<td><a href="firewall_nat_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
@@ -346,11 +346,11 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<tr><td>&nbsp;</td></tr>
<tr>
<td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass.gif" width="11" height="11"></td>
- <td colspan="3">pass</td>
+ <td colspan="3"><?=gettext("pass"); ?></td>
</tr>
<tr>
<td width="14"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_chain.png" width="11" height="11"></td>
- <td colspan="3">linked rule</td>
+ <td colspan="3"><?=gettext("linked rule");?></td>
</tr>
</table>
</div>
diff --git a/usr/local/www/firewall_nat_1to1.php b/usr/local/www/firewall_nat_1to1.php
index 15788da..74e0ce8 100755
--- a/usr/local/www/firewall_nat_1to1.php
+++ b/usr/local/www/firewall_nat_1to1.php
@@ -75,7 +75,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("Firewall","NAT","1:1");
+$pgtitle = array(gettext("Firewall"),gettext("NAT"),gettext("1:1"));
include("head.inc");
?>
@@ -84,14 +84,14 @@ include("head.inc");
<form action="firewall_nat_1to1.php" method="post">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('natconf')): ?><p>
-<?php print_info_box_np("The NAT configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The NAT configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td>
<?php
$tab_array = array();
- $tab_array[] = array("Port Forward", false, "firewall_nat.php");
- $tab_array[] = array("1:1", true, "firewall_nat_1to1.php");
- $tab_array[] = array("Outbound", false, "firewall_nat_out.php");
+ $tab_array[] = array(gettext("Port Forward"), false, "firewall_nat.php");
+ $tab_array[] = array(gettext("1:1"), true, "firewall_nat_1to1.php");
+ $tab_array[] = array(gettext("Outbound"), false, "firewall_nat_out.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -100,15 +100,15 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="10%" class="listhdrr">Interface</td>
- <td width="20%" class="listhdrr">External IP</td>
- <td width="20%" class="listhdrr">Internal IP</td>
- <td width="40%" class="listhdr">Description</td>
+ <td width="10%" class="listhdrr"><?=gettext("Interface"); ?></td>
+ <td width="20%" class="listhdrr"><?=gettext("External IP"); ?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Internal IP"); ?></td>
+ <td width="40%" class="listhdr"><?=gettext("Description"); ?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17"></td>
- <td valign="middle"><a href="firewall_nat_1to1_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="add rule"></a></td>
+ <td valign="middle"><a href="firewall_nat_1to1_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add rule"); ?>"></a></td>
</tr>
</table>
</td>
@@ -137,8 +137,8 @@ include("head.inc");
<td class="list" nowrap>
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td valign="middle"><a href="firewall_nat_1to1_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="edit rule"></a></td>
- <td valign="middle"><a href="firewall_nat_1to1.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this mapping?')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="delete rule"></a></td>
+ <td valign="middle"><a href="firewall_nat_1to1_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit rule"); ?>"></a></td>
+ <td valign="middle"><a href="firewall_nat_1to1.php?act=del&id=<?=$i;?>" onclick="return confirm(<?=gettext('Do you really want to delete this mapping?');?>)"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete rule"); ?>"></a></td>
</tr>
</table>
</td>
@@ -150,17 +150,17 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17"></td>
- <td valign="middle"><a href="firewall_nat_1to1_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="add rule"></a></td>
+ <td valign="middle"><a href="firewall_nat_1to1_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add rule"); ?>"></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="4">
- <p><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>Depending on the way your WAN connection is setup, you may also need a <a href="firewall_virtual_ip.php">Virtual IP</a>.<br/>
- If you add a 1:1 NAT entry for any of the interface IPs on this system, it will make this system inaccessible on that IP address. i.e. if
- you use your WAN IP address, any services on this system (IPsec, OpenVPN server, etc.) using the WAN IP address will no longer function.</span></p>
+ <p><span class="vexpl"><span class="red"><strong><?=gettext("Note"); ?>:<br>
+ </strong></span><?=gettext("Depending on the way your WAN connection is setup, you may also need a"); ?> <a href="firewall_virtual_ip.php"><?=gettext("Virtual IP"); ?></a>.<br/>
+ <?=gettext("If you add a 1:1 NAT entry for any of the interface IPs on this system, it will make this system inaccessible on that IP address. i.e. if " .
+ "you use your WAN IP address, any services on this system (IPsec, OpenVPN server, etc.) using the WAN IP address will no longer function."); ?></span></p>
</td>
<tr>
</table>
diff --git a/usr/local/www/firewall_nat_1to1_edit.php b/usr/local/www/firewall_nat_1to1_edit.php
index 4966e14..5057959 100755
--- a/usr/local/www/firewall_nat_1to1_edit.php
+++ b/usr/local/www/firewall_nat_1to1_edit.php
@@ -90,15 +90,15 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "interface external internal");
- $reqdfieldsn = explode(",", "Interface,External subnet,Internal subnet");
+ $reqdfieldsn = array(gettext("Interface"),gettext("External subnet"),gettext("Internal subnet"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['external'] && !is_ipaddr($_POST['external']))) {
- $input_errors[] = "A valid external subnet must be specified.";
+ $input_errors[] = gettext("A valid external subnet must be specified.");
}
if (($_POST['internal'] && !is_ipaddr($_POST['internal']))) {
- $input_errors[] = "A valid internal subnet must be specified.";
+ $input_errors[] = gettext("A valid internal subnet must be specified.");
}
/* check for overlaps with other 1:1 */
@@ -144,7 +144,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Firewall","NAT","1:1","Edit");
+$pgtitle = array(gettext("Firewall"),gettext("NAT"),gettext("1:1"),gettext("Edit"));
include("head.inc");
?>
@@ -155,10 +155,10 @@ include("head.inc");
<form action="firewall_nat_1to1_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Edit NAT 1:1 entry</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit NAT 1:1 entry"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Interface</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface"); ?></td>
<td width="78%" class="vtable">
<select name="interface" class="formselect">
<?php
@@ -195,11 +195,11 @@ include("head.inc");
</option>
<?php endforeach; ?>
</select><br>
- <span class="vexpl">Choose which interface this rule applies to.<br>
- Hint: in most cases, you'll want to use WAN here.</span></td>
+ <span class="vexpl"><?=gettext("Choose which interface this rule applies to"); ?>.<br>
+ <?=gettext("Hint: in most cases, you'll want to use WAN here"); ?>.</span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">External subnet</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("External subnet"); ?></td>
<td width="78%" class="vtable">
<input name="external" type="text" class="formfld unknown" id="external" size="20" value="<?=htmlspecialchars($pconfig['external']);?>">
<select name="subnet" class="formselect" id="subnet" >
@@ -210,36 +210,36 @@ include("head.inc");
<?php endfor; ?>
</select>
<br>
- <span class="vexpl">Enter the external (WAN) subnet for the 1:1 mapping. You may map single IP addresses by specifying a /32 subnet.</span></td>
+ <span class="vexpl"><?=gettext("Enter the external (WAN) subnet for the 1:1 mapping. You may map single IP addresses by specifying a /32 subnet."); ?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Internal subnet</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Internal subnet"); ?></td>
<td width="78%" class="vtable">
<input name="internal" type="text" class="formfld unknown" id="internal" size="20" value="<?=htmlspecialchars($pconfig['internal']);?>">
<br>
- <span class="vexpl">Enter the internal (LAN) subnet for the 1:1 mapping. The subnet size specified for the external subnet also applies to the internal subnet (they have to be the same).</span></td>
+ <span class="vexpl"><?=gettext("Enter the internal (LAN) subnet for the 1:1 mapping. The subnet size specified for the external subnet also applies to the internal subnet (they have to be the same)."); ?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here " .
+ "for your reference (not parsed)."); ?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">NAT reflection</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("NAT reflection"); ?></td>
<td width="78%" class="vtable">
<select name="natreflection" class="formselect">
- <option value="default" <?php if ($pconfig['natreflection'] != "enable" && $pconfig['natreflection'] != "disable") echo "selected"; ?>>use system default</option>
- <option value="enable" <?php if ($pconfig['natreflection'] == "enable") echo "selected"; ?>>enable</option>
- <option value="disable" <?php if ($pconfig['natreflection'] == "disable") echo "selected"; ?>>disable</option>
+ <option value="default" <?php if ($pconfig['natreflection'] != "enable" && $pconfig['natreflection'] != "disable") echo "selected"; ?>><?=gettext("use system default"); ?></option>
+ <option value="enable" <?php if ($pconfig['natreflection'] == "enable") echo "selected"; ?>><?=gettext("enable"); ?></option>
+ <option value="disable" <?php if ($pconfig['natreflection'] == "disable") echo "selected"; ?>><?=gettext("disable"); ?></option>
</select>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input type="button" class="formbtn" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"> <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
<?php if (isset($id) && $a_1to1[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/firewall_nat_edit.php b/usr/local/www/firewall_nat_edit.php
index 3f06928..7a7b807 100755
--- a/usr/local/www/firewall_nat_edit.php
+++ b/usr/local/www/firewall_nat_edit.php
@@ -105,7 +105,7 @@ foreach ($_POST as $key => $value) {
$temp = $value;
$newpost = htmlentities($temp);
if($newpost <> $temp)
- $input_errors[] = "Invalid characters detected ($temp). Please remove invalid characters and save again.";
+ $input_errors[] = sprintf(gettext("Invalid characters detected %s. Please remove invalid characters and save again."), $temp);
}
if ($_POST) {
@@ -179,19 +179,19 @@ if ($_POST) {
/* input validation */
if(strtoupper($_POST['proto']) == "TCP" or strtoupper($_POST['proto']) == "UDP" or strtoupper($_POST['proto']) == "TCP/UDP") {
$reqdfields = explode(" ", "interface proto dstbeginport dstendport localip");
- $reqdfieldsn = explode(",", "Interface,Protocol,Destination port from,Destination port to,NAT IP");
+ $reqdfieldsn = array(gettext("Interface"),gettext("Protocol"),gettext("Destination port from"),gettext("Destination port to"),gettext("NAT IP"));
} else {
$reqdfields = explode(" ", "interface proto localip");
- $reqdfieldsn = explode(",", "Interface,Protocol,NAT IP");
+ $reqdfieldsn = array(gettext("Interface"),gettext("Protocol"),gettext("NAT IP"));
}
if ($_POST['srctype'] == "single" || $_POST['srctype'] == "network") {
$reqdfields[] = "src";
- $reqdfieldsn[] = "Source address";
+ $reqdfieldsn[] = gettext("Source address");
}
if ($_POST['dsttype'] == "single" || $_POST['dsttype'] == "network") {
$reqdfields[] = "dst";
- $reqdfieldsn[] = "Destination address";
+ $reqdfieldsn[] = gettext("Destination address");
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -206,42 +206,42 @@ if ($_POST) {
}
if (($_POST['localip'] && !is_ipaddroralias($_POST['localip']))) {
- $input_errors[] = "\"{$_POST['localip']}\" is not valid NAT IP address or host alias.";
+ $input_errors[] = sprintf(gettext("\"%s\" is not valid NAT IP address or host alias."), $_POST['localip']);
}
if ($_POST['srcbeginport'] && !is_portoralias($_POST['srcbeginport']))
- $input_errors[] = "{$_POST['srcbeginport']} is not a valid start source port. It must be a port alias or integer between 1 and 65535.";
+ $input_errors[] = sprintf(gettext("%s is not a valid start source port. It must be a port alias or integer between 1 and 65535."), $_POST['srcbeginport']);
if ($_POST['srcendport'] && !is_portoralias($_POST['srcendport']))
- $input_errors[] = "{$_POST['srcendport']} is not a valid end source port. It must be a port alias or integer between 1 and 65535.";
+ $input_errors[] = sprintf(gettext("%s is not a valid end source port. It must be a port alias or integer between 1 and 65535."), $_POST['srcendport']);
if ($_POST['dstbeginport'] && !is_portoralias($_POST['dstbeginport']))
- $input_errors[] = "{$_POST['dstbeginport']} is not a valid start destination port. It must be a port alias or integer between 1 and 65535.";
+ $input_errors[] = sprintf(gettext("%s is not a valid start destination port. It must be a port alias or integer between 1 and 65535."), $_POST['dstbeginport']);
if ($_POST['dstendport'] && !is_portoralias($_POST['dstendport']))
- $input_errors[] = "{$_POST['dstendport']} is not a valid end destination port. It must be a port alias or integer between 1 and 65535.";
+ $input_errors[] = sprintf(gettext("%s is not a valid end destination port. It must be a port alias or integer between 1 and 65535."), $_POST['dstendport']);
if ($_POST['localbeginport'] && !is_portoralias($_POST['localbeginport'])) {
- $input_errors[] = "{$_POST['localbeginport']} is not a valid local port. It must be a port alias or integer between 1 and 65535.";
+ $input_errors[] = sprintf(gettext("%s is not a valid local port. It must be a port alias or integer between 1 and 65535."), $_POST['localbeginport']);
}
/* if user enters an alias and selects "network" then disallow. */
if( ($_POST['srctype'] == "network" && is_alias($_POST['src']) )
|| ($_POST['dsttype'] == "network" && is_alias($_POST['dst']) ) ) {
- $input_errors[] = "You must specify single host or alias for alias entries.";
+ $input_errors[] = gettext("You must specify single host or alias for alias entries.");
}
if (!is_specialnet($_POST['srctype'])) {
if (($_POST['src'] && !is_ipaddroralias($_POST['src']))) {
- $input_errors[] = "{$_POST['src']} is not a valid source IP address or alias.";
+ $input_errors[] = sprintf(gettext("%s is not a valid source IP address or alias."), $_POST['src']);
}
if (($_POST['srcmask'] && !is_numericint($_POST['srcmask']))) {
- $input_errors[] = "A valid source bit count must be specified.";
+ $input_errors[] = gettext("A valid source bit count must be specified.");
}
}
if (!is_specialnet($_POST['dsttype'])) {
if (($_POST['dst'] && !is_ipaddroralias($_POST['dst']))) {
- $input_errors[] = "{$_POST['dst']} is not a valid destination IP address or alias.";
+ $input_errors[] = sprintf(gettext("%s is not a valid destination IP address or alias."), $_POST['dst']);
}
if (($_POST['dstmask'] && !is_numericint($_POST['dstmask']))) {
- $input_errors[] = "A valid destination bit count must be specified.";
+ $input_errors[] = gettext("A valid destination bit count must be specified.");
}
}
@@ -260,7 +260,7 @@ if ($_POST) {
if (!$input_errors) {
if (($_POST['dstendport'] - $_POST['dstbeginport'] + $_POST['localbeginport']) > 65535)
- $input_errors[] = "The target port range must be an integer between 1 and 65535.";
+ $input_errors[] = gettext("The target port range must be an integer between 1 and 65535.");
}
/* check for overlaps */
@@ -281,7 +281,7 @@ if ($_POST) {
if (!( (($_POST['beginport'] < $begp) && ($_POST['endport'] < $begp))
|| (($_POST['beginport'] > $endp) && ($_POST['endport'] > $endp)))) {
- $input_errors[] = "The destination port range overlaps with an existing entry.";
+ $input_errors[] = gettext("The destination port range overlaps with an existing entry.");
break;
}
}
@@ -421,7 +421,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Firewall","NAT","Port Forward: Edit");
+$pgtitle = array(gettext("Firewall"),gettext("NAT"),gettext("Port Forward"),gettext("Edit"));
include("head.inc");
?>
@@ -433,26 +433,26 @@ include("fbegin.inc"); ?>
<form action="firewall_nat_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Edit Redirect entry</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Redirect entry"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Disabled</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled"); ?></td>
<td width="78%" class="vtable">
<input name="disabled" type="checkbox" id="disabled" value="yes" <?php if ($pconfig['disabled']) echo "checked"; ?>>
- <strong>Disable this rule</strong><br />
- <span class="vexpl">Set this option to disable this rule without removing it from the list.</span>
+ <strong><?=gettext("Disable this rule"); ?></strong><br />
+ <span class="vexpl"><?=gettext("Set this option to disable this rule without removing it from the list."); ?></span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">No RDR (NOT)</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("No RDR (NOT)"); ?></td>
<td width="78%" class="vtable">
<input type="checkbox" name="nordr"<?php if($pconfig['nordr']) echo " CHECKED"; ?>>
- <span class="vexpl">Enabling this option will disable redirection for traffic matching this rule.
- <br>Hint: this option is rarely needed, don't use this unless you know what you're doing.</span>
+ <span class="vexpl"><?=gettext("Enabling this option will disable redirection for traffic matching this rule."); ?>
+ <br><?=gettext("Hint: this option is rarely needed, don't use this unless you know what you're doing."); ?></span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Interface</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface"); ?></td>
<td width="78%" class="vtable">
<select name="interface" class="formselect" onChange="dst_change(this.value,iface_old,document.iform.dsttype.value);iface_old = document.iform.interface.value;typesel_change();">
<?php
@@ -489,60 +489,60 @@ include("fbegin.inc"); ?>
</option>
<?php endforeach; ?>
</select><br>
- <span class="vexpl">Choose which interface this rule applies to.<br>
- Hint: in most cases, you'll want to use WAN here.</span></td>
+ <span class="vexpl"><?=gettext("Choose which interface this rule applies to."); ?><br>
+ <?=gettext("Hint: in most cases, you'll want to use WAN here."); ?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Protocol</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Protocol"); ?></td>
<td width="78%" class="vtable">
<select name="proto" class="formselect" onChange="proto_change(); check_for_aliases();">
<?php $protocols = explode(" ", "TCP UDP TCP/UDP GRE ESP"); foreach ($protocols as $proto): ?>
<option value="<?=strtolower($proto);?>" <?php if (strtolower($proto) == $pconfig['proto']) echo "selected"; ?>><?=htmlspecialchars($proto);?></option>
<?php endforeach; ?>
- </select> <br> <span class="vexpl">Choose which IP protocol
- this rule should match.<br>
- Hint: in most cases, you should specify <em>TCP</em> &nbsp;here.</span></td>
+ </select> <br> <span class="vexpl"><?=gettext("Choose which IP protocol " .
+ "this rule should match."); ?><br>
+ <?=gettext("Hint: in most cases, you should specify"); ?> <em>TCP</em> &nbsp;<?=gettext("here"); ?>.</span></td>
</tr>
<tr id="showadvancedboxsrc" name="showadvancedboxsrc">
- <td width="22%" valign="top" class="vncellreq">Source</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Source"); ?></td>
<td width="78%" class="vtable">
- <input type="button" onClick="show_source()" value="Advanced"></input> - Show source address and port range</a>
+ <input type="button" onClick="show_source()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show source address and port range"); ?></a>
</td>
</tr>
<tr style="display: none;" id="srctable" name="srctable">
- <td width="22%" valign="top" class="vncellreq">Source</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Source"); ?></td>
<td width="78%" class="vtable">
<input name="srcnot" type="checkbox" id="srcnot" value="yes" <?php if ($pconfig['srcnot']) echo "checked"; ?>>
- <strong>not</strong>
+ <strong><?=gettext("not"); ?></strong>
<br />
- Use this option to invert the sense of the match.
+ <?=gettext("Use this option to invert the sense of the match"); ?>.
<br />
<br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td>Type:&nbsp;&nbsp;</td>
+ <td><?=gettext("Type"); ?>:&nbsp;&nbsp;</td>
<td>
<select name="srctype" class="formselect" onChange="typesel_change()">
<?php
$sel = is_specialnet($pconfig['src']); ?>
- <option value="any" <?php if ($pconfig['src'] == "any") { echo "selected"; } ?>>any</option>
- <option value="single" <?php if (($pconfig['srcmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>>Single host or alias</option>
- <option value="network" <?php if (!$sel) echo "selected"; ?>>Network</option>
+ <option value="any" <?php if ($pconfig['src'] == "any") { echo "selected"; } ?>><?=gettext("any"); ?></option>
+ <option value="single" <?php if (($pconfig['srcmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>><?=gettext("Single host or alias"); ?></option>
+ <option value="network" <?php if (!$sel) echo "selected"; ?>><?=gettext("Network"); ?></option>
<?php if(have_ruleint_access("pptp")): ?>
- <option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo "selected"; } ?>>PPTP clients</option>
+ <option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo "selected"; } ?>><?=gettext("PPTP clients"); ?></option>
<?php endif; ?>
<?php if(have_ruleint_access("pppoe")): ?>
- <option value="pppoe" <?php if ($pconfig['src'] == "pppoe") { echo "selected"; } ?>>PPPoE clients</option>
+ <option value="pppoe" <?php if ($pconfig['src'] == "pppoe") { echo "selected"; } ?>><?=gettext("PPPoE clients"); ?></option>
<?php endif; ?>
<?php if(have_ruleint_access("l2tp")): ?>
- <option value="l2tp" <?php if ($pconfig['src'] == "l2tp") { echo "selected"; } ?>>L2TP clients</option>
- <?php endif; ?>
+ <option value="l2tp" <?php if ($pconfig['src'] == "l2tp") { echo "selected"; } ?>><?=gettext("L2TP clients"); ?></option>
+ <?php endif; ?>
<?php
foreach ($ifdisp as $ifent => $ifdesc): ?>
<?php if(have_ruleint_access($ifent)): ?>
- <option value="<?=$ifent;?>" <?php if ($pconfig['src'] == $ifent) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?> subnet</option>
+ <option value="<?=$ifent;?>" <?php if ($pconfig['src'] == $ifent) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?> <?=gettext("subnet"); ?></option>
<option value="<?=$ifent;?>ip"<?php if ($pconfig['src'] == $ifent . "ip") { echo "selected"; } ?>>
- <?=$ifdesc?> address
+ <?=$ifdesc?> <?=gettext("address");?>
</option>
<?php endif; ?>
<?php endforeach; ?>
@@ -550,7 +550,7 @@ include("fbegin.inc"); ?>
</td>
</tr>
<tr>
- <td>Address:&nbsp;&nbsp;</td>
+ <td><?=gettext("Address"); ?>:&nbsp;&nbsp;</td>
<td>
<input autocomplete='off' name="src" type="text" class="formfldalias" id="src" size="20" value="<?php if (!is_specialnet($pconfig['src'])) echo htmlspecialchars($pconfig['src']);?>"> /
<select name="srcmask" class="formselect" id="srcmask">
@@ -564,15 +564,15 @@ include("fbegin.inc"); ?>
</td>
</tr>
<tr style="display:none" id="sprtable" name="sprtable">
- <td width="22%" valign="top" class="vncellreq">Source port range</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Source port range"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td>from:&nbsp;&nbsp;</td>
+ <td><?=gettext("from"); ?>:&nbsp;&nbsp;</td>
<td>
<select name="srcbeginport" class="formselect" onchange="src_rep_change();ext_change()">
- <option value="">(other)</option>
- <option value="any" <?php $bfound = 0; if ($pconfig['srcbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>>any</option>
+ <option value="">(<?=gettext("other"); ?>)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['srcbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any"); ?></option>
<?php foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcbeginport']) { echo "selected"; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
<?php endforeach; ?>
@@ -581,11 +581,11 @@ include("fbegin.inc"); ?>
</td>
</tr>
<tr>
- <td>to:</td>
+ <td><?=gettext("to"); ?>:</td>
<td>
<select name="srcendport" class="formselect" onchange="ext_change()">
- <option value="">(other)</option>
- <option value="any" <?php $bfound = 0; if ($pconfig['srcendport'] == "any") { echo "selected"; $bfound = 1; } ?>>any</option>
+ <option value="">(<?=gettext("other"); ?>)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['srcendport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any"); ?></option>
<?php foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcendport']) { echo "selected"; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
<?php endforeach; ?>
@@ -595,43 +595,43 @@ include("fbegin.inc"); ?>
</tr>
</table>
<br />
- <span class="vexpl"><?=gettext("Specify the source port or port range for this rule. <b>This is usually <em>random</em> and almost never equal to the destination port range (and should usually be &quot;any&quot;).</b> <br /> Hint: you can leave the <em>'to'</em> field empty if you only want to filter a single port.");?></span><br/>
+ <span class="vexpl"><?=gettext("Specify the source port or port range for this rule"); ?>. <b><?=gettext("This is usually"); ?> <em><?=gettext("random"); ?></em> <?=gettext("and almost never equal to the destination port range (and should usually be 'any')"); ?>.</b> <br /> <?=gettext("Hint: you can leave the"); ?> <em>'<?=gettext("to"); ?>'</em> <?=gettext("field empty if you only want to filter a single port."); ?></span><br/>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Destination</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Destination"); ?></td>
<td width="78%" class="vtable">
<input name="dstnot" type="checkbox" id="dstnot" value="yes" <?php if ($pconfig['dstnot']) echo "checked"; ?>>
- <strong>not</strong>
+ <strong><?=gettext("not"); ?></strong>
<br />
- Use this option to invert the sense of the match.
+ <?=gettext("Use this option to invert the sense of the match"); ?>.
<br />
<br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td>Type:&nbsp;&nbsp;</td>
+ <td><?=gettext("Type"); ?>:&nbsp;&nbsp;</td>
<td>
<select name="dsttype" class="formselect" onChange="typesel_change()">
<?php
$sel = is_specialnet($pconfig['dst']); ?>
- <option value="any" <?php if ($pconfig['dst'] == "any") { echo "selected"; } ?>>any</option>
- <option value="single" <?php if (($pconfig['dstmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>>Single host or alias</option>
- <option value="network" <?php if (!$sel) echo "selected"; ?>>Network</option>
+ <option value="any" <?php if ($pconfig['dst'] == "any") { echo "selected"; } ?>><?=gettext("any"); ?></option>
+ <option value="single" <?php if (($pconfig['dstmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>><?=gettext("Single host or alias"); ?></option>
+ <option value="network" <?php if (!$sel) echo "selected"; ?>><?=gettext("Network"); ?></option>
<?php if(have_ruleint_access("pptp")): ?>
- <option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo "selected"; } ?>>PPTP clients</option>
+ <option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo "selected"; } ?>><?=gettext("PPTP clients"); ?></option>
<?php endif; ?>
<?php if(have_ruleint_access("pppoe")): ?>
- <option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo "selected"; } ?>>PPPoE clients</option>
+ <option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo "selected"; } ?>><?=gettext("PPPoE clients"); ?></option>
<?php endif; ?>
<?php if(have_ruleint_access("l2tp")): ?>
- <option value="l2tp" <?php if ($pconfig['dst'] == "l2tp") { echo "selected"; } ?>>L2TP clients</option>
+ <option value="l2tp" <?php if ($pconfig['dst'] == "l2tp") { echo "selected"; } ?>><?=gettext("L2TP clients"); ?></option>
<?php endif; ?>
<?php foreach ($ifdisp as $if => $ifdesc): ?>
<?php if(have_ruleint_access($if)): ?>
- <option value="<?=$if;?>" <?php if ($pconfig['dst'] == $if) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?> subnet</option>
+ <option value="<?=$if;?>" <?php if ($pconfig['dst'] == $if) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?> <?=gettext("subnet"); ?></option>
<option value="<?=$if;?>ip"<?php if ($pconfig['dst'] == $if . "ip") { echo "selected"; } ?>>
- <?=$ifdesc;?> address
+ <?=$ifdesc;?> <?=gettext("address");?>
</option>
<?php endif; ?>
<?php endforeach; ?>
@@ -658,7 +658,7 @@ include("fbegin.inc"); ?>
</td>
</tr>
<tr>
- <td>Address:&nbsp;&nbsp;</td>
+ <td><?=gettext("Address"); ?>:&nbsp;&nbsp;</td>
<td>
<input name="dst" type="text" class="formfldalias" id="dst" size="20" value="<?php if (!is_specialnet($pconfig['dst'])) echo htmlspecialchars($pconfig['dst']);?>">
/
@@ -674,14 +674,14 @@ include("fbegin.inc"); ?>
</td>
</tr>
<tr id="dprtr" name="dprtr">
- <td width="22%" valign="top" class="vncellreq">Destination port range </td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Destination port range"); ?> </td>
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td>from:&nbsp;&nbsp;</td>
+ <td><?=gettext("from"); ?>:&nbsp;&nbsp;</td>
<td>
<select name="dstbeginport" class="formselect" onchange="dst_rep_change();ext_change()">
- <option value="">(other)</option>
+ <option value="">(<?=gettext("other"); ?>)</option>
<?php $bfound = 0;
foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstbeginport']) { echo "selected"; $bfound = 1; }?>><?=htmlspecialchars($wkportdesc);?></option>
@@ -691,10 +691,10 @@ include("fbegin.inc"); ?>
</td>
</tr>
<tr>
- <td>to:</td>
+ <td><?=gettext("to"); ?>:</td>
<td>
<select name="dstendport" class="formselect" onchange="ext_change()">
- <option value="">(other)</option>
+ <option value="">(<?=gettext("other"); ?>)</option>
<?php $bfound = 0;
foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstendport']) { echo "selected"; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
@@ -706,25 +706,25 @@ include("fbegin.inc"); ?>
</table>
<br />
<span class="vexpl">
- Specify the port or port range for the destination of the packet for this mapping.
+ <?=gettext("Specify the port or port range for the destination of the packet for this mapping"); ?>.
<br />
- Hint: you can leave the <em>'to'</em> field empty if you only want to map a single port
+ <?=gettext("Hint: you can leave the"); ?> <em>'<?=gettext("to"); ?>'</em> <?=gettext("field empty if you only want to map a single port"); ?>
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Redirect target IP</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Redirect target IP"); ?></td>
<td width="78%" class="vtable">
<input autocomplete='off' name="localip" type="text" class="formfldalias" id="localip" size="20" value="<?=htmlspecialchars($pconfig['localip']);?>">
- <br> <span class="vexpl">Enter the internal IP address of
- the server on which you want to map the ports.<br>
- e.g. <em>192.168.1.12</em></span></td>
+ <br> <span class="vexpl"><?=gettext("Enter the internal IP address of " .
+ "the server on which you want to map the ports"); ?>.<br>
+ <?=gettext("e.g."); ?> <em>192.168.1.12</em></span></td>
</tr>
<tr name="lprtr" id="lprtr">
- <td width="22%" valign="top" class="vncellreq">Redirect target port</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Redirect target port"); ?></td>
<td width="78%" class="vtable">
<select name="localbeginport" class="formselect" onChange="ext_change();check_for_aliases();">
- <option value="">(other)</option>
+ <option value="">(<?=gettext("other"); ?>)</option>
<?php $bfound = 0; foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['localbeginport']) {
echo "selected";
@@ -735,42 +735,42 @@ include("fbegin.inc"); ?>
<?php endforeach; ?>
</select> <input onChange="check_for_aliases();" autocomplete='off' class="formfldalias" name="localbeginport_cust" id="localbeginport_cust" type="text" size="5" value="<?php if (!$bfound) echo $pconfig['localbeginport']; ?>">
<br>
- <span class="vexpl">Specify the port on the machine with the
- IP address entered above. In case of a port range, specify
- the beginning port of the range (the end port will be calculated
- automatically).<br>
- Hint: this is usually identical to the 'from' port above</span></td>
+ <span class="vexpl"><?=gettext("Specify the port on the machine with the " .
+ "IP address entered above. In case of a port range, specify " .
+ "the beginning port of the range (the end port will be calculated " .
+ "automatically)"); ?>.<br>
+ <?=gettext("Hint: this is usually identical to the 'from' port above"); ?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here " .
+ "for your reference (not parsed)"); ?>.</span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">No XMLRPC Sync</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("No XMLRPC Sync"); ?></td>
<td width="78%" class="vtable">
<input type="checkbox" value="yes" name="nosync"<?php if($pconfig['nosync']) echo " CHECKED"; ?>><br>
- HINT: This prevents the rule from automatically syncing to other CARP members.
+ <?=gettext("HINT: This prevents the rule from automatically syncing to other CARP members"); ?>.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">NAT reflection</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("NAT reflection"); ?></td>
<td width="78%" class="vtable">
<select name="natreflection" class="formselect">
- <option value="default" <?php if ($pconfig['natreflection'] != "enable" && $pconfig['natreflection'] != "disable") echo "selected"; ?>>use system default</option>
- <option value="enable" <?php if ($pconfig['natreflection'] == "enable") echo "selected"; ?>>enable</option>
- <option value="disable" <?php if ($pconfig['natreflection'] == "disable") echo "selected"; ?>>disable</option>
+ <option value="default" <?php if ($pconfig['natreflection'] != "enable" && $pconfig['natreflection'] != "disable") echo "selected"; ?>><?=gettext("use system default"); ?></option>
+ <option value="enable" <?php if ($pconfig['natreflection'] == "enable") echo "selected"; ?>><?=gettext("enable"); ?></option>
+ <option value="disable" <?php if ($pconfig['natreflection'] == "disable") echo "selected"; ?>><?=gettext("disable"); ?></option>
</select>
</td>
</tr>
<?php if (isset($id) && $a_nat[$id] && !isset($_GET['dup'])): ?>
<tr>
- <td width="22%" valign="top" class="vncell">Filter rule association</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Filter rule association"); ?></td>
<td width="78%" class="vtable">
<select name="associated-rule-id">
- <option value="">None</option>
+ <option value=""><?=gettext("None"); ?></option>
<option value="pass" <?php if($pconfig['associated-rule-id'] == "pass") echo " SELECTED"; ?>>Pass</option>
<?php
$linkedrule = "";
@@ -781,7 +781,7 @@ include("fbegin.inc"); ?>
echo "<option value=\"{$filter_rule['associated-rule-id']}\"";
if ($filter_rule['associated-rule-id']==$pconfig['associated-rule-id']) {
echo " SELECTED";
- $linkedrule = "<br /><a href=\"firewall_rules_edit.php?id={$filter_id}\">View the filter rule</a><br/>";
+ $linkedrule = sprintf("<br /><a href=\"firewall_rules_edit.php?id=%s\">%s</a><br/>", $filter_id, gettext("View the filter rule"));
}
echo ">". htmlspecialchars('Rule ' . $filter_rule['descr']) . "</option>\n";
@@ -791,7 +791,7 @@ include("fbegin.inc"); ?>
}
}
if (isset($pconfig['associated-rule-id']))
- echo "<option value=\"new\">Create new associated filter rule</option>\n";
+ echo "<option value=\"new\">" . gettext("Create new associated filter rule") . "</option>\n";
echo "</select>\n";
echo $linkedrule;
?>
@@ -800,13 +800,13 @@ include("fbegin.inc"); ?>
<?php endif; ?>
<?php if ((!(isset($id) && $a_nat[$id])) || (isset($_GET['dup']))): ?>
<tr>
- <td width="22%" valign="top" class="vncell">Filter rule association</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Filter rule association"); ?></td>
<td width="78%" class="vtable">
<select name="filter-rule-association" id="filter-rule-association">
- <option value="">None</option>
- <option value="add-associated" selected="selected">Add associated filter rule</option>
- <option value="add-unassociated">Add unassociated filter rule</option>
- <option value="pass">Pass</option>
+ <option value=""><?=gettext("None"); ?></option>
+ <option value="add-associated" selected="selected"><?=gettext("Add associated filter rule"); ?></option>
+ <option value="add-unassociated"><?=gettext("Add unassociated filter rule"); ?></option>
+ <option value="pass"><?=gettext("Pass"); ?></option>
</select>
</td>
</tr><?php endif; ?>
@@ -817,7 +817,7 @@ include("fbegin.inc"); ?>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input type="button" class="formbtn" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"> <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
<?php if (isset($id) && $a_nat[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/firewall_nat_out.php b/usr/local/www/firewall_nat_out.php
index e216516..2039848 100755
--- a/usr/local/www/firewall_nat_out.php
+++ b/usr/local/www/firewall_nat_out.php
@@ -108,7 +108,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
$natent = array();
$natent['source']['network'] = "{$osn}/{$ossubnet}";
$natent['dstport'] = "500";
- $natent['descr'] = "Auto created rule for ISAKMP - {$ifdesc} to {$ifdesc2}";
+ $natent['descr'] = sprintf(gettext("Auto created rule for ISAKMP - %s to %s"),$ifdesc,$ifdesc2);
$natent['target'] = "";
$natent['interface'] = $if2;
$natent['destination']['any'] = true;
@@ -118,7 +118,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
$natent = array();
$natent['source']['network'] = "{$osn}/{$ossubnet}";
$natent['dstport'] = "5060";
- $natent['descr'] = "Auto created rule for SIP - {$ifdesc} to {$ifdesc2}";
+ $natent['descr'] = sprintf(gettext("Auto created rule for SIP - %s to %s"),$ifdesc,$ifdesc2);
$natent['target'] = "";
$natent['interface'] = $if2;
$natent['destination']['any'] = true;
@@ -128,7 +128,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
$natent = array();
$natent['source']['network'] = "{$osn}/{$ossubnet}";
$natent['sourceport'] = "";
- $natent['descr'] = "Auto created rule for {$ifdesc} to {$ifdesc2}";
+ $natent['descr'] = sprintf(gettext("Auto created rule for %s to %s"),$ifdesc,$ifdesc2);
$natent['target'] = "";
$natent['interface'] = $if2;
$natent['destination']['any'] = true;
@@ -146,7 +146,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
$natent = array();
$natent['source']['network'] = "{$osn}/{$ossubnet}";
$natent['sourceport'] = "";
- $natent['descr'] = "Auto created rule for PPTP server";
+ $natent['descr'] = gettext("Auto created rule for PPTP server");
$natent['target'] = "";
$natent['interface'] = $if2;
$natent['destination']['any'] = true;
@@ -165,7 +165,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
$natent = array();
$natent['source']['network'] = "{$osn}/{$ossubnet}";
$natent['sourceport'] = "";
- $natent['descr'] = "Auto created rule for PPPoE server";
+ $natent['descr'] = gettext("Auto created rule for PPPoE server");
$natent['target'] = "";
$natent['interface'] = $if2;
$natent['destination']['any'] = true;
@@ -184,7 +184,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
$natent = array();
$natent['source']['network'] = "{$osn}/{$ossubnet}";
$natent['sourceport'] = "";
- $natent['descr'] = "Auto created rule for L2TP server";
+ $natent['descr'] = gettext("Auto created rule for L2TP server");
$natent['target'] = "";
$natent['interface'] = $if2;
$natent['destination']['any'] = true;
@@ -198,7 +198,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
$natent = array();
$natent['source']['network'] = $ovpnsrv['tunnel_network'];
$natent['sourceport'] = "";
- $natent['descr'] = "Auto created rule for OpenVPN server";
+ $natent['descr'] = gettext("Auto created rule for OpenVPN server");
$natent['target'] = "";
$natent['interface'] = $if2;
$natent['destination']['any'] = true;
@@ -209,7 +209,7 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
}
}
- $savemsg = "Default rules for each interface have been created.";
+ $savemsg = gettext("Default rules for each interface have been created.");
}
break;
}
@@ -280,7 +280,7 @@ if (isset($_POST['del_x'])) {
}
-$pgtitle = array("Firewall","NAT","Outbound");
+$pgtitle = array(gettext("Firewall"),gettext("NAT"),gettext("Outbound"));
include("head.inc");
?>
@@ -291,14 +291,14 @@ include("head.inc");
</script>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('natconf')): ?><p>
-<?php print_info_box_np("The NAT configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The NAT configuration has been changed.")."<br>".gettext("You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td>
<?php
$tab_array = array();
- $tab_array[] = array("Port Forward", false, "firewall_nat.php");
+ $tab_array[] = array(gettext("Port Forward"), false, "firewall_nat.php");
$tab_array[] = array("1:1", false, "firewall_nat_1to1.php");
- $tab_array[] = array("Outbound", true, "firewall_nat_out.php");
+ $tab_array[] = array(gettext("Outbound"), true, "firewall_nat_out.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -306,17 +306,17 @@ include("head.inc");
<td>
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr><td align="right"><b>Mode:</b></td>
+ <tr><td align="right"><b><?=gettext("Mode"); ?>:</b></td>
<td>
&nbsp;&nbsp;<input name="advancedoripsec" type="radio" id="ipsecpassthru" value="ipsecpassthru" <?php if (isset($config['nat']['ipsecpassthru']['enable'])) echo "checked";?>>
- <strong><?=gettext("Automatic outbound NAT rule generation<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(IPsec passthrough included)");?></strong>
+ <strong><?=gettext("Automatic outbound NAT rule generation"); ?><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?=gettext("(IPsec passthrough included)");?></strong>
</td>
<td>
&nbsp;&nbsp;<input name="advancedoripsec" type="radio" id="advancedoutbound" value="advancedoutboundnat" <?php if (isset($config['nat']['advancedoutbound']['enable'])) echo "checked";?>>
- <strong><?=gettext("Manual Outbound NAT rule generation<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(AON - Advanced Outbound NAT)");?></strong></td>
+ <strong><?=gettext("Manual Outbound NAT rule generation") . "<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" . gettext("(AON - Advanced Outbound NAT)");?></strong></td>
<td valign="middle" align="left">
- <input name="save" type="submit" class="formbtn" value="Save">
+ <input name="save" type="submit" class="formbtn" value="<?=gettext("Save");?>">
&nbsp;<br/>&nbsp;
</td>
</tr>
@@ -332,25 +332,25 @@ include("head.inc");
</tr>
</table>
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr><td colspan="5"><b>&nbsp;Mappings:</b></td></tr>
+ <tr><td colspan="5"><b>&nbsp;<?=gettext("Mappings"); ?>:</b></td></tr>
<tr><td>&nbsp;</td></tr>
<tr id="frheader">
<td width="3%" class="list">&nbsp;</td>
<td width="3%" class="list">&nbsp;</td>
- <td width="10%" class="listhdrr">Interface</td>
- <td width="15%" class="listhdrr">Source</td>
- <td width="10%" class="listhdrr">Source Port</td>
- <td width="15%" class="listhdrr">Destination</td>
- <td width="10%" class="listhdrr">Destination Port</td>
- <td width="15%" class="listhdrr">NAT Address</td>
- <td width="10%" class="listhdrr">NAT Port</td>
- <td width="10%" class="listhdrr">Static Port</td>
- <td width="25%" class="listhdr">Description</td>
+ <td width="10%" class="listhdrr"><?=gettext("Interface");?></td>
+ <td width="15%" class="listhdrr"><?=gettext("Source");?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Source Port");?></td>
+ <td width="15%" class="listhdrr"><?=gettext("Destination");?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Destination Port");?></td>
+ <td width="15%" class="listhdrr"><?=gettext("NAT Address");?></td>
+ <td width="10%" class="listhdrr"><?=gettext("NAT Port");?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Static Port");?></td>
+ <td width="25%" class="listhdr"><?=gettext("Description");?></td>
<td width="5%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17"></td>
- <td><a href="firewall_nat_out_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="add new mapping"></a></td>
+ <td><a href="firewall_nat_out_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add new mapping");?>"></a></td>
</tr>
</table>
</td>
@@ -417,9 +417,9 @@ include("head.inc");
<td class="listr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
<?php
if(isset($natent['staticnatport']))
- echo "<CENTER>YES</CENTER>";
+ echo "<CENTER>" . gettext("YES") . "</CENTER>";
else
- echo "<CENTER>NO</CENTER>";
+ echo "<CENTER>" . gettext("NO") . "</CENTER>";
?>
</td>
<td class="listbg" onClick="fr_toggle(<?=$nnats;?>)" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';">
@@ -428,11 +428,11 @@ include("head.inc");
<td class="list" valign="middle" nowrap>
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td><a href="firewall_nat_out_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="edit mapping"></a></td>
+ <td><a href="firewall_nat_out_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit mapping");?>"></a></td>
</tr>
<tr>
- <td><input onmouseover="fr_insline(<?=$nnats;?>, true)" onmouseout="fr_insline(<?=$nnats;?>, false)" name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" title="move selected rules before this rule" height="17" type="image" width="17" border="0"></td>
- <td><a href="firewall_nat_out_edit.php?dup=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add a new nat based on this one" width="17" height="17" border="0"></a></td>
+ <td><input onmouseover="fr_insline(<?=$nnats;?>, true)" onmouseout="fr_insline(<?=$nnats;?>, false)" name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" title="<?=gettext("move selected rules before this rule");?>" height="17" type="image" width="17" border="0"></td>
+ <td><a href="firewall_nat_out_edit.php?dup=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new nat based on this one");?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
<?php $i++; $nnats++; endforeach; ?>
@@ -441,24 +441,24 @@ include("head.inc");
<td class="list" valign="middle" nowrap>
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected mappings to end" border="0"><?php else: ?><input name="move_<?=$i;?>" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="move selected mappings to end" border="0"><?php endif; ?></td>
- <td><a href="firewall_nat_out_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="add new mapping"></a></td>
+ <td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected mappings to end");?>" border="0"><?php else: ?><input name="move_<?=$i;?>" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="<?=gettext("move selected mappings to end");?>" border="0"><?php endif; ?></td>
+ <td><a href="firewall_nat_out_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add new mapping");?>"></a></td>
</tr>
<tr>
- <td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="delete selected rules" border="0"><?php else: ?><input name="del" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="delete selected mappings" onclick="return confirm('Do you really want to delete the selected mappings?')"><?php endif; ?></td>
+ <td><?php if ($nnats == 0): ?><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" border="0"><?php else: ?><input name="del" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="<?=gettext("delete selected mappings");?>" onclick="return confirm('<?=gettext("Do you really want to delete the selected mappings?");?>')"><?php endif; ?></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="12">
- <p><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>If advanced outbound NAT is enabled, no outbound NAT
- rules will be automatically generated any longer. Instead, only the mappings
- you specify below will be used. With advanced outbound NAT disabled,
- a mapping is automatically created for each interface's subnet
- (except WAN). If you use target addresses other than the WAN interface's
- IP address, then depending on the way your WAN connection is setup, you
- may also need a <a href="firewall_virtual_ip.php">Virtual IP</a>.</span><br>
+ <p><span class="vexpl"><span class="red"><strong><?=gettext("Note"); ?>:<br>
+ </strong></span><?=gettext("If advanced outbound NAT is enabled, no outbound NAT " .
+ "rules will be automatically generated any longer. Instead, only the mappings " .
+ "you specify below will be used. With advanced outbound NAT disabled, " .
+ "a mapping is automatically created for each interface's subnet " .
+ "(except WAN). If you use target addresses other than the WAN interface's " .
+ "IP address, then depending on the way your WAN connection is setup, you " .
+ "may also need a"); ?> <a href="firewall_virtual_ip.php"><?=gettext("Virtual IP"); ?></a>.</span><br>
</td>
</tr>
diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php
index b1e7a64..01af830 100755
--- a/usr/local/www/firewall_nat_out_edit.php
+++ b/usr/local/www/firewall_nat_out_edit.php
@@ -109,50 +109,50 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "interface protocol source source_subnet destination destination_subnet");
- $reqdfieldsn = explode(",", "Interface,Protocol,Source,Source bit count,Destination,Destination bit count");
+ $reqdfieldsn = array(gettext("Interface"),gettext("Protocol"),gettext("Source"),gettext("Source bit count"),gettext("Destination"),gettext("Destination bit count"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if($_POST['sourceport'] <> "" && !is_port($_POST['sourceport']))
- $input_errors[] = "You must supply either a valid port for the source port entry.";
+ $input_errors[] = gettext("You must supply either a valid port for the source port entry.");
if($_POST['dstport'] <> "" and !is_port($_POST['dstport']))
- $input_errors[] = "You must supply either a valid port for the destination port entry.";
+ $input_errors[] = gettext("You must supply either a valid port for the destination port entry.");
if($_POST['natport'] <> "" and !is_port($_POST['natport']))
- $input_errors[] = "You must supply either a valid port for the nat port entry.";
+ $input_errors[] = gettext("You must supply either a valid port for the nat port entry.");
if ($_POST['source_type'] != "any") {
if ($_POST['source'] && !is_ipaddr($_POST['source']) && $_POST['source'] <> "any") {
- $input_errors[] = "A valid source must be specified.";
+ $input_errors[] = gettext("A valid source must be specified.");
}
}
if ($_POST['source_subnet'] && !is_numericint($_POST['source_subnet'])) {
- $input_errors[] = "A valid source bit count must be specified.";
+ $input_errors[] = gettext("A valid source bit count must be specified.");
}
if ($_POST['sourceport'] && !is_numericint($_POST['sourceport'])) {
- $input_errors[] = "A valid source port must be specified.";
+ $input_errors[] = gettext("A valid source port must be specified.");
}
if ($_POST['destination_type'] != "any") {
if ($_POST['destination'] && !is_ipaddr($_POST['destination'])) {
- $input_errors[] = "A valid destination must be specified.";
+ $input_errors[] = gettext("A valid destination must be specified.");
}
}
if ($_POST['destination_subnet'] && !is_numericint($_POST['destination_subnet'])) {
- $input_errors[] = "A valid destination bit count must be specified.";
+ $input_errors[] = gettext("A valid destination bit count must be specified.");
}
if ($_POST['destination_type'] == "any") {
if ($_POST['destination_not']) {
- $input_errors[] = "Negating destination address of \"any\" is invalid.";
+ $input_errors[] = gettext("Negating destination address of \"any\" is invalid.");
}
}
if ($_POST['nonat'] && $_POST['staticnatport']) {
- $input_errors[] = "Static port cannot be used with No NAT.";
+ $input_errors[] = gettext("Static port cannot be used with No NAT.");
}
if ($_POST['target'] && !is_ipaddr($_POST['target'])) {
- $input_errors[] = "A valid target IP address must be specified.";
+ $input_errors[] = gettext("A valid target IP address must be specified.");
}
/* if user has selected any as source, set it here */
@@ -249,7 +249,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Firewall","NAT","Outbound","Edit");
+$pgtitle = array(gettext("Firewall"),gettext("NAT"),gettext("Outbound"),gettext("Edit"));
$closehead = false;
include("head.inc");
@@ -304,17 +304,17 @@ function sourcesel_change() {
<form action="firewall_nat_out_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="1">
<tr>
- <td colspan="2" valign="top" class="listtopic">Edit Advanced Outbound NAT entry</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Advanced Outbound NAT entry");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Do not NAT</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Do not NAT");?></td>
<td width="78%" class="vtable">
<input type="checkbox" name="nonat"<?php if(isset($pconfig['nonat'])) echo " CHECKED"; ?>>
- <span class="vexpl">Enabling this option will disable NAT for traffic matching this rule and stop processing Outbound NAT rules.
- <br>Hint: in most cases, you won't use this option.</span></td>
+ <span class="vexpl"><?=gettext("Enabling this option will disable NAT for traffic matching this rule and stop processing Outbound NAT rules.");?>
+ <br><?=gettext("Hint: in most cases, you won't use this option.");?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Interface</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface");?></td>
<td width="78%" class="vtable">
<select name="interface" class="formselect">
<?php
@@ -350,34 +350,34 @@ function sourcesel_change() {
</option>
<?php endforeach; ?>
</select><br>
- <span class="vexpl">Choose which interface this rule applies to.<br>
- Hint: in most cases, you'll want to use WAN here.</span></td>
+ <span class="vexpl"><?=gettext("Choose which interface this rule applies to.");?><br>
+ <?=gettext("Hint: in most cases, you'll want to use WAN here.");?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Protocol</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Protocol");?></td>
<td width="78%" class="vtable">
<select name="protocol" class="formselect">
<?php $protocols = explode(" ", "any TCP UDP TCP/UDP ICMP ESP AH GRE IGMP carp pfsync");
foreach ($protocols as $proto): ?>
<option value="<?=strtolower($proto);?>" <?php if (strtolower($proto) == $pconfig['protocol']) echo "selected"; ?>><?=htmlspecialchars($proto);?></option>
<?php endforeach; ?>
- </select> <br> <span class="vexpl">Choose which protocol this rule should match.<br />
- Hint: in most cases, you should specify <em>any</em> &nbsp;here.</span>
+ </select> <br> <span class="vexpl"><?=gettext("Choose which protocol this rule should match.");?><br />
+ <?php printf(gettext("Hint: in most cases, you should specify %s any %s here."),"<em>","</em>&nbsp");?></span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Source</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Source");?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="1" cellpadding="1">
<tr>
- <td>Type:&nbsp;&nbsp;</td>
+ <td><?=gettext("Type");?>:&nbsp;&nbsp;</td>
<td>
<select name="source_type" class="formselect" onChange="sourcesel_change()">
- <option value="any" <?php if ($pconfig['source'] == "any") echo "selected"; ?>>any</option>
- <option value="network" <?php if ($pconfig['source'] != "any") echo "selected"; ?>>Network</option>
+ <option value="any" <?php if ($pconfig['source'] == "any") echo "selected"; ?>><?=gettext("any");?></option>
+ <option value="network" <?php if ($pconfig['source'] != "any") echo "selected"; ?>><?=gettext("Network");?></option>
</select>
</td></tr>
- <td>Address:&nbsp;&nbsp;</td>
+ <td><?=gettext("Address");?>:&nbsp;&nbsp;</td>
<td><input name="source" type="text" class="formfld unknown" id="source" size="20" value="<?=htmlspecialchars($pconfig['source']);?>">/<select name="source_subnet" class="formfld" id="source_subnet">
<?php for ($i = 32; $i >= 0; $i--): ?>
<option value="<?=$i;?>"<?php if ($i == $pconfig['source_subnet']) echo " selected"; ?>><?=$i;?></option>
@@ -386,34 +386,34 @@ function sourcesel_change() {
</tr>
<tr>
<td>&nbsp;</td>
- <td><span class="vexpl">Enter the source network for the outbound NAT mapping.</span></td>
+ <td><span class="vexpl"><?=gettext("Enter the source network for the outbound NAT mapping.");?></span></td>
</tr>
<tr>
- <td>Source port:&nbsp;&nbsp;</td>
- <td><input name="sourceport" type="text" class="formfld unknown" id="sourceport" size="5" value="<?=htmlspecialchars($pconfig['sourceport']);?>"> (leave
-blank for any)</td>
+ <td><?=gettext("Source port");?>:&nbsp;&nbsp;</td>
+ <td><input name="sourceport" type="text" class="formfld unknown" id="sourceport" size="5" value="<?=htmlspecialchars($pconfig['sourceport']);?>"> <?=gettext("(leave
+blank for any)");?></td>
</tr>
</table></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Destination</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Destination");?></td>
<td width="78%" class="vtable">
<input name="destination_not" type="checkbox" id="destination_not" value="yes" <?php if ($pconfig['destination_not']) echo "checked"; ?>>
- <strong>not</strong><br>
- Use this option to invert the sense of the match.<br>
+ <strong><?=gettext("not");?></strong><br>
+ <?=gettext("Use this option to invert the sense of the match.");?><br>
<br>
<table border="0" cellspacing="1" cellpadding="1">
<tr>
- <td>Type:&nbsp;&nbsp;</td>
+ <td><?=gettext("Type");?>:&nbsp;&nbsp;</td>
<td><select name="destination_type" class="formselect" onChange="typesel_change()">
<option value="any"<?php if ($pconfig['destination'] == "any") echo " selected"; ?>>
- any</option>
+ <?=gettext("any");?></option>
<option value="network"<?php if ($pconfig['destination'] != "any") echo " selected"; ?>>
- Network</option>
+ <?=gettext("Network");?></option>
</select></td>
</tr>
<tr>
- <td>Address:&nbsp;&nbsp;</td>
+ <td><?=gettext("Address");?>:&nbsp;&nbsp;</td>
<td><input name="destination" type="text" class="formfld unknown" id="destination" size="20" value="<?=htmlspecialchars($pconfig['destination']);?>">
/
<select name="destination_subnet" class="formselect" id="destination_subnet">
@@ -424,25 +424,25 @@ blank for any)</td>
</tr>
<tr>
<td>&nbsp;</td>
- <td><span class="vexpl">Enter the destination network for
- the outbound NAT mapping.</span></td>
+ <td><span class="vexpl"><?=gettext("Enter the destination network for ".
+ "the outbound NAT mapping.");?></span></td>
</tr>
<tr>
- <td>Destination port:&nbsp;&nbsp;</td>
- <td><input name="dstport" type="text" class="formfld unknown" id="dstport" size="5" value="<?=htmlspecialchars($pconfig['dstport']);?>"> (leave blank for
-any)</td>
+ <td><?=gettext("Destination port");?>:&nbsp;&nbsp;</td>
+ <td><input name="dstport" type="text" class="formfld unknown" id="dstport" size="5" value="<?=htmlspecialchars($pconfig['dstport']);?>"> <?=gettext("(leave blank for
+any)");?></td>
</tr>
</table>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Translation</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Translation");?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="1" cellpadding="1">
<tr>
- <td>Address:&nbsp;&nbsp;</td>
+ <td><?=gettext("Address");?>:&nbsp;&nbsp;</td>
<td><select name="target" class="formselect">
- <option value=""<?php if (!$pconfig['target']) echo " selected"; ?>>Interface address</option>
+ <option value=""<?php if (!$pconfig['target']) echo " selected"; ?>><?=gettext("Interface address");?></option>
<?php if (is_array($config['virtualip']['vip'])):
foreach ($config['virtualip']['vip'] as $sn):
if ($sn['mode'] == "proxyarp" && $sn['type'] == "network"):
@@ -460,49 +460,49 @@ any)</td>
<?php endif; endforeach;
endif;
?>
- <option value=""<?php if($pconfig['target'] == "any") echo " selected"; ?>>any</option>
+ <option value=""<?php if($pconfig['target'] == "any") echo " selected"; ?>><?=gettext("any");?></option>
</select>
</td>
</tr>
<tr><td>&nbsp;</td><td>
- <span class="vexpl">Packets matching this rule will be mapped to the IP address given here.<br>
- If you want this rule to apply to another IP address than the IP address of the interface chosen above,
- select it here (you need to define <a href="firewall_virtual_ip.php">Virtual IP</a> addresses on the first).
- Also note that if you are trying to redirect connections on the LAN select the "any" option.
+ <span class="vexpl"><?=gettext("Packets matching this rule will be mapped to the IP address given here.");?><br>
+ <?=gettext("If you want this rule to apply to another IP address than the IP address of the interface chosen above, ".
+ "select it here (you need to define");?> <a href="firewall_virtual_ip.php"><?=gettext("Virtual IP");?></a> <?=gettext("addresses on the first).");?>
+ <?=gettext("Also note that if you are trying to redirect connections on the LAN select the \"any\" option.");?>
</span>
</td></tr>
<tr>
- <td>Port:&nbsp;&nbsp;</td>
+ <td><?=gettext("Port");?>:&nbsp;&nbsp;</td>
<td><input name="natport" type="text" class="formfld unknown" id="natport" size="5" value="<?=htmlspecialchars($pconfig['natport']);?>"></td>
</tr>
<tr><td>&nbsp;</td><td>
- <span class="vexpl">Enter the source port for the outbound NAT mapping.</span>
+ <span class="vexpl"><?=gettext("Enter the source port for the outbound NAT mapping.");?></span>
</td></tr>
<tr>
- <td>Static-port:&nbsp;&nbsp;</td>
+ <td><?=gettext("Static-port");?>:&nbsp;&nbsp;</td>
<td><input onChange="staticportchange();" name="staticnatport" type="checkbox" class="formfld" id="staticnatport" size="5"<?php if($pconfig['staticnatport']) echo " CHECKED";?>></td>
</tr>
</table>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">No XMLRPC Sync</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("No XMLRPC Sync");?></td>
<td width="78%" class="vtable">
<input value="yes" name="nosync" type="checkbox" class="formfld" id="nosync"<?php if($pconfig['nosync']) echo " CHECKED"; ?>><br>
- HINT: This prevents the rule from automatically syncing to other CARP members.
+ <?=gettext("HINT: This prevents the rule from automatically syncing to other CARP members.");?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here " .
+ "for your reference (not parsed).");?></span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input type="button" class="formbtn" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"> <input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="history.back()">
<?php if (isset($id) && $a_out[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php
index 704f394..19a6cdc 100755
--- a/usr/local/www/firewall_rules.php
+++ b/usr/local/www/firewall_rules.php
@@ -41,7 +41,6 @@
##|*MATCH=firewall_rules.php*
##|-PRIV
-$pgtitle = array("Firewall", "Rules");
$statusurl = "status_filter_reload.php";
$logurl = "diag_logs_filter.php";
@@ -50,6 +49,8 @@ require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
+$pgtitle = array(gettext("Firewall"),gettext("Rules"));
+
function check_for_advaned_options(&$item) {
$item_set = "";
if($item['max'])
@@ -188,7 +189,7 @@ if ($_POST) {
clear_subsystem_dirty('filter');
- $savemsg = "The settings have been applied. The firewall rules are now reloading in the background. You can also <a href='status_filter_reload.php'>monitor</a> the reload progress.";
+ $savemsg = sprintf(gettext("The settings have been applied. The firewall rules are now reloading in the background. You can also %s monitor %s the reload progress"),"<a href='status_filter_reload.php'>","</a>");
}
}
@@ -300,9 +301,9 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
if($_REQUEST['undodrag']) {
foreach($_REQUEST['dragtable'] as $dt)
$dragtable .= "&dragtable[]={$dt}";
- print_info_box_np_undo("The firewall rule configuration has been changed.<br>You must apply the changes in order for them to take effect.", "apply" , "Apply changes" , "firewall_rules.php?if={$_REQUEST['if']}&dragdroporder=true&{$dragtable}");
+ print_info_box_np_undo(gettext("The firewall rule configuration has been changed.<br>You must apply the changes in order for them to take effect."), "apply" , gettext("Apply changes") , "firewall_rules.php?if={$_REQUEST['if']}&dragdroporder=true&{$dragtable}");
} else {
- print_info_box_np("The firewall rule configuration has been changed.<br>You must apply the changes in order for them to take effect.");
+ print_info_box_np(gettext("The firewall rule configuration has been changed.<br>You must apply the changes in order for them to take effect."));
}
?>
<br>
@@ -320,7 +321,7 @@ if($_REQUEST['undodrag']) {
$active = true;
else
$active = false;
- $tab_array[] = array("Floating", $active, "firewall_rules.php?if=FloatingRules");
+ $tab_array[] = array(gettext("Floating"), $active, "firewall_rules.php?if=FloatingRules");
$tabscounter = 0; $i = 0; foreach ($iflist as $ifent => $ifname) {
if ($ifent == $if)
$active = true;
@@ -338,16 +339,16 @@ if($_REQUEST['undodrag']) {
<tr id="frheader">
<td width="3%" class="list">&nbsp;</td>
<td width="5%" class="list">&nbsp;</td>
- <td width="3%" class="listhdrr">ID</td>
- <td width="6%" class="listhdrr">Proto</td>
- <td width="12%" class="listhdrr">Source</td>
- <td width="6%" class="listhdrr">Port</td>
- <td width="12%" class="listhdrr">Destination</td>
- <td width="6%" class="listhdrr">Port</td>
- <td width="5%" class="listhdrr">Gateway</td>
- <td width="8%" class="listhdrr">Queue</td>
- <td width="5%" class="listhdrr">Schedule</td>
- <td width="19%" class="listhdr">Description</td>
+ <td width="3%" class="listhdrr"><?=gettext("ID");?></td>
+ <td width="6%" class="listhdrr"><?=gettext("Proto");?></td>
+ <td width="12%" class="listhdrr"><?=gettext("Source");?></td>
+ <td width="6%" class="listhdrr"><?=gettext("Port");?></td>
+ <td width="12%" class="listhdrr"><?=gettext("Destination");?></td>
+ <td width="6%" class="listhdrr"><?=gettext("Port");?></td>
+ <td width="5%" class="listhdrr"><?=gettext("Gateway");?></td>
+ <td width="8%" class="listhdrr"><?=gettext("Queue");?></td>
+ <td width="5%" class="listhdrr"><?=gettext("Schedule");?></td>
+ <td width="19%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -364,10 +365,10 @@ if($_REQUEST['undodrag']) {
?>
<td>
<?php if ($nrules == 0): ?>
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="delete selected rules" border="0"><?php else: ?>
- <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="delete selected rules" onclick="return confirm('Do you really want to delete the selected rules?')"><?php endif; ?>
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="<?gettext("delete selected rules"); ?>" border="0"><?php else: ?>
+ <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" onclick="return confirm('<?=gettext('Do you really want to delete the selected rules?');?>')"><?php endif; ?>
</td>
- <td align="center" valign="middle"><a href="firewall_rules_edit.php?if=<?=$if;?>&after=-1"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add new rule" width="17" height="17" border="0"></a></td>
+ <td align="center" valign="middle"><a href="firewall_rules_edit.php?if=<?=$if;?>&after=-1"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add new rule");?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
@@ -378,23 +379,23 @@ if($_REQUEST['undodrag']) {
<td class="listt" align="center"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" width="11" height="11" border="0"></td>
<td class="listlr" style="background-color: #e0e0e0"></td>
<td class="listr" style="background-color: #e0e0e0">*</td>
- <td class="listr" style="background-color: #e0e0e0">RFC 1918 networks</td>
+ <td class="listr" style="background-color: #e0e0e0"><?=gettext("RFC 1918 networks");?></td>
<td class="listr" style="background-color: #e0e0e0">*</td>
<td class="listr" style="background-color: #e0e0e0">*</td>
<td class="listr" style="background-color: #e0e0e0">*</td>
<td class="listr" style="background-color: #e0e0e0">*</td>
<td class="listr" style="background-color: #e0e0e0">*</td>
<td class="listr" style="background-color: #e0e0e0"></td>
- <td class="listbg">Block private networks</td>
+ <td class="listbg"><?=gettext("Block private networks");?></td>
<td valign="middle" nowrap class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected rules before this rule"></td>
- <td><a href="interfaces.php?if=<?=$if?>#rfc1918"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit rule" width="17" height="17" border="0"></a></td>
+ <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected rules before this rule");?>"></td>
+ <td><a href="interfaces.php?if=<?=$if?>#rfc1918"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit rule");?>" width="17" height="17" border="0"></a></td>
</tr>
<tr>
<td align="center" valign="middle"></td>
- <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus_d.gif" title="add a new rule based on this one" width="17" height="17" border="0"></td>
+ <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus_d.gif" title="<?=gettext("add a new rule based on this one");?>" width="17" height="17" border="0"></td>
</tr>
</table>
</td>
@@ -406,23 +407,23 @@ if($_REQUEST['undodrag']) {
<td class="listt" align="center"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" width="11" height="11" border="0"></td>
<td class="listlr" style="background-color: #e0e0e0"></td>
<td class="listr" style="background-color: #e0e0e0">*</td>
- <td class="listr" style="background-color: #e0e0e0">Reserved/not assigned by IANA</td>
+ <td class="listr" style="background-color: #e0e0e0"><?=gettext("Reserved/not assigned by IANA");?></td>
<td class="listr" style="background-color: #e0e0e0">*</td>
<td class="listr" style="background-color: #e0e0e0">*</td>
<td class="listr" style="background-color: #e0e0e0">*</td>
<td class="listr" style="background-color: #e0e0e0">*</td>
<td class="listr" style="background-color: #e0e0e0">*</td>
<td class="listr" style="background-color: #e0e0e0">*</td>
- <td class="listbg">Block bogon networks</td>
+ <td class="listbg"><?=gettext("Block bogon networks");?></td>
<td valign="middle" nowrap class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected rules before this rule"></td>
- <td><a href="interfaces.php?if=<?=$if?>#rfc1918"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit rule" width="17" height="17" border="0"></a></td>
+ <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected rules before this rule");?>"></td>
+ <td><a href="interfaces.php?if=<?=$if?>#rfc1918"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit rule");?>" width="17" height="17" border="0"></a></td>
</tr>
<tr>
<td align="center" valign="middle"></td>
- <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus_d.gif" title="add a new rule based on this one" width="17" height="17" border="0"></td>
+ <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus_d.gif" title="<?=gettext("add a new rule based on this one");?>" width="17" height="17" border="0"></td>
</tr>
</table>
</td>
@@ -437,7 +438,7 @@ if($_REQUEST['undodrag']) {
continue;
$isadvset = check_for_advaned_options($filterent);
if($isadvset)
- $advanced_set = "<img src=\"./themes/{$g['theme']}/images/icons/icon_advanced.gif\" title=\"advanced settings set: $isadvset\" border=\"0\">";
+ $advanced_set = sprintf("<img src=\"./themes/%s/images/icons/icon_advanced.gif\" title=\"%s: %s\" border=\"0\">", $g['theme'], gettext("advanced settings set"), $isadvset);
else
$advanced_set = ""
?>
@@ -461,7 +462,7 @@ if($_REQUEST['undodrag']) {
$textss = $textse = "";
}
?>
- <a href="?if=<?=$if;?>&act=toggle&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfn;?>.gif" width="11" height="11" border="0" title="click to toggle enabled/disabled status"></a>
+ <a href="?if=<?=$if;?>&act=toggle&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfn;?>.gif" width="11" height="11" border="0" title="<?=gettext("click to toggle enabled/disabled status");?>"></a>
<?php if (isset($filterent['log'])):
$iconfnlog = "log_s";
if (isset($filterent['disabled']))
@@ -497,8 +498,8 @@ if($_REQUEST['undodrag']) {
$sched_caption_escaped = "";
$sched_content = "";
$schedstatus = false;
- $dayArray = array ('Mon','Tues','Wed','Thur','Fri','Sat','Sun');
- $monthArray = array ('January','February','March','April','May','June','July','August','September','October','November','December');
+ $dayArray = array (gettext('Mon'),gettext('Tues'),gettext('Wed'),gettext('Thur'),gettext('Fri'),gettext('Sat'),gettext('Sun'));
+ $monthArray = array (gettext('January'),gettext('February'),gettext('March'),gettext('April'),gettext('May'),gettext('June'),gettext('July'),gettext('August'),gettext('September'),gettext('October'),gettext('November'),gettext('December'));
if($config['schedules']['schedule'] <> "" and is_array($config['schedules']['schedule'])){
foreach ($a_schedules as $schedule)
{
@@ -609,12 +610,12 @@ if($_REQUEST['undodrag']) {
if ($iconfn == "block" || $iconfn == "reject")
{
$image = "icon_block";
- $alttext = "Traffic matching this rule is currently being denied";
+ $alttext = gettext("Traffic matching this rule is currently being denied");
}
else
{
$image = "icon_pass";
- $alttext = "Traffic matching this rule is currently being allowed";
+ $alttext = gettext("Traffic matching this rule is currently being allowed");
}
$printicon = true;
}
@@ -624,7 +625,7 @@ if($_REQUEST['undodrag']) {
$image = "icon_block_d";
else
$image = "icon_block";
- $alttext = "This rule is not currently active because its period has expired";
+ $alttext = gettext("This rule is not currently active because its period has expired");
$printicon = true;
}
}
@@ -660,7 +661,7 @@ if($_REQUEST['undodrag']) {
} else if (isset($filterent['defaultqueue'])) {
$desc = $filterent['defaultqueue'];
echo "<a href=\"firewall_shaper_queues.php?queue={$filterent['defaultqueue']}&action=show\">{$desc}</a>"; }
- else echo "none";
+ else echo gettext("none");
?><?=$textse;?>
</td>
<td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';"><font color="black">
@@ -672,12 +673,12 @@ if($_REQUEST['undodrag']) {
<td valign="middle" nowrap class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td><input name="move_<?=$i;?>" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="move selected rules before this rule" onMouseOver="fr_insline(<?=$nrules;?>, true)" onMouseOut="fr_insline(<?=$nrules;?>, false)"></td>
- <td><a href="firewall_rules_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit rule" width="17" height="17" border="0"></a></td>
+ <td><input name="move_<?=$i;?>" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="<?=gettext("move selected rules before this rule"); ?>" onMouseOver="fr_insline(<?=$nrules;?>, true)" onMouseOut="fr_insline(<?=$nrules;?>, false)"></td>
+ <td><a href="firewall_rules_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit rule"); ?>" width="17" height="17" border="0"></a></td>
</tr>
<tr>
- <td align="center" valign="middle"><a href="firewall_rules.php?act=del&if=<?=$if;?>&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="delete rule" onclick="return confirm('Do you really want to delete this rule?')"></a></td>
- <td><a href="firewall_rules_edit.php?dup=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add a new rule based on this one" width="17" height="17" border="0"></a></td>
+ <td align="center" valign="middle"><a href="firewall_rules.php?act=del&if=<?=$if;?>&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete rule"); ?>" onclick="return confirm('Do you really want to delete this rule?')"></a></td>
+ <td><a href="firewall_rules_edit.php?dup=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new rule based on this one"); ?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
@@ -689,9 +690,9 @@ if($_REQUEST['undodrag']) {
<td class="listt"></td>
<td class="listlr" colspan="10" align="center" valign="middle">
<span class="gray">
- No rules are currently defined for this interface.<br>
- All incoming connections on this interface will be blocked until you add pass rules.<br><br>
- Click the <a href="firewall_rules_edit.php?if=<?=$if;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add new rule" border="0" width="17" height="17" align="absmiddle"></a> button to add a new rule.</span>
+ <?=gettext("No rules are currently defined for this interface"); ?><br>
+ <?=gettext("All incoming connections on this interface will be blocked until you add pass rules."); ?><br><br>
+ <?=gettext("Click the"); ?> <a href="firewall_rules_edit.php?if=<?=$if;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add new rule");?>" border="0" width="17" height="17" align="absmiddle"></a><?=gettext(" button to add a new rule.");?></span>
</td>
<?php endif; ?>
<tr id="fr<?=$nrules;?>">
@@ -711,16 +712,16 @@ if($_REQUEST['undodrag']) {
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td>
- <?php if ($nrules == 0): ?><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected rules to end" border="0"><?php else: ?><input name="move_<?=$i;?>" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="move selected rules to end" onMouseOver="fr_insline(<?=$nrules;?>, true)" onMouseOut="fr_insline(<?=$nrules;?>, false)"><?php endif; ?></td>
+ <?php if ($nrules == 0): ?><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected rules to end");?>" border="0"><?php else: ?><input name="move_<?=$i;?>" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="<?=gettext("move selected rules to end");?>" onMouseOver="fr_insline(<?=$nrules;?>, true)" onMouseOut="fr_insline(<?=$nrules;?>, false)"><?php endif; ?></td>
<td></td>
</tr>
<tr>
<td>
<?php if ($nrules == 0): ?>
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="delete selected rules" border="0"><?php else: ?>
- <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="delete selected rules" onclick="return confirm('Do you really want to delete the selected rules?')"><?php endif; ?>
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" border="0"><?php else: ?>
+ <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" onclick="return confirm('<?=gettext('Do you really want to delete the selected rules?');?>')"><?php endif; ?>
</td>
- <td><a href="firewall_rules_edit.php?if=<?=$if;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add new rule" width="17" height="17" border="0"></a></td>
+ <td><a href="firewall_rules_edit.php?if=<?=$if;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add new rule");?>" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
@@ -729,45 +730,45 @@ if($_REQUEST['undodrag']) {
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass.gif" width="11" height="11"></td>
- <td>pass</td>
+ <td><?=gettext("pass");?></td>
<td width="14"></td>
<td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" width="11" height="11"></td>
- <td>block</td>
+ <td><?=gettext("block");?></td>
<td width="14"></td>
<td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_reject.gif" width="11" height="11"></td>
- <td>reject</td>
+ <td><?=gettext("reject");?></td>
<td width="14"></td>
<td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_log.gif" width="11" height="11"></td>
- <td>log</td>
+ <td><?=gettext("log");?></td>
</tr>
<tr>
<td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass_d.gif" width="11" height="11"></td>
- <td nowrap>pass (disabled)</td>
+ <td nowrap><?=gettext("pass (disabled)");?></td>
<td>&nbsp;</td>
<td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block_d.gif" width="11" height="11"></td>
- <td nowrap>block (disabled)</td>
+ <td nowrap><?=gettext("block (disabled)");?></td>
<td>&nbsp;</td>
<td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_reject_d.gif" width="11" height="11"></td>
- <td nowrap>reject (disabled)</td>
+ <td nowrap><?=gettext("reject (disabled)");?></td>
<td>&nbsp;</td>
<td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_log_d.gif" width="11" height="11"></td>
- <td nowrap>log (disabled)</td>
+ <td nowrap><?=gettext("log (disabled)");?></td>
</tr>
<tr>
<td colspan="10">
&nbsp;<p/>
<strong>
- <span class="red">Hint:</span>
+ <span class="red"><?=gettext("Hint") . ":";?></span>
</strong><br>
<ul>
- <li>Rules are evaluated on a first-match basis (i.e.
- the action of the first rule to match a packet will be executed).
- This means that if you use block rules, you'll have to pay attention
- to the rule order. Everything that isn't explicitly passed is blocked
- by default.
+ <li><?=gettext("Rules are evaluated on a first-match basis (i.e. " .
+ "the action of the first rule to match a packet will be executed). " .
+ "This means that if you use block rules, you'll have to pay attention " .
+ "to the rule order. Everything that isn't explicitly passed is blocked " .
+ "by default. ");?>
</li>
<li>
- You may drag and drop rules using your mouse to reorder the rule ordering.
+ <?=gettext("You may drag and drop rules using your mouse to reorder the rule ordering.");?>
</li>
</ul>
</td>
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index 0823aec..c91b1a8 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -188,7 +188,7 @@ if (isset($_GET['dup']))
if ($_POST) {
if ($_POST['type'] == "reject" && $_POST['proto'] <> "tcp")
- $input_errors[] = "Reject type rules only works when the protocol is set to TCP.";
+ $input_errors[] = gettext("Reject type rules only works when the protocol is set to TCP.");
if (($_POST['proto'] != "tcp") && ($_POST['proto'] != "udp") && ($_POST['proto'] != "tcp/udp")) {
$_POST['srcbeginport'] = 0;
@@ -254,7 +254,7 @@ if ($_POST) {
continue;
$newpost = htmlentities($temp);
if($newpost <> $temp)
- $input_errors[] = "Invalid characters detected ($temp). Please remove invalid characters and save again.";
+ $input_errors[] = sprintf(gettext("Invalid characters detected (%s). Please remove invalid characters and save again."),$temp);
}
/* input validation */
@@ -271,9 +271,9 @@ if ($_POST) {
if($_POST['statetype'] == "modulate state" or $_POST['statetype'] == "synproxy state") {
if( $_POST['proto'] != "tcp" )
- $input_errors[] = "{$_POST['statetype']} is only valid with protocol tcp.";
+ $input_errors[] = sprintf(gettext("%s is only valid with protocol tcp."),$_POST['statetype']);
if(($_POST['statetype'] == "synproxy state") && ($_POST['gateway'] != ""))
- $input_errors[] = "{$_POST['statetype']} is only valid if the gateway is set to 'default'.";
+ $input_errors[] = sprintf(gettext("%s is only valid if the gateway is set to 'default'."),$_POST['statetype']);
}
if ( isset($a_filter[$id]['associated-rule-id'])===false &&
@@ -284,7 +284,7 @@ if ($_POST) {
if ( isset($a_filter[$id]['associated-rule-id'])===false &&
(!(is_specialnet($_POST['dsttype']) || ($_POST['dsttype'] == "single"))) ) {
$reqdfields[] = "dstmask";
- $reqdfieldsn[] = "Destination bit count";
+ $reqdfieldsn[] = gettext("Destination bit count");
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -299,38 +299,38 @@ if ($_POST) {
}
if ($_POST['srcbeginport'] && !is_portoralias($_POST['srcbeginport']))
- $input_errors[] = "{$_POST['srcbeginport']} is not a valid start source port. It must be a port alias or integer between 1 and 65535.";
+ $input_errors[] = sprintf(gettext("%s is not a valid start source port. It must be a port alias or integer between 1 and 65535."),$_POST['srcbeginposrt']);
if ($_POST['srcendport'] && !is_portoralias($_POST['srcendport']))
- $input_errors[] = "{$_POST['srcendport']} is not a valid end source port. It must be a port alias or integer between 1 and 65535.";
+ $input_errors[] = sprintf(gettext("%s is not a valid end source port. It must be a port alias or integer between 1 and 65535."),$_POST['srcendport']);
if ($_POST['dstbeginport'] && !is_portoralias($_POST['dstbeginport']))
- $input_errors[] = "{$_POST['dstbeginport']} is not a valid start destination port. It must be a port alias or integer between 1 and 65535.";
+ $input_errors[] = sprintf(gettext("%s is not a valid start destination port. It must be a port alias or integer between 1 and 65535."),$_POST['dstbeginport']);
if ($_POST['dstendport'] && !is_portoralias($_POST['dstendport']))
- $input_errors[] = "{$_POST['dstendport']} is not a valid end destination port. It must be a port alias or integer between 1 and 65535.";
+ $input_errors[] = sprintf(gettext("%s is not a valid end destination port. It must be a port alias or integer between 1 and 65535."),$_POST['dstendport']);
/* if user enters an alias and selects "network" then disallow. */
if($_POST['srctype'] == "network") {
if(is_alias($_POST['src']))
- $input_errors[] = "You must specify single host or alias for alias entries.";
+ $input_errors[] = gettext("You must specify single host or alias for alias entries.");
}
if($_POST['dsttype'] == "network") {
if(is_alias($_POST['dst']))
- $input_errors[] = "You must specify single host or alias for alias entries.";
+ $input_errors[] = gettext("You must specify single host or alias for alias entries.");
}
if (!is_specialnet($_POST['srctype'])) {
if (($_POST['src'] && !is_ipaddroralias($_POST['src']))) {
- $input_errors[] = "{$_POST['src']} is not a valid source IP address or alias.";
+ $input_errors[] = sprintf(gettext("%s is not a valid source IP address or alias."),$_POST['src']);
}
if (($_POST['srcmask'] && !is_numericint($_POST['srcmask']))) {
- $input_errors[] = "A valid source bit count must be specified.";
+ $input_errors[] = gettext("A valid source bit count must be specified.");
}
}
if (!is_specialnet($_POST['dsttype'])) {
if (($_POST['dst'] && !is_ipaddroralias($_POST['dst']))) {
- $input_errors[] = "{$_POST['dst']} is not a valid destination IP address or alias.";
+ $input_errors[] = sprintf(gettext("%s is not a valid destination IP address or alias."),$_POST['dst']);
}
if (($_POST['dstmask'] && !is_numericint($_POST['dstmask']))) {
- $input_errors[] = "A valid destination bit count must be specified.";
+ $input_errors[] = gettext("A valid destination bit count must be specified.");
}
}
@@ -348,31 +348,31 @@ if ($_POST) {
}
if ($_POST['os'])
if( $_POST['proto'] != "tcp" )
- $input_errors[] = "OS detection is only valid with protocol tcp.";
+ $input_errors[] = gettext("OS detection is only valid with protocol tcp.");
if ($_POST['ackqueue'] && $_POST['ackqueue'] != "none") {
if ($_POST['defaultqueue'] == "none" )
- $input_errors[] = "You have to select a queue when you select an acknowledge queue too.";
+ $input_errors[] = gettext("You have to select a queue when you select an acknowledge queue too.");
else if ($_POST['ackqueue'] == $_POST['defaultqueue'])
- $input_errors[] = "Acknowledge queue and Queue cannot be the same.";
+ $input_errors[] = gettext("Acknowledge queue and Queue cannot be the same.");
}
if ($_POST['pdnpipe'] && $_POST['pdnpipe'] != "none") {
if ($_POST['dnpipe'] == "none" )
- $input_errors[] = "You must select a queue for the In direction before selecting one for Out too.";
+ $input_errors[] = gettext("You must select a queue for the In direction before selecting one for Out too.");
else if ($_POST['pdnpipe'] == $_POST['dnpipe'])
- $input_errors[] = "In and Out Queue cannot be the same.";
+ $input_errors[] = gettext("In and Out Queue cannot be the same.");
else if ($pdnpipe[0] == "?" && $dnpipe[0] <> "?")
- $input_errors[] = "You cannot select one queue and one virtual interface for IN and Out. both must be from the same type.";
- else if ($dnpipe[0] == "?" && $pdnpipe[0] <> "?")
- $input_errors[] = "You cannot select one queue and one virtual interface for IN and Out. both must be from the same type.";
+ $input_errors[] = gettext("You cannot select one queue and one virtual interface for IN and Out. both must be from the same type.");
+ else if ($dnpipe[0] == "?" && $pdnpipe[0] <> "?")
+ $input_errors[] = gettext("You cannot select one queue and one virtual interface for IN and Out. both must be from the same type.");
}
if( !empty($_POST['ruleid']) && !ctype_digit($_POST['ruleid']))
- $input_errors[] = 'ID must be an integer';
+ $input_errors[] = gettext('ID must be an integer');
if($_POST['l7container'] && $_POST['l7container'] != "none") {
if(!($_POST['proto'] == "tcp" || $_POST['proto'] == "udp" || $_POST['proto'] == "tcp/udp"))
- $input_errors[] = "You can only select a layer7 container for TCP and/or UDP protocols";
+ $input_errors[] = gettext("You can only select a layer7 container for TCP and/or UDP protocols");
if ($_POST['type'] <> "pass")
- $input_errors[] = "You can only select a layer7 container for Pass type rules.";
+ $input_errors[] = gettext("You can only select a layer7 container for Pass type rules.");
}
if (!$_POST['tcpflags_any']) {
@@ -385,7 +385,7 @@ if ($_POST) {
$outoftcpflags[] = $tcpflag;
}
if (empty($outoftcpflags) && !empty($settcpflags))
- $input_errors[] = "If you specify TCP flags that should be set you should specify out of which flags as well.";
+ $input_errors[] = gettext("If you specify TCP flags that should be set you should specify out of which flags as well.");
}
if (!$input_errors) {
@@ -549,7 +549,7 @@ $dnqlist =& get_unique_dnqueue_list();
read_layer7_config();
$l7clist =& get_l7_unique_list();
-$pgtitle = array("Firewall","Rules","Edit");
+$pgtitle = array(gettext("Firewall"),gettext("Rules"),gettext("Edit"));
$statusurl = "status_filter_reload.php";
$logurl = "diag_logs_filter.php";
@@ -571,10 +571,10 @@ include("head.inc");
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Edit Firewall rule</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Firewall rule");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Action</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Action");?></td>
<td width="78%" class="vtable">
<select name="type" class="formselect">
<?php $types = explode(" ", "Pass Block Reject"); foreach ($types as $type): ?>
@@ -585,17 +585,17 @@ include("head.inc");
</select>
<br/>
<span class="vexpl">
- Choose what to do with packets that match the criteria specified below. <br/>
- Hint: the difference between block and reject is that with reject, a packet (TCP RST or ICMP port unreachable for UDP) is returned to the sender, whereas with block the packet is dropped silently. In either case, the original packet is discarded.
+ <?=gettext("Choose what to do with packets that match the criteria specified below.");?> <br/>
+ <?=gettext("Hint: the difference between block and reject is that with reject, a packet (TCP RST or ICMP port unreachable for UDP) is returned to the sender, whereas with block the packet is dropped silently. In either case, the original packet is discarded.");?>
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Disabled</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled");?></td>
<td width="78%" class="vtable">
<input name="disabled" type="checkbox" id="disabled" value="yes" <?php if ($pconfig['disabled']) echo "checked"; ?>>
- <strong>Disable this rule</strong><br />
- <span class="vexpl">Set this option to disable this rule without removing it from the list.</span>
+ <strong><?=gettext("Disable this rule");?></strong><br />
+ <span class="vexpl"><?=gettext("Set this option to disable this rule without removing it from the list.");?></span>
</td>
</tr>
<?php if ($if == "FloatingRules" || isset($pconfig['floating'])): ?>
@@ -611,7 +611,7 @@ include("head.inc");
</tr>
<? endif; ?>
<tr>
- <td width="22%" valign="top" class="vncellreq">Interface</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface");?></td>
<td width="78%" class="vtable">
<?php if ($if == "FloatingRules" || isset($pconfig['floating'])): ?>
<select name="interface[]" multiple="true" class="formselect" size="3">
@@ -651,7 +651,7 @@ include("head.inc");
<?php endforeach; ?>
</select>
<br />
- <span class="vexpl">Choose on which interface packets must come in to match this rule.</span>
+ <span class="vexpl"><?=gettext("Choose on which interface packets must come in to match this rule.");?></span>
</td>
</tr>
<?php if ($if == "FloatingRules" || isset($pconfig['floating'])): ?>
@@ -661,7 +661,7 @@ include("head.inc");
</td>
<td width="78%" class="vtable">
<select name="direction" class="formselect">
- <?php $directions = array('any', 'in', 'out');
+ <?php $directions = array('any','in','out');
foreach ($directions as $direction): ?>
<option value="<?=$direction;?>"
<?php if ($direction == $pconfig['direction']): ?>
@@ -675,7 +675,7 @@ include("head.inc");
<tr>
<?php endif; ?>
<tr>
- <td width="22%" valign="top" class="vncellreq">Protocol</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Protocol");?></td>
<td width="78%" class="vtable">
<select name="proto" class="formselect" onchange="proto_change()">
<?php
@@ -685,32 +685,32 @@ include("head.inc");
<?php endforeach; ?>
</select>
<br />
- <span class="vexpl">Choose which IP protocol this rule should match. <br /> Hint: in most cases, you should specify <em>TCP</em> &nbsp;here.</span>
+ <span class="vexpl"><?=gettext("Choose which IP protocol this rule should match.");?> <br /> <?=gettext("Hint: in most cases, you should specify ");?><em>TCP</em> &nbsp;<?=gettext("here.");?></span>
</td>
</tr>
<tr id="icmpbox" name="icmpbox">
- <td valign="top" class="vncell">ICMP type</td>
+ <td valign="top" class="vncell"><?=gettext("ICMP type");?></td>
<td class="vtable">
<select name="icmptype" class="formselect">
<?php
$icmptypes = array(
- "" => "any",
- "echorep" => "Echo reply",
- "unreach" => "Destination unreachable",
- "squench" => "Source quench",
- "redir" => "Redirect",
- "althost" => "Alternate Host",
- "echoreq" => "Echo",
- "routeradv" => "Router advertisement",
- "routersol" => "Router solicitation",
- "timex" => "Time exceeded",
- "paramprob" => "Invalid IP header",
- "timereq" => "Timestamp",
- "timerep" => "Timestamp reply",
- "inforeq" => "Information request",
- "inforep" => "Information reply",
- "maskreq" => "Address mask request",
- "maskrep" => "Address mask reply"
+ "" => gettext("any"),
+ "echorep" => gettext("Echo reply"),
+ "unreach" => gettext("Destination unreachable"),
+ "squench" => gettext("Source quench"),
+ "redir" => gettext("Redirect"),
+ "althost" => gettext("Alternate Host"),
+ "echoreq" => gettext("Echo"),
+ "routeradv" => gettext("Router advertisement"),
+ "routersol" => gettext("Router solicitation"),
+ "timex" => gettext("Time exceeded"),
+ "paramprob" => gettext("Invalid IP header"),
+ "timereq" => gettext("Timestamp"),
+ "timerep" => gettext("Timestamp reply"),
+ "inforeq" => gettext("Information request"),
+ "inforep" => gettext("Information reply"),
+ "maskreq" => gettext("Address mask request"),
+ "maskrep" => gettext("Address mask reply")
);
foreach ($icmptypes as $icmptype => $descr): ?>
@@ -718,23 +718,23 @@ include("head.inc");
<?php endforeach; ?>
</select>
<br />
- <span class="vexpl">If you selected ICMP for the protocol above, you may specify an ICMP type here.</span>
+ <span class="vexpl"><?=gettext("If you selected ICMP for the protocol above, you may specify an ICMP type here.");?></span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Source</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Source");?></td>
<td width="78%" class="vtable">
<?php $edit_disabled=false; ?>
<?php if( isset($pconfig['associated-rule-id']) ): ?>
- <span class="red"><strong>NOTE: </strong></span> This is associated to a NAT rule.<br />
- You cannot edit the source and destination of associated filter rules.<br />
+ <span class="red"><strong><?=gettext("NOTE: ");?></strong></span><?=gettext("This is associated to a NAT rule.");?><br />
+ <?=gettext("You cannot edit the source and destination of associated filter rules.");?><br />
<br />
<?php
$edit_disabled=true;
if (is_array($config['nat']['rule'])) {
foreach( $config['nat']['rule'] as $index => $nat_rule ) {
if( isset($nat_rule['associated-rule-id']) && $nat_rule['associated-rule-id']==$pconfig['associated-rule-id'] ) {
- echo "<a href=\"firewall_nat_edit.php?id={$index}\">View the NAT rule</a><br>";
+ printf("<a href=\"firewall_nat_edit.php?id=%s\">%s</a><br>", $index, gettext("View the NAT rule"));
break;
}
}
@@ -746,36 +746,36 @@ include("head.inc");
</script>
<?php endif; ?>
<input<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="srcnot" type="checkbox" id="srcnot" value="yes" <?php if ($pconfig['srcnot']) echo "checked"; ?>>
- <strong>not</strong>
+ <strong><?=gettext("not");?></strong>
<br />
- Use this option to invert the sense of the match.
+ <?=gettext("Use this option to invert the sense of the match.");?>
<br />
<br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td>Type:&nbsp;&nbsp;</td>
+ <td><?=gettext("Type");?>:&nbsp;&nbsp;</td>
<td>
<select<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="srctype" class="formselect" onChange="typesel_change()">
<?php
$sel = is_specialnet($pconfig['src']); ?>
- <option value="any" <?php if ($pconfig['src'] == "any") { echo "selected"; } ?>>any</option>
- <option value="single" <?php if (($pconfig['srcmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>>Single host or alias</option>
- <option value="network" <?php if (!$sel) echo "selected"; ?>>Network</option>
+ <option value="any" <?php if ($pconfig['src'] == "any") { echo "selected"; } ?>><?=gettext("any");?></option>
+ <option value="single" <?php if (($pconfig['srcmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>><?=gettext("Single host or alias");?></option>
+ <option value="network" <?php if (!$sel) echo "selected"; ?>><?=gettext("Network");?></option>
<?php if(have_ruleint_access("pptp")): ?>
- <option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo "selected"; } ?>>PPTP clients</option>
+ <option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo "selected"; } ?>><?=gettext("PPTP clients");?></option>
<?php endif; ?>
<?php if(have_ruleint_access("pppoe")): ?>
- <option value="pppoe" <?php if ($pconfig['src'] == "pppoe") { echo "selected"; } ?>>PPPoE clients</option>
+ <option value="pppoe" <?php if ($pconfig['src'] == "pppoe") { echo "selected"; } ?>><?=gettext("PPPoE clients");?></option>
<?php endif; ?>
<?php if(have_ruleint_access("l2tp")): ?>
- <option value="l2tp" <?php if ($pconfig['src'] == "l2tp") { echo "selected"; } ?>>L2TP clients</option>
+ <option value="l2tp" <?php if ($pconfig['src'] == "l2tp") { echo "selected"; } ?>><?=gettext("L2TP clients");?></option>
<?php endif; ?>
<?php
foreach ($ifdisp as $ifent => $ifdesc): ?>
<?php if(have_ruleint_access($ifent)): ?>
- <option value="<?=$ifent;?>" <?php if ($pconfig['src'] == $ifent) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?> subnet</option>
+ <option value="<?=$ifent;?>" <?php if ($pconfig['src'] == $ifent) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?><?=gettext(" subnet");?></option>
<option value="<?=$ifent;?>ip"<?php if ($pconfig['src'] == $ifent . "ip") { echo "selected"; } ?>>
- <?=$ifdesc?> address
+ <?=$ifdesc?> <?=gettext("address");?>
</option>
<?php endif; ?>
<?php endforeach; ?>
@@ -783,7 +783,7 @@ include("head.inc");
</td>
</tr>
<tr>
- <td>Address:&nbsp;&nbsp;</td>
+ <td><?=gettext("Address");?>:&nbsp;&nbsp;</td>
<td>
<input<?php echo ($edit_disabled===true?' DISABLED':''); ?> autocomplete='off' name="src" type="text" class="formfldalias" id="src" size="20" value="<?php if (!is_specialnet($pconfig['src'])) echo htmlspecialchars($pconfig['src']);?>"> /
<select<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="srcmask" class="formselect" id="srcmask">
@@ -796,20 +796,20 @@ include("head.inc");
</table>
<div id="showadvancedboxspr">
<p>
- <input<?php echo ($edit_disabled===true?' DISABLED':''); ?> type="button" onClick="show_source_port_range()" value="Advanced"></input> - Show source port range</a>
+ <input<?php echo ($edit_disabled===true?' DISABLED':''); ?> type="button" onClick="show_source_port_range()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show source port range");?></a>
</div>
</td>
</tr>
<tr style="display:none" id="sprtable" name="sprtable">
- <td width="22%" valign="top" class="vncellreq">Source port range</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Source port range");?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td>from:&nbsp;&nbsp;</td>
+ <td><?=gettext("from");?>:&nbsp;&nbsp;</td>
<td>
<select<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="srcbeginport" class="formselect" onchange="src_rep_change();ext_change()">
- <option value="">(other)</option>
- <option value="any" <?php $bfound = 0; if ($pconfig['srcbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>>any</option>
+ <option value="">(<?=gettext("other"); ?>)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['srcbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any");?></option>
<?php foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcbeginport']) { echo "selected"; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
<?php endforeach; ?>
@@ -818,11 +818,11 @@ include("head.inc");
</td>
</tr>
<tr>
- <td>to:</td>
+ <td><?=gettext("to");?>:</td>
<td>
<select<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="srcendport" class="formselect" onchange="ext_change()">
- <option value="">(other)</option>
- <option value="any" <?php $bfound = 0; if ($pconfig['srcendport'] == "any") { echo "selected"; $bfound = 1; } ?>>any</option>
+ <option value="">(<?=gettext("other"); ?>)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['srcendport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any");?></option>
<?php foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcendport']) { echo "selected"; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
<?php endforeach; ?>
@@ -832,43 +832,43 @@ include("head.inc");
</tr>
</table>
<br />
- <span class="vexpl"><?=gettext("Specify the source port or port range for this rule. <b>This is usually <em>random</em> and almost never equal to the destination port range (and should usually be &quot;any&quot;).</b> <br /> Hint: you can leave the <em>'to'</em> field empty if you only want to filter a single port.");?></span><br/>
+ <span class="vexpl"><?=gettext("Specify the source port or port range for this rule."); ?> <b><?=gettext("This is usually"); ?> <em><?=gettext("random"); ?></em> <?=gettext("and almost never equal to the destination port range (and should usually be"); ?> &quot;<?=gettext("any"); ?>&quot;).</b>")."<br />".<?=gettext("Hint: you can leave the"); ?> <em><?=gettext("\"to\""); ?></em> <?=gettext("field empty if you only want to filter a single port.");?></span><br/>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Destination</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Destination");?></td>
<td width="78%" class="vtable">
<input<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="dstnot" type="checkbox" id="dstnot" value="yes" <?php if ($pconfig['dstnot']) echo "checked"; ?>>
- <strong>not</strong>
+ <strong><?=gettext("not");?></strong>
<br />
- Use this option to invert the sense of the match.
+ <?=gettext("Use this option to invert the sense of the match.");?>
<br />
<br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td>Type:&nbsp;&nbsp;</td>
+ <td><?=gettext("Type");?>:&nbsp;&nbsp;</td>
<td>
<select<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="dsttype" class="formselect" onChange="typesel_change()">
<?php
$sel = is_specialnet($pconfig['dst']); ?>
- <option value="any" <?php if ($pconfig['dst'] == "any") { echo "selected"; } ?>>any</option>
- <option value="single" <?php if (($pconfig['dstmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>>Single host or alias</option>
- <option value="network" <?php if (!$sel) echo "selected"; ?>>Network</option>
+ <option value="any" <?php if ($pconfig['dst'] == "any") { echo "selected"; } ?>><?=gettext("any");?></option>
+ <option value="single" <?php if (($pconfig['dstmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>><?=gettext("Single host or alias");?></option>
+ <option value="network" <?php if (!$sel) echo "selected"; ?>><?=gettext("Network");?></option>
<?php if(have_ruleint_access("pptp")): ?>
- <option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo "selected"; } ?>>PPTP clients</option>
+ <option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo "selected"; } ?>><?=gettext("PPTP clients");?></option>
<?php endif; ?>
<?php if(have_ruleint_access("pppoe")): ?>
- <option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo "selected"; } ?>>PPPoE clients</option>
+ <option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo "selected"; } ?>><?=gettext("PPPoE clients");?></option>
<?php endif; ?>
<?php if(have_ruleint_access("l2tp")): ?>
- <option value="l2tp" <?php if ($pconfig['dst'] == "l2tp") { echo "selected"; } ?>>L2TP clients</option>
+ <option value="l2tp" <?php if ($pconfig['dst'] == "l2tp") { echo "selected"; } ?>><?=gettext("L2TP clients");?></option>
<?php endif; ?>
<?php foreach ($ifdisp as $if => $ifdesc): ?>
<?php if(have_ruleint_access($if)): ?>
- <option value="<?=$if;?>" <?php if ($pconfig['dst'] == $if) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?> subnet</option>
+ <option value="<?=$if;?>" <?php if ($pconfig['dst'] == $if) { echo "selected"; } ?>><?=htmlspecialchars($ifdesc);?> <?=gettext("subnet");?></option>
<option value="<?=$if;?>ip"<?php if ($pconfig['dst'] == $if . "ip") { echo "selected"; } ?>>
- <?=$ifdesc;?> address
+ <?=$ifdesc;?> <?=gettext("address");?>
</option>
<?php endif; ?>
<?php endforeach; ?>
@@ -876,7 +876,7 @@ include("head.inc");
</td>
</tr>
<tr>
- <td>Address:&nbsp;&nbsp;</td>
+ <td><?=gettext("Address");?>:&nbsp;&nbsp;</td>
<td>
<input<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="dst" type="text" class="formfldalias" id="dst" size="20" value="<?php if (!is_specialnet($pconfig['dst'])) echo htmlspecialchars($pconfig['dst']);?>">
/
@@ -892,15 +892,15 @@ include("head.inc");
</td>
</tr>
<tr id="dprtr" name="dprtr">
- <td width="22%" valign="top" class="vncellreq">Destination port range </td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Destination port range ");?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td>from:&nbsp;&nbsp;</td>
+ <td><?=gettext("from");?>:&nbsp;&nbsp;</td>
<td>
<select<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="dstbeginport" class="formselect" onchange="dst_rep_change();ext_change()">
- <option value="">(other)</option>
- <option value="any" <?php $bfound = 0; if ($pconfig['dstbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>>any</option>
+ <option value="">(<?=gettext("other"); ?>)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['dstbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any");?></option>
<?php foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstbeginport']) { echo "selected"; $bfound = 1; }?>><?=htmlspecialchars($wkportdesc);?></option>
<?php endforeach; ?>
@@ -909,11 +909,11 @@ include("head.inc");
</td>
</tr>
<tr>
- <td>to:</td>
+ <td><?=gettext("to");?>:</td>
<td>
<select<?php echo ($edit_disabled===true?' DISABLED':''); ?> name="dstendport" class="formselect" onchange="ext_change()">
- <option value="">(other)</option>
- <option value="any" <?php $bfound = 0; if ($pconfig['dstendport'] == "any") { echo "selected"; $bfound = 1; } ?>>any</option>
+ <option value="">(<?=gettext("other"); ?>)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['dstendport'] == "any") { echo "selected"; $bfound = 1; } ?>><?=gettext("any");?></option>
<?php foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstendport']) { echo "selected"; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
<?php endforeach; ?>
@@ -924,34 +924,34 @@ include("head.inc");
</table>
<br />
<span class="vexpl">
- Specify the port or port range for the destination of the packet for this rule.
+ <?=gettext("Specify the port or port range for the destination of the packet for this rule.");?>
<br />
- Hint: you can leave the <em>'to'</em> field empty if you only want to filter a single port
+ <?=gettext("Hint: you can leave the"); ?> <em><?=gettext("'to'"); ?></em> <?=gettext("field empty if you only want to filter a single port");?>
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Log</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Log");?></td>
<td width="78%" class="vtable">
<input name="log" type="checkbox" id="log" value="yes" <?php if ($pconfig['log']) echo "checked"; ?>>
- <strong>Log packets that are handled by this rule</strong>
+ <strong><?=gettext("Log packets that are handled by this rule");?></strong>
<br />
- <span class="vexpl">Hint: the firewall has limited local log space. Don't turn on logging for everything. If you want to do a lot of logging, consider using a remote syslog server (see the <a href="diag_logs_settings.php">Diagnostics: System logs: Settings</a> page).</span>
+ <span class="vexpl"><?=gettext("Hint: the firewall has limited local log space. Don't turn on logging for everything. If you want to do a lot of logging, consider using a remote syslog server"); ?> (<?=gettext("see the"); ?> <a href="diag_logs_settings.php"><?=gettext("Diagnostics: System logs: Settings"); ?></a> <?=gettext("page"); ?>).</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="52" maxlength="52" value="<?=htmlspecialchars($pconfig['descr']);?>">
<br />
- <span class="vexpl">You may enter a description here for your reference.</span>
+ <span class="vexpl"><?=gettext("You may enter a description here for your reference.");?></span>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
&nbsp;<br>&nbsp;
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input type="button" class="formbtn" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"> <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
<?php if (isset($id) && $a_filter[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
@@ -962,20 +962,20 @@ include("head.inc");
<td>&nbsp;</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Advanced features</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Advanced features");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Source OS</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Source OS");?></td>
<td width="78%" class="vtable">
<div id="showadvsourceosbox" <? if ($pconfig['os']) echo "style='display:none'"; ?>>
- <input type="button" onClick="show_advanced_sourceos()" value="Advanced"></input> - Show advanced option</a>
+ <input type="button" onClick="show_advanced_sourceos()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
</div>
<div id="showsourceosadv" <? if (empty($pconfig['os'])) echo "style='display:none'"; ?>>
- OS Type:&nbsp;
+ <?=gettext("OS Type");?>:&nbsp;
<select name="os" id="os" class="formselect">
<?php
$ostypes = array(
- "" => "any",
+ "" => gettext("any"),
"AIX" => "AIX",
"Linux" => "Linux",
"FreeBSD" => "FreeBSD",
@@ -994,15 +994,15 @@ include("head.inc");
?>
</select>
<br />
- Note: this only works for TCP rules
+ <?=gettext("Note: this only works for TCP rules");?>
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Diffserv Code Point</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Diffserv Code Point");?></td>
<td width="78%" class="vtable">
<div id="dsadv" name="dsadv" <? if ($pconfig['dscp']) echo "style='display:none'"; ?>>
- <input type="button" onClick="show_dsdiv();" value="Advanced"> - Show advanced option
+ <input type="button" onClick="show_dsdiv();" value="<?=gettext("Advanced"); ?>"> - <?=gettext("Show advanced option");?>
</div>
<div id="dsdivmain" name="dsdivmain" <? if (empty($pconfig['dscp'])) echo "style='display:none'"; ?>>
<select name="dscp" id="dscp">
@@ -1015,10 +1015,10 @@ include("head.inc");
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Advanced Options</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Advanced Options");?></td>
<td width="78%" class="vtable">
<div id="aoadv" name="aoadv">
- <input type="button" onClick="show_aodiv();" value="Advanced"> - Show advanced option
+ <input type="button" onClick="show_aodiv();" value="<?=gettext("Advanced"); ?>"> - <?=gettext("Show advanced option");?>
</div>
<div id="aodivmain" name="aodivmain" style="display:none">
<input type="checkbox" id="allowopts" value="yes" name="allowopts"<?php if($pconfig['allowopts'] == true) echo " checked"; ?>>
@@ -1028,15 +1028,15 @@ include("head.inc");
<br/><span class="vexpl"><?=gettext("This will disable auto generated reply-to for this rule.");?>
</span><p>
<input name="tag" id="tag" value="<?=htmlspecialchars($pconfig['tag']);?>">
- <br /><span class="vexpl"><?=gettext("You can mark a packet matching this rule and use this mark to match on other NAT/filter rules. It is called <b>Policy filtering</b>");?>
+ <br /><span class="vexpl"><?=gettext("You can mark a packet matching this rule and use this mark to match on other NAT/filter rules. It is called"); ?> <b><?=gettext("Policy filtering"); ?></b>
</span><p>
<input name="tagged" id="tagged" value="<?=htmlspecialchars($pconfig['tagged']);?>">
<br /><span class="vexpl"><?=gettext("You can match packet on a mark placed before on another rule.")?>
</span> <p>
- <input name="max" id="max" value="<?php echo $pconfig['max'] ?>"><br> Maximum state entries this rule can create<p>
- <input name="max-src-nodes" id="max-src-nodes" value="<?php echo $pconfig['max-src-nodes'] ?>"><br> Maximum number of unique source hosts<p>
- <input name="max-src-conn" id="max-src-conn" value="<?php echo $pconfig['max-src-conn'] ?>"><br> Maximum number of established connections per host<p>
- <input name="max-src-states" id="max-src-states" value="<?php echo $pconfig['max-src-states'] ?>"><br> Maximum state entries per host<p>
+ <input name="max" id="max" value="<?php echo $pconfig['max'] ?>"><br><?=gettext(" Maximum state entries this rule can create");?><p>
+ <input name="max-src-nodes" id="max-src-nodes" value="<?php echo $pconfig['max-src-nodes'] ?>"><br><?=gettext(" Maximum number of unique source hosts");?><p>
+ <input name="max-src-conn" id="max-src-conn" value="<?php echo $pconfig['max-src-conn'] ?>"><br><?=gettext(" Maximum number of established connections per host");?><p>
+ <input name="max-src-states" id="max-src-states" value="<?php echo $pconfig['max-src-states'] ?>"><br><?=gettext(" Maximum state entries per host");?><p>
<input name="max-src-conn-rate" id="max-src-conn-rate" value="<?php echo $pconfig['max-src-conn-rate'] ?>"> /
<select name="max-src-conn-rates" id="max-src-conn-rates">
<option value=""<?php if(intval($pconfig['max-src-conn-rates']) < 1) echo " selected"; ?>></option>
@@ -1045,22 +1045,22 @@ include("head.inc");
echo "<option value=\"{$x}\"{$selected}>{$x}</option>\n";
} ?>
</select><br />
- Maximum new connections / per second(s)
+ <?=gettext("Maximum new connections / per second(s)");?>
<p>
<input name="statetimeout" value="<?php echo $pconfig['statetimeout'] ?>"><br>
- State Timeout in seconds
+ <?=gettext("State Timeout in seconds");?>
<p />
- <p><strong>NOTE: Leave fields blank to disable that feature.</strong>
+ <p><strong><?=gettext("NOTE: Leave fields blank to disable that feature.");?></strong>
</div>
</td>
</tr>
<tr id="tcpflags" name="tcpflags">
- <td width="22%" valign="top" class="vncell">TCP flags</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("TCP flags");?></td>
<td width="78%" class="vtable">
<div id="showtcpflagsbox" <? if ($pconfig['tcpflags_any'] || $pconfig['tcpflags1'] || $pconfig['tcpflags2']) echo "style='display:none'"; ?>>
- <input type="button" onClick="show_advanced_tcpflags()" value="Advanced"></input> - Show advanced option</a>
+ <input type="button" onClick="show_advanced_tcpflags()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
</div>
<div id="showtcpflagsadv" <? if (empty($pconfig['tcpflags_any']) && empty($pconfig['tcpflags1']) && empty($pconfig['tcpflags2'])) echo "style='display:none'"; ?>>
<div id="tcpheader" name="tcpheader">
@@ -1091,46 +1091,46 @@ include("head.inc");
<center>
</div>
<br/><center>
- <input onClick='tcpflags_anyclick(this);' type='checkbox' name='tcpflags_any' value='on' <?php if ($pconfig['tcpflags_any']) echo "checked"; ?>><strong>Any flags.</strong><br/></center>
+ <input onClick='tcpflags_anyclick(this);' type='checkbox' name='tcpflags_any' value='on' <?php if ($pconfig['tcpflags_any']) echo "checked"; ?>><strong><?=gettext("Any flags.");?></strong><br/></center>
<br/>
- <span class="vexpl">Use this to choose TCP flags that must
- be set or cleared for this rule to match.</span>
+ <span class="vexpl"><?=gettext("Use this to choose TCP flags that must".
+ "be set or cleared for this rule to match.");?></span>
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">State Type</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("State Type");?></td>
<td width="78%" class="vtable">
<div id="showadvstatebox" <? if (!empty($pconfig['statetype']) && $pconfig['statetype'] != "keep state") echo "style='display:none'"; ?>>
- <input type="button" onClick="show_advanced_state()" value="Advanced"></input> - Show advanced option</a>
+ <input type="button" onClick="show_advanced_state()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
</div>
<div id="showstateadv" <? if (empty($pconfig['statetype']) || $pconfig['statetype'] == "keep state") echo "style='display:none'"; ?>>
<select name="statetype">
- <option value="keep state" <?php if(!isset($pconfig['statetype']) or $pconfig['statetype'] == "keep state") echo "selected"; ?>>keep state</option>
- <option value="sloppy state" <?php if($pconfig['statetype'] == "sloppy state") echo "selected"; ?>>sloppy state</option>
- <option value="synproxy state"<?php if($pconfig['statetype'] == "synproxy state") echo "selected"; ?>>synproxy state</option>
- <option value="none"<?php if($pconfig['statetype'] == "none") echo "selected"; ?>>none</option>
- </select><br>HINT: Select which type of state tracking mechanism you would like to use. If in doubt, use keep state.
+ <option value="keep state" <?php if(!isset($pconfig['statetype']) or $pconfig['statetype'] == "keep state") echo "selected"; ?>><?=gettext("keep state");?></option>
+ <option value="sloppy state" <?php if($pconfig['statetype'] == "sloppy state") echo "selected"; ?>><?=gettext("sloppy state");?></option>
+ <option value="synproxy state"<?php if($pconfig['statetype'] == "synproxy state") echo "selected"; ?>><?=gettext("synproxy state");?></option>
+ <option value="none"<?php if($pconfig['statetype'] == "none") echo "selected"; ?>><?=gettext("none");?></option>
+ </select><br><?=gettext("HINT: Select which type of state tracking mechanism you would like to use. If in doubt, use keep state.");?>
<p>
<table width="90%">
- <tr><td width="25%"><ul><li>keep state</li></td><td>Works with all IP protocols.</ul></td></tr>
- <tr><td width="25%"><ul><li>sloppy state</li></td><td>Works with all IP protocols.</ul></td></tr>
- <tr><td width="25%"><ul><li>synproxy state</li></td><td>Proxies incoming TCP connections to help protect servers from spoofed TCP SYN floods. This option includes the functionality of keep state and modulate state combined.</ul></td></tr>
- <tr><td width="25%"><ul><li>none</li></td><td>Do not use state mechanisms to keep track. This is only useful if you're doing advanced queueing in certain situations. Please check the documentation.</ul></td></tr>
+ <tr><td width="25%"><ul><li><?=gettext("keep state");?></li></td><td><?=gettext("Works with all IP protocols.");?></ul></td></tr>
+ <tr><td width="25%"><ul><li><?=gettext("sloppy state");?></li></td><td><?=gettext("Works with all IP protocols.");?></ul></td></tr>
+ <tr><td width="25%"><ul><li><?=gettext("synproxy state");?></li></td><td><?=gettext("Proxies incoming TCP connections to help protect servers from spoofed TCP SYN floods. This option includes the functionality of keep state and modulate state combined.");?></ul></td></tr>
+ <tr><td width="25%"><ul><li><?=gettext("none");?></li></td><td><?=gettext("Do not use state mechanisms to keep track. This is only useful if you're doing advanced queueing in certain situations. Please check the documentation.");?></ul></td></tr>
</table>
</p>
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">No XMLRPC Sync</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("No XMLRPC Sync");?></td>
<td width="78%" class="vtable">
<div id="showadvnoxmlrpcsyncbox" <? if ($pconfig['nosync']) echo "style='display:none'"; ?>>
- <input type="button" onClick="show_advanced_noxmlrpc()" value="Advanced"></input> - Show advanced option</a>
+ <input type="button" onClick="show_advanced_noxmlrpc()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
</div>
<div id="shownoxmlrpcadv" <? if (empty($pconfig['nosync'])) echo "style='display:none'"; ?>>
<input type="checkbox" name="nosync"<?php if($pconfig['nosync']) echo " CHECKED"; ?>><br>
- HINT: This prevents the rule from automatically syncing to other CARP members.
+ <?=gettext("HINT: This prevents the rule from automatically syncing to other CARP members.");?>
</div>
</td>
</tr>
@@ -1146,10 +1146,10 @@ include("head.inc");
}
?>
<tr>
- <td width="22%" valign="top" class="vncell">Schedule</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Schedule");?></td>
<td width="78%" class="vtable">
<div id="showadvschedulebox" <? if (!empty($pconfig['sched'])) echo "style='display:none'"; ?>>
- <input type="button" onClick="show_advanced_schedule()" value="Advanced"></input> - Show advanced option</a>
+ <input type="button" onClick="show_advanced_schedule()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
</div>
<div id="showscheduleadv" <? if (empty($pconfig['sched'])) echo "style='display:none'"; ?>>
<select name='sched'>
@@ -1168,19 +1168,19 @@ include("head.inc");
}
?>
</select>
- <p>Leave as 'none' to leave the rule enabled all the time.</p>
+ <p><?=gettext("Leave as 'none' to leave the rule enabled all the time.");?></p>
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Gateway</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Gateway");?></td>
<td width="78%" class="vtable">
<div id="showadvgatewaybox" <? if (!empty($pconfig['gateway'])) echo "style='display:none'"; ?>>
- <input type="button" onClick="show_advanced_gateway()" value="Advanced"></input> - Show advanced option</a>
+ <input type="button" onClick="show_advanced_gateway()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
</div>
<div id="showgatewayadv" <? if (empty($pconfig['gateway'])) echo "style='display:none'"; ?>>
<select name='gateway'>
- <option value="" >default</option>
+ <option value="" ><?=gettext("default");?></option>
<?php
/* build a list of gateways */
$gateways = return_gateways_array();
@@ -1209,15 +1209,15 @@ include("head.inc");
}
?>
</select>
- <p><strong>Leave as 'default' to use the system routing table. Or choose a gateway to utilize policy based routing.</strong></p>
+ <p><strong><?=gettext("Leave as 'default' to use the system routing table. Or choose a gateway to utilize policy based routing.");?></strong></p>
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">In/Out</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("In/Out");?></td>
<td width="78%" class="vtable">
<div id="showadvinoutbox" <? if (!empty($pconfig['dnpipe'])) echo "style='display:none'"; ?>>
- <input type="button" onClick="show_advanced_inout()" value="Advanced"></input> - Show advanced option</a>
+ <input type="button" onClick="show_advanced_inout()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
</div>
<div id="showinoutadv" <? if (empty($pconfig['dnpipe'])) echo "style='display:none'"; ?>>
<select name="dnpipe">
@@ -1258,16 +1258,16 @@ include("head.inc");
?>
</select>
<br />
- <span class="vexpl">Choose the Out queue/Virtual interface only if you have selected In too. <br/> The Out selection is applied to traffic going out the interface the rule is created, In is the incoming one. <br/> If you are creating a rule on the Floating tab if the direction is In then the same rules apply, if the direction is out the selections are reverted Out is for incoming and In is for outgoing and if you do not select any direction use only the In since the Out selection does not make sense in there to prevent oddities.</span>
+ <span class="vexpl"><?=gettext("Choose the Out queue/Virtual interface only if you have selected In too.")."<br/>".gettext("The Out selection is applied to traffic going out the interface the rule is created, In is the incoming one.")."<br/>".gettext("If you are creating a rule on the Floating tab if the direction is In then the same rules apply, if the direction is out the selections are reverted Out is for incoming and In is for outgoing and if you do not select any direction use only the In since the Out selection does not make sense in there to prevent oddities.");?></span>
</div>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Ackqueue/Queue</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Ackqueue/Queue");?></td>
<td width="78%" class="vtable">
<div id="showadvackqueuebox" <? if (!empty($pconfig['defaultqueue'])) echo "style='display:none'"; ?>>
- <input type="button" onClick="show_advanced_ackqueue()" value="Advanced"></input> - Show advanced option</a>
+ <input type="button" onClick="show_advanced_ackqueue()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
</div>
<div id="showackqueueadv" <? if (empty($pconfig['defaultqueue'])) echo "style='display:none'"; ?>>
<select name="ackqueue">
@@ -1308,14 +1308,14 @@ include("head.inc");
?>
</select>
<br />
- <span class="vexpl">Choose the Acknowledge Queue only if you have selected Queue.</span>
+ <span class="vexpl"><?=gettext("Choose the Acknowledge Queue only if you have selected Queue.");?></span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Layer7</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Layer7");?></td>
<td width="78%" class="vtable">
<div id="showadvlayer7box" <? if (!empty($pconfig['l7container'])) echo "style='display:none'"; ?>>
- <input type="button" onClick="show_advanced_layer7()" value="Advanced"></input> - Show advanced option</a>
+ <input type="button" onClick="show_advanced_layer7()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
</div>
<div id="showlayer7adv" <? if (empty($pconfig['l7container'])) echo "style='display:none'"; ?>>
<select name="l7container">
@@ -1335,8 +1335,8 @@ include("head.inc");
</select>
<br/>
<span class="vexpl">
- Choose a Layer7 container to apply application protocol inspection rules.
- These are valid for TCP and UDP protocols only.
+ <?=gettext("Choose a Layer7 container to apply application protocol inspection rules. " .
+ "These are valid for TCP and UDP protocols only.");?>
</span>
</div>
</td>
@@ -1345,7 +1345,7 @@ include("head.inc");
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
&nbsp;<br>&nbsp;
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input type="button" class="formbtn" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"> <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
<?php if (isset($id) && $a_filter[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/firewall_schedule.php b/usr/local/www/firewall_schedule.php
index f204497..cfa160b 100644
--- a/usr/local/www/firewall_schedule.php
+++ b/usr/local/www/firewall_schedule.php
@@ -39,15 +39,16 @@
##|*MATCH=firewall_schedule.php*
##|-PRIV
-$pgtitle = array("Firewall","Schedules");
-$dayArray = array ('Mon','Tues','Wed','Thur','Fri','Sat','Sun');
-$monthArray = array ('January','February','March','April','May','June','July','August','September','October','November','December');
+$dayArray = array (gettext('Mon'),gettext('Tues'),gettext('Wed'),gettext('Thur'),gettext('Fri'),gettext('Sat'),gettext('Sun'));
+$monthArray = array (gettext('January'),gettext('February'),gettext('March'),gettext('April'),gettext('May'),gettext('June'),gettext('July'),gettext('August'),gettext('September'),gettext('October'),gettext('November'),gettext('December'));
require("guiconfig.inc");
require("filter.inc");
require("shaper.inc");
+$pgtitle = array(gettext("Firewall"),gettext("Schedules"));
+
if (!is_array($config['schedules']['schedule']))
$config['schedules']['schedule'] = array();
@@ -73,7 +74,7 @@ if ($_GET['act'] == "del") {
}
if($is_schedule_referenced == true) {
- $savemsg = "Cannot delete Schedule. Currently in use by {$referenced_by}";
+ $savemsg = sprintf(gettext("Cannot delete Schedule. Currently in use by %s"),$referenced_by);
} else {
unset($a_schedules[$_GET['id']]);
write_config();
@@ -92,9 +93,9 @@ include("head.inc");
<form action="firewall_schedule.php" method="post">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="25%" class="listhdrr">Name</td>
- <td width="35%" class="listhdrr">Time Range(s)</td>
- <td width="35%" class="listhdr">Description</td>
+ <td width="25%" class="listhdrr"><?=gettext("Name");?></td>
+ <td width="35%" class="listhdrr"><?=gettext("Time Range(s)");?></td>
+ <td width="35%" class="listhdr"><?=gettext("Description");?></td>
<td width="5%" class="list sort_ignore">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -110,7 +111,7 @@ include("head.inc");
<?=htmlspecialchars($schedule['name']);
$schedstatus = filter_get_time_based_rule_status($schedule);
if ($schedstatus) { ?>
- &nbsp;<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_frmfld_time.png" title="Schedule is currently active" width="17" height="17" border="0">
+ &nbsp;<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_frmfld_time.png" title="<?=gettext("Schedule is currently active");?>" width="17" height="17" border="0">
<?php } ?>
</td>
@@ -215,8 +216,8 @@ include("head.inc");
<td valign="middle" nowrap class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td valign="middle"><a href="firewall_schedule_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="edit alias"></a></td>
- <td><a href="firewall_schedule.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this schedule?')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="delete alias"></a></td>
+ <td valign="middle"><a href="firewall_schedule_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit alias");?>"></a></td>
+ <td><a href="firewall_schedule.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext('Do you really want to delete this schedule?');?>')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete alias");?>"></a></td>
</tr>
</table>
</td>
@@ -235,7 +236,7 @@ include("head.inc");
</tr>
<tr>
<td class="tabcont" colspan="3">
- <p><span class="vexpl"><span class="red"><strong>Note:<br></strong></span>Schedules act as placeholders for time ranges to be used in Firewall Rules.</span></p>
+ <p><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br></strong></span><?=gettext("Schedules act as placeholders for time ranges to be used in Firewall Rules.");?></span></p>
</td>
</tr>
</table>
diff --git a/usr/local/www/firewall_schedule_edit.php b/usr/local/www/firewall_schedule_edit.php
index 62f0d99..74497c1 100644
--- a/usr/local/www/firewall_schedule_edit.php
+++ b/usr/local/www/firewall_schedule_edit.php
@@ -53,20 +53,21 @@ function schedule_sort(){
usort($config['schedules']['schedule'], "schedulecmp");
}
-$pgtitle = array("Firewall","Schedules","Edit");
require("guiconfig.inc");
require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
+$pgtitle = array(gettext("Firewall"),gettext("Schedules"),gettext("Edit"));
+
$starttimehr = 00;
$starttimemin = 00;
$stoptimehr = 23;
$stoptimemin = 59;
-$dayArray = array ('Mon','Tues','Wed','Thur','Fri','Sat','Sun');
-$monthArray = array ('January','February','March','April','May','June','July','August','September','October','November','December');
+$dayArray = array (gettext('Mon'),gettext('Tues'),gettext('Wed'),gettext('Thur'),gettext('Fri'),gettext('Sat'),gettext('Sun'));
+$monthArray = array (gettext('January'),gettext('February'),gettext('March'),gettext('April'),gettext('May'),gettext('June'),gettext('July'),gettext('August'),gettext('September'),gettext('October'),gettext('November'),gettext('December'));
if (!is_array($config['schedules']['schedule']))
$config['schedules']['schedule'] = array();
@@ -89,18 +90,18 @@ if (isset($id) && $a_schedules[$id]) {
if ($_POST) {
if(strtolower($_POST['name']) == "lan")
- $input_errors[] = "Schedule may not be named LAN.";
+ $input_errors[] = gettext("Schedule may not be named LAN.");
if(strtolower($_POST['name']) == "wan")
- $input_errors[] = "Schedule may not be named WAN.";
+ $input_errors[] = gettext("Schedule may not be named WAN.");
if(strtolower($_POST['name']) == "")
- $input_errors[] = "Schedule name cannot be blank.";
+ $input_errors[] = gettext("Schedule name cannot be blank.");
$x = is_validaliasname($_POST['name']);
if (!isset($x)) {
- $input_errors[] = "Reserved word used for schedule name.";
+ $input_errors[] = gettext("Reserved word used for schedule name.");
} else {
if (is_validaliasname($_POST['name']) == false)
- $input_errors[] = "The schedule name may only consist of the characters a-z, A-Z, 0-9";
+ $input_errors[] = gettext("The schedule name may only consist of the characters a-z, A-Z, 0-9");
}
/* check for name conflicts */
@@ -109,7 +110,7 @@ if ($_POST) {
continue;
if ($schedule['name'] == $_POST['name']) {
- $input_errors[] = "A Schedule with this name already exists.";
+ $input_errors[] = gettext("A Schedule with this name already exists.");
break;
}
}
@@ -166,7 +167,7 @@ if ($_POST) {
}
if (!$timerangeFound)
- $input_errors[] = "The schedule must have at least one time range configured.";
+ $input_errors[] = gettext("The schedule must have at least one time range configured.");
if (!$input_errors) {
@@ -766,33 +767,33 @@ EOD;
<form action="firewall_schedule_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Schedule information</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Schedule information");?></td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td width="15%" valign="top" class="vncellreq">Schedule Name</td>
+ <td width="15%" valign="top" class="vncellreq"><?=gettext("Schedule Name");?></td>
<td width="85%" class="vtable">
<?php if(is_schedule_inuse($pconfig['name']) == true): ?>
<input name="name" type="hidden" id="name" size="40" value="<?=htmlspecialchars($pconfig['name']);?>" />
<?php echo $pconfig['name']; ?>
<p>
- <span class="vexpl">NOTE: This schedule is in use so the name may not be modified!</span>
+ <span class="vexpl"><?=gettext("NOTE: This schedule is in use so the name may not be modified!");?></span>
</p>
<?php else: ?>
<input name="name" type="text" id="name" size="40" maxlength="40" class="formfld unknown" value="<?=htmlspecialchars($pconfig['name']);?>"><br>
<span class="vexpl">
- The name of the alias may only consist of the characters a-z, A-Z and 0-9
+ <?=gettext("The name of the alias may only consist of the characters a-z, A-Z and 0-9");?>
</span>
<?php endif; ?>
</td>
</tr>
<tr>
- <td width="15%" valign="top" class="vncell">Description</td>
+ <td width="15%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="85%" class="vtable"><input name="descr" type="text" id="descr" size="40" maxlength="40" class="formfld unknown" value="<?=htmlspecialchars($pconfig['descr']);?>"><br>
<span class="vexpl">
- You may enter a description here for your reference (not parsed).
+ <?=gettext("You may enter a description here for your reference (not parsed).");?>
</span>
</td>
@@ -800,7 +801,7 @@ EOD;
<tr>
</tr>
<tr>
- <td width="15%" valign="top" class="vncellreq">Month</td>
+ <td width="15%" valign="top" class="vncellreq"><?=gettext("Month");?></td>
<td width="85%" class="vtable">
<select name="monthsel" class="formselect" id="monthsel" onchange="update_month();">
<?php
@@ -842,13 +843,13 @@ EOD;
<TR><TD COLSPAN="7" ALIGN=center class="listbg"><B><?php echo date("F Y", mktime(0, 0, 0, date($monthcounter), 1, date($yearcounter)));?></B></TD>
</TR>
<TR>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p1');"><u><b>Mon</b></u></TD>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p2');"><u><b>Tue</b></u></TD>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p3');"><u><b>Wed</b></u></TD>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p4');"><u><b>Thu</b></u></TD>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p5');"><u><b>Fri</b></u></TD>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p6');"><u><b>Sat</b></u></TD>
- <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p7');"><u><b>Sun</b></u></TD>
+ <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p1');"><u><b><?=gettext("Mon");?></b></u></TD>
+ <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p2');"><u><b><?=gettext("Tue");?></b></u></TD>
+ <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p3');"><u><b><?=gettext("Wed");?></b></u></TD>
+ <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p4');"><u><b><?=gettext("Thu");?></b></u></TD>
+ <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p5');"><u><b><?=gettext("Fri");?></b></u></TD>
+ <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p6');"><u><b><?=gettext("Sat");?></b></u></TD>
+ <TD ALIGN=center class="listhdrr" style="cursor: pointer;" onClick="daytoggle('w1p7');"><u><b><?=gettext("Sun");?></b></u></TD>
</TR>
<?php
$firstmonth = FALSE;
@@ -902,15 +903,15 @@ EOD;
} //end for loop
?>
<br/>
- Click individual date to select that date only. Click the appropriate weekday Header to select all occurences of that weekday.
+ <?=gettext("Click individual date to select that date only. Click the appropriate weekday Header to select all occurences of that weekday.");?>
</td>
</tr>
<tr>
- <td width="15%" valign="top" class="vncellreq">Time</td>
+ <td width="15%" valign="top" class="vncellreq"><?=gettext("Time");?></td>
<td width="85%" class="vtable">
<table cellspacing=2 class="tabcont">
<tr>
- <td class="listhdrr" align="center">Start Time</td><td></td><td class="listhdrr" align="center">Stop Time</td>
+ <td class="listhdrr" align="center"><?=gettext("Start Time");?></td><td></td><td class="listhdrr" align="center"><?=gettext("Stop Time");?></td>
</tr>
<tr>
<td>
@@ -923,14 +924,14 @@ EOD;
echo "</option>";
}
?>
- </select>&nbsp;Hr&nbsp;&nbsp;
+ </select>&nbsp;<?=gettext("Hr"); ?>&nbsp;&nbsp;
<select name="starttimemin" class="formselect" id="starttimemin">
<option value="00">00</option>
<option value="15">15</option>
<option value="30">30</option>
<option value="45">45</option>
<option value="59">59</option>
- </select>&nbsp;Min
+ </select>&nbsp;<?=gettext("Min"); ?>
</td>
<td></td>
<td>
@@ -948,33 +949,33 @@ EOD;
echo "</option>";
}
?>
- </select>&nbsp;Hr&nbsp;&nbsp;
+ </select>&nbsp;<?=gettext("Hr");?>&nbsp;&nbsp;
<select name="stoptimemin" class="formselect" id="stoptimemin">
<option value="00">00</option>
<option value="15">15</option>
<option value="30">30</option>
<option value="45">45</option>
<option value="59" SELECTED>59</option>
- </select>&nbsp;Min
+ </select>&nbsp;<?=gettext("Min");?>
</td>
</tr>
</table><br>
- Select the time range for the day(s) selected on the Month(s) above. A full day is 0:00-23:59.
+ <?=gettext("Select the time range for the day(s) selected on the Month(s) above. A full day is 0:00-23:59.")?>
</td>
</tr>
<tr>
- <td width="15%" valign="top" class="vncell">Time Range Description</td>
+ <td width="15%" valign="top" class="vncell"><?=gettext("Time Range Description")?></td>
<td width="85%" class="vtable"><input name="timerangedescr" type="text" class="formfld unknown" id="timerangedescr" size="40" maxlength="40"><br>
<span class="vexpl">
- You may enter a description here for your reference (not parsed).
+ <?=gettext("You may enter a description here for your reference (not parsed).")?>
</span>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input type="button" value="Add Time" class="formbtn" onclick="javascript:processEntries();">&nbsp;&nbsp;&nbsp;
- <input type="button" value="Clear Selection" class="formbtn" onclick="javascript:clearCalendar(); clearTime(); clearDescr();">
+ <input type="button" value="<?=gettext("Add Time");?>" class="formbtn" onclick="javascript:processEntries();">&nbsp;&nbsp;&nbsp;
+ <input type="button" value="<?=gettext("Clear Selection");?>" class="formbtn" onclick="javascript:clearCalendar(); clearTime(); clearDescr();">
</td>
</tr>
<tr>
@@ -983,18 +984,18 @@ EOD;
</td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Schedule repeat</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Schedule repeat");?></td>
</tr>
<tr>
- <td width="15%" valign="top" class="vncellreq">Configured Ranges</td>
+ <td width="15%" valign="top" class="vncellreq"><?=gettext("Configured Ranges");?></td>
<td width="85%">
<table id="scheduletable">
<tbody>
<tr>
- <TD ALIGN="center" class="listbg" width="35%">Day(s)</td>
- <TD ALIGN="center" class="listbg" width="12%">Start Time</td>
- <TD ALIGN="center" class="listbg" width="11%">Stop Time</td>
- <TD ALIGN="center" class="listbg" width="42%">Description</td>
+ <TD ALIGN="center" class="listbg" width="35%"><?=gettext("Day(s)");?></td>
+ <TD ALIGN="center" class="listbg" width="12%"><?=gettext("Start Time");?></td>
+ <TD ALIGN="center" class="listbg" width="11%"><?=gettext("Stop Time");?></td>
+ <TD ALIGN="center" class="listbg" width="42%"><?=gettext("Description");?></td>
</tr>
<?php
if ($getSchedule){
@@ -1152,8 +1153,8 @@ EOD;
<tr>
<td width="15%" valign="top">&nbsp;</td>
<td width="85%">
- <input id="submit" name="submit" type="submit" onclick="return checkForRanges();" class="formbtn" value="Save" />
- <input id="cancelbutton" name="cancelbutton" type="button" class="formbtn" value="Cancel" onclick="history.back()" />
+ <input id="submit" name="submit" type="submit" onclick="return checkForRanges();" class="formbtn" value="<?=gettext("Save"); ?>" />
+ <input id="cancelbutton" name="cancelbutton" type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()" />
<?php if (isset($id) && $a_schedules[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>" />
<?php endif; ?>
diff --git a/usr/local/www/firewall_shaper.php b/usr/local/www/firewall_shaper.php
index e456c61..26954c2 100755
--- a/usr/local/www/firewall_shaper.php
+++ b/usr/local/www/firewall_shaper.php
@@ -51,7 +51,7 @@ if($_GET['reset'] <> "") {
exit;
}
-$pgtitle = array("Firewall","Traffic Shaper");
+$pgtitle = array(gettext("Firewall"),gettext("Traffic Shaper"));
$statusurl = "status_queues.php";
$shaperIFlist = get_configured_interface_with_descr();
@@ -156,7 +156,7 @@ if ($_GET) {
} else if ($addnewaltq) {
$q = new altq_root_queue();
} else
- $input_errors[] = "Could not create new queue/discipline!";
+ $input_errors[] = gettext("Could not create new queue/discipline!");
if ($q) {
$q->SetInterface($interface);
@@ -172,7 +172,7 @@ if ($_GET) {
if ($queue)
$output_form .= $queue->build_form();
else
- $input_errors[] = "Queue not found!";
+ $input_errors[] = gettext("Queue not found!");
break;
case "enable":
if ($queue) {
@@ -181,7 +181,7 @@ if ($_GET) {
write_config();
mark_subsystem_dirty('shaper');
} else
- $input_errors[] = "Queue not found!";
+ $input_errors[] = gettext("Queue not found!");
break;
case "disable":
if ($queue) {
@@ -190,7 +190,7 @@ if ($_GET) {
write_config();
mark_subsystem_dirty('shaper');
} else
- $input_errors[] = "Queue not found!";
+ $input_errors[] = gettext("Queue not found!");
break;
default:
$output_form .= "<p class=\"pgtitle\">" . $default_shaper_msg."</p>";
@@ -267,7 +267,7 @@ if ($_GET) {
read_altq_config();
$output_form .= $tmp->build_form();
} else
- $input_errors[] = "Could not add new queue.";
+ $input_errors[] = gettext("Could not add new queue.");
} else if ($_POST['apply']) {
write_config();
@@ -342,7 +342,7 @@ $tree .= "</ul>";
if (!$dontshow || $newqueue) {
$output_form .= "<tr><td width=\"22%\" valign=\"center\" class=\"vncellreq\">";
-$output_form .= "<br />Queue Actions<br />";
+$output_form .= "<br />" . gettext("Queue Actions") . "<br />";
$output_form .= "</td><td valign=\"center\" class=\"vncellreq\" width=\"78%\"><br />";
$output_form .= "<input type=\"submit\" name=\"Submit\" value=\"" . gettext("Save") . "\" class=\"formbtn\" />";
@@ -353,7 +353,7 @@ if ($can_add || $addnewaltq) {
$output_form .= "&queue=" . $queue->GetQname();
}
$output_form .= "&action=add\">";
- $output_form .= "<input type=\"button\" class=\"formbtn\" name=\"add\" value=\"Add new queue\">";
+ $output_form .= "<input type=\"button\" class=\"formbtn\" name=\"add\" value=\"" . gettext("Add new queue") . "\">";
$output_form .= "</a>";
$output_form .= "<a href=\"firewall_shaper.php?interface=";
$output_form .= $interface . "&queue=";
@@ -363,9 +363,9 @@ if ($can_add || $addnewaltq) {
$output_form .= "&action=delete\">";
$output_form .= "<input type=\"button\" class=\"formbtn\" name=\"delete\"";
if ($queue)
- $output_form .= " value=\"Delete this queue\">";
+ $output_form .= " value=\"" . gettext("Delete this queue") . "\">";
else
- $output_form .= " value=\"Disable shaper on interface\">";
+ $output_form .= " value=\"" . gettext("Disable shaper on interface") . "\">";
$output_form .= "</a>";
}
$output_form .= "<br /></td></tr>";
@@ -402,17 +402,17 @@ include("fbegin.inc");
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('shaper')): ?><p>
-<?php print_info_box_np("The traffic shaper configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The traffic shaper configuration has been changed.")."<br>".gettext("You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
<?php
$tab_array = array();
- $tab_array[0] = array("By Interface", true, "firewall_shaper.php");
- $tab_array[1] = array("By Queue", false, "firewall_shaper_queues.php");
- $tab_array[2] = array("Limiter", false, "firewall_shaper_vinterface.php");
- $tab_array[3] = array("Layer7", false, "firewall_shaper_layer7.php");
- $tab_array[4] = array("Wizards", false, "firewall_shaper_wizards.php");
+ $tab_array[0] = array(gettext("By Interface"), true, "firewall_shaper.php");
+ $tab_array[1] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
+ $tab_array[2] = array(gettext("Limiter"), false, "firewall_shaper_vinterface.php");
+ $tab_array[3] = array(gettext("Layer7"), false, "firewall_shaper_layer7.php");
+ $tab_array[4] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -423,7 +423,7 @@ include("fbegin.inc");
<?php if (count($altq_list_queues) > 0): ?>
<tr class="tabcont"><td width="25%" align="left">
<a href="firewall_shaper.php?action=resetall" >
- <input type="button" value="Remove Shaper" class="formbtn">
+ <input type="button" value="<?=gettext("Remove Shaper")?>" class="formbtn">
</a>
</td><td width="75%"> </td></tr>
<? endif; ?>
diff --git a/usr/local/www/firewall_shaper_layer7.php b/usr/local/www/firewall_shaper_layer7.php
index 3e2dc22..7a58e12 100755
--- a/usr/local/www/firewall_shaper_layer7.php
+++ b/usr/local/www/firewall_shaper_layer7.php
@@ -56,14 +56,14 @@ $avail_behaviours_limiter = get_dummynet_name_list();
$show_proto_form = false;
//More variables
-$pgtitle = array("Firewall","Traffic Shaper", "Layer7");
+$pgtitle = array(gettext("Firewall"),gettext("Traffic Shaper"), gettext("Layer7"));
$statusurl = "status_queues.php";
$output_form = "";
$default_layer7shaper_msg = "<tr><td colspan=\"4\">";
-$default_layer7shaper_msg .= "<p><span class=\"vexpl\"><span class=\"red\"><strong>Note:<br>";
-$default_layer7shaper_msg .= "</strong></span>You can add new layer7 protocol patterns by simply uploading the file <a href=\"diag_patterns.php\">here.</a><br>";
+$default_layer7shaper_msg .= sprintf("<p><span class=\"vexpl\"><span class=\"red\"><strong>%s:<br>", gettext("Note"));
+$default_layer7shaper_msg .= "</strong></span>" . gettext("You can add new layer7 protocol patterns by simply uploading the file") . " <a href=\"diag_patterns.php\">" . gettext("here") . ".</a><br>";
$default_layer7shaper_msg .= "</td></tr>";
@@ -109,7 +109,7 @@ if ($_GET) {
}
else {
$show_proto_form = false;
- $input_errors[] = "Layer7 Rules Container not found!";
+ $input_errors[] = gettext("Layer7 Rules Container not found!");
}
break;
default:
@@ -159,7 +159,7 @@ else if ($_POST) {
}
else {
if(sizeof($dupes) > 0) {
- $dupe_error = "Found the following repeated protocol definitions: ";
+ $dupe_error = gettext("Found the following repeated protocol definitions") . ": ";
foreach($dupes as $dupe)
$dupe_error .= "$dupe ";
$input_errors[] .= $dupe_error;
@@ -399,17 +399,17 @@ include("fbegin.inc");
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('shaper')): ?><p>
-<?php print_info_box_np("The traffic shaper configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The traffic shaper configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
<?php
$tab_array = array();
- $tab_array[0] = array("By Interface", false, "firewall_shaper.php");
- $tab_array[1] = array("By Queue", false, "firewall_shaper_queues.php");
- $tab_array[2] = array("Limiter", false, "firewall_shaper_vinterface.php");
- $tab_array[3] = array("Layer7", true, "firewall_shaper_layer7.php");
- $tab_array[4] = array("Wizards", false, "firewall_shaper_wizards.php");
+ $tab_array[0] = array(gettext("By Interface"), false, "firewall_shaper.php");
+ $tab_array[1] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
+ $tab_array[2] = array(gettext("Limiter"), false, "firewall_shaper_vinterface.php");
+ $tab_array[3] = array(gettext("Layer7"), true, "firewall_shaper_layer7.php");
+ $tab_array[4] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -430,7 +430,7 @@ include("fbegin.inc");
?>
<br/><br/>
<a href="firewall_shaper_layer7.php?action=add">
- <img src="./themes/<?=$g['theme']; ?>/images/icons/icon_plus.gif" title="Create new l7 rules group" width="17" height="17" border="0"> Create new l7 rules group
+ <img src="./themes/<?=$g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("Create new l7 rules group"); ?>" width="17" height="17" border="0"> <?=gettext("Create new l7 rules group"); ?>
</a><br/>
</td>
<td width="75%" valign="top" align="center">
@@ -443,7 +443,7 @@ include("fbegin.inc");
<?php if($show_proto_form): ?>
<td width = "22%" valign = "top" class = "vncellreq">
<div id = "addressnetworkport">
- Rule(s)
+ <?=gettext("Rule(s)"); ?>
</div>
</td>
@@ -455,7 +455,7 @@ include("fbegin.inc");
<td colspan = "4">
<div style = "font-size: 8pt; padding:5px; margin-top: 16px; margin-bottom: 16px; border:1px dashed #000066;"
id = "itemhelp">
- Add one or more rules
+ <?=gettext("Add one or more rules"); ?>
</div>
</td>
</tr>
@@ -464,21 +464,21 @@ include("fbegin.inc");
<td>
<div style = "font-size: 8pt; padding:5px;"
id = "onecolumn">
- Protocol
+ <?=gettext("Protocol"); ?>
</div>
</td>
<td>
<div style = "font-size: 8pt; padding:5px;"
id = "twocolumn">
- Structure
+ <?=gettext("Structure"); ?>
</div>
</td>
<td>
<div style = "font-size: 8pt; padding:5px;"
id = "threecolumn">
- Behaviour
+ <?=gettext("Behaviour"); ?>
</div>
</td>
</tr>
@@ -540,7 +540,7 @@ include("fbegin.inc");
<? endif; ?>
</td>
<td>
- <input type="image" src="/themes/<? echo $g['theme'];?>/images/icons/icon_x.gif" onclick="removeRow('maintable',this.parentNode.parentNode); return false;" value="Delete" />
+ <input type="image" src="/themes/<? echo $g['theme'];?>/images/icons/icon_x.gif" onclick="removeRow('maintable',this.parentNode.parentNode); return false;" value="<?=gettext("Delete"); ?>" />
</td>
</tr>
@@ -556,7 +556,7 @@ include("fbegin.inc");
<a onclick = "javascript:addRow('maintable'); return false;" href="#"> <img border = "0"
src = "/themes/<?=$g['theme']; ?>/images/icons/icon_plus.gif"
- alt = "" title = "add another entry" /> </a>
+ alt = "" title = "<?=gettext("add another entry"); ?>" /> </a>
</td>
</tr>
@@ -567,14 +567,14 @@ include("fbegin.inc");
<td width = "78%">
<input id = "submit"
- name = "submit" type = "submit" class = "formbtn" value = "Save" />
+ name = "submit" type = "submit" class = "formbtn" value = "<?=gettext("Save"); ?>" />
<a href= "firewall_shaper_layer7.php">
<input id = "cancelbutton"
- name = "cancelbutton" type = "button" class = "formbtn" value = "Cancel" /></a>
+ name = "cancelbutton" type = "button" class = "formbtn" value = "<?=gettext("Cancel"); ?>" /></a>
<?php if($container): ?>
- <input id = "delete" type="submit" class="formbtn" name="delete" value="Delete"></a>
+ <input id = "delete" type="submit" class="formbtn" name="delete" value="<?=gettext("Delete"); ?>"></a>
<? endif ?>
</td>
</tr>
diff --git a/usr/local/www/firewall_shaper_queues.php b/usr/local/www/firewall_shaper_queues.php
index 35b6f21..ac3213a 100755
--- a/usr/local/www/firewall_shaper_queues.php
+++ b/usr/local/www/firewall_shaper_queues.php
@@ -169,7 +169,7 @@ if ($_POST['apply']) {
clear_subsystem_dirty('shaper');
}
-$pgtitle = "Firewall: Shaper: By Queues View";
+$pgtitle = gettext("Firewall: Shaper: By Queues View");
$statusurl = "status_queues.php";
include("head.inc");
@@ -184,17 +184,17 @@ include("head.inc");
<form action="firewall_shaper_queues.php" method="post" name="iform" id="iform">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('shaper')): ?><p>
-<?php print_info_box_np("The traffic shaper configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The traffic shaper configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
<?php
$tab_array = array();
- $tab_array[0] = array("By Interface", false, "firewall_shaper.php");
- $tab_array[1] = array("By Queue", true, "firewall_shaper_queues.php");
- $tab_array[2] = array("Limiter", false, "firewall_shaper_vinterface.php");
- $tab_array[3] = array("Layer7", false, "firewall_shaper_layer7.php");
- $tab_array[4] = array("Wizards", false, "firewall_shaper_wizards.php");
+ $tab_array[0] = array(gettext("By Interface"), false, "firewall_shaper.php");
+ $tab_array[1] = array(gettext("By Queue"), true, "firewall_shaper_queues.php");
+ $tab_array[2] = array(gettext("Limiter"), false, "firewall_shaper_vinterface.php");
+ $tab_array[3] = array(gettext("Layer7"), false, "firewall_shaper_layer7.php");
+ $tab_array[4] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php");
display_top_tabs($tab_array);
?>
</td></tr>
diff --git a/usr/local/www/firewall_shaper_vinterface.php b/usr/local/www/firewall_shaper_vinterface.php
index b6c8c76..7ed4b02 100644
--- a/usr/local/www/firewall_shaper_vinterface.php
+++ b/usr/local/www/firewall_shaper_vinterface.php
@@ -51,7 +51,7 @@ if($_GET['reset'] <> "") {
exit;
}
-$pgtitle = array("Firewall","Traffic Shaper", "Limiter");
+$pgtitle = array(gettext("Firewall"),gettext("Traffic Shaper"), gettext("Limiter"));
$statusurl = "status_queues.php";
read_dummynet_config();
@@ -142,7 +142,7 @@ if ($_GET) {
$q = new dnpipe_class();
$q->SetQname($pipe);
} else
- $input_errors[] = "Could not create new queue/discipline!";
+ $input_errors[] = gettext("Could not create new queue/discipline!");
if ($q) {
$output_form .= $q->build_form();
@@ -154,7 +154,7 @@ if ($_GET) {
if ($queue)
$output_form .= $queue->build_form();
else
- $input_errors[] = "Queue not found!";
+ $input_errors[] = gettext("Queue not found!");
break;
case "enable":
if ($queue) {
@@ -163,7 +163,7 @@ if ($_GET) {
write_config();
mark_subsystem_dirty('shaper');
} else
- $input_errors[] = "Queue not found!";
+ $input_errors[] = gettext("Queue not found!");
break;
case "disable":
if ($queue) {
@@ -172,7 +172,7 @@ if ($_GET) {
write_config();
mark_subsystem_dirty('shaper');
} else
- $input_errors[] = "Queue not found!";
+ $input_errors[] = gettext("Queue not found!");
break;
default:
$output_form .= "<p class=\"pgtitle\">" . $dn_default_shaper_msg."</p>";
@@ -217,7 +217,7 @@ if ($_GET) {
read_dummynet_config();
$output_form .= $tmp->build_form();
} else
- $input_errors[] = "Could not add new queue.";
+ $input_errors[] = gettext("Could not add new queue.");
} else if ($_POST['apply']) {
write_config();
@@ -286,7 +286,7 @@ $tree .= "</ul>";
if (!$dontshow || $newqueue) {
$output_form .= "<tr><td width=\"22%\" valign=\"top\" class=\"vncellreq\">";
-$output_form .= "Queue Actions";
+$output_form .= gettext("Queue Actions");
$output_form .= "</td><td valign=\"top\" class=\"vncellreq\" width=\"78%\">";
$output_form .= "<input type=\"submit\" name=\"Submit\" value=\"" . gettext("Save") . "\" class=\"formbtn\" />";
@@ -297,7 +297,7 @@ if ($can_add || $addnewaltq) {
$output_form .= "&queue=" . $queue->GetQname();
}
$output_form .= "&action=add\">";
- $output_form .= "<input type=\"button\" class=\"formbtn\" name=\"add\" value=\"Add new queue\">";
+ $output_form .= "<input type=\"button\" class=\"formbtn\" name=\"add\" value=\"" . gettext("Add new queue") ."\">";
$output_form .= "</a>";
}
$output_form .= "<a href=\"firewall_shaper_vinterface.php?pipe=";
@@ -308,9 +308,9 @@ if ($queue) {
$output_form .= "&action=delete\">";
$output_form .= "<input type=\"button\" class=\"formbtn\" name=\"delete\"";
if ($queue)
- $output_form .= " value=\"Delete this queue\">";
+ $output_form .= " value=\"" . gettext("Delete this queue") ."\">";
else
- $output_form .= " value=\"Delete virtual interface\">";
+ $output_form .= " value=\"" . gettext("Delete virtual interface") ."\">";
$output_form .= "</a>";
$output_form .= "</td></tr>";
$output_form .= "</div>";
@@ -348,17 +348,17 @@ include("fbegin.inc");
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('shaper')): ?><p>
-<?php print_info_box_np("The traffic shaper configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The traffic shaper configuration has been changed.")."<br>".gettext("You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
<?php
$tab_array = array();
- $tab_array[0] = array("By Interface", false, "firewall_shaper.php");
- $tab_array[1] = array("By Queue", false, "firewall_shaper_queues.php");
- $tab_array[2] = array("Limiter", true, "firewall_shaper_vinterface.php");
- $tab_array[3] = array("Layer7", false, "firewall_shaper_layer7.php");
- $tab_array[4] = array("Wizards", false, "firewall_shaper_wizards.php");
+ $tab_array[0] = array(gettext("By Interface"), false, "firewall_shaper.php");
+ $tab_array[1] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
+ $tab_array[2] = array(gettext("Limiter"), true, "firewall_shaper_vinterface.php");
+ $tab_array[3] = array(gettext("Layer7"), false, "firewall_shaper_layer7.php");
+ $tab_array[4] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -377,7 +377,7 @@ include("fbegin.inc");
?>
<br/><br/>
<a href="firewall_shaper_vinterface.php?pipe=new&action=add">
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="Create new limiter" width="17" height="17" border="0"> Create new limiter
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("Create new limiter");?>" width="17" height="17" border="0"><?=gettext("Create new limiter");?>
</a><br/>
</td>
<td width="75%" valign="top" align="center">
diff --git a/usr/local/www/firewall_shaper_wizards.php b/usr/local/www/firewall_shaper_wizards.php
index acd744c..ac6d00a 100755
--- a/usr/local/www/firewall_shaper_wizards.php
+++ b/usr/local/www/firewall_shaper_wizards.php
@@ -70,14 +70,14 @@ if ($_POST['apply']) {
clear_subsystem_dirty('shaper');
}
-$pgtitle = array("Firewall", "Traffic Shaper", "Wizards");
+$pgtitle = array(gettext("Firewall"),gettext("Traffic Shaper"),gettext("Wizards"));
$statusurl = "status_queues.php";
-$wizards = array("Single Lan multi Wan" => "traffic_shaper_wizard.xml",
- "Single Wan multi Lan" => "traffic_shaper_wizard_multi_lan.xml",
- "Multiple Lan/Wan" => "traffic_shaper_wizard_multi_all.xml",
- "Dedicated Links" => "traffic_shaper_wizard_dedicated.xml",
- );
+$wizards = array(gettext("Single Lan multi Wan") => "traffic_shaper_wizard.xml",
+ gettext("Single Wan multi Lan") => "traffic_shaper_wizard_multi_lan.xml",
+ gettext("Multiple Lan/Wan") => "traffic_shaper_wizard_multi_all.xml",
+ gettext("Dedicated Links") => "traffic_shaper_wizard_dedicated.xml",
+ );
include("head.inc");
?>
@@ -93,17 +93,17 @@ include("fbegin.inc");
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('shaper')): ?><p>
-<?php print_info_box_np("The traffic shaper configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+<?php print_info_box_np(gettext("The traffic shaper configuration has been changed.")."<br>".gettext("You must apply the changes in order for them to take effect."));?><br>
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
<?php
$tab_array = array();
- $tab_array[0] = array("By Interface", false, "firewall_shaper.php");
- $tab_array[1] = array("By Queue", false, "firewall_shaper_queues.php");
- $tab_array[2] = array("Limiter", false, "firewall_shaper_vinterface.php");
- $tab_array[3] = array("Layer7", false, "firewall_shaper_layer7.php");
- $tab_array[4] = array("Wizards", true, "firewall_shaper_wizards.php");
+ $tab_array[0] = array(gettext("By Interface"), false, "firewall_shaper.php");
+ $tab_array[1] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
+ $tab_array[2] = array(gettext("Limiter"), false, "firewall_shaper_vinterface.php");
+ $tab_array[3] = array(gettext("Layer7"), false, "firewall_shaper_layer7.php");
+ $tab_array[4] = array(gettext("Wizards"), true, "firewall_shaper_wizards.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -112,8 +112,8 @@ include("fbegin.inc");
<div id="mainarea">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td class="listhdrr" width="25%" align="center" >Wizard function</td>
- <td class="listhdrr" width="75%" align="center">Wizard Link</td>
+ <td class="listhdrr" width="25%" align="center" ><?=gettext("Wizard function");?></td>
+ <td class="listhdrr" width="75%" align="center"><?=gettext("Wizard Link");?></td>
</tr>
<?php foreach ($wizards as $key => $wizard): ?>
<tr class="tabcont"><td class="listlr" style="background-color: #e0e0e0" width="25%" align="center">
diff --git a/usr/local/www/firewall_virtual_ip.php b/usr/local/www/firewall_virtual_ip.php
index f4b4567..f39fbe7 100755
--- a/usr/local/www/firewall_virtual_ip.php
+++ b/usr/local/www/firewall_virtual_ip.php
@@ -101,7 +101,7 @@ if ($_GET['act'] == "del") {
foreach ($config['nat']['rule'] as $rule) {
if($rule['destination']['address'] <> "") {
if ($rule['destination']['address'] == $a_vip[$_GET['id']]['subnet']) {
- $input_errors[] = "This entry cannot be deleted because it is still referenced by at least one NAT mapping.";
+ $input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one NAT mapping.");
break;
}
}
@@ -128,7 +128,7 @@ if ($_GET['act'] == "del") {
} else if ($_GET['changes'] == "mods")
$id = $_GET['id'];
-$pgtitle = array("Firewall","Virtual IP Addresses");
+$pgtitle = array(gettext("Firewall"),gettext("Virtual IP Addresses"));
include("head.inc");
?>
@@ -143,7 +143,7 @@ include("head.inc");
print_info_box($savemsg);
else
if (is_subsystem_dirty('vip'))
- print_info_box_np("The VIP configuration has been changed.<br>You must apply the changes in order for them to take effect.");
+ print_info_box_np(gettext("The VIP configuration has been changed.")."<br>".gettext("You must apply the changes in order for them to take effect."));
?>
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
@@ -151,8 +151,8 @@ include("head.inc");
<?php
/* active tabs */
$tab_array = array();
- $tab_array[] = array("Virtual IPs", true, "firewall_virtual_ip.php");
- $tab_array[] = array("CARP Settings", false, "pkg_edit.php?xml=carp_settings.xml&id=0");
+ $tab_array[] = array(gettext("Virtual IPs"), true, "firewall_virtual_ip.php");
+ $tab_array[] = array(gettext("CARP Settings"), false, "pkg_edit.php?xml=carp_settings.xml&id=0");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -164,9 +164,9 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="30%" class="listhdrr">Virtual IP address</td>
- <td width="10%" class="listhdrr">Type</td>
- <td width="40%" class="listhdr">Description</td>
+ <td width="30%" class="listhdrr"><?=gettext("Virtual IP address");?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Type");?></td>
+ <td width="40%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -200,7 +200,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle"><a href="firewall_virtual_ip_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a></td>
- <td valign="middle"><a href="firewall_virtual_ip.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this entry?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ <td valign="middle"><a href="firewall_virtual_ip.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext('Do you really want to delete this entry?');?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
</table>
</td>
@@ -220,9 +220,9 @@ include("head.inc");
</tr>
<tr>
<td colspan="4">
- <p><span class="vexpl"><span class="red"><strong>Note:<br>
- </strong></span>The virtual IP addresses defined on this page may be used in <a href="firewall_nat.php">NAT</a> mappings.<br>
- You can check the status of your CARP Virtual IPs and interfaces <a href="carp_status.php">here</a>.</span></p>
+ <p><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br>
+ </strong></span><?=gettext("The virtual IP addresses defined on this page may be used in");?><a href="firewall_nat.php"> <?=gettext("NAT"); ?> </a><?=gettext("mappings.");?><br>
+ <?=gettext("You can check the status of your CARP Virtual IPs and interfaces ");?><a href="carp_status.php"><?=gettext("here");?></a>.</span></p>
</td>
</tr>
</table>
diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php
index 8970e33..1781518 100755
--- a/usr/local/www/firewall_virtual_ip_edit.php
+++ b/usr/local/www/firewall_virtual_ip_edit.php
@@ -101,20 +101,20 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "mode");
- $reqdfieldsn = explode(",", "Type");
+ $reqdfieldsn = array(gettext("Type"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_POST['subnet'] && !is_ipaddr($_POST['subnet'])))
- $input_errors[] = "A valid IP address must be specified.";
+ $input_errors[] = gettext("A valid IP address must be specified.");
$natiflist = get_configured_interface_with_descr();
foreach ($natiflist as $natif => $natdescr)
if ($_POST['subnet'] == get_interface_ip($natif))
- $input_errors[] = "The {$natdescr} IP address may not be used in a virtual entry.";
+ $input_errors[] = sprintf(gettext("The %s IP address may not be used in a virtual entry."),$natdescr);
if($_POST['subnet_bits'] == "32" and $_POST['type'] == "carp")
- $input_errors[] = "The /32 subnet mask is invalid for CARP IPs.";
+ $input_errors[] = gettext("The /32 subnet mask is invalid for CARP IPs.");
/* check for overlaps with other virtual IP */
foreach ($a_vip as $vipent) {
@@ -122,7 +122,7 @@ if ($_POST) {
continue;
if (isset($_POST['subnet']) && $_POST['subnet'] == $vipent['subnet']) {
- $input_errors[] = "There is already a virtual IP entry for the specified IP address.";
+ $input_errors[] = gettext("There is already a virtual IP entry for the specified IP address.");
break;
}
}
@@ -135,19 +135,19 @@ if ($_POST) {
$idtracker = 0;
foreach($config['virtualip']['vip'] as $vip) {
if($vip['vhid'] == $_POST['vhid'] and $idtracker <> $id)
- $input_errors[] = "VHID {$_POST['vhid']} is already in use. Pick a unique number.";
+ $input_errors[] = sprintf(gettext("VHID %s is already in use. Pick a unique number."),$_POST['vhid']);
$idtracker++;
}
if($_POST['password'] == "")
- $input_errors[] = "You must specify a CARP password that is shared between the two VHID members.";
+ $input_errors[] = gettext("You must specify a CARP password that is shared between the two VHID members.");
$parent_ip = get_interface_ip($_POST['interface']);
$parent_sn = get_interface_subnet($_POST['interface']);
if (!ip_in_subnet($_POST['subnet'], gen_subnet($parent_ip, $parent_sn) . "/" . $parent_sn)) {
$cannot_find = $_POST['subnet'] . "/" . $_POST['subnet_bits'] ;
- $input_errors[] = "Sorry, we could not locate an interface with a matching subnet for {$cannot_find}. Please add an IP alias in this subnet on this interface.";
+ $input_errors[] = sprintf(gettext("Sorry, we could not locate an interface with a matching subnet for %s. Please add an IP alias in this subnet on this interface."),$cannot_find);
} else if ($parent_sn != $_POST['subnet_bits'])
- $input_errors[] = "Subnet bits needs to be the same as the parent interface.";
+ $input_errors[] = gettext("Subnet bits needs to be the same as the parent interface.");
if ($a_vip[$id]['vhid'] != $_POST['vhid'])
interface_vip_bring_down($a_vip[$id]);
@@ -229,7 +229,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Firewall","Virtual IP Address","Edit");
+$pgtitle = array(gettext("Firewall"),gettext("Virtual IP Address"),gettext("Edit"));
include("head.inc");
?>
@@ -248,9 +248,9 @@ function get_radio_value(obj)
}
function enable_change(enable_over) {
var note = document.getElementById("typenote");
- var carpnote = document.createTextNode("This must be the network's subnet mask. It does not specify a CIDR range.");
- var proxyarpnote = document.createTextNode("This is a CIDR block of proxy ARP addresses.");
- var ipaliasnote = document.createTextNode("This must be the network's subnet mask. It does not specify a CIDR range.");
+ var carpnote = document.createTextNode('<?=gettext("This must be the network's subnet mask. It does not specify a CIDR range.");?>');
+ var proxyarpnote = document.createTextNode('<?=gettext("This is a CIDR block of proxy ARP addresses.");?>');
+ var ipaliasnote = document.createTextNode('<?=gettext("This must be the network's subnet mask. It does not specify a CIDR range.");?>');
if ((get_radio_value(document.iform.mode) == "carp") || enable_over) {
document.iform.vhid.disabled = 0;
document.iform.password.disabled = 0;
@@ -338,19 +338,19 @@ function typesel_change() {
<form action="firewall_virtual_ip_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Edit Virtual IP</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Virtual IP");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Type</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Type");?></td>
<td width="78%" class="vtable">
<input name="mode" type="radio" onclick="enable_change(false)" value="proxyarp"
- <?php if ($pconfig['mode'] == "proxyarp" || $pconfig['type'] != "carp") echo "checked";?>> Proxy ARP
+ <?php if ($pconfig['mode'] == "proxyarp" || $pconfig['type'] != "carp") echo "checked";?>> <?=gettext("Proxy ARP"); ?>
<input name="mode" type="radio" onclick="enable_change(false)" value="carp"
- <?php if ($pconfig['mode'] == "carp") echo "checked";?>> CARP
+ <?php if ($pconfig['mode'] == "carp") echo "checked";?>> <?=gettext("CARP"); ?>
<input name="mode" type="radio" onclick="enable_change(false)" value="other"
- <?php if ($pconfig['mode'] == "other") echo "checked";?>> Other
+ <?php if ($pconfig['mode'] == "other") echo "checked";?>> <?=gettext("Other");?>
<input name="mode" type="radio" onclick="enable_change(false)" value="ipalias"
- <?php if ($pconfig['mode'] == "ipalias") echo "checked";?>> IP Alias
+ <?php if ($pconfig['mode'] == "ipalias") echo "checked";?>> <?=gettext("IP Alias");?>
<?php
/*
<input name="mode" type="radio" onclick="enable_change(false)" value="carpdev-dhcp"
@@ -361,7 +361,7 @@ function typesel_change() {
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Interface</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface");?></td>
<td width="78%" class="vtable">
<select name="interface" class="formselect">
<?php
@@ -375,22 +375,22 @@ function typesel_change() {
</td>
</tr>
<tr>
- <td valign="top" class="vncellreq">IP Address(es)</td>
+ <td valign="top" class="vncellreq"><?=gettext("IP Address(es)");?></td>
<td class="vtable">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td>Type:&nbsp;&nbsp;</td>
+ <td><?=gettext("Type");?>:&nbsp;&nbsp;</td>
<td><select name="type" class="formselect" onChange="typesel_change()">
<option value="single" <?php if ((!$pconfig['range'] && $pconfig['subnet_bits'] == 32) || (!isset($pconfig['subnet']))) echo "selected"; ?>>
- Single address</option>
+ <?=gettext("Single address");?></option>
<option value="network" <?php if (!$pconfig['range'] && $pconfig['subnet_bits'] != 32 && isset($pconfig['subnet'])) echo "selected"; ?>>
- Network</option>
+ <?=gettext("Network");?></option>
<!-- XXX: Billm, don't let anyone choose this until NAT configuration screens are ready for it <option value="range" <?php if ($pconfig['range']) echo "selected"; ?>>
Range</option> -->
</select></td>
</tr>
<tr>
- <td>Address:&nbsp;&nbsp;</td>
+ <td><?=gettext("Address");?>:&nbsp;&nbsp;</td>
<td><input name="subnet" type="text" class="formfld unknown" id="subnet" size="20" value="<?=htmlspecialchars($pconfig['subnet']);?>">
/<select name="subnet_bits" class="formselect" id="select">
<?php for ($i = 32; $i >= 1; $i--): ?>
@@ -416,13 +416,13 @@ function typesel_change() {
</td>
</tr>
<tr valign="top">
- <td width="22%" class="vncellreq">Virtual IP Password</td>
+ <td width="22%" class="vncellreq"><?=gettext("Virtual IP Password");?></td>
<td class="vtable"><input type='password' name='password' value="<?=htmlspecialchars($pconfig['password']);?>">
- <br>Enter the VHID group password.
+ <br><?=gettext("Enter the VHID group password.");?>
</td>
</tr>
<tr valign="top">
- <td width="22%" class="vncellreq">VHID Group</td>
+ <td width="22%" class="vncellreq"><?=gettext("VHID Group");?></td>
<td class="vtable"><select id='vhid' name='vhid'>
<?php for ($i = 1; $i <= 254; $i++): ?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['vhid']) echo "selected"; ?>>
@@ -430,11 +430,11 @@ function typesel_change() {
</option>
<?php endfor; ?>
</select>
- <br>Enter the VHID group that the machines will share
+ <br><?=gettext("Enter the VHID group that the machines will share");?>
</td>
</tr>
<tr valign="top">
- <td width="22%" class="vncellreq">Advertising Frequency</td>
+ <td width="22%" class="vncellreq"><?=gettext("Advertising Frequency");?></td>
<td class="vtable"><select id='advskew' name='advskew'>
<?php for ($i = 0; $i <= 254; $i++): ?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['advskew']) echo "selected"; ?>>
@@ -442,19 +442,19 @@ function typesel_change() {
</option>
<?php endfor; ?>
</select>
- <br>The frequency that this machine will advertise. 0 = master. Anything above 0 designates a backup.
+ <br><?=gettext("The frequency that this machine will advertise. 0 = master. Anything above 0 designates a backup.");?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here for your reference (not parsed).");?></span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input type="button" class="formbtn" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"> <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
<?php if (isset($id) && $a_vip[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
@@ -465,10 +465,10 @@ function typesel_change() {
<p>
<span class="vexpl">
<span class="red">
- <strong>Note:<br></strong>
+ <b><?=gettext("Note");?>:<br></b>
</span>&nbsp;&nbsp;
- ProxyARP type IP addresses *DO NOT* work with add on packages such as Squid. Use a CARP or IP Alias type address for these cases.
- <p>&nbsp;&nbsp;&nbsp;For more information on CARP and the above values, visit the OpenBSD <a href='http://www.openbsd.org/faq/pf/carp.html'>CARP FAQ</A>.
+ <?=gettext("ProxyARP type IP addresses *DO NOT* work with add on packages such as Squid. Use a CARP or IP Alias type address for these cases.");?>
+ <p>&nbsp;&nbsp;&nbsp;<?=gettext("For more information on CARP and the above values, visit the OpenBSD ");?><a href='http://www.openbsd.org/faq/pf/carp.html'> <?=gettext("CARP FAQ"); ?></A>.
</span>
</p>
</td>
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 340a6f8..888aa02 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -178,7 +178,7 @@ $pconfig['enable'] = isset($wancfg['enable']);
if (is_array($config['aliases']['alias'])) {
foreach($config['aliases']['alias'] as $alias) {
if($alias['name'] == $wancfg['descr']) {
- $input_errors[] = gettext("Sorry, an alias with the name {$wancfg['descr']} already exists.");
+ $input_errors[] = sprintf(gettext("Sorry, an alias with the name '%s' already exists."),$wancfg['descr']);
}
}
}
@@ -288,7 +288,7 @@ if (isset($wancfg['wireless'])) {
if ($_POST['apply']) {
unset($input_errors);
if (!is_subsystem_dirty('interfaces'))
- $intput_errors[] = "You have already applied your settings!";
+ $intput_errors[] = gettext("You have already applied your settings!");
else {
unlink_if_exists("{$g['tmp_path']}/config.cache");
clear_subsystem_dirty('interfaces');
@@ -300,7 +300,7 @@ if ($_POST['apply']) {
/* restart snmp so that it binds to correct address */
services_snmpd_configure();
if ($if == "lan")
- $savemsg = "The changes have been applied. You may need to correct your web browser's IP address.";
+ $savemsg = gettext("The changes have been applied. You may need to correct your web browser's IP address.");
/* sync filter configuration */
setup_gateways_monitor();
@@ -350,40 +350,40 @@ if ($_POST) {
/* description unique? */
foreach ($iflist as $ifent => $ifdescr) {
if ($if != $ifent && $ifdescr == $_POST['descr'])
- $input_errors[] = "An interface with the specified description already exists.";
+ $input_errors[] = gettext("An interface with the specified description already exists.");
}
/* input validation */
if (isset($config['dhcpd']) && isset($config['dhcpd'][$if]['enable']) && $_POST['type'] != "static")
- $input_errors[] = "The DHCP Server is active on this interface and it can be used only with a static IP configuration. Please disable the DHCP Server service on this interface first, then change the interface configuration.";
+ $input_errors[] = gettext("The DHCP Server is active on this interface and it can be used only with a static IP configuration. Please disable the DHCP Server service on this interface first, then change the interface configuration.");
switch($_POST['type']) {
case "static":
$reqdfields = explode(" ", "ipaddr subnet gateway");
- $reqdfieldsn = explode(",", "IP address,Subnet bit count,Gateway");
+ $reqdfieldsn = array(gettext("IP address"),gettext("Subnet bit count"),gettext("Gateway"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
break;
case "ppp":
$reqdfields = explode(" ", "port phone");
- $reqdfieldsn = explode(",", "Modem Port,Phone Number");
+ $reqdfieldsn = array(gettext("Modem Port"),gettext("Phone Number"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
break;
case "PPPoE":
if ($_POST['pppoe_dialondemand']) {
$reqdfields = explode(" ", "pppoe_username pppoe_password pppoe_dialondemand pppoe_idletimeout");
- $reqdfieldsn = explode(",", "PPPoE username,PPPoE password,Dial on demand,Idle timeout value");
+ $reqdfieldsn = array(gettext("PPPoE username"),gettext("PPPoE password"),gettext("Dial on demand"),gettext("Idle timeout value"));
} else {
$reqdfields = explode(" ", "pppoe_username pppoe_password");
- $reqdfieldsn = explode(",", "PPPoE username,PPPoE password");
+ $reqdfieldsn = array(gettext("PPPoE username"),gettext("PPPoE password"));
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
break;
case "PPTP":
if ($_POST['pptp_dialondemand']) {
$reqdfields = explode(" ", "pptp_username pptp_password pptp_local pptp_subnet pptp_remote pptp_dialondemand pptp_idletimeout");
- $reqdfieldsn = explode(",", "PPTP username,PPTP password,PPTP local IP address,PPTP subnet,PPTP remote IP address,Dial on demand,Idle timeout value");
+ $reqdfieldsn = array(gettext("PPTP username"),gettext("PPTP password"),gettext("PPTP local IP address"),gettext("PPTP subnet"),gettext("PPTP remote IP address"),gettext("Dial on demand"),gettext("Idle timeout value"));
} else {
$reqdfields = explode(" ", "pptp_username pptp_password pptp_local pptp_subnet pptp_remote");
- $reqdfieldsn = explode(",", "PPTP username,PPTP password,PPTP local IP address,PPTP subnet,PPTP remote IP address");
+ $reqdfieldsn = array(gettext("PPTP username"),gettext("PPTP password"),gettext("PPTP local IP address"),gettext("PPTP subnet"),gettext("PPTP remote IP address"));
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
break;
@@ -392,13 +392,13 @@ if ($_POST) {
/* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */
$_POST['spoofmac'] = strtolower(str_replace("-", ":", $_POST['spoofmac']));
if (($_POST['ipaddr'] && !is_ipaddr($_POST['ipaddr'])))
- $input_errors[] = "A valid IP address must be specified.";
+ $input_errors[] = gettext("A valid IP address must be specified.");
if (($_POST['subnet'] && !is_numeric($_POST['subnet'])))
- $input_errors[] = "A valid subnet bit count must be specified.";
+ $input_errors[] = gettext("A valid subnet bit count must be specified.");
if (($_POST['alias-address'] && !is_ipaddr($_POST['alias-address'])))
- $input_errors[] = "A valid alias IP address must be specified.";
+ $input_errors[] = gettext("A valid alias IP address must be specified.");
if (($_POST['alias-subnet'] && !is_numeric($_POST['alias-subnet'])))
- $input_errors[] = "A valid alias subnet bit count must be specified.";
+ $input_errors[] = gettext("A valid alias subnet bit count must be specified.");
if ($_POST['gateway'] != "none") {
$match = false;
foreach($a_gateways as $gateway) {
@@ -407,13 +407,13 @@ if ($_POST) {
}
}
if(!$match) {
- $input_errors[] = "A valid gateway must be specified.";
+ $input_errors[] = gettext("A valid gateway must be specified.");
}
}
if (($_POST['provider'] && !is_domain($_POST['provider'])))
- $input_errors[] = "The service name contains invalid characters.";
+ $input_errors[] = gettext("The service name contains invalid characters.");
if (($_POST['pppoe_idletimeout'] != "") && !is_numericint($_POST['pppoe_idletimeout']))
- $input_errors[] = "The idle timeout value must be an integer.";
+ $input_errors[] = gettext("The idle timeout value must be an integer.");
if ($_POST['pppoe_resethour'] <> "" && !is_numericint($_POST['pppoe_resethour']) &&
$_POST['pppoe_resethour'] >= 0 && $_POST['pppoe_resethour'] <=23)
$input_errors[] = gettext("A valid PPPoE reset hour must be specified (0-23).");
@@ -423,21 +423,21 @@ if ($_POST) {
if ($_POST['pppoe_resetdate'] <> "" && !is_numeric(str_replace("/", "", $_POST['pppoe_resetdate'])))
$input_errors[] = gettext("A valid PPPoE reset date must be specified (mm/dd/yyyy).");
if (($_POST['pptp_local'] && !is_ipaddr($_POST['pptp_local'])))
- $input_errors[] = "A valid PPTP local IP address must be specified.";
+ $input_errors[] = gettext("A valid PPTP local IP address must be specified.");
if (($_POST['pptp_subnet'] && !is_numeric($_POST['pptp_subnet'])))
- $input_errors[] = "A valid PPTP subnet bit count must be specified.";
+ $input_errors[] = gettext("A valid PPTP subnet bit count must be specified.");
if (($_POST['pptp_remote'] && !is_ipaddr($_POST['pptp_remote'])))
- $input_errors[] = "A valid PPTP remote IP address must be specified.";
+ $input_errors[] = gettext("A valid PPTP remote IP address must be specified.");
if (($_POST['pptp_idletimeout'] != "") && !is_numericint($_POST['pptp_idletimeout']))
- $input_errors[] = "The idle timeout value must be an integer.";
+ $input_errors[] = gettext("The idle timeout value must be an integer.");
if (($_POST['spoofmac'] && !is_macaddr($_POST['spoofmac'])))
- $input_errors[] = "A valid MAC address must be specified.";
+ $input_errors[] = gettext("A valid MAC address must be specified.");
if ($_POST['mtu'] && ($_POST['mtu'] < 576))
- $input_errors[] = "The MTU must be greater than 576 bytes.";
+ $input_errors[] = gettext("The MTU must be greater than 576 bytes.");
/* Wireless interface? */
if (isset($wancfg['wireless'])) {
$reqdfields = explode(" ", "mode ssid");
- $reqdfieldsn = explode(",", "Mode,SSID");
+ $reqdfieldsn = array(gettext("Mode"),gettext("SSID"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
check_wireless_mode();
/* loop through keys and enforce size */
@@ -471,7 +471,7 @@ if ($_POST) {
}
if(strlen($_POST['key' . $i]) == 28)
continue;
- $input_errors[] = "Invalid WEP key size. Sizes should be 40 (64) bit keys or 104 (128) bit.";
+ $input_errors[] = gettext("Invalid WEP key size. Sizes should be 40 (64) bit keys or 104 (128) bit.");
break;
}
}
@@ -479,7 +479,7 @@ if ($_POST) {
if ($_POST['passphrase']) {
$passlen = strlen($_POST['passphrase']);
if ($passlen < 8 || $passlen > 64)
- $input_errors[] = "The length of the passphrase should be between 8 and 63 characters.";
+ $input_errors[] = gettext("The length of the passphrase should be between 8 and 63 characters.");
}
}
if (!$input_errors) {
@@ -525,8 +525,8 @@ if ($_POST) {
}
}
if($skip == false) {
- $gateway_item['gateway'] = "dynamic";
- $gateway_item['descr'] = "Interface {$if} dynamic gateway";
+ $gateway_item['gateway'] = gettext("dynamic");
+ $gateway_item['descr'] = gettext("Interface") . $if . gettext("dynamic gateway");
$gateway_item['name'] = "GW_" . strtoupper($if);
$gateway_item['interface'] = "{$if}";
} else {
@@ -805,7 +805,7 @@ function check_wireless_mode() {
$old_wireless_mode = $wancfg['wireless']['mode'];
$wancfg['wireless']['mode'] = $_POST['mode'];
if (!interface_wireless_clone("{$wlanif}_", $wancfg)) {
- $input_errors[] = "Unable to change mode to {$wlan_modes[$wancfg['wireless']['mode']]}. You may already have the maximum number of wireless clones supported in this mode.";
+ $input_errors[] = sprintf(gettext("Unable to change mode to %s . You may already have the maximum number of wireless clones supported in this mode."), $wlan_modes[$wancfg['wireless']['mode']]);
} else {
mwexec("/sbin/ifconfig {$wlanif}_ destroy");
}
@@ -813,12 +813,12 @@ function check_wireless_mode() {
}
}
-$pgtitle = array("Interfaces", $pconfig['descr']);
+$pgtitle = array(gettext("Interfaces"),sprintf(gettext("'%s'"),$pconfig['descr']));
$statusurl = "status_interfaces.php";
$closehead = false;
include("head.inc");
-$types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" => "PPTP" /* , "carpdev-dhcp" => "CarpDev"*/);
+$types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" => gettext("DHCP"), "ppp" => gettext("PPP"), "pppoe" => gettext("PPPoE"), "pptp" => gettext("PPTP") /* , "carpdev-dhcp" => "CarpDev"*/);
?>
@@ -983,7 +983,7 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
<form action="interfaces.php" method="post" name="iform" id="iform">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if (is_subsystem_dirty('interfaces')): ?><p>
- <?php print_info_box_np(gettext("The {$wancfg['descr']} configuration has been changed.<p>You must apply the changes in order for them to take effect.<p>Don't forget to adjust the DHCP Server range if needed after applying."));?><br />
+ <?php print_info_box_np(printf(gettext("The '%s' configuration has been changed."),$wancfg['descr'])."<p>".gettext("You must apply the changes in order for them to take effect.")."<p>".gettext("Don't forget to adjust the DHCP Server range if needed after applying."));?><br />
<?php endif; ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
@@ -992,27 +992,27 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
<div class="tabcont">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">General configuration</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("General configuration"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Enable</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Enable"); ?></td>
<td width="78%" class="vtable">
<input name="enable" type="checkbox" value="yes" <?php if ($pconfig['enable'] == true) echo "checked"; ?> onClick="show_allcfg(this);">
- <strong>Enable Interface</strong>
+ <strong><?=gettext("Enable Interface"); ?></strong>
</td>
</tr>
</table>
<div style="display:none;" name="allcfg" id="allcfg">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="30" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br><span class="vexpl">Enter a description (name) for the interface here.</span>
+ <br><span class="vexpl"><?= gettext("Enter a description (name) for the interface here."); ?></span>
</td>
</tr>
<tr>
- <td valign="middle" class="vncell"><strong>Type</strong></td>
+ <td valign="middle" class="vncell"><strong><?=gettext("Type"); ?></strong></td>
<td class="vtable">
<select name="type" onChange="updateType(this.value);" class="formselect" id="type">
<?php
@@ -1028,7 +1028,7 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
</td>
</tr>
<tr>
- <td valign="top" class="vncell">MAC address</td>
+ <td valign="top" class="vncell"><?=gettext("MAC address"); ?></td>
<td class="vtable">
<input name="spoofmac" type="text" class="formfld unknown" id="spoofmac" size="30" value="<?=htmlspecialchars($pconfig['spoofmac']);?>">
<?php
@@ -1037,25 +1037,25 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
$mac = str_replace("\n","",$mac);
if($mac):
?>
- <a OnClick="document.forms[0].spoofmac.value='<?=$mac?>';" href="#">Insert my local MAC address</a>
+ <a OnClick="document.forms[0].spoofmac.value='<?=$mac?>';" href="#"><?=gettext("Insert my local MAC address"); ?></a>
<?php endif; ?>
<br>
- This field can be used to modify (&quot;spoof&quot;) the MAC
- address of the WAN interface<br>
- (may be required with some cable connections)<br>
- Enter a MAC address in the following format: xx:xx:xx:xx:xx:xx
- or leave blank
+ <?=gettext("This field can be used to modify (\"spoof\") the MAC " .
+ "address of the WAN interface"); ?><br>
+ <?=gettext("(may be required with some cable connections)"); ?><br>
+ <?=gettext("Enter a MAC address in the following format: xx:xx:xx:xx:xx:xx " .
+ "or leave blank"); ?>
</td>
</tr>
<tr>
- <td valign="top" class="vncell">MTU</td>
+ <td valign="top" class="vncell"><?=gettext("MTU"); ?></td>
<td class="vtable">
<input name="mtu" type="text" class="formfld unknown" id="mtu" size="8" value="<?=htmlspecialchars($pconfig['mtu']);?>">
<br>
- If you enter a value in this field, then MSS clamping for
- TCP connections to the value entered above minus 40 (TCP/IP
- header size) will be in effect. If you leave this field blank,
- an MTU of 1500 bytes will be assumed.
+ <?=gettext("If you enter a value in this field, then MSS clamping for " .
+ "TCP connections to the value entered above minus 40 (TCP/IP " .
+ "header size) will be in effect. If you leave this field blank, " .
+ "an MTU of 1500 bytes will be assumed"); ?>.
</td>
</tr>
<tr>
@@ -1067,10 +1067,10 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
<td colspan="2" style="padding:0px;">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Static IP configuration</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Static IP configuration"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">IP address</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("IP address"); ?></td>
<td width="78%" class="vtable">
<input name="ipaddr" type="text" class="formfld unknown" id="ipaddr" size="20" value="<?=htmlspecialchars($pconfig['ipaddr']);?>">
/
@@ -1088,10 +1088,10 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Gateway</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Gateway"); ?></td>
<td width="78%" class="vtable">
<select name="gateway" class="formselect" id="gateway">
- <option value="none" selected>None</option>
+ <option value="none" selected><?=gettext("None"); ?></option>
<?php
if(count($a_gateways) > 0) {
foreach ($a_gateways as $gateway) {
@@ -1108,7 +1108,7 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
</select>
<br/>
<div id='addgwbox'>
- If this interface is an Internet connection, select an existing Gateway from the list or <a OnClick="show_add_gateway();" href="#">add a new one</a>.
+ <?=gettext("If this interface is an Internet connection, select an existing Gateway from the list or"); ?> <a OnClick="show_add_gateway();" href="#"><?=gettext("add a new one"); ?></a>.
</div>
<div id='notebox'>
</div>
@@ -1122,7 +1122,7 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
<table bgcolor="#990000" cellpadding="1" cellspacing="1">
<tr><td>&nbsp;</td>
<tr>
- <td colspan="2"><center><b><font color="white">Add new gateway:</font></b></center></td>
+ <td colspan="2"><center><b><font color="white"><?=gettext("Add new gateway"); ?>:</font></b></center></td>
</tr>
<tr><td>&nbsp;</td>
<?php
@@ -1130,16 +1130,16 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
$checked = " CHECKED";
?>
<tr>
- <td width="45%" align="right"><font color="white">Default gateway:</td><td><input type="checkbox" id="defaultgw" name="defaultgw"<?=$checked?>></td>
+ <td width="45%" align="right"><font color="white"><?=gettext("Default gateway"); ?>:</td><td><input type="checkbox" id="defaultgw" name="defaultgw"<?=$checked?>></td>
</tr>
<tr>
- <td align="right"><font color="white">Gateway Name:</td><td><input id="name" name="name" value="<?=$wancfg['descr'] . "GW"?>"></td>
+ <td align="right"><font color="white"><?=gettext("Gateway Name"); ?>:</td><td><input id="name" name="name" value="<?=$wancfg['descr'] . "GW"?>"></td>
</tr>
<tr>
- <td align="right"><font color="white">Gateway IP:</td><td><input id="gatewayip" name="gatewayip"></td>
+ <td align="right"><font color="white"><?=gettext("Gateway IP"); ?>:</td><td><input id="gatewayip" name="gatewayip"></td>
</tr>
<tr>
- <td align="right"><font color="white">Description:</td><td><input id="gatewaydescr" name="gatewaydescr"></td>
+ <td align="right"><font color="white"><?=gettext("Description"); ?>:</td><td><input id="gatewaydescr" name="gatewaydescr"></td>
</tr>
<tr><td>&nbsp;</td>
<tr>
@@ -1147,8 +1147,8 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
<center>
<div id='savebuttondiv'>
<input type="hidden" name="addrtype" id="addrtype" value="IPv4" />
- <input id="gwsave" type="Button" value="Save Gateway" onClick='hide_add_gatewaysave();'>
- <input id="gwcancel" type="Button" value="Cancel" onClick='hide_add_gateway();'>
+ <input id="gwsave" type="Button" value="<?=gettext("Save Gateway"); ?>" onClick='hide_add_gatewaysave();'>
+ <input id="gwcancel" type="Button" value="<?=gettext("Cancel"); ?>" onClick='hide_add_gateway();'>
</div>
</center>
</td>
@@ -1169,20 +1169,20 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
<td colspan="2" style="padding: 0px;">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">DHCP client configuration</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("DHCP client configuration"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Hostname</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Hostname"); ?></td>
<td width="78%" class="vtable">
<input name="dhcphostname" type="text" class="formfld unknown" id="dhcphostname" size="40" value="<?=htmlspecialchars($pconfig['dhcphostname']);?>">
<br>
- The value in this field is sent as the DHCP client identifier
- and hostname when requesting a DHCP lease. Some ISPs may require
- this (for client identification).
+ <?=gettext("The value in this field is sent as the DHCP client identifier " .
+ "and hostname when requesting a DHCP lease. Some ISPs may require " .
+ "this (for client identification)"); ?>.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Alias IP address</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Alias IP address"); ?></td>
<td width="78%" class="vtable">
<input name="alias-address" type="text" class="formfld unknown" id="alias-address" size="20" value="<?=htmlspecialchars($pconfig['alias-address']);?>">
<select name="alias-subnet" class="formselect" id="alias-subnet">
@@ -1196,8 +1196,8 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
}
?>
</select>
- The value in this field is used as a fixed alias IP address by the
- DHCP client.
+ <?=gettext("The value in this field is used as a fixed alias IP address by the " .
+ "DHCP client"); ?>.
</td>
</tr>
</table>
@@ -1207,14 +1207,14 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
<td colspan="2" style="padding: 0px;">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">PPP configuration</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("PPP configuration"); ?></td>
</tr>
<tr name="ppp_provider" id="ppp_provider">
- <td width="22%" valign="top" class="vncell"><?= gettext("Service Provider"); ?></td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Service Provider"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellpadding="0" cellspacing="0">
<tr id="trcountry">
- <td><?= gettext("Country"); ?> :&nbsp;&nbsp;</td>
+ <td><?=gettext("Country"); ?> :&nbsp;&nbsp;</td>
<td>
<select class="formselect" name="country" id="country" onChange="providers_list()">
<option></option>
@@ -1222,7 +1222,7 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
</td>
</tr>
<tr id="trprovider" style="display:none">
- <td><?= gettext("Provider"); ?> :&nbsp;&nbsp;</td>
+ <td><?=gettext("Provider"); ?> :&nbsp;&nbsp;</td>
<td>
<select class="formselect" name="provider" id="provider" onChange="providerplan_list()">
<option></option>
@@ -1230,7 +1230,7 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
</td>
</tr>
<tr id="trproviderplan" style="display:none">
- <td><?= gettext("Plan"); ?> :&nbsp;&nbsp;</td>
+ <td><?=gettext("Plan"); ?> :&nbsp;&nbsp;</td>
<td>
<select class="formselect" name="providerplan" id="providerplan" onChange="prefill_provider()">
<option></option>
@@ -1238,35 +1238,35 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
</td>
</tr>
</table>
- <br/><span class="vexpl"><?= gettext("Select to fill in data for your service provider."); ?></span>
+ <br/><span class="vexpl"><?=gettext("Select to fill in data for your service provider."); ?></span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?= gettext("Username"); ?></td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Username"); ?></td>
<td width="78%" class="vtable">
<input name="username" type="text" class="formfld user" id="username" size="20" value="<?=htmlspecialchars($pconfig['username']);?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell"><?= gettext("Password"); ?></td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Password"); ?></td>
<td width="78%" class="vtable">
<input name="password" type="password" class="formfld pwd" id="password" size="20" value="<?=htmlspecialchars($pconfig['password']);?>">
</td>
</tr>
<tr name="phone_num" id="phone_num">
- <td width="22%" valign="top" class="vncellreq"><?= gettext("Phone Number"); ?></td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Phone Number"); ?></td>
<td width="78%" class="vtable">
<input name="phone" type="text" class="formfld unknown" id="phone" size="12" value="<?=htmlspecialchars($pconfig['phone']);?>">
</td>
</tr>
<tr name="apn_" id="apn_">
- <td width="22%" valign="top" class="vncell"><?= gettext("Access Point Name (APN)"); ?></td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Access Point Name (APN)"); ?></td>
<td width="78%" class="vtable">
<input name="apn" type="text" class="formfld unknown" id="apn" size="40" value="<?=htmlspecialchars($pconfig['apn']);?>">
</td>
</tr>
<tr name="interface" id="interface" >
- <td width="22%" valign="top" class="vncellreq"><?= gettext("Modem Port"); ?></td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Modem Port"); ?></td>
<td width="78%" class="vtable">
<select name="port" id="port" class="formselect">
<?php
@@ -1284,16 +1284,16 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
</select>
</td>
</tr>
- <td width="22%" valign="top" class="vncell"><?= gettext("Advanced PPP"); ?></td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Advanced PPP"); ?></td>
<?php if (isset($pconfig['pppid'])): ?>
<td width="78%" class="vtable">
- <a href="/interfaces_ppps_edit.php?id=<?=htmlspecialchars($pconfig['pppid']);?>" class="navlnk">Click here</a>
- to edit PPP configuration.
+ <a href="/interfaces_ppps_edit.php?id=<?=htmlspecialchars($pconfig['pppid']);?>" class="navlnk"><?=gettext("Click here "); ?></a>
+ <?=gettext("to edit PPP configuration"); ?>.
</td>
<? else: ?>
<td width="78%" class="vtable">
- <a href="/interfaces_ppps_edit.php" class="navlnk">Click here</a>
- to create a PPP configuration.
+ <a href="/interfaces_ppps_edit.php" class="navlnk"><?=gettext("Click here"); ?></a>
+ <?=gettext("to create a PPP configuration"); ?>.
</td>
<? endif; ?>
</tr>
@@ -1304,38 +1304,38 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
<td colspan="2" style="padding:0px;">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">PPPoE configuration</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("PPPoE configuration"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Username</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Username"); ?></td>
<td width="78%" class="vtable">
<input name="pppoe_username" type="text" class="formfld user" id="pppoe_username" size="20" value="<?=htmlspecialchars($pconfig['pppoe_username']);?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Password</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Password"); ?></td>
<td width="78%" class="vtable">
<input name="pppoe_password" type="password" class="formfld pwd" id="pppoe_password" size="20" value="<?=htmlspecialchars($pconfig['pppoe_password']);?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Service name</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Service name"); ?></td>
<td width="78%" class="vtable"><input name="provider" type="text" class="formfld unknown" id="provider" size="20" value="<?=htmlspecialchars($pconfig['provider']);?>">
- <br> <span class="vexpl">Hint: this field can usually be left empty</span>
+ <br> <span class="vexpl"><?=gettext("Hint: this field can usually be left empty"); ?></span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Dial on demand</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Dial on demand"); ?></td>
<td width="78%" class="vtable">
<input name="pppoe_dialondemand" type="checkbox" id="pppoe_dialondemand" value="enable" <?php if ($pconfig['pppoe_dialondemand']) echo "checked"; ?>>
- <strong>Enable Dial-On-Demand mode</strong><br>
- This option causes the interface to operate in dial-on-demand mode, allowing you to have a <i>virtual full time</i> connection. The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected.
+ <strong><?=gettext("Enable Dial-On-Demand mode"); ?></strong><br>
+ <?=gettext("This option causes the interface to operate in dial-on-demand mode, allowing you to have a "); ?><i><?=gettext("virtual full time"); ?></i> <?=gettext("connection. The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected"); ?>.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Idle timeout</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Idle timeout"); ?></td>
<td width="78%" class="vtable">
- <input name="pppoe_idletimeout" type="text" class="formfld unknown" id="pppoe_idletimeout" size="8" value="<?=htmlspecialchars($pconfig['pppoe_idletimeout']);?>"> seconds<br>If no qualifying outgoing packets are transmitted for the specified number of seconds, the connection is brought down. An idle timeout of zero disables this feature.
+ <input name="pppoe_idletimeout" type="text" class="formfld unknown" id="pppoe_idletimeout" size="8" value="<?=htmlspecialchars($pconfig['pppoe_idletimeout']);?>"> <?=gettext("seconds"); ?><br><?=gettext("If no qualifying outgoing packets are transmitted for the specified number of seconds, the connection is brought down. An idle timeout of zero disables this feature"); ?>.
</td>
</tr>
<tr>
@@ -1346,10 +1346,10 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
<td align="left" valign="top">
<p style="margin: 4px; padding: 4px 0 4px 0; width: 94%;">
<select valign="top" id="reset_type" name="pppoe-reset-type" class="formselect" onChange="show_reset_settings(this.value);">
- <option value = ""><?= gettext("Disabled"); ?></option>
- <option value="custom" <?php if ($pconfig['pppoe-reset-type'] == "custom") echo "selected"; ?>><?= gettext("Custom"); ?></option>
- <option value="preset" <?php if ($pconfig['pppoe-reset-type'] == "preset") echo "selected"; ?>><?= gettext("Pre-Set"); ?></option>
- </select> <?= gettext("Select a reset timing type"); ?>
+ <option value = ""><?=gettext("Disabled"); ?></option>
+ <option value="custom" <?php if ($pconfig['pppoe-reset-type'] == "custom") echo "selected"; ?>><?=gettext("Custom"); ?></option>
+ <option value="preset" <?php if ($pconfig['pppoe-reset-type'] == "preset") echo "selected"; ?>><?=gettext("Pre-Set"); ?></option>
+ </select> <?=gettext("Select a reset timing type"); ?>
</p>
<?php if ($pconfig['pppoe_pr_custom']): ?>
<p style="margin: 2px; padding: 4px; width: 94%;" id="pppoecustomwrap">
@@ -1357,14 +1357,14 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
<p style="margin: 2px; padding: 4px; width: 94%; display: none;" id="pppoecustomwrap">
<?php endif; ?>
<input type="text" name="pppoe_resethour" class="fd_incremental_inp_range_0_23 fd_increment_1 fd_classname_dec_buttonDec fd_classname_inc_buttonInc" maxlength="2" id="pppoe_resethour" value="<?= $pconfig['pppoe_resethour']; ?>" size="3" />
- <?= gettext("hour (0-23)"); ?><br />
+ <?=gettext("hour (0-23)"); ?><br />
<input type="text" name="pppoe_resetminute" class="fd_incremental_inp_range_0_59 fd_increment_1 fd_classname_dec_buttonDec fd_classname_inc_buttonInc" maxlength="2" id="pppoe_resetminute" value="<?= $pconfig['pppoe_resetminute']; ?>" size="3" />
- <?= gettext("minute (0-59)"); ?><br />
+ <?=gettext("minute (0-59)"); ?><br />
<input name="pppoe_resetdate" type="text" class="w8em format-m-d-y highlight-days-67" id="pppoe_resetdate" maxlength="10" size="10" value="<?=htmlspecialchars($pconfig['pppoe_resetdate']);?>" />
- <?= gettext("reset at a specific date (mm/dd/yyyy)"); ?>
+ <?=gettext("reset at a specific date (mm/dd/yyyy)"); ?>
<br />&nbsp;<br />
- <span class="red"><strong>Note: </strong></span>
- <?= gettext("If you leave the date field empty, the reset will be executed each day at the time you did specify using the minutes and hour field."); ?>
+ <span class="red"><strong><?=gettext("Note"); ?>: </strong></span>
+ <?=gettext("If you leave the date field empty, the reset will be executed each day at the time you did specify using the minutes and hour field."); ?>
</p>
<?php if ($pconfig['pppoe_pr_preset']): ?>
<p style="margin: 2px; padding: 4px; width: 94%;" id="pppoepresetwrap">
@@ -1372,16 +1372,16 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
<p style="margin: 2px; padding: 4px; width: 94%; display: none;" id="pppoepresetwrap">
<?php endif; ?>
<input name="pppoe_pr_preset_val" type="radio" id="pppoe_monthly" value="monthly" <?php if ($pconfig['pppoe_monthly']) echo "checked=\"checked\""; ?> />
- <?= gettext("reset at each month ('0 0 1 * *')"); ?>
+ <?=gettext("reset at each month ('0 0 1 * *')"); ?>
<br />
<input name="pppoe_pr_preset_val" type="radio" id="pppoe_weekly" value="weekly" <?php if ($pconfig['pppoe_weekly']) echo "checked=\"checked\""; ?> />
- <?= gettext("reset at each week ('0 0 * * 0')"); ?>
+ <?=gettext("reset at each week ('0 0 * * 0')"); ?>
<br />
<input name="pppoe_pr_preset_val" type="radio" id="pppoe_daily" value="daily" <?php if ($pconfig['pppoe_daily']) echo "checked=\"checked\""; ?> />
- <?= gettext("reset at each day ('0 0 * * *')"); ?>
+ <?=gettext("reset at each day ('0 0 * * *')"); ?>
<br />
<input name="pppoe_pr_preset_val" type="radio" id="pppoe_hourly" value="hourly" <?php if ($pconfig['pppoe_hourly']) echo "checked=\"checked\""; ?> />
- <?= gettext("reset at each hour ('0 * * * *')"); ?>
+ <?=gettext("reset at each hour ('0 * * * *')"); ?>
</p>
</td>
</tr>
@@ -1390,16 +1390,16 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Advanced and MLPPP</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Advanced and MLPPP"); ?></td>
<?php if (isset($pconfig['pppid'])): ?>
<td width="78%" class="vtable">
- <a href="/interfaces_ppps_edit.php?id=<?=htmlspecialchars($pconfig['pppid']);?>" class="navlnk">Click here</a>
- for additional PPPoE configuration options. Save first if you made changes.
+ <a href="/interfaces_ppps_edit.php?id=<?=htmlspecialchars($pconfig['pppid']);?>" class="navlnk"><?=gettext("Click here"); ?> </a>
+ <?=gettext("for additional PPPoE configuration options. Save first if you made changes"); ?>.
</td>
<? else: ?>
<td width="78%" class="vtable">
- <a href="/interfaces_ppps_edit.php" class="navlnk">Click here</a>
- for advanced PPPoE configuration options and MLPPP configuration.
+ <a href="/interfaces_ppps_edit.php" class="navlnk"><?=gettext("Click here"); ?> </a>
+ <?=gettext("for advanced PPPoE configuration options and MLPPP configuration"); ?>.
</td>
<? endif; ?>
</tr>
@@ -1410,22 +1410,22 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
<td colspan="2" style="padding:0px;">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">PPTP configuration</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("PPTP configuration"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Username</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Username"); ?></td>
<td width="78%" class="vtable">
<input name="pptp_username" type="text" class="formfld user" id="pptp_username" size="20" value="<?=htmlspecialchars($pconfig['pptp_username']);?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Password</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Password"); ?></td>
<td width="78%" class="vtable">
<input name="pptp_password" type="password" class="formfld pwd" id="pptp_password" size="20" value="<?=htmlspecialchars($pconfig['pptp_password']);?>">
</td>
</tr>
<tr>
- <td width="22%" width="100" valign="top" class="vncellreq">Local IP address</td>
+ <td width="22%" width="100" valign="top" class="vncellreq"><?=gettext("Local IP address"); ?></td>
<td width="78%" class="vtable">
<input name="pptp_local" type="text" class="formfld unknown" id="pptp_local" size="20" value="<?=htmlspecialchars($pconfig['pptp_local'][0]);?>">
/
@@ -1438,36 +1438,36 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
</td>
</tr>
<tr>
- <td width="22%" width="100" valign="top" class="vncellreq">Remote IP address</td>
+ <td width="22%" width="100" valign="top" class="vncellreq"><?=gettext("Remote IP address"); ?></td>
<td width="78%" class="vtable">
<input name="pptp_remote" type="text" class="formfld unknown" id="pptp_remote" size="20" value="<?=htmlspecialchars($pconfig['pptp_remote'][0]);?>">
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Dial on demand</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Dial on demand"); ?></td>
<td width="78%" class="vtable">
<input name="pptp_dialondemand" type="checkbox" id="pptp_dialondemand" value="enable" <?php if ($pconfig['pptp_dialondemand']) echo "checked"; ?>>
- <strong>Enable Dial-On-Demand mode</strong><br>
- This option causes the interface to operate in dial-on-demand mode, allowing you to have a <i>virtual full time</i> connection. The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected.
+ <strong><?=gettext("Enable Dial-On-Demand mode"); ?></strong><br>
+ <?=gettext("This option causes the interface to operate in dial-on-demand mode, allowing you to have a"); ?> <i><?=gettext("virtual full time"); ?></i> <?=gettext("connection. The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected"); ?>.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Idle timeout</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Idle timeout"); ?></td>
<td width="78%" class="vtable">
- <input name="pptp_idletimeout" type="text" class="formfld unknown" id="pptp_idletimeout" size="8" value="<?=htmlspecialchars($pconfig['pptp_idletimeout']);?>"> seconds<br>If no qualifying outgoing packets are transmitted for the specified number of seconds, the connection is brought down. An idle timeout of zero disables this feature.
+ <input name="pptp_idletimeout" type="text" class="formfld unknown" id="pptp_idletimeout" size="8" value="<?=htmlspecialchars($pconfig['pptp_idletimeout']);?>"> <?=gettext("seconds"); ?><br><?=gettext("If no qualifying outgoing packets are transmitted for the specified number of seconds, the connection is brought down. An idle timeout of zero disables this feature"); ?>.
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Advanced</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Advanced"); ?></td>
<?php if (isset($pconfig['pppid'])): ?>
<td width="78%" class="vtable">
- <a href="/interfaces_ppps_edit.php?id=<?=htmlspecialchars($pconfig['pppid']);?>" class="navlnk">Click here</a>
- for additional PPTP and L2TP configuration options. Save first if you made changes.
+ <a href="/interfaces_ppps_edit.php?id=<?=htmlspecialchars($pconfig['pppid']);?>" class="navlnk"><?=gettext("Click here");?></a>
+ <?=gettext("for additional PPTP and L2TP configuration options. Save first if you made changes");?>.
</td>
<? else: ?>
<td width="78%" class="vtable">
- <a href="/interfaces_ppps_edit.php" class="navlnk">Click here</a>
- for advanced PPTP and L2TP configuration options.
+ <a href="/interfaces_ppps_edit.php" class="navlnk"><?=gettext("Click here");?></a>
+ <?=gettext("for advanced PPTP and L2TP configuration options");?>.
</td>
<? endif; ?>
</tr>
@@ -1482,17 +1482,17 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
<td colspan="2" valign="top" height="16"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Common wireless configuration - Settings apply to all wireless networks on <?=$wlanbaseif;?>.</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Common wireless configuration - Settings apply to all wireless networks on"); ?> <?=$wlanbaseif;?>.</td>
</tr>
<tr>
- <td valign="top" class="vncell">Persist common settings</td>
+ <td valign="top" class="vncell"><?=gettext("Persist common settings");?></td>
<td class="vtable">
<input name="persistcommonwireless" type="checkbox" value="yes" class="formfld" id="persistcommonwireless" <? if ($pconfig['persistcommonwireless']) echo "checked";?>>
- <br/>Enabling this preserves the common wireless configuration through interface deletions and reassignments.
+ <br/><?=gettext("Enabling this preserves the common wireless configuration through interface deletions and reassignments");?>.
</td>
</tr>
<tr>
- <td valign="top" class="vncellreq">Standard</td>
+ <td valign="top" class="vncellreq"><?=gettext("Standard"); ?></td>
<td class="vtable">
<select name="standard" class="formselect" id="standard">
<?php
@@ -1508,15 +1508,15 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
</tr>
<?php if (isset($wl_modes['11g'])): ?>
<tr>
- <td valign="top" class="vncellreq">802.11g OFDM Protection Mode</td>
+ <td valign="top" class="vncellreq">802.11g OFDM <?=gettext("Protection Mode"); ?></td>
<td class="vtable">
<select name="protmode" class="formselect" id="protmode">
- <option <? if ($pconfig['protmode'] == 'off') echo "selected";?> value="off">Protection mode off</option>
- <option <? if ($pconfig['protmode'] == 'cts') echo "selected";?> value="cts">Protection mode CTS to self</option>
- <option <? if ($pconfig['protmode'] == 'rtscts') echo "selected";?> value="rtscts">Protection mode RTS and CTS</option>
+ <option <? if ($pconfig['protmode'] == 'off') echo "selected";?> value="off"><?=gettext("Protection mode off"); ?></option>
+ <option <? if ($pconfig['protmode'] == 'cts') echo "selected";?> value="cts"><?=gettext("Protection mode CTS to self"); ?></option>
+ <option <? if ($pconfig['protmode'] == 'rtscts') echo "selected";?> value="rtscts"><?=gettext("Protection mode RTS and CTS"); ?></option>
</select>
<br/>
- For IEEE 802.11g, use the specified technique for protecting OFDM frames in a mixed 11b/11g network.
+ <?=gettext("For IEEE 802.11g, use the specified technique for protecting OFDM frames in a mixed 11b/11g network"); ?>.
<br/>
</td>
</tr>
@@ -1524,7 +1524,7 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
<input name="protmode" type="hidden" id="protmode" value="off">
<?php endif; ?>
<tr>
- <td valign="top" class="vncellreq">Transmit power</td>
+ <td valign="top" class="vncellreq"><?=gettext("Transmit power"); ?></td>
<td class="vtable">
<select name="txpower" class="formselect" id="txpower">
<?
@@ -1537,14 +1537,14 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
}
?>
</select><br/>
- Note: Typically only a few discreet power settings are available and the driver will use the setting closest to the specified value. Not all adaptors support changing the transmit power setting.
+ <?=gettext("Note: Typically only a few discreet power settings are available and the driver will use the setting closest to the specified value. Not all adaptors support changing the transmit power setting"); ?>.
</td>
</tr>
<tr>
- <td valign="top" class="vncellreq">Channel</td>
+ <td valign="top" class="vncellreq"><?=gettext("Channel"); ?></td>
<td class="vtable">
<select name="channel" class="formselect" id="channel">
- <option <? if ($pconfig['channel'] == 0) echo "selected"; ?> value="0">Auto</option>
+ <option <? if ($pconfig['channel'] == 0) echo "selected"; ?> value="0"><?=gettext("Auto"); ?></option>
<?php
foreach($wl_modes as $wl_standard => $wl_channels) {
if($wl_standard == "11g") { $wl_standard = "11b/g"; }
@@ -1564,26 +1564,26 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
?>
</select>
<br/>
- Legend: wireless standards - channel # (frequency @ max TX power / TX power allowed in reg. domain)
+ <?=gettext("Legend: wireless standards - channel # (frequency @ max TX power / TX power allowed in reg. domain)"); ?>
<br/>
- Note: Not all channels may be supported by your card. Auto may override the wireless standard selected above.
+ <?=gettext("Note: Not all channels may be supported by your card. Auto may override the wireless standard selected above"); ?>.
</td>
</tr>
<tr>
- <td valign="top" class="vncell">Distance setting</td>
+ <td valign="top" class="vncell"><?=gettext("Distance setting"); ?></td>
<td class="vtable">
<input name="distance" type="text" class="formfld unknown" id="distance" size="5" value="<?=htmlspecialchars($pconfig['distance']);?>">
<br/>
- Note: This field can be used to tune ACK/CTS timers to fit the distance between AP and Client<br/>
- (measured in Meters and works only for Atheros based cards !)
+ <?=gettext("Note: This field can be used to tune ACK/CTS timers to fit the distance between AP and Client"); ?><br/>
+ <?=gettext("(measured in Meters and works only for Atheros based cards !)"); ?>
</td>
</tr>
<tr>
- <td valign="top" class="vncell">Regulatory settings</td>
+ <td valign="top" class="vncell"><?=gettext("Regulatory settings"); ?></td>
<td class="vtable">
- Regulatory domain<br/>
+ <?=gettext("Regulatory domain"); ?><br/>
<select name="regdomain" class="formselect" id="regdomain">
- <option <? if (empty($pconfig['regdomain'])) echo "selected"; ?> value="">Default</option>
+ <option <? if (empty($pconfig['regdomain'])) echo "selected"; ?> value=""><?=gettext("Default"); ?></option>
<?php
foreach($wl_regdomains as $wl_regdomain_key => $wl_regdomain) {
echo "<option ";
@@ -1595,11 +1595,11 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
?>
</select>
<br/>
- Note: Some cards have a default that is not recognized and require changing the regulatory domain to one in this list for the changes to other regulatory settings to work.
+ <?=gettext("Note: Some cards have a default that is not recognized and require changing the regulatory domain to one in this list for the changes to other regulatory settings to work"); ?>.
<br/><br/>
- Country (listed with country code and regulatory domain)<br/>
+ <?=gettext("Country (listed with country code and regulatory domain)"); ?><br/>
<select name="regcountry" class="formselect" id="regcountry">
- <option <? if (empty($pconfig['regcountry'])) echo "selected"; ?> value="">Default</option>
+ <option <? if (empty($pconfig['regcountry'])) echo "selected"; ?> value=""><?=gettext("Default"); ?></option>
<?php
foreach($wl_countries as $wl_country_key => $wl_country) {
echo "<option ";
@@ -1611,107 +1611,107 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
?>
</select>
<br/>
- Note: Any country setting other than "Default" will override the regulatory domain setting.
+ <?=gettext("Note: Any country setting other than \"Default\" will override the regulatory domain setting"); ?>.
<br/><br/>
- Location<br/>
+ <?=gettext("Location"); ?><br/>
<select name="reglocation" class="formselect" id="reglocation">
- <option <? if (empty($pconfig['reglocation'])) echo "selected"; ?> value="">Default</option>
- <option <? if ($pconfig['reglocation'] == 'indoor') echo "selected"; ?> value="indoor">Indoor</option>
- <option <? if ($pconfig['reglocation'] == 'outdoor') echo "selected"; ?> value="outdoor">Outdoor</option>
- <option <? if ($pconfig['reglocation'] == 'anywhere') echo "selected"; ?> value="anywhere">Anywhere</option>
+ <option <? if (empty($pconfig['reglocation'])) echo "selected"; ?> value=""><?=gettext("Default"); ?></option>
+ <option <? if ($pconfig['reglocation'] == 'indoor') echo "selected"; ?> value="indoor"><?=gettext("Indoor"); ?></option>
+ <option <? if ($pconfig['reglocation'] == 'outdoor') echo "selected"; ?> value="outdoor"><?=gettext("Outdoor"); ?></option>
+ <option <? if ($pconfig['reglocation'] == 'anywhere') echo "selected"; ?> value="anywhere"><?=gettext("Anywhere"); ?></option>
</select>
<br/><br/>
- These settings may affect which channels are available and the maximum transmit power allowed on those channels. Using the correct settings to comply with local regulatory requirements is recommended.
+ <?=gettext("These settings may affect which channels are available and the maximum transmit power allowed on those channels. Using the correct settings to comply with local regulatory requirements is recommended"); ?>.
<br/>
- Note: All wireless networks on this interface will be temporarily brought down when changing regulatory settings. Some of the regulatory domains or country codes may not be allowed by some cards. These settings may not be able to add additional channels that are not already supported.
+ <?=gettext("Note: All wireless networks on this interface will be temporarily brought down when changing regulatory settings. Some of the regulatory domains or country codes may not be allowed by some cards. These settings may not be able to add additional channels that are not already supported"); ?>.
</td>
</tr>
<tr>
<td colspan="2" valign="top" height="16"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Network-specific wireless configuration</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Network-specific wireless configuration");?></td>
</tr>
<tr>
- <td valign="top" class="vncellreq">Mode</td>
+ <td valign="top" class="vncellreq"><?=gettext("Mode"); ?></td>
<td class="vtable">
<select name="mode" class="formselect" id="mode">
- <option <? if ($pconfig['mode'] == 'bss') echo "selected";?> value="bss">Infrastructure (BSS)</option>
- <option <? if ($pconfig['mode'] == 'adhoc') echo "selected";?> value="adhoc">Ad-hoc (IBSS)</option>
- <option <? if ($pconfig['mode'] == 'hostap') echo "selected";?> value="hostap">Access Point</option>
+ <option <? if ($pconfig['mode'] == 'bss') echo "selected";?> value="bss"><?=gettext("Infrastructure (BSS)"); ?></option>
+ <option <? if ($pconfig['mode'] == 'adhoc') echo "selected";?> value="adhoc"><?=gettext("Ad-hoc (IBSS)"); ?></option>
+ <option <? if ($pconfig['mode'] == 'hostap') echo "selected";?> value="hostap"><?=gettext("Access Point"); ?></option>
</select>
</td>
</tr>
<tr>
- <td valign="top" class="vncellreq">SSID</td>
+ <td valign="top" class="vncellreq"><?=gettext("SSID"); ?></td>
<td class="vtable">
<input name="ssid" type="text" class="formfld unknown" id="ssid" size="20" value="<?=htmlspecialchars($pconfig['ssid']); ?>">
</td>
</tr>
<?php if (isset($wl_modes['11ng']) || isset($wl_modes['11na'])): ?>
<tr>
- <td valign="top" class="vncell">Minimum wireless standard</td>
+ <td valign="top" class="vncell"><?=gettext("Minimum wireless standard"); ?></td>
<td class="vtable">
<select name="puremode" class="formselect" id="puremode">
- <option <? if ($pconfig['puremode'] == 'any') echo "selected";?> value="any">Any</option>
+ <option <? if ($pconfig['puremode'] == 'any') echo "selected";?> value="any"><?=gettext("Any"); ?></option>
<?php if (isset($wl_modes['11g'])): ?>
<option <? if ($pconfig['puremode'] == '11g') echo "selected";?> value="11g">802.11g</option>
<?php endif; ?>
<option <? if ($pconfig['puremode'] == '11n') echo "selected";?> value="11n">802.11n</option>
</select>
<br/>
- When operating as an access point, allow only stations capable of the selected wireless standard to associate (stations not capable are not permitted to associate).
+ <?=gettext("When operating as an access point, allow only stations capable of the selected wireless standard to associate (stations not capable are not permitted to associate)"); ?>.
</td>
</tr>
<?php elseif (isset($wl_modes['11g'])): ?>
<tr>
- <td valign="top" class="vncell">802.11g only</td>
+ <td valign="top" class="vncell">802.11g <?=gettext("only"); ?></td>
<td class="vtable">
<input name="puremode" type="checkbox" value="11g" class="formfld" id="puremode" <? if ($pconfig['puremode'] == '11g') echo "checked";?>>
- <br/>When operating as an access point in 802.11g mode, allow only 11g-capable stations to associate (11b-only stations are not permitted to associate).
+ <br/><?=gettext("When operating as an access point in 802.11g mode, allow only 11g-capable stations to associate (11b-only stations are not permitted to associate)"); ?>.
</td>
</tr>
<?php endif; ?>
<tr>
- <td valign="top" class="vncell">Allow intra-BSS communication</td>
+ <td valign="top" class="vncell"><?=gettext("Allow intra-BSS communication"); ?></td>
<td class="vtable">
<input name="apbridge_enable" type="checkbox" value="yes" class="formfld" id="apbridge_enable" <? if ($pconfig['apbridge_enable']) echo "checked";?>>
<br/>
- When operating as an access point, enable this if you want to pass packets between wireless clients directly.
+ <?=gettext("When operating as an access point, enable this if you want to pass packets between wireless clients directly"); ?>.
<br/>
- Disabling the internal bridging is useful when traffic is to be processed with packet filtering.
+ <?=gettext("Disabling the internal bridging is useful when traffic is to be processed with packet filtering"); ?>.
</td>
</tr>
<tr>
- <td valign="top" class="vncell">Enable WME</td>
+ <td valign="top" class="vncell"><?=gettext("Enable WME"); ?></td>
<td class="vtable">
<input name="wme_enable" type="checkbox" class="formfld" id="wme_enable" value="yes" <? if ($pconfig['wme_enable']) echo "checked";?>>
- <br/>Setting this option will force the card to use WME (wireless QoS).
+ <br/><?=gettext("Setting this option will force the card to use WME (wireless QoS)"); ?>.
</td>
</tr>
<tr>
- <td valign="top" class="vncell">Enable Hide SSID</td>
+ <td valign="top" class="vncell"><?=gettext("Enable Hide SSID"); ?></td>
<td class="vtable">
<input name="hidessid_enable" type="checkbox" class="formfld" id="hidessid_enable" value="yes" <? if ($pconfig['hidessid_enable']) echo "checked";?>>
<br/>
- Setting this option will force the card to NOT broadcast its SSID
+ <?=gettext("Setting this option will force the card to NOT broadcast its SSID"); ?>
<br/>
- (this might create problems for some clients).
+ <?=gettext("(this might create problems for some clients)"); ?>.
</td>
</tr>
<tr>
- <td valign="top" class="vncell">WEP</td>
+ <td valign="top" class="vncell"><?=gettext("WEP"); ?></td>
<td class="vtable">
<input name="wep_enable" type="checkbox" id="wep_enable" value="yes" <? if ($pconfig['wep_enable']) echo "checked"; ?>>
- <strong>Enable WEP</strong>
+ <strong><?=gettext("Enable WEP"); ?></strong>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
- <td>&nbsp;TX key&nbsp;</td>
+ <td>&nbsp;<?=gettext("TX key"); ?>&nbsp;</td>
</tr>
<tr>
- <td>Key 1:&nbsp;&nbsp;</td>
+ <td><?=gettext("Key"); ?> 1:&nbsp;&nbsp;</td>
<td>
<input name="key1" type="text" class="formfld unknown" id="key1" size="30" value="<?=htmlspecialchars($pconfig['key1']);?>">
</td>
@@ -1720,7 +1720,7 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
</td>
</tr>
<tr>
- <td>Key 2:&nbsp;&nbsp;</td>
+ <td><?=gettext("Key"); ?> 2:&nbsp;&nbsp;</td>
<td>
<input name="key2" type="text" class="formfld unknown" id="key2" size="30" value="<?=htmlspecialchars($pconfig['key2']);?>">
</td>
@@ -1729,7 +1729,7 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
</td>
</tr>
<tr>
- <td>Key 3:&nbsp;&nbsp;</td>
+ <td><?=gettext("Key"); ?> 3:&nbsp;&nbsp;</td>
<td>
<input name="key3" type="text" class="formfld unknown" id="key3" size="30" value="<?=htmlspecialchars($pconfig['key3']);?>">
</td>
@@ -1738,7 +1738,7 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
</td>
</tr>
<tr>
- <td>Key 4:&nbsp;&nbsp;</td>
+ <td><?=gettext("Key"); ?> 4:&nbsp;&nbsp;</td>
<td>
<input name="key4" type="text" class="formfld unknown" id="key4" size="30" value="<?=htmlspecialchars($pconfig['key4']);?>">
</td>
@@ -1748,117 +1748,117 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
</tr>
</table>
<br/>
- 40 (64) bit keys may be entered as 5 ASCII characters or 10 hex digits preceded by '0x'.<br/>
- 104 (128) bit keys may be entered as 13 ASCII characters or 26 hex digits preceded by '0x'.
+ <?=gettext("40 (64) bit keys may be entered as 5 ASCII characters or 10 hex digits preceded by '0x'"); ?>.<br/>
+ <?=gettext("104 (128) bit keys may be entered as 13 ASCII characters or 26 hex digits preceded by '0x'"); ?>.
</td>
</tr>
<tr>
- <td valign="top" class="vncell">WPA</td>
+ <td valign="top" class="vncell"><?=gettext("WPA"); ?></td>
<td class="vtable">
<input name="wpa_enable" type="checkbox" class="formfld" id="wpa_enable" value="yes" <? if ($pconfig['wpa_enable']) echo "checked"; ?>>
- <strong>Enable WPA</strong>
+ <strong><?=gettext("Enable WPA"); ?></strong>
<br/><br/>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
- <td>&nbsp;WPA Pre Shared Key&nbsp;</td>
+ <td>&nbsp;<?=gettext("WPA Pre Shared Key"); ?>&nbsp;</td>
</tr>
<tr>
- <td>PSK:&nbsp;&nbsp;</td>
+ <td><?=gettext("PSK"); ?>:&nbsp;&nbsp;</td>
<td>
<input name="passphrase" type="text" class="formfld unknown" id="passphrase" size="66" value="<?=htmlspecialchars($pconfig['passphrase']);?>">
</td>
</tr>
</table>
- <br/>Passphrase must be from 8 to 63 characters.
+ <br/><?=gettext("Passphrase must be from 8 to 63 characters"); ?>.
</td>
</tr>
<tr>
- <td valign="top" class="vncell">WPA Mode</td>
+ <td valign="top" class="vncell"><?=gettext("WPA Mode"); ?></td>
<td class="vtable">
<select name="wpa_mode" class="formselect" id="wpa_mode">
- <option <? if ($pconfig['wpa_mode'] == '1') echo "selected";?> value="1">WPA</option>
- <option <? if ($pconfig['wpa_mode'] == '2') echo "selected";?> value="2">WPA2</option>
- <option <? if ($pconfig['wpa_mode'] == '3') echo "selected";?> value="3">Both</option>
+ <option <? if ($pconfig['wpa_mode'] == '1') echo "selected";?> value="1"><?=gettext("WPA"); ?></option>
+ <option <? if ($pconfig['wpa_mode'] == '2') echo "selected";?> value="2"><?=gettext("WPA2"); ?></option>
+ <option <? if ($pconfig['wpa_mode'] == '3') echo "selected";?> value="3"><?=gettext("Both"); ?></option>
</select>
</td>
</tr>
<tr>
- <td valign="top" class="vncell">WPA Key Management Mode</td>
+ <td valign="top" class="vncell"><?=gettext("WPA Key Management Mode"); ?></td>
<td class="vtable">
<select name="wpa_key_mgmt" class="formselect" id="wpa_key_mgmt">
- <option <? if ($pconfig['wpa_key_mgmt'] == 'WPA-PSK') echo "selected";?> value="WPA-PSK">Pre Shared Key</option>
- <option <? if ($pconfig['wpa_key_mgmt'] == 'WPA-EAP') echo "selected";?> value="WPA-EAP">Extensible Authentication Protocol</option>
- <option <? if ($pconfig['wpa_key_mgmt'] == 'WPA-PSK WPA-EAP') echo "selected";?> value="WPA-PSK WPA-EAP">Both</option>
+ <option <? if ($pconfig['wpa_key_mgmt'] == 'WPA-PSK') echo "selected";?> value="WPA-PSK"><?=gettext("Pre Shared Key"); ?></option>
+ <option <? if ($pconfig['wpa_key_mgmt'] == 'WPA-EAP') echo "selected";?> value="WPA-EAP"><?=gettext("Extensible Authentication Protocol"); ?></option>
+ <option <? if ($pconfig['wpa_key_mgmt'] == 'WPA-PSK WPA-EAP') echo "selected";?> value="WPA-PSK WPA-EAP"><?=gettext("Both"); ?></option>
</select>
</td>
</tr>
<tr>
- <td valign="top" class="vncell">Authentication</td>
+ <td valign="top" class="vncell"><?=gettext("Authentication"); ?></td>
<td class="vtable">
<select name="auth_algs" class="formselect" id="auth_algs">
- <option <? if ($pconfig['auth_algs'] == '1') echo "selected";?> value="1">Open System Authentication</option>
- <option <? if ($pconfig['auth_algs'] == '2') echo "selected";?> value="2">Shared Key Authentication</option>
+ <option <? if ($pconfig['auth_algs'] == '1') echo "selected";?> value="1"><?=gettext("Open System Authentication"); ?></option>
+ <option <? if ($pconfig['auth_algs'] == '2') echo "selected";?> value="2"><?=gettext("Shared Key Authentication"); ?></option>
<option <? if ($pconfig['auth_algs'] == '3') echo "selected";?> value="3">Both</option>
</select>
- <br/>Note: Shared Key Authentication requires WEP.</br>
+ <br/><?=gettext("Note: Shared Key Authentication requires WEP"); ?>.</br>
</td>
</tr>
<tr>
- <td valign="top" class="vncell">WPA Pairwise</td>
+ <td valign="top" class="vncell"><?=gettext("WPA Pairwise"); ?></td>
<td class="vtable">
<select name="wpa_pairwise" class="formselect" id="wpa_pairwise">
- <option <? if ($pconfig['wpa_pairwise'] == 'CCMP TKIP') echo "selected";?> value="CCMP TKIP">Both</option>
- <option <? if ($pconfig['wpa_pairwise'] == 'CCMP') echo "selected";?> value="CCMP">AES (recommended)</option>
- <option <? if ($pconfig['wpa_pairwise'] == 'TKIP') echo "selected";?> value="TKIP">TKIP</option>
+ <option <? if ($pconfig['wpa_pairwise'] == 'CCMP TKIP') echo "selected";?> value="CCMP TKIP"><?=gettext("Both"); ?></option>
+ <option <? if ($pconfig['wpa_pairwise'] == 'CCMP') echo "selected";?> value="CCMP"><?=gettext("AES (recommended)"); ?></option>
+ <option <? if ($pconfig['wpa_pairwise'] == 'TKIP') echo "selected";?> value="TKIP"><?=gettext("TKIP"); ?></option>
</select>
</td>
</tr>
<tr>
- <td valign="top" class="vncell">Key Rotation</td>
+ <td valign="top" class="vncell"><?=gettext("Key Rotation"); ?></td>
<td class="vtable">
<input name="wpa_group_rekey" type="text" class="formfld unknown" id="wpa_group_rekey" size="30" value="<? echo $pconfig['wpa_group_rekey'] ? $pconfig['wpa_group_rekey'] : "60";?>">
- <br/>Allowed values are 1-9999 but should not be longer than Master Key Regeneration time.
+ <br/><?=gettext("Allowed values are 1-9999 but should not be longer than Master Key Regeneration time"); ?>.
</td>
</tr>
<tr>
- <td valign="top" class="vncell">Master Key Regeneration</td>
+ <td valign="top" class="vncell"><?=gettext("Master Key Regeneration"); ?></td>
<td class="vtable">
<input name="wpa_gmk_rekey" type="text" class="formfld" id="wpa_gmk_rekey" size="30" value="<? echo $pconfig['wpa_gmk_rekey'] ? $pconfig['wpa_gmk_rekey'] : "3600";?>">
- <br/>Allowed values are 1-9999 but should not be shorter than Key Rotation time.
+ <br/><?=gettext("Allowed values are 1-9999 but should not be shorter than Key Rotation time"); ?>.
</td>
</tr>
<tr>
- <td valign="top" class="vncell">Strict Key Regeneration</td>
+ <td valign="top" class="vncell"><?=gettext("Strict Key Regeneration"); ?></td>
<td class="vtable">
<input name="wpa_strict_rekey" type="checkbox" value="yes" class="formfld" id="wpa_strict_rekey" <? if ($pconfig['wpa_strict_rekey']) echo "checked"; ?>>
- <br/>Setting this option will force the AP to rekey whenever a client disassociates.
+ <br/><?=gettext("Setting this option will force the AP to rekey whenever a client disassociates"); ?>.
</td>
</tr>
<tr>
- <td valign="top" class="vncell">Enable IEEE802.1X Authentication</td>
+ <td valign="top" class="vncell"><?=gettext("Enable IEEE802.1X Authentication"); ?></td>
<td class="vtable">
<input name="ieee8021x" type="checkbox" value="yes" class="formfld" id="ieee8021x" <? if ($pconfig['ieee8021x']) echo "checked";?>>
- <br/>Setting this option will enable 802.1x authentication.
- <br/><span class="red"><strong>NOTE:</strong</span> this option requires checking the "Enable WPA box".
+ <br/><?=gettext("Setting this option will enable 802.1x authentication"); ?>.
+ <br/><span class="red"><strong><?=gettext("NOTE"); ?>:</strong</span> <?=gettext("this option requires checking the \"Enable WPA box\""); ?>.
</td>
</tr>
<tr>
- <td valign="top" class="vncell">802.1X Authentication Server IP Address</td>
+ <td valign="top" class="vncell"><?=gettext("802.1X Authentication Server IP Address"); ?></td>
<td class="vtable">
<input name="auth_server_addr" id="auth_server_addr" type="text" class="formfld unknown" size="66" value="<?=htmlspecialchars($pconfig['auth_server_addr']);?>">
- <br/>Enter the IP address of the 802.1X Authentication Server. This is commonly a Radius server (FreeRadius, Internet Authentication Services, etc.)
+ <br/><?=gettext("Enter the IP address of the 802.1X Authentication Server. This is commonly a Radius server (FreeRadius, Internet Authentication Services, etc.)"); ?>
</td>
</tr>
<tr>
- <td valign="top" class="vncell">802.1X Authentication Server Port</td>
+ <td valign="top" class="vncell">802.1X <?=gettext("Authentication Server Port"); ?></td>
<td class="vtable">
<input name="auth_server_port" id="auth_server_port" type="text" class="formfld unknown" size="66" value="<?=htmlspecialchars($pconfig['auth_server_port']);?>">
- <br/>Leave blank for the default 1812 port.
+ <br/><?=gettext("Leave blank for the default 1812 port"); ?>.
</td>
</tr>
<tr>
- <td valign="top" class="vncell">802.1X Authentication Server Shared Secret</td>
+ <td valign="top" class="vncell">802.1X <?=gettext("Authentication Server Shared Secret"); ?></td>
<td class="vtable">
<input name="auth_server_shared_secret" id="auth_server_shared_secret" type="text" class="formfld unknown" size="66" value="<?=htmlspecialchars($pconfig['auth_server_shared_secret']);?>">
<br/>
@@ -1869,30 +1869,30 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
<td colspan="2" valign="top" height="16"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Private networks</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Private networks"); ?></td>
</tr>
<tr>
<td valign="middle" class="vncell">&nbsp;</td>
<td class="vtable">
<a name="rfc1918"></a>
<input name="blockpriv" type="checkbox" id="blockpriv" value="yes" <?php if ($pconfig['blockpriv']) echo "checked"; ?>>
- <strong>Block private networks</strong><br>
- When set, this option blocks traffic from IP addresses that are reserved
- for private networks as per RFC 1918 (10/8, 172.16/12, 192.168/16) as
- well as loopback addresses (127/8).&nbsp;&nbsp; You should generally
- leave this option turned on, unless your WAN network lies in such
- a private address space, too.
+ <strong><?=gettext("Block private networks"); ?></strong><br>
+ <?=gettext("When set, this option blocks traffic from IP addresses that are reserved " .
+ "for private networks as per RFC 1918 (10/8, 172.16/12, 192.168/16) as"); ?>
+ <?=gettext("well as loopback addresses (127/8)"); ?>.&nbsp;&nbsp; <?=gettext("You should generally " .
+ "leave this option turned on, unless your WAN network lies in such " .
+ "a private address space, too"); ?>.
</td>
</tr>
<tr>
<td valign="middle" class="vncell">&nbsp;</td>
<td class="vtable">
<input name="blockbogons" type="checkbox" id="blockbogons" value="yes" <?php if ($pconfig['blockbogons']) echo "checked"; ?>>
- <strong>Block bogon networks</strong><br>
- When set, this option blocks traffic from IP addresses that are reserved
- (but not RFC 1918) or not yet assigned by IANA.&nbsp;&nbsp;
- Bogons are prefixes that should never appear in the Internet routing table,
- and obviously should not appear as the source address in any packets you receive.
+ <strong><?=gettext("Block bogon networks"); ?></strong><br>
+ <?=gettext("When set, this option blocks traffic from IP addresses that are reserved " .
+ "(but not RFC 1918) or not yet assigned by IANA"); ?>.&nbsp;&nbsp;
+ <?=gettext("Bogons are prefixes that should never appear in the Internet routing table, " .
+ "and obviously should not appear as the source address in any packets you receive"); ?>.
</td>
</tr>
</table> <!-- End "allcfg" table -->
@@ -1905,8 +1905,8 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
</td>
<td>
<br/>
- <input id="save" name="Submit" type="submit" class="formbtn" value="Save">
- <input id="cancel" type="button" class="formbtn" value="Cancel" onclick="history.back()">
+ <input id="save" name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
+ <input id="cancel" type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
<input name="if" type="hidden" id="if" value="<?=$if;?>">
<?php if ($wancfg['if'] == $a_ppps[$pppid]['if']) : ?>
<input name="ppp_port" type="hidden" value="<?=$pconfig['port'];?>">
diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php
index 2c38e80..aef014a 100755
--- a/usr/local/www/interfaces_assign.php
+++ b/usr/local/www/interfaces_assign.php
@@ -40,7 +40,7 @@
##|*MATCH=interfaces_assign.php*
##|-PRIV
-$pgtitle = array("Interfaces", "Assign network ports");
+$pgtitle = array(gettext("Interfaces"),gettext("Assign network ports"));
$statusurl = "status_interfaces.php";
require("guiconfig.inc");
@@ -182,9 +182,9 @@ if ($_POST['apply']) {
/* Deliver error message for any port with more than one assignment */
foreach ($portifmap as $portname => $ifnames) {
if (count($ifnames) > 1) {
- $errstr = "Port " . $portname .
- " was assigned to " . count($ifnames) .
- " interfaces:";
+ $errstr = sprintf(gettext("Port '%s' ".
+ " was assigned to '%s'" .
+ " interfaces:"), $portname, count($ifnames));
foreach ($portifmap[$portname] as $ifn)
$errstr .= " " . $ifn;
@@ -246,11 +246,11 @@ if ($_GET['act'] == "del") {
$id = $_GET['id'];
if (link_interface_to_bridge($id))
- $input_errors[] = "The interface is part of a bridge. Please remove it from the bridge to continue";
+ $input_errors[] = gettext("The interface is part of a bridge. Please remove it from the bridge to continue");
else if (link_interface_to_gre($id))
- $input_errors[] = "The interface is part of a gre tunnel. Please delete the tunnel to continue";
+ $input_errors[] = gettext("The interface is part of a gre tunnel. Please delete the tunnel to continue");
else if (link_interface_to_gif($id))
- $input_errors[] = "The interface is part of a gif tunnel. Please delete the tunnel to continue";
+ $input_errors[] = gettext("The interface is part of a gif tunnel. Please delete the tunnel to continue");
else {
unset($config['interfaces'][$id]['enable']);
$realid = get_real_interface($id);
@@ -300,15 +300,15 @@ if ($_GET['act'] == "del") {
link_interface_to_vlans($realid, "update");
- $savemsg = "Interface has been deleted.";
+ $savemsg = gettext("Interface has been deleted.");
}
}
if ($_GET['act'] == "add") {
/* find next free optional interface number */
if(!$config['interfaces']['lan']) {
- $newifname = "lan";
- $descr = "LAN";
+ $newifname = gettext("lan");
+ $descr = gettext("LAN");
$config['interfaces'][$newifname] = array();
$config['interfaces'][$newifname]['descr'] = $descr;
} else {
@@ -317,7 +317,7 @@ if ($_GET['act'] == "add") {
break;
}
$newifname = 'opt' . $i;
- $descr = "OPT{$i}";
+ $descr = sprintf(gettext("OPT '%s'"),$i);
$config['interfaces'][$newifname] = array();
$config['interfaces'][$newifname]['descr'] = $descr;
}
@@ -348,7 +348,7 @@ if ($_GET['act'] == "add") {
write_config();
- $savemsg = "Interface has been added.";
+ $savemsg = gettext("Interface has been added.");
}
@@ -371,9 +371,9 @@ include("head.inc");
if(file_exists("/var/run/interface_mismatch_reboot_needed"))
if ($_POST)
- $savemsg = "Reboot is needed. Please apply the settings in order to reboot.";
+ $savemsg = gettext("Reboot is needed. Please apply the settings in order to reboot.");
else
- $savemsg = "Interface mismatch detected. Please resolve the mismatch and click Save. The firewall will reboot afterwards.";
+ $savemsg = gettext("Interface mismatch detected. Please resolve the mismatch and click Save. The firewall will reboot afterwards.");
?>
@@ -383,7 +383,7 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed"))
<form action="interfaces_assign.php" method="post" name="iform" id="iform">
<?php if (file_exists("/tmp/reload_interfaces")): ?><p>
- <?php print_info_box_np("The interface configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
+ <?php print_info_box_np(gettext("The interface configuration has been changed.<br>You must apply the changes in order for them to take effect)."));?><br>
<?php elseif($savemsg): ?>
<?php print_info_box($savemsg); ?>
<?php endif; ?>
@@ -394,16 +394,16 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed"))
<tr><td class="tabnavtbl">
<?php
$tab_array = array();
- $tab_array[0] = array("Interface assignments", true, "interfaces_assign.php");
- $tab_array[1] = array("Interface Groups", false, "interfaces_groups.php");
- $tab_array[2] = array("Wireless", false, "interfaces_wireless.php");
- $tab_array[3] = array("VLANs", false, "interfaces_vlan.php");
- $tab_array[4] = array("QinQs", false, "interfaces_qinq.php");
- $tab_array[5] = array("PPPs", false, "interfaces_ppps.php");
- $tab_array[7] = array("GRE", false, "interfaces_gre.php");
- $tab_array[8] = array("GIF", false, "interfaces_gif.php");
- $tab_array[9] = array("Bridges", false, "interfaces_bridge.php");
- $tab_array[10] = array("LAGG", false, "interfaces_lagg.php");
+ $tab_array[0] = array(gettext("Interface assignments"), true, "interfaces_assign.php");
+ $tab_array[1] = array(gettext("Interface Groups"), false, "interfaces_groups.php");
+ $tab_array[2] = array(gettext("Wireless"), false, "interfaces_wireless.php");
+ $tab_array[3] = array(gettext("VLANs"), false, "interfaces_vlan.php");
+ $tab_array[4] = array(gettext("QinQs"), false, "interfaces_qinq.php");
+ $tab_array[5] = array(gettext("PPPs"), false, "interfaces_ppps.php");
+ $tab_array[7] = array(gettext("GRE"), false, "interfaces_gre.php");
+ $tab_array[8] = array(gettext("GIF"), false, "interfaces_gif.php");
+ $tab_array[9] = array(gettext("Bridges"), false, "interfaces_bridge.php");
+ $tab_array[10] = array(gettext("LAGG"), false, "interfaces_lagg.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -412,8 +412,8 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed"))
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td class="listhdrr">Interface</td>
- <td class="listhdr">Network port</td>
+ <td class="listhdrr"><?=gettext("Interface"); ?></td>
+ <td class="listhdr"><?=gettext("Network port"); ?></td>
<td class="list">&nbsp;</td>
</tr>
<?php foreach ($config['interfaces'] as $ifname => $iface):
@@ -429,7 +429,7 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed"))
<?php foreach ($portlist as $portname => $portinfo): ?>
<option value="<?=$portname;?>" <?php if ($portname == $iface['if']) echo " selected";?>>
<?php if ($portinfo['isvlan']) {
- $descr = "VLAN {$portinfo['tag']} on {$portinfo['if']}";
+ $descr = sprintf(gettext("VLAN '%s' on '%s'"),$portinfo['tag'],$portinfo['if']);
if ($portinfo['descr'])
$descr .= " (" . $portinfo['descr'] . ")";
echo htmlspecialchars($descr);
@@ -470,7 +470,7 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed"))
</td>
<td valign="middle" class="list">
<?php if ($ifname != 'wan'): ?>
- <a href="interfaces_assign.php?act=del&id=<?=$ifname;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="delete interface" width="17" height="17" border="0"></a>
+ <a href="interfaces_assign.php?act=del&id=<?=$ifname;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title=<?=gettext("delete interface"); ?> width="17" height="17" border="0"></a>
<?php endif; ?>
</td>
</tr>
@@ -479,7 +479,7 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed"))
<tr>
<td class="list" colspan="2"></td>
<td class="list" nowrap>
- <a href="interfaces_assign.php?act=add"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add interface" width="17" height="17" border="0"></a>
+ <a href="interfaces_assign.php?act=add"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title=<?=gettext("add interface"); ?> width="17" height="17" border="0"></a>
</td>
</tr>
<?php else: ?>
@@ -490,14 +490,14 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed"))
</table>
</div>
<br/>
-<input name="Submit" type="submit" class="formbtn" value="Save"><br><br>
+<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"><br><br>
<p>
</p>
<ul>
- <li><span class="vexpl">change the IP address of your computer</span></li>
- <li><span class="vexpl">renew its DHCP lease</span></li>
- <li><span class="vexpl">access the webConfigurator with the new IP address</span></li>
- <li><span class="vexpl">interfaces that are configured as members of a lagg(4) interface will not be shown.</span></li>
+ <li><span class="vexpl"><?=gettext("change the IP address of your computer"); ?></span></li>
+ <li><span class="vexpl"><?=gettext("renew its DHCP lease"); ?></span></li>
+ <li><span class="vexpl"><?=gettext("access the webConfigurator with the new IP address"); ?></span></li>
+ <li><span class="vexpl"><?=gettext("interfaces that are configured as members of a lagg(4) interface will not be shown."); ?></span></li>
</ul></td>
</tr>
</table>
diff --git a/usr/local/www/interfaces_bridge.php b/usr/local/www/interfaces_bridge.php
index e7aa71d..ad31e59 100644
--- a/usr/local/www/interfaces_bridge.php
+++ b/usr/local/www/interfaces_bridge.php
@@ -61,7 +61,7 @@ function bridge_inuse($num) {
if ($_GET['act'] == "del") {
/* check if still in use */
if (bridge_inuse($_GET['id'])) {
- $input_errors[] = "This bridge cannot be deleted because it is assigned as an interface.";
+ $input_errors[] = gettext("This bridge cannot be deleted because it is assigned as an interface.");
} else {
mwexec("/sbin/ifconfig " . $a_bridges[$_GET['id']]['bridgeif'] . " destroy");
unset($a_bridges[$_GET['id']]);
@@ -74,7 +74,7 @@ if ($_GET['act'] == "del") {
}
-$pgtitle = array("Interfaces","Bridge");
+$pgtitle = array(gettext("Interfaces"),gettext("Bridge"));
include("head.inc");
?>
@@ -86,16 +86,16 @@ include("head.inc");
<tr><td>
<?php
$tab_array = array();
- $tab_array[0] = array("Interface assignments", false, "interfaces_assign.php");
- $tab_array[1] = array("Interface Groups", false, "interfaces_groups.php");
- $tab_array[2] = array("Wireless", false, "interfaces_wireless.php");
- $tab_array[3] = array("VLANs", false, "interfaces_vlan.php");
- $tab_array[4] = array("QinQs", false, "interfaces_qinq.php");
- $tab_array[5] = array("PPPs", false, "interfaces_ppps.php");
- $tab_array[6] = array("GRE", false, "interfaces_gre.php");
- $tab_array[7] = array("GIF", false, "interfaces_gif.php");
- $tab_array[8] = array("Bridges", true, "interfaces_bridge.php");
- $tab_array[9] = array("LAGG", false, "interfaces_lagg.php");
+ $tab_array[0] = array(gettext("Interface assignments"), false, "interfaces_assign.php");
+ $tab_array[1] = array(gettext("Interface Groups"), false, "interfaces_groups.php");
+ $tab_array[2] = array(gettext("Wireless"), false, "interfaces_wireless.php");
+ $tab_array[3] = array(gettext("VLANs"), false, "interfaces_vlan.php");
+ $tab_array[4] = array(gettext("QinQs"), false, "interfaces_qinq.php");
+ $tab_array[5] = array(gettext("PPPs"), false, "interfaces_ppps.php");
+ $tab_array[6] = array(gettext("GRE"), false, "interfaces_gre.php");
+ $tab_array[7] = array(gettext("GIF"), false, "interfaces_gif.php");
+ $tab_array[8] = array(gettext("Bridges"), true, "interfaces_bridge.php");
+ $tab_array[9] = array(gettext("LAGG"), false, "interfaces_lagg.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -104,9 +104,9 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="20%" class="listhdrr">Interface</td>
- <td width="20%" class="listhdrr">Members</td>
- <td width="50%" class="listhdr">Description</td>
+ <td width="20%" class="listhdrr"><?=gettext("Interface"); ?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Members"); ?></td>
+ <td width="50%" class="listhdr"><?=gettext("Description"); ?></td>
<td width="10%" class="list"></td>
</tr>
<?php $i = 0; $ifdescrs = get_configured_interface_with_descr();
@@ -132,7 +132,7 @@ include("head.inc");
<?=htmlspecialchars($bridge['descr']);?>&nbsp;
</td>
<td valign="middle" nowrap class="list"> <a href="interfaces_bridge_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
- &nbsp;<a href="interfaces_bridge.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this bridge?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ &nbsp;<a href="interfaces_bridge.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("'Do you really want to delete this bridge?'"); ?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
@@ -141,9 +141,9 @@ include("head.inc");
</tr>
<tr>
<td colspan="3" class="list"><p class="vexpl"><span class="red"><strong>
- Note:<br>
+ <?=gettext("Note"); ?>:<br>
</strong></span>
- Here you can configure bridging of interfaces.
+ <?=gettext("Here you can configure bridging of interfaces"); ?>.
</td>
<td class="list">&nbsp;</td>
</tr>
diff --git a/usr/local/www/interfaces_bridge_edit.php b/usr/local/www/interfaces_bridge_edit.php
index 1b2b304..1a32ff5 100644
--- a/usr/local/www/interfaces_bridge_edit.php
+++ b/usr/local/www/interfaces_bridge_edit.php
@@ -104,45 +104,45 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "members");
- $reqdfieldsn = explode(",", "Member Interfaces");
+ $reqdfieldsn = array(gettext("Member Interfaces"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if ($_POST['maxage'] && !is_numeric($_POST['maxage']))
- $input_errors[] = "Maxage needs to be an integer between 6 and 40.";
+ $input_errors[] = gettext("Maxage needs to be an integer between 6 and 40.");
if ($_POST['maxaddr'] && !is_numeric($_POST['maxaddr']))
- $input_errors[] = "Maxaddr needs to be an integer.";
+ $input_errors[] = gettext("Maxaddr needs to be an integer.");
if ($_POST['timeout'] && !is_numeric($_POST['timeout']))
- $input_errors[] = "Timeout needs to be an integer.";
+ $input_errors[] = gettext("Timeout needs to be an integer.");
if ($_POST['fwdelay'] && !is_numeric($_POST['fwdelay']))
- $input_errors[] = "Forward Delay needs to be an integer between 4 and 30.";
+ $input_errors[] = gettext("Forward Delay needs to be an integer between 4 and 30.");
if ($_POST['hellotime'] && !is_numeric($_POST['hellotime']))
- $input_errors[] = "Hello time for STP needs to be an integer between 1 and 2.";
+ $input_errors[] = gettext("Hello time for STP needs to be an integer between 1 and 2.");
if ($_POST['priority'] && !is_numeric($_POST['priority']))
- $input_errors[] = "Priority for STP needs to be an integer between 0 and 61440.";
+ $input_errors[] = gettext("Priority for STP needs to be an integer between 0 and 61440.");
if ($_POST['holdcnt'] && !is_numeric($_POST['holdcnt']))
- $input_errors[] = "Transmit Hold Count for STP needs to be an integer between 1 and 10.";
+ $input_errors[] = gettext("Transmit Hold Count for STP needs to be an integer between 1 and 10.");
foreach ($ifacelist as $ifn => $ifdescr) {
if ($_POST[$ifn] <> "" && !is_numeric($_POST[$ifn]))
- $input_errors[] = "{$ifdescr} interface priority for STP needs to be an integer between 0 and 240.";
+ $input_errors[] = "{$ifdescr} " . gettext("interface priority for STP needs to be an integer between 0 and 240.");
}
$i = 0;
foreach ($ifacelist as $ifn => $ifdescr) {
if ($_POST["{$ifn}{$i}"] <> "" && !is_numeric($_POST["{$ifn}{$i}"]))
- $input_errors[] = "{$ifdescr} interface path cost for STP needs to be an integer between 1 and 200000000.";
+ $input_errors[] = "{$ifdescr} " . gettext("interface path cost for STP needs to be an integer between 1 and 200000000.");
$i++;
}
if (!is_array($_POST['members']) || count($_POST['members']) < 2)
- $input_errors[] = "You must select at least 2 member interfaces for a bridge.";
+ $input_errors[] = gettext("You must select at least 2 member interfaces for a bridge.");
if (is_array($_POST['members'])) {
foreach($_POST['members'] as $ifmembers) {
if (is_array($config['interfaces'][$ifmembers]['wireless']) &&
$config['interfaces'][$ifmembers]['wireless']['mode'] != "hostap")
- $input_errors[] = "Bridging a wireless interface is only possible in hostap mode.";
+ $input_errors[] = gettext("Bridging a wireless interface is only possible in hostap mode.");
if ($_POST['span'] != "none" && $_POST['span'] == $ifmembers)
- $input_errors[] = "Span interface cannot be part of the bridge. Remove the span interface from bridge members to continue.";
+ $input_errors[] = gettext("Span interface cannot be part of the bridge. Remove the span interface from bridge members to continue.");
}
}
@@ -199,7 +199,7 @@ if ($_POST) {
$bridge['bridgeif'] = $_POST['bridgeif'];
$bridge['bridgeif'] = interface_bridge_configure($bridge);
if ($bridge['bridgeif'] == "" || !stristr($bridge['bridgeif'], "bridge"))
- $input_errors[] = "Error occured creating interface, please retry.";
+ $input_errors[] = gettext("Error occured creating interface, please retry.");
else {
if (isset($id) && $a_bridges[$id])
$a_bridges[$id] = $bridge;
@@ -219,7 +219,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Firewall","Bridge","Edit");
+$pgtitle = array(gettext("Firewall"),gettext("Bridge"),gettext("Edit"));
include("head.inc");
?>
@@ -246,10 +246,10 @@ function show_source_port_range() {
<form action="interfaces_bridge_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">Bridge configuration</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Bridge configuration"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Member interfaces</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Member interfaces"); ?></td>
<td width="78%" class="vtable">
<select name="members[]" multiple="true" class="formselect" size="3">
<?php
@@ -262,11 +262,11 @@ function show_source_port_range() {
?>
</select>
<br/>
- <span class="vexpl">Interfaces participating in the bridge.</span>
+ <span class="vexpl"><?=gettext("Interfaces participating in the bridge."); ?></span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<input type="text" name="descr" id="descr" class="formfld unknown" size="50" value="<?=$pconfig['descr'];?>">
</td>
@@ -274,17 +274,17 @@ function show_source_port_range() {
<tr id="sprtable" name="sprtable">
<td></td>
<td>
- <p><input type="button" onClick="show_source_port_range()" value="Show advanced options"></p>
+ <p><input type="button" onClick="show_source_port_range()" value="<?=gettext("Show advanced options"); ?>"></p>
</td>
</tr>
<tr style="display:none" id="sprtable1" name="sprtable1">
<td valign="top" class="vncell" align="middle">RSTP/STP </td>
<td class="vtable">
<input type="checkbox" name="enablestp" id="enablestp" <?php if ($pconfig['enablestp']) echo "checked";?>>
- <span class="vexpl"><strong>Enable spanning tree options for this bridge. </strong></span>
+ <span class="vexpl"><strong><?=gettext("Enable spanning tree options for this bridge."); ?> </strong></span>
<br/><br/>
<table id="stpoptions" name="stpoptions" border="0" cellpadding="6" cellspacing="0">
- <tr><td valign="top" class="vncell" width="20%">Protocol</td>
+ <tr><td valign="top" class="vncell" width="20%"><?=gettext("Protocol"); ?></td>
<td class="vtable" width="80%">
<select name="proto" id="proto">
<?php
@@ -297,9 +297,9 @@ function show_source_port_range() {
?>
</select>
<br/>
- <span class="vexpl">Protocol used for spanning tree. </span></td>
+ <span class="vexpl"><?=gettext("Protocol used for spanning tree."); ?> </span></td>
</td></tr>
- <tr> <td valign="top" class="vncell" width="20%">STP interfaces</td>
+ <tr> <td valign="top" class="vncell" width="20%"><?=gettext("STP interfaces"); ?></td>
<td class="vtable" width="80%">
<select name="stp[]" class="formselect" multiple="true" size="3">
<?php
@@ -312,61 +312,61 @@ function show_source_port_range() {
?>
</select>
<br/>
- <span class="vexpl" >
- Enable Spanning Tree Protocol on interface. The if_bridge(4)
- driver has support for the IEEE 802.1D Spanning Tree Protocol
- (STP). STP is used to detect and remove loops in a
- network topology.
+ <span class="vexpl" >
+ <?=gettext("Enable Spanning Tree Protocol on interface. The if_bridge(4) " .
+ "driver has support for the IEEE 802.1D Spanning Tree Protocol " .
+ "(STP). STP is used to detect and remove loops in a " .
+ "network topology."); ?>
</span>
</td></tr>
- <tr><td valign="top" class="vncell" width="20%">Valid time</td>
+ <tr><td valign="top" class="vncell" width="20%"><?=gettext("Valid time"); ?></td>
<td class="vtable" width="80%">
- <input name="maxage" type="text" class="formfld unkown" id="maxage" size="8" value="<?=$pconfig['maxage'];?>"> seconds
+ <input name="maxage" type="text" class="formfld unkown" id="maxage" size="8" value="<?=$pconfig['maxage'];?>"> <?=gettext("seconds"); ?>
<br/>
<span class="vexpl">
- Set the time that a Spanning Tree Protocol configuration is
- valid. The default is 20 seconds. The minimum is 6 seconds and
- the maximum is 40 seconds.
+ <?=gettext("Set the time that a Spanning Tree Protocol configuration is " .
+ "valid. The default is 20 seconds. The minimum is 6 seconds and " .
+ "the maximum is 40 seconds."); ?>
</span>
</td></tr>
- <tr><td valign="top" class="vncell" width="20%">Forward time </td>
+ <tr><td valign="top" class="vncell" width="20%"><?=gettext("Forward time"); ?> </td>
<td class="vtable" width="80%">
- <input name="fwdelay" type="text" class="formfld unkown" id="fwdelay" size="8" value="<?=$pconfig['fwdelay'];?>"> seconds
+ <input name="fwdelay" type="text" class="formfld unkown" id="fwdelay" size="8" value="<?=$pconfig['fwdelay'];?>"> <?=gettext("seconds"); ?>
<br/>
<span class="vexpl">
- Set the time that must pass before an interface begins forwarding
- packets when Spanning Tree is enabled. The default is 15 seconds. The minimum is 4 seconds and the maximum is 30 seconds.
+ <?=gettext("Set the time that must pass before an interface begins forwarding " .
+ "packets when Spanning Tree is enabled. The default is 15 seconds. The minimum is 4 seconds and the maximum is 30 seconds."); ?>
</span>
</td></tr>
- <tr><td valign="top" class="vncell" width="20%">Hello time</td>
+ <tr><td valign="top" class="vncell" width="20%"><?=gettext("Hello time"); ?></td>
<td class="vtable" width="80%">
- <input name="hellotime" type="text" class="formfld unkown" size="8" id="hellotime" value="<?=$pconfig['hellotime'];?>"> seconds
+ <input name="hellotime" type="text" class="formfld unkown" size="8" id="hellotime" value="<?=$pconfig['hellotime'];?>"> <?=gettext("seconds"); ?>
<br/>
<span class="vexpl">
- Set the time between broadcasting of Spanning Tree Protocol configuration messages. The hello time may only be changed when
- operating in legacy STP mode. The default is 2 seconds. The minimum is 1 second and the maximum is 2 seconds.
+ <?=gettext("Set the time between broadcasting of Spanning Tree Protocol configuration messages. The hello time may only be changed when " .
+ "operating in legacy STP mode. The default is 2 seconds. The minimum is 1 second and the maximum is 2 seconds."); ?>
</span>
</td></tr>
- <tr><td valign="top" class="vncell" width="20%">Priority</td>
+ <tr><td valign="top" class="vncell" width="20%"><?=gettext("Priority"); ?></td>
<td class="vtable" width="80%">
<input name="priority" type="text" class="formfld unkown" id="priority" value="<?=$pconfig['priority'];?>">
<br/>
<span class="vexpl">
- Set the bridge priority for Spanning Tree. The default is 32768.
- The minimum is 0 and the maximum is 61440.
+ <?=gettext("Set the bridge priority for Spanning Tree. The default is 32768. " .
+ "The minimum is 0 and the maximum is 61440."); ?>
</span>
</td></tr>
- <tr><td valign="top" class="vncell" width="20%">Hold count</td>
+ <tr><td valign="top" class="vncell" width="20%"><?=gettext("Hold count"); ?></td>
<td class="vtable" width="80%">
<input name="holdcnt" type="text" class="formfld unkown" id="holdcnt" value="<?=$pconfig['holdcnt'];?>">
<br/>
<span class="vexpl">
- Set the transmit hold count for Spanning Tree. This is the num-
- ber of packets transmitted before being rate limited. The
- default is 6. The minimum is 1 and the maximum is 10.
+ <?=gettext("Set the transmit hold count for Spanning Tree. This is the num- " .
+ "ber of packets transmitted before being rate limited. The " .
+ "default is 6. The minimum is 1 and the maximum is 10."); ?>
</span>
</td></tr>
- <tr><td valign="top" class="vncell" width="20%">Priority</td>
+ <tr><td valign="top" class="vncell" width="20%"><?=gettext("Priority"); ?></td>
<td class="vtable" width="80%">
<table>
<?php foreach ($ifacelist as $ifn => $ifdescr)
@@ -375,11 +375,11 @@ function show_source_port_range() {
</table>
<br/>
<span class="vexpl" >
- Set the Spanning Tree priority of interface to value. The
- default is 128. The minimum is 0 and the maximum is 240.
+ <?=gettext("Set the Spanning Tree priority of interface to value. The " .
+ "default is 128. The minimum is 0 and the maximum is 240."); ?>
</span>
</td></tr>
- <tr><td valign="top" class="vncell" width="20%">Path cost</td>
+ <tr><td valign="top" class="vncell" width="20%"><?=gettext("Path cost"); ?></td>
<td class="vtable" width="80%">
<table>
<?php $i = 0; foreach ($ifacelist as $ifn => $ifdescr)
@@ -388,40 +388,40 @@ function show_source_port_range() {
</table>
<br/>
<span class="vexpl" >
- Set the Spanning Tree path cost of interface to value. The
- default is calculated from the link speed. To change a previously selected path cost back to automatic, set the cost to 0.
- The minimum is 1 and the maximum is 200000000.
+ <?=gettext("Set the Spanning Tree path cost of interface to value. The " .
+ "default is calculated from the link speed. To change a previously selected path cost back to automatic, set the cost to 0. ".
+ "The minimum is 1 and the maximum is 200000000."); ?>
</span>
</td></tr>
</table>
</tr>
<tr style="display:none" id="sprtable2" name="sprtable2">
- <td valign="top" class="vncell">Cache size</td>
+ <td valign="top" class="vncell"><?=gettext("Cache size"); ?></td>
<td class="vtable">
- <input name="maxaddr" size="10" type="text" class="formfld unkown" id="maxaddr" value="<?=$pconfig['maxaddr'];?>"> entries
+ <input name="maxaddr" size="10" type="text" class="formfld unkown" id="maxaddr" value="<?=$pconfig['maxaddr'];?>"> <?=gettext("entries"); ?>
<br/><span class="vexpl">
-Set the size of the bridge address cache to size. The default is
- 100 entries.
+<?=gettext("Set the size of the bridge address cache to size. The default is " .
+ ".100 entries."); ?>
</span>
</td>
</tr>
<tr style="display:none" id="sprtable3" name="sprtable3">
- <td valign="top" class="vncell">Cache entry expire time</td>
+ <td valign="top" class="vncell"><?=gettext("Cache entry expire time"); ?></td>
<td>
- <input name="timeout" type="text" class="formfld unkown" id="timeout" size="10" value="<?=$pconfig['timeout'];?>"> seconds
+ <input name="timeout" type="text" class="formfld unkown" id="timeout" size="10" value="<?=$pconfig['timeout'];?>"> <?=gettext("seconds"); ?>
<br/><span class="vexpl">
- Set the timeout of address cache entries to this number of seconds. If
- seconds is zero, then address cache entries will not be expired.
- The default is 240 seconds.
+ <?=gettext("Set the timeout of address cache entries to this number of seconds. If " .
+ "seconds is zero, then address cache entries will not be expired. " .
+ "The default is 240 seconds."); ?>
</span>
</td>
</tr>
<tr style="display:none" id="sprtable4" name="sprtable4">
- <td valign="top" class="vncell">Span port</td>
+ <td valign="top" class="vncell"><?=gettext("Span port"); ?></td>
<td class="vtable">
<select name="span" class="formselect" id="span">
- <option value="none" selected>None</option>
+ <option value="none" selected><?=gettext("None"); ?></option>
<?php
foreach ($ifacelist as $ifn => $ifdescr) {
echo "<option value=\"{$ifn}\"";
@@ -432,21 +432,21 @@ Set the size of the bridge address cache to size. The default is
?>
</select>
<br/><span class="vexpl">
- Add the interface named by interface as a span port on the
- bridge. Span ports transmit a copy of every frame received by
- the bridge. This is most useful for snooping a bridged network
- passively on another host connected to one of the span ports of
- the bridge.
+ <?=gettext("Add the interface named by interface as a span port on the " .
+ "bridge. Span ports transmit a copy of every frame received by " .
+ "the bridge. This is most useful for snooping a bridged network " .
+ "passively on another host connected to one of the span ports of " .
+ "the bridge."); ?>
</span>
<p class="vexpl"><span class="red"><strong>
- Note:<br>
+ <?=gettext("Note"); ?>:<br>
</strong></span>
- The span interface cannot be part of the bridge member interfaces.
+ <?=gettext("The span interface cannot be part of the bridge member interfaces."); ?>
</span>
</td>
</tr>
<tr style="display:none" id="sprtable5" name="sprtable5">
- <td valign="top" class="vncell">Edge ports</td>
+ <td valign="top" class="vncell"><?=gettext("Edge ports"); ?></td>
<td class="vtable">
<select name="edge[]" class="formselect" multiple="true" size="3">
<?php
@@ -460,13 +460,13 @@ Set the size of the bridge address cache to size. The default is
</select>
<br>
<span class="vexpl">
- Set interface as an edge port. An edge port connects directly to
- end stations and cannot create bridging loops in the network; this
- allows it to transition straight to forwarding.
+ <?=gettext("Set interface as an edge port. An edge port connects directly to " .
+ "end stations and cannot create bridging loops in the network; this " .
+ "allows it to transition straight to forwarding."); ?>
</span></td>
</tr>
<tr style="display:none" id="sprtable6" name="sprtable6">
- <td valign="top" class="vncell">Auto Edge ports</td>
+ <td valign="top" class="vncell"><?=gettext("Auto Edge ports"); ?></td>
<td class="vtable">
<select name="autoedge[]" class="formselect" multiple="true" size="3">
<?php
@@ -480,16 +480,16 @@ Set the size of the bridge address cache to size. The default is
</select>
<br>
<span class="vexpl">
- Allow interface to automatically detect edge status. This is the
- default for all interfaces added to a bridge.
+ <?=gettext("Allow interface to automatically detect edge status. This is the " .
+ "default for all interfaces added to a bridge."); ?>
<p class="vexpl"><span class="red"><strong>
- Note:<br>
+ <?=gettext("Note"); ?>:<br>
</strong></span>
- This will disable the autoedge status of interfaces.
+ <?=gettext("This will disable the autoedge status of interfaces."); ?>
</span></td>
</tr>
<tr style="display:none" id="sprtable7" name="sprtable7">
- <td valign="top" class="vncell">PTP ports</td>
+ <td valign="top" class="vncell"><?=gettext("PTP ports"); ?></td>
<td class="vtable">
<select name="ptp[]" class="formselect" multiple="true" size="3">
<?php
@@ -503,13 +503,13 @@ Set the size of the bridge address cache to size. The default is
</select>
<br>
<span class="vexpl">
- Set the interface as a point-to-point link. This is required for
- straight transitions to forwarding and should be enabled on a
- direct link to another RSTP-capable switch.
+ <?=gettext("Set the interface as a point-to-point link. This is required for " .
+ "straight transitions to forwarding and should be enabled on a " .
+ "direct link to another RSTP-capable switch."); ?>
</span></td>
</tr>
<tr style="display:none" id="sprtable8" name="sprtable8">
- <td valign="top" class="vncell">Auto PTP ports</td>
+ <td valign="top" class="vncell"><?=gettext("Auto PTP ports"); ?></td>
<td class="vtable">
<select name="autoptp[]" class="formselect" multiple="true" size="3">
<?php
@@ -523,17 +523,17 @@ Set the size of the bridge address cache to size. The default is
</select>
<br>
<span class="vexpl">
- Automatically detect the point-to-point status on interface by
- checking the full duplex link status. This is the default for
- interfaces added to the bridge.
+ <?=gettext("Automatically detect the point-to-point status on interface by " .
+ "checking the full duplex link status. This is the default for " .
+ "interfaces added to the bridge."); ?>
<p class="vexpl"><span class="red"><strong>
- Note:<br>
+ <?=gettext("Note"); ?>:<br>
</strong></span>
- The interfaces selected here will be removed from default autoedge status.
+ <?=gettext("The interfaces selected here will be removed from default autoedge status."); ?>
</span></td>
</tr>
<tr style="display:none" id="sprtable9" name="sprtable9">
- <td valign="top" class="vncell">Sticky ports</td>
+ <td valign="top" class="vncell"><?=gettext("Sticky ports"); ?></td>
<td class="vtable">
<select name="static[]" class="formselect" multiple="true" size="3">
<?php
@@ -547,14 +547,14 @@ Set the size of the bridge address cache to size. The default is
</select>
<br>
<span class="vexpl">
- Mark an interface as a "sticky" interface. Dynamically learned
- address entries are treated as static once entered into the
- cache. Sticky entries are never aged out of the cache or
- replaced, even if the address is seen on a different interface.
+ <?=gettext("Mark an interface as a \"sticky\" interface. Dynamically learned " .
+ "address entries are treated as static once entered into the " .
+ "cache. Sticky entries are never aged out of the cache or " .
+ "replaced, even if the address is seen on a different interface."); ?>
</span></td>
</tr>
<tr style="display:none" id="sprtable10" name="sprtable10">
- <td valign="top" class="vncell">Private ports</td>
+ <td valign="top" class="vncell"><?=gettext("Private ports"); ?></td>
<td class="vtable">
<select name="private[]" class="formselect" multiple="true" size="3">
<?php
@@ -568,15 +568,15 @@ Set the size of the bridge address cache to size. The default is
</select>
<br>
<span class="vexpl">
- Mark an interface as a "private" interface. A private interface does not forward any traffic to any other port that is also
- a private interface.
+ <?=gettext("Mark an interface as a \"private\" interface. A private interface does not forward any traffic to any other port that is also " .
+ "a private interface."); ?>
</span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input type="hidden" name="bridgeif" value="<?=$pconfig['bridgeif']; ?>">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input type="button" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"> <input type="button" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
<?php if (isset($id) && $a_bridges[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/interfaces_gif.php b/usr/local/www/interfaces_gif.php
index 92439fa..3c03ad5 100644
--- a/usr/local/www/interfaces_gif.php
+++ b/usr/local/www/interfaces_gif.php
@@ -61,7 +61,7 @@ function gif_inuse($num) {
if ($_GET['act'] == "del") {
/* check if still in use */
if (gif_inuse($_GET['id'])) {
- $input_errors[] = "This gif TUNNEL cannot be deleted because it is still being used as an interface.";
+ $input_errors[] = gettext("This gif TUNNEL cannot be deleted because it is still being used as an interface.");
} else {
mwexec("/sbin/ifconfig " . $a_gifs[$_GET['id']]['gifif'] . " destroy");
unset($a_gifs[$_GET['id']]);
@@ -73,7 +73,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("Interfaces","GIF");
+$pgtitle = array(gettext("Interfaces"),gettext("GIF"));
include("head.inc");
?>
@@ -85,16 +85,16 @@ include("head.inc");
<tr><td>
<?php
$tab_array = array();
- $tab_array[0] = array("Interface assignments", false, "interfaces_assign.php");
- $tab_array[1] = array("Interface Groups", false, "interfaces_groups.php");
- $tab_array[2] = array("Wireless", false, "interfaces_wireless.php");
- $tab_array[3] = array("VLANs", false, "interfaces_vlan.php");
- $tab_array[4] = array("QinQs", false, "interfaces_qinq.php");
- $tab_array[5] = array("PPPs", false, "interfaces_ppps.php");
- $tab_array[6] = array("GRE", false, "interfaces_gre.php");
- $tab_array[7] = array("GIF", true, "interfaces_gif.php");
- $tab_array[8] = array("Bridges", false, "interfaces_bridge.php");
- $tab_array[9] = array("LAGG", false, "interfaces_lagg.php");
+ $tab_array[0] = array(gettext("Interface assignments"), false, "interfaces_assign.php");
+ $tab_array[1] = array(gettext("Interface Groups"), false, "interfaces_groups.php");
+ $tab_array[2] = array(gettext("Wireless"), false, "interfaces_wireless.php");
+ $tab_array[3] = array(gettext("VLANs"), false, "interfaces_vlan.php");
+ $tab_array[4] = array(gettext("QinQs"), false, "interfaces_qinq.php");
+ $tab_array[5] = array(gettext("PPPs"), false, "interfaces_ppps.php");
+ $tab_array[6] = array(gettext("GRE"), false, "interfaces_gre.php");
+ $tab_array[7] = array(gettext("GIF"), true, "interfaces_gif.php");
+ $tab_array[8] = array(gettext("Bridges"), false, "interfaces_bridge.php");
+ $tab_array[9] = array(gettext("LAGG"), false, "interfaces_lagg.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -103,9 +103,9 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="20%" class="listhdrr">Interface</td>
- <td width="20%" class="listhdrr">Tunnel to...</td>
- <td width="50%" class="listhdr">Description</td>
+ <td width="20%" class="listhdrr"><?=gettext("Interface"); ?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Tunnel to"); ?>...</td>
+ <td width="50%" class="listhdr"><?=gettext("Description"); ?></td>
<td width="10%" class="list"></td>
</tr>
<?php $i = 0; foreach ($a_gifs as $gif): ?>
@@ -120,7 +120,7 @@ include("head.inc");
<?=htmlspecialchars($gif['descr']);?>&nbsp;
</td>
<td valign="middle" nowrap class="list"> <a href="interfaces_gif_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
- &nbsp;<a href="interfaces_gif.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this gif tunnel?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ &nbsp;<a href="interfaces_gif.php?act=del&id=<?=$i;?>" onclick="return confirm(gettext("'Do you really want to delete this gif tunnel?'"))"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
@@ -129,9 +129,9 @@ include("head.inc");
</tr>
<tr>
<td colspan="3" class="list"><p class="vexpl"><span class="red"><strong>
- Note:<br>
+ <?=gettext("Note"); ?>:<br>
</strong></span>
- GIF tunnels are configured here.
+ <?=gettext("GIF tunnels are configured here"); ?>.
</td>
<td class="list">&nbsp;</td>
</tr>
diff --git a/usr/local/www/interfaces_gif_edit.php b/usr/local/www/interfaces_gif_edit.php
index 908277f..fdde8d4 100644
--- a/usr/local/www/interfaces_gif_edit.php
+++ b/usr/local/www/interfaces_gif_edit.php
@@ -69,13 +69,13 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "if tunnel-remote-addr tunnel-remote-net tunnel-local-addr");
- $reqdfieldsn = explode(",", "Parent interface,Local address, Remote tunnel address, Remote tunnel network, Local tunnel address");
+ $reqdfieldsn = array(gettext("Parent interface,Local address, Remote tunnel address, Remote tunnel network, Local tunnel address"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if ((!is_ipaddr($_POST['tunnel-local-addr'])) || (!is_ipaddr($_POST['tunnel-remote-addr'])) ||
(!is_ipaddr($_POST['remote-addr']))) {
- $input_errors[] = "The tunnel local and tunnel remote fields must have valid IP addresses.";
+ $input_errors[] = gettext("The tunnel local and tunnel remote fields must have valid IP addresses.");
}
foreach ($a_gifs as $gif) {
@@ -83,7 +83,7 @@ if ($_POST) {
continue;
if (($gif['if'] == $_POST['if']) && ($gif['tunnel-remote-net'] == $_POST['tunnel-remote-net'])) {
- $input_errors[] = "A gif with the network {$gif['remote-network']} is already defined.";
+ $input_errors[] = sprintf(gettext("A gif with the network %s is already defined."), $gif['remote-network']);
break;
}
}
@@ -102,7 +102,7 @@ if ($_POST) {
$gif['gifif'] = interface_gif_configure($gif);
if ($gif['gifif'] == "" || !stristr($gif['gifif'], "gif"))
- $input_errors[] = "Error occured creating interface, please retry.";
+ $input_errors[] = gettext("Error occured creating interface, please retry.");
else {
if (isset($id) && $a_gifs[$id])
$a_gifs[$id] = $gif;
@@ -117,7 +117,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Firewall","GIF","Edit");
+$pgtitle = array(gettext("Firewall"),gettext("GIF"),gettext("Edit"));
include("head.inc");
?>
@@ -128,10 +128,10 @@ include("head.inc");
<form action="interfaces_gif_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">GIF configuration</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("GIF configuration"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Parent interface</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Parent interface"); ?></td>
<td width="78%" class="vtable">
<select name="if" class="formselect">
<?php
@@ -145,24 +145,24 @@ include("head.inc");
?>
</select>
<br/>
- <span class="vexpl">The interface here servers as the local address to be used for the gif tunnel.</span></td>
+ <span class="vexpl"><?=gettext("The interface here servers as the local address to be used for the gif tunnel."); ?></span></td>
</tr>
<tr>
- <td valign="top" class="vncellreq">gif remote address</td>
+ <td valign="top" class="vncellreq"><?=gettext("gif remote address"); ?></td>
<td class="vtable">
<input name="remote-addr" type="text" class="formfld unknown" id="remote-addr" size="16" value="<?=$pconfig['remote-addr'];?>">
<br>
- <span class="vexpl">Peer address where encapsulated gif packets will be sent. </span></td>
+ <span class="vexpl"><?=gettext("Peer address where encapsulated gif packets will be sent. "); ?></span></td>
</tr>
<tr>
- <td valign="top" class="vncellreq">gif tunnel local address</td>
+ <td valign="top" class="vncellreq"><?=gettext("gif tunnel local address"); ?></td>
<td class="vtable">
<input name="tunnel-local-addr" type="text" class="formfld unknown" id="tunnel-local-addr" size="16" value="<?=$pconfig['tunnel-local-addr'];?>">
<br>
- <span class="vexpl">Local gif tunnel endpoint</span></td>
+ <span class="vexpl"><?=gettext("Local gif tunnel endpoint"); ?></span></td>
</tr>
<tr>
- <td valign="top" class="vncellreq">gif tunnel remote address </td>
+ <td valign="top" class="vncellreq"><?=gettext("gif tunnel remote address "); ?></td>
<td class="vtable">
<input name="tunnel-remote-addr" type="text" class="formfld unknown" id="tunnel-remote-addr" size="16" value="<?=$pconfig['tunnel-remote-addr'];?>">
<select name="tunnel-remote-net" class="formselect" id="tunnel-remote-net">
@@ -177,37 +177,37 @@ include("head.inc");
?>
</select>
<br/>
- <span class="vexpl">Remote gif address endpoint. The subnet part is used for the determinig the network that is tunneled.</span></td>
+ <span class="vexpl"><?=gettext("Remote gif address endpoint. The subnet part is used for the determinig the network that is tunneled."); ?></span></td>
</tr>
<tr>
- <td valign="top" class="vncell">Route caching </td>
+ <td valign="top" class="vncell"><?=gettext("Route caching "); ?></td>
<td class="vtable">
<input name="link0" type="checkbox" id="link0" <?if ($pconfig['link0']) echo "checked";?>>
<br>
- <span class="vexpl">Specify if route caching can be enabled. Be careful with these settings on dynamic networks. </span></td>
+ <span class="vexpl"><?=gettext("Specify if route caching can be enabled. Be careful with these settings on dynamic networks. "); ?></span></td>
</tr>
<tr>
- <td valign="top" class="vncell">ECN friendly behaviour</td>
+ <td valign="top" class="vncell"><?=gettext("ECN friendly behaviour"); ?></td>
<td class="vtable">
<input name="link1" type="checkbox" id="link1" <?if ($pconfig['link1']) echo "checked";?>>
<br>
<span class="vexpl">
- Note that the ECN friendly behavior violates RFC2893. This should be
- used in mutual agreement with the peer.
+ <?=gettext("Note that the ECN friendly behavior violates RFC2893. This should be " .
+ "used in mutual agreement with the peer."); ?>
</span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here " .
+ "for your reference (not parsed)."); ?></span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input type="hidden" name="gifif" value="<?=$pconfig['gifif']; ?>">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input type="button" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"> <input type="button" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
<?php if (isset($id) && $a_gifs[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/interfaces_gre.php b/usr/local/www/interfaces_gre.php
index a1a959e..de2992b 100644
--- a/usr/local/www/interfaces_gre.php
+++ b/usr/local/www/interfaces_gre.php
@@ -40,6 +40,7 @@
##|-PRIV
require("guiconfig.inc");
+require_once("functions.inc");
if (!is_array($config['gres']['gre']))
$config['gres']['gre'] = array();
@@ -61,7 +62,7 @@ function gre_inuse($num) {
if ($_GET['act'] == "del") {
/* check if still in use */
if (gre_inuse($_GET['id'])) {
- $input_errors[] = "This GRE tunnel cannot be deleted because it is still being used as an interface.";
+ $input_errors[] = gettext("This GRE tunnel cannot be deleted because it is still being used as an interface.");
} else {
mwexec("/sbin/ifconfig " . $a_gres[$_GET['id']]['greif'] . " destroy");
unset($a_gres[$_GET['id']]);
@@ -73,7 +74,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("Interfaces","GRE");
+$pgtitle = array(gettext("Interfaces"),gettext("GRE"));
include("head.inc");
?>
@@ -85,16 +86,16 @@ include("head.inc");
<tr><td>
<?php
$tab_array = array();
- $tab_array[0] = array("Interface assignments", false, "interfaces_assign.php");
- $tab_array[1] = array("Interface Groups", false, "interfaces_groups.php");
- $tab_array[2] = array("Wireless", false, "interfaces_wireless.php");
- $tab_array[3] = array("VLANs", false, "interfaces_vlan.php");
- $tab_array[4] = array("QinQs", false, "interfaces_qinq.php");
- $tab_array[5] = array("PPPs", false, "interfaces_ppps.php");
- $tab_array[6] = array("GRE", true, "interfaces_gre.php");
- $tab_array[7] = array("GIF", false, "interfaces_gif.php");
- $tab_array[8] = array("Bridges", false, "interfaces_bridge.php");
- $tab_array[9] = array("LAGG", false, "interfaces_lagg.php");
+ $tab_array[0] = array(gettext("Interface assignments"), false, "interfaces_assign.php");
+ $tab_array[1] = array(gettext("Interface Groups"), false, "interfaces_groups.php");
+ $tab_array[2] = array(gettext("Wireless"), false, "interfaces_wireless.php");
+ $tab_array[3] = array(gettext("VLANs"), false, "interfaces_vlan.php");
+ $tab_array[4] = array(gettext("QinQs"), false, "interfaces_qinq.php");
+ $tab_array[5] = array(gettext("PPPs"), false, "interfaces_ppps.php");
+ $tab_array[6] = array(gettext("GRE"), true, "interfaces_gre.php");
+ $tab_array[7] = array(gettext("GIF"), false, "interfaces_gif.php");
+ $tab_array[8] = array(gettext("Bridges"), false, "interfaces_bridge.php");
+ $tab_array[9] = array(gettext("LAGG"), false, "interfaces_lagg.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -103,9 +104,9 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="20%" class="listhdrr">Interface</td>
- <td width="20%" class="listhdrr">Tunnel to...</td>
- <td width="50%" class="listhdr">Description</td>
+ <td width="20%" class="listhdrr"><?=gettext("Interface");?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Tunnel to...");?></td>
+ <td width="50%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list"></td>
</tr>
<?php $i = 0; foreach ($a_gres as $gre): ?>
@@ -120,7 +121,7 @@ include("head.inc");
<?=htmlspecialchars($gre['descr']);?>&nbsp;
</td>
<td valign="middle" nowrap class="list"> <a href="interfaces_gre_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
- &nbsp;<a href="interfaces_gre.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this GRE tunnel?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ &nbsp;<a href="interfaces_gre.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this GRE tunnel?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
@@ -129,7 +130,7 @@ include("head.inc");
</tr>
<tr>
<td class="tabcont" colspan="3">
- <p><span class="vexpl"><span class="red"><strong>Note:<br></strong></span>Here you can configure Generic Routing Encapsulation (GRE - RFC 2784) tunnels.</span></p>
+ <p><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br></strong></span><?=gettext("Here you can configure Generic Routing Encapsulation (GRE - RFC 2784) tunnels.");?></span></p>
</td>
</tr>
</table>
diff --git a/usr/local/www/interfaces_gre_edit.php b/usr/local/www/interfaces_gre_edit.php
index 1144bcd..a59affc 100644
--- a/usr/local/www/interfaces_gre_edit.php
+++ b/usr/local/www/interfaces_gre_edit.php
@@ -39,6 +39,7 @@
##|-PRIV
require("guiconfig.inc");
+require_once("functions.inc");
if (!is_array($config['gres']['gre']))
$config['gres']['gre'] = array();
@@ -76,7 +77,7 @@ if ($_POST) {
if ((!is_ipaddr($_POST['tunnel-local-addr'])) || (!is_ipaddr($_POST['tunnel-remote-addr'])) ||
(!is_ipaddr($_POST['remote-addr']))) {
- $input_errors[] = "The tunnel local and tunnel remote fields must have valid IP addresses.";
+ $input_errors[] = gettext("The tunnel local and tunnel remote fields must have valid IP addresses.");
}
foreach ($a_gres as $gre) {
diff --git a/usr/local/www/interfaces_groups.php b/usr/local/www/interfaces_groups.php
index 27a088a..54670b4 100755
--- a/usr/local/www/interfaces_groups.php
+++ b/usr/local/www/interfaces_groups.php
@@ -38,6 +38,7 @@
##|-PRIV
require("guiconfig.inc");
+require_once("functions.inc");
if (!is_array($config['ifgroups']['ifgroupentry']))
$config['ifgroups']['ifgroupentry'] = array();
@@ -59,7 +60,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("Interfaces","Groups");
+$pgtitle = array(gettext("Interfaces"),gettext("Groups"));
include("head.inc");
?>
@@ -71,16 +72,16 @@ include("head.inc");
<tr><td>
<?php
$tab_array = array();
- $tab_array[0] = array("Interface assignments", false, "interfaces_assign.php");
- $tab_array[1] = array("Interface Groups", true, "interfaces_groups.php");
- $tab_array[2] = array("Wireless", false, "interfaces_wireless.php");
- $tab_array[3] = array("VLANs", false, "interfaces_vlan.php");
- $tab_array[4] = array("QinQs", false, "interfaces_qinq.php");
- $tab_array[5] = array("PPPs", false, "interfaces_ppps.php");
- $tab_array[6] = array("GRE", false, "interfaces_gre.php");
- $tab_array[7] = array("GIF", false, "interfaces_gif.php");
- $tab_array[8] = array("Bridges", false, "interfaces_bridge.php");
- $tab_array[9] = array("LAGG", false, "interfaces_lagg.php");
+ $tab_array[0] = array(gettext("Interface assignments"), false, "interfaces_assign.php");
+ $tab_array[1] = array(gettext("Interface Groups"), true, "interfaces_groups.php");
+ $tab_array[2] = array(gettext("Wireless"), false, "interfaces_wireless.php");
+ $tab_array[3] = array(gettext("VLANs"), false, "interfaces_vlan.php");
+ $tab_array[4] = array(gettext("QinQs"), false, "interfaces_qinq.php");
+ $tab_array[5] = array(gettext("PPPs"), false, "interfaces_ppps.php");
+ $tab_array[6] = array(gettext("GRE"), false, "interfaces_gre.php");
+ $tab_array[7] = array(gettext("GIF"), false, "interfaces_gif.php");
+ $tab_array[8] = array(gettext("Bridges"), false, "interfaces_bridge.php");
+ $tab_array[9] = array(gettext("LAGG"), false, "interfaces_lagg.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -90,9 +91,9 @@ include("head.inc");
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="15%" class="listhdrr">Name</td>
- <td width="35%" class="listhdrr">Members</td>
- <td width="25%" class="listhdr">Description</td>
+ <td width="15%" class="listhdrr"><?=gettext("Name");?></td>
+ <td width="35%" class="listhdrr"><?=gettext("Members");?></td>
+ <td width="25%" class="listhdr"><?=gettext("Description");?></td>
<td width="5%" class="list"></td>
</tr>
<?php if (count ($a_ifgroups)):
@@ -123,8 +124,8 @@ include("head.inc");
<td valign="middle" nowrap class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td valign="middle"><a href="interfaces_groups_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="edit group"></a></td>
- <td><a href="interfaces_groups.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this group? 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 ifgroupentry"></a></td>
+ <td valign="middle"><a href="interfaces_groups_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit group");?>"></a></td>
+ <td><a href="interfaces_groups.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this group? 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 ifgroupentry");?>"></a></td>
</tr>
</table>
</td>
@@ -136,7 +137,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle" width="17">&nbsp;</td>
- <td valign="middle"><a href="interfaces_groups_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="add a new group"></a></td>
+ <td valign="middle"><a href="interfaces_groups_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new group");?>"></a></td>
</td>
</tr>
</table>
@@ -144,7 +145,7 @@ include("head.inc");
</tr>
<tr>
<td class="tabcont" colspan="3">
- <p><span class="vexpl"><span class="red"><strong>Note:<br></strong></span>Interface Groups allow you to create rules that apply to multiple interfaces without duplicating the rules. If you remove members from an interface group, the group rules no longer apply to that interface.</span></p>
+ <p><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br></strong></span><?=gettext("Interface Groups allow you to create rules that apply to multiple interfaces without duplicating the rules. If you remove members from an interface group, the group rules no longer apply to that interface.");?></span></p>
</td>
</tr>
</table>
diff --git a/usr/local/www/interfaces_groups_edit.php b/usr/local/www/interfaces_groups_edit.php
index 430bd7b..e1a9666 100755
--- a/usr/local/www/interfaces_groups_edit.php
+++ b/usr/local/www/interfaces_groups_edit.php
@@ -37,9 +37,11 @@
##|*MATCH=interfaces_groups_edit.php*
##|-PRIV
-$pgtitle = array("Interfaces","Groups", "Edit");
require("guiconfig.inc");
+require_once("functions.inc");
+
+$pgtitle = array(gettext("Interfaces"),gettext("Groups"),gettext("Edit"));
if (!is_array($config['ifgroups']['ifgroupentry']))
$config['ifgroups']['ifgroupentry'] = array();
@@ -66,10 +68,10 @@ if ($_POST) {
if (!isset($id)) {
foreach ($a_ifgroups as $groupentry)
if ($groupentry['ifname'] == $_POST['ifname'])
- $input_errors[] = "Group name already exists!";
+ $input_errors[] = gettext("Group name already exists!");
}
if (preg_match("/([^a-zA-Z])+/", $_POST['ifname'], $match))
- $input_errors[] = "Only letters A-Z are allowed as the group name.";
+ $input_errors[] = gettext("Only letters A-Z are allowed as the group name.");
$ifaces = get_configured_interface_with_descr();
foreach ($ifaces as $gif => $gdescr) {
@@ -205,33 +207,33 @@ function removeRow(el) {
<form action="interfaces_groups_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">Interface Groups Edit</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Interface Groups Edit");?></td>
</tr>
<tr>
- <td valign="top" class="vncellreq">Group Name</td>
+ <td valign="top" class="vncellreq"><?=gettext("Group Name");?></td>
<td class="vtable">
<input class="formfld unknown" name="ifname" id="ifname" value="<?=$pconfig['ifname'];?>" />
<br />
- No numbers or spaces are allowed. Only characters in a-zA-Z
+ <?=gettext("No numbers or spaces are allowed. Only characters in a-zA-Z");?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=$pconfig['descr'];?>" />
<br />
<span class="vexpl">
- You may enter a description here for your reference (not parsed).
+ <?=gettext("You may enter a description here for your reference (not parsed).");?>
</span>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq"><div id="membersnetworkport">Member (s)</div></td>
+ <td width="22%" valign="top" class="vncellreq"><div id="membersnetworkport"><?=gettext("Member (s)");?></div></td>
<td width="78%" class="vtable">
<table id="maintable">
<tbody>
<tr>
- <td><div id="onecolumn">Interface</div></td>
+ <td><div id="onecolumn"><?=gettext("Interface");?></div></td>
</tr>
<?php
@@ -257,7 +259,7 @@ function removeRow(el) {
</select>
</td>
<td>
- <input type="image" src="/themes/<?echo $g['theme'];?>/images/icons/icon_x.gif" onclick="removeRow(this); return false;" value="Delete" />
+ <input type="image" src="/themes/<?echo $g['theme'];?>/images/icons/icon_x.gif" onclick="removeRow(this); return false;" value="<?=gettext("Delete");?>" />
</td>
</tr>
<?php
@@ -272,15 +274,15 @@ function removeRow(el) {
</tfoot>
</table>
<a onclick="javascript:addRowTo('maintable'); return false;" href="#">
- <img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" title="add another entry" />
+ <img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" title="<?=gettext("add another entry");?>" />
</a>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input id="submit" name="submit" type="submit" class="formbtn" value="Save" />
- <a href="interfaces_groups.php"><input id="cancelbutton" name="cancelbutton" type="button" class="formbtn" value="Cancel" /></a>
+ <input id="submit" name="submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
+ <a href="interfaces_groups.php"><input id="cancelbutton" name="cancelbutton" type="button" class="formbtn" value="<?=gettext("Cancel");?>" /></a>
<?php if (isset($id) && $a_ifgroups[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>" />
<?php endif; ?>
diff --git a/usr/local/www/interfaces_lagg.php b/usr/local/www/interfaces_lagg.php
index f09c59e..9cabb00 100644
--- a/usr/local/www/interfaces_lagg.php
+++ b/usr/local/www/interfaces_lagg.php
@@ -67,7 +67,7 @@ function lagg_inuse($num) {
if ($_GET['act'] == "del") {
/* check if still in use */
if (lagg_inuse($_GET['id'])) {
- $input_errors[] = "This LAGG interface cannot be deleted because it is still being used.";
+ $input_errors[] = gettext("This LAGG interface cannot be deleted because it is still being used.");
} else {
mwexec_bg("/sbin/ifconfig " . $a_laggs[$_GET['id']]['laggif'] . " destroy");
unset($a_laggs[$_GET['id']]);
@@ -79,7 +79,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("Interfaces","LAGG");
+$pgtitle = array(gettext("Interfaces"),gettext("LAGG"));
include("head.inc");
?>
@@ -91,16 +91,16 @@ include("head.inc");
<tr><td>
<?php
$tab_array = array();
- $tab_array[0] = array("Interface assignments", false, "interfaces_assign.php");
- $tab_array[1] = array("Interface Groups", false, "interfaces_groups.php");
- $tab_array[2] = array("Wireless", false, "interfaces_wireless.php");
- $tab_array[3] = array("VLANs", false, "interfaces_vlan.php");
- $tab_array[4] = array("QinQs", false, "interfaces_qinq.php");
- $tab_array[5] = array("PPPs", false, "interfaces_ppps.php");
- $tab_array[6] = array("GRE", false, "interfaces_gre.php");
- $tab_array[7] = array("GIF", false, "interfaces_gif.php");
- $tab_array[8] = array("Bridges", false, "interfaces_bridge.php");
- $tab_array[9] = array("LAGG", true, "interfaces_lagg.php");
+ $tab_array[0] = array(gettext("Interface assignments"), false, "interfaces_assign.php");
+ $tab_array[1] = array(gettext("Interface Groups"), false, "interfaces_groups.php");
+ $tab_array[2] = array(gettext("Wireless"), false, "interfaces_wireless.php");
+ $tab_array[3] = array(gettext("VLANs"), false, "interfaces_vlan.php");
+ $tab_array[4] = array(gettext("QinQs"), false, "interfaces_qinq.php");
+ $tab_array[5] = array(gettext("PPPs"), false, "interfaces_ppps.php");
+ $tab_array[6] = array(gettext("GRE"), false, "interfaces_gre.php");
+ $tab_array[7] = array(gettext("GIF"), false, "interfaces_gif.php");
+ $tab_array[8] = array(gettext("Bridges"), false, "interfaces_bridge.php");
+ $tab_array[9] = array(gettext("LAGG"), true, "interfaces_lagg.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -109,9 +109,9 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="20%" class="listhdrr">Interface</td>
- <td width="20%" class="listhdrr">Members</td>
- <td width="50%" class="listhdr">Description</td>
+ <td width="20%" class="listhdrr"><?=gettext("Interface"); ?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Members"); ?></td>
+ <td width="50%" class="listhdr"><?=gettext("Description"); ?></td>
<td width="10%" class="list"></td>
</tr>
<?php $i = 0; foreach ($a_laggs as $lagg): ?>
@@ -135,9 +135,9 @@ include("head.inc");
</tr>
<tr>
<td colspan="3" class="list"><p class="vexpl"><span class="red"><strong>
- Note:<br>
+ <?=gettext("Note"); ?>:<br>
</strong></span>
- LAGG allows for link aggregation, bonding and fault tolerance. Only unassigned interfaces can be added to LAGG.
+ <?=gettext("LAGG allows for link aggregation, bonding and fault tolerance. Only unassigned interfaces can be added to LAGG"); ?>.
</td>
<td class="list">&nbsp;</td>
</tr>
diff --git a/usr/local/www/interfaces_lagg_edit.php b/usr/local/www/interfaces_lagg_edit.php
index 8b67ab6..124c6ea 100644
--- a/usr/local/www/interfaces_lagg_edit.php
+++ b/usr/local/www/interfaces_lagg_edit.php
@@ -76,7 +76,7 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "members proto");
- $reqdfieldsn = explode(",", "Member interfaces, Lagg protocol");
+ $reqdfieldsn = array(",", gettext("Member interfaces"), gettext("Lagg protocol"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -89,7 +89,7 @@ if ($_POST) {
$lagg['laggif'] = interface_lagg_configure($lagg);
if ($lagg['laggif'] == "" || !stristr($lagg['laggif'], "lagg"))
- $input_errors[] = "Error occured creating interface, please retry.";
+ $input_errors[] = gettext("Error occured creating interface, please retry.");
else {
if (isset($id) && $a_laggs[$id])
$a_laggs[$id] = $lagg;
@@ -108,7 +108,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Firewall","LAGG","Edit");
+$pgtitle = array(gettext("Firewall"),gettext("LAGG"),gettext("Edit"));
include("head.inc");
?>
@@ -119,10 +119,10 @@ include("head.inc");
<form action="interfaces_lagg_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">LAGG configuration</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("LAGG configuration"); ?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Parent interface</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Parent interface"); ?></td>
<td width="78%" class="vtable">
<select name="members[]" multiple="true" size="4" class="formselect">
<?php
@@ -137,10 +137,10 @@ include("head.inc");
?>
</select>
<br/>
- <span class="vexpl">Choose the members that will be used for the link aggregation.</span></td>
+ <span class="vexpl"><?=gettext("Choose the members that will be used for the link aggregation"); ?>.</span></td>
</tr>
<tr>
- <td valign="top" class="vncellreq">Lag proto</td>
+ <td valign="top" class="vncellreq"><?=gettext("Lag proto"); ?></td>
<td class="vtable">
<select name="proto" class="formselect" id="proto">
<?php
@@ -156,57 +156,57 @@ include("head.inc");
<span class="vexpl">
<ul>
<li>
- <b>failover</b><br/>
- Sends and receives traffic only through the master port. If
- the master port becomes unavailable, the next active port is
- used. The first interface added is the master port; any
- interfaces added after that are used as failover devices.
+ <b><?=gettext("failover"); ?></b><br/>
+ <?=gettext("Sends and receives traffic only through the master port. If " .
+ "the master port becomes unavailable, the next active port is " .
+ "used. The first interface added is the master port; any " .
+ "interfaces added after that are used as failover devices."); ?>
</li><li>
- <b>fec</b><br/> Supports Cisco EtherChannel. This is a static setup and
- does not negotiate aggregation with the peer or exchange
- frames to monitor the link.
+ <b><?=gettext("fec"); ?></b><br/> <?=gettext("Supports Cisco EtherChannel. This is a static setup and " .
+ "does not negotiate aggregation with the peer or exchange " .
+ "frames to monitor the link."); ?>
</li><li>
- <b>lacp</b><br/> Supports the IEEE 802.3ad Link Aggregation Control Protocol
- (LACP) and the Marker Protocol. LACP will negotiate a set
- of aggregable links with the peer in to one or more Link
- Aggregated Groups. Each LAG is composed of ports of the
- same speed, set to full-duplex operation. The traffic will
- be balanced across the ports in the LAG with the greatest
- total speed, in most cases there will only be one LAG which
- contains all ports. In the event of changes in physical
- connectivity, Link Aggregation will quickly converge to a
- new configuration.
+ <b><?=gettext("lacp"); ?></b><br/> <?=gettext("Supports the IEEE 802.3ad Link Aggregation Control Protocol " .
+ "(LACP) and the Marker Protocol. LACP will negotiate a set " .
+ "of aggregable links with the peer in to one or more Link " .
+ "Aggregated Groups. Each LAG is composed of ports of the " .
+ "same speed, set to full-duplex operation. The traffic will " .
+ "be balanced across the ports in the LAG with the greatest " .
+ "total speed, in most cases there will only be one LAG which " .
+ "contains all ports. In the event of changes in physical " .
+ "connectivity, Link Aggregation will quickly converge to a " .
+ "new configuration."); ?>
</li><li>
- <b>loadbalance</b><br/> Balances outgoing traffic across the active ports based on
- hashed protocol header information and accepts incoming
- traffic from any active port. This is a static setup and
- does not negotiate aggregation with the peer or exchange
- frames to monitor the link. The hash includes the Ethernet
- source and destination address, and, if available, the VLAN
- tag, and the IP source and destination address.
+ <b><?=gettext("loadbalance"); ?></b><br/> <?=gettext("Balances outgoing traffic across the active ports based on " .
+ "hashed protocol header information and accepts incoming " .
+ "traffic from any active port. This is a static setup and " .
+ "does not negotiate aggregation with the peer or exchange " .
+ "frames to monitor the link. The hash includes the Ethernet " .
+ "source and destination address, and, if available, the VLAN " .
+ "tag, and the IP source and destination address") ?>.
</li><li>
- <b>roundrobin</b><br/> Distributes outgoing traffic using a round-robin scheduler
- through all active ports and accepts incoming traffic from
- any active port.
+ <b><?=gettext("roundrobin"); ?></b><br/> <?=gettext("Distributes outgoing traffic using a round-robin scheduler " .
+ "through all active ports and accepts incoming traffic from " .
+ "any active port"); ?>.
</li><li>
- <b>none</b><br/> This protocol is intended to do nothing: it disables any
- traffic without disabling the lagg interface itself.
+ <b><?=gettext("none"); ?></b><br/> <?=gettext("This protocol is intended to do nothing: it disables any " .
+ "traffic without disabling the lagg interface itself"); ?>.
</li>
</ul>
</span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here " .
+ "for your reference (not parsed)"); ?>.</span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input type="hidden" name="laggif" value="<?=$pconfig['laggif']; ?>">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input type="button" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"> <input type="button" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
<?php if (isset($id) && $a_laggs[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/interfaces_ppps.php b/usr/local/www/interfaces_ppps.php
index e6d4880..01dcdb5 100644
--- a/usr/local/www/interfaces_ppps.php
+++ b/usr/local/www/interfaces_ppps.php
@@ -41,6 +41,7 @@
##|-PRIV
require("guiconfig.inc");
+require_once("functions.inc");
if (!is_array($config['ppps']['ppp']))
$config['ppps']['ppp'] = array();
@@ -60,7 +61,7 @@ function ppp_inuse($num) {
if ($_GET['act'] == "del") {
/* check if still in use */
if (ppp_inuse($_GET['id'])) {
- $input_errors[] = "This point-to-point link cannot be deleted because it is still being used as an interface.";
+ $input_errors[] = gettext("This point-to-point link cannot be deleted because it is still being used as an interface.");
} else {
unset($a_ppps[$_GET['id']]['pppoe-reset-type']);
handle_pppoe_reset($a_ppps[$_GET['id']]);
@@ -71,7 +72,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = "Interfaces: PPPs";
+$pgtitle = gettext("Interfaces: PPPs");
include("head.inc");
?>
@@ -83,16 +84,16 @@ include("head.inc");
<tr><td>
<?php
$tab_array = array();
- $tab_array[0] = array("Interface assignments", false, "interfaces_assign.php");
- $tab_array[1] = array("Interface Groups", false, "interfaces_groups.php");
- $tab_array[2] = array("Wireless", false, "interfaces_wireless.php");
- $tab_array[3] = array("VLANs", false, "interfaces_vlan.php");
- $tab_array[4] = array("QinQs", false, "interfaces_qinq.php");
- $tab_array[5] = array("PPPs", true, "interfaces_ppps.php");
- $tab_array[6] = array("GRE", false, "interfaces_gre.php");
- $tab_array[7] = array("GIF", false, "interfaces_gif.php");
- $tab_array[8] = array("Bridges", false, "interfaces_bridge.php");
- $tab_array[9] = array("LAGG", false, "interfaces_lagg.php");
+ $tab_array[0] = array(gettext("Interface assignments"), false, "interfaces_assign.php");
+ $tab_array[1] = array(gettext("Interface Groups"), false, "interfaces_groups.php");
+ $tab_array[2] = array(gettext("Wireless"), false, "interfaces_wireless.php");
+ $tab_array[3] = array(gettext("VLANs"), false, "interfaces_vlan.php");
+ $tab_array[4] = array(gettext("QinQs"), false, "interfaces_qinq.php");
+ $tab_array[5] = array(gettext("PPPs"), true, "interfaces_ppps.php");
+ $tab_array[6] = array(gettext("GRE"), false, "interfaces_gre.php");
+ $tab_array[7] = array(gettext("GIF"), false, "interfaces_gif.php");
+ $tab_array[8] = array(gettext("Bridges"), false, "interfaces_bridge.php");
+ $tab_array[9] = array(gettext("LAGG"), false, "interfaces_lagg.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -101,9 +102,9 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="20%" class="listhdrr">Interface</td>
- <td width="20%" class="listhdrr">Interface(s)/Port(s)</td>
- <td width="40%" class="listhdr">Description</td>
+ <td width="20%" class="listhdrr"><?=gettext("Interface");?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Interface(s)/Port(s)");?></td>
+ <td width="40%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list"></td>
</tr>
<?php $i = 0; foreach ($a_ppps as $id => $ppp): ?>
@@ -125,7 +126,7 @@ include("head.inc");
<?=htmlspecialchars($ppp['descr']);?>&nbsp;
</td>
<td valign="middle" nowrap class="list"> <a href="interfaces_ppps_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
- &nbsp;<a href="interfaces_ppps.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this PPP interface?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ &nbsp;<a href="interfaces_ppps.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this PPP interface?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
diff --git a/usr/local/www/interfaces_ppps_edit.php b/usr/local/www/interfaces_ppps_edit.php
index f218f3c..391f3f2 100644
--- a/usr/local/www/interfaces_ppps_edit.php
+++ b/usr/local/www/interfaces_ppps_edit.php
@@ -175,17 +175,17 @@ if ($_POST) {
/* input validation */
switch($_POST['type']) {
case "ppp":
- $reqdfields = explode(" ", "interfaces phone");
- $reqdfieldsn = explode(",", "Link Interface(s),Phone Number");
+ $reqdfields = explode("interfaces phone");
+ $reqdfieldsn = array(gettext("Link Interface(s)"),gettext("Phone Number"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
break;
case "pppoe":
if ($_POST['ondemand']) {
$reqdfields = explode(" ", "interfaces username password ondemand idletimeout");
- $reqdfieldsn = explode(",", "Link Interface(s),Username,Password,Dial on demand,Idle timeout value");
+ $reqdfieldsn = array(gettext("Link Interface(s)"),gettext("Username"),gettext("Password"),gettext("Dial on demand"),gettext("Idle timeout value"));
} else {
$reqdfields = explode(" ", "interfaces username password");
- $reqdfieldsn = explode(",", "Link Interface(s),Username,Password");
+ $reqdfieldsn = array(gettext("Link Interface(s)"),gettext("Username"),gettext("Password"));
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
break;
@@ -193,23 +193,23 @@ if ($_POST) {
case "pptp":
if ($_POST['ondemand']) {
$reqdfields = explode(" ", "interfaces username password localip subnet gateway ondemand idletimeout");
- $reqdfieldsn = explode(",", "Link Interface(s),Username,Password,Local IP address,Subnet,Remote IP address,Dial on demand,Idle timeout value");
+ $reqdfieldsn = array(gettext("Link Interface(s)"),gettext("Username"),gettext("Password"),gettext("Local IP address"),gettext("Subnet"),gettext("Remote IP address"),gettext("Dial on demand"),gettext("Idle timeout value"));
} else {
$reqdfields = explode(" ", "interfaces username password localip subnet gateway");
- $reqdfieldsn = explode(",", "Link Interface(s),Username,Password,Local IP address,Subnet,Remote IP address");
+ $reqdfieldsn = array(gettext("Link Interface(s)"),gettext("Username"),gettext("Password"),gettext("Local IP address"),gettext("Subnet"),gettext("Remote IP address"));
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
break;
default:
- $input_errors[] = "Please choose a Link Type.";
+ $input_errors[] = gettext("Please choose a Link Type.");
break;
}
if ($_POST['type'] == "ppp" && count($_POST['interfaces']) > 1)
- $input_errors[] = "Multilink connections (MLPPP) using the PPP link type is not currently supported. Please select only one Link Interface.";
+ $input_errors[] = gettext("Multilink connections (MLPPP) using the PPP link type is not currently supported. Please select only one Link Interface.");
if (($_POST['provider'] && !is_domain($_POST['provider'])))
- $input_errors[] = "The service name contains invalid characters.";
+ $input_errors[] = gettext("The service name contains invalid characters.");
if (($_POST['idletimeout'] != "") && !is_numericint($_POST['idletimeout']))
- $input_errors[] = "The idle timeout value must be an integer.";
+ $input_errors[] = gettext("The idle timeout value must be an integer.");
if ($_POST['pppoe-reset-type'] == "custom" && $_POST['pppoe_resethour'] <> "" && !is_numericint($_POST['pppoe_resethour']) &&
$_POST['pppoe_resethour'] >= 0 && $_POST['pppoe_resethour'] <=23)
$input_errors[] = gettext("A valid PPPoE reset hour must be specified (0-23).");
@@ -230,15 +230,15 @@ if ($_POST) {
foreach($_POST['interfaces'] as $iface){
if ($_POST['localip'][$iface] && !is_ipaddr($_POST['localip'][$iface]))
- $input_errors[] = "A valid local IP address must be specified for {$iface}.";
+ $input_errors[] = sprintf(gettext("A valid local IP address must be specified for %s."),$iface);
if ($_POST['gateway'][$iface] && !is_ipaddr($_POST['gateway'][$iface]) && !is_hostname($_POST['gateway'][$iface]))
- $input_errors[] = "A valid gateway IP address OR hostname must be specified for {$iface}.";
+ $input_errors[] = sprintf(gettext("A valid gateway IP address OR hostname must be specified for %s."),$iface);
if ($_POST['bandwidth'][$iface] && !is_numericint($_POST['bandwidth'][$iface]))
- $input_errors[] = "The bandwidth value for {$iface} must be an integer.";
+ $input_errors[] = sprintf(gettext("The bandwidth value for %s must be an integer."),$iface);
if ($_POST['mtu'][$iface] && ($_POST['mtu'][$iface] < 576))
- $input_errors[] = "The MTU for {$iface} must be greater than 576 bytes.";
+ $input_errors[] = sprintf(gettext("The MTU for %s must be greater than 576 bytes."),$iface);
if ($_POST['mru'][$iface] && ($_POST['mru'][$iface] < 576))
- $input_errors[] = "The MRU for {$iface} must be greater than 576 bytes.";
+ $input_errors[] = sprintf(gettext("The MRU for %s must be greater than 576 bytes."),$iface);
}
/*
@@ -370,10 +370,10 @@ if ($_POST) {
} // end if($_POST)
$closehead = false;
-$pgtitle = array("Interfaces","PPPs","Edit");
+$pgtitle = array(gettext("Interfaces"),gettext("PPPs"),gettext("Edit"));
include("head.inc");
-$types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" => "PPTP", "l2tp" => "L2TP"/*, "tcp" => "TCP", "udp" => "UDP"*/ );
+$types = array("select" => gettext("Select"), "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" => "PPTP", "l2tp" => "L2TP"/*, "tcp" => "TCP", "udp" => "UDP"*/ );
?>
<script type="text/javascript" src="/javascript/numericupdown/js/numericupdown.js"></script>
@@ -558,8 +558,8 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp"
<td width="22%" valign="top" class="vncell"><?= gettext("Init String"); ?></td>
<td width="78%" class="vtable">
<input type="text" size="40" class="formfld unknown" id="initstr" name="initstr" value="<?=htmlspecialchars($pconfig['initstr']);?>">
- <br/><span class="vexpl"><?= gettext("Note: Enter the modem initialization string here. Do NOT include the \"AT\"
- string at the beginning of the command. Many modern USB 3G modems don't need an initialization string."); ?></span>
+ <br/><span class="vexpl"><?= gettext("Note: Enter the modem initialization string here. Do NOT include the \"AT\"" .
+ "string at the beginning of the command. Many modern USB 3G modems don't need an initialization string."); ?></span>
</td>
</tr>
<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
@@ -613,7 +613,7 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp"
<input name="pppoe_resetdate" type="text" class="w8em format-m-d-y highlight-days-67" id="pppoe_resetdate" maxlength="10" size="10" value="<?=htmlspecialchars($pconfig['pppoe_resetdate']);?>" />
<?= gettext("reset at a specific date (mm/dd/yyyy)"); ?>
<br />&nbsp;<br />
- <span class="red"><strong>Note: </strong></span>
+ <span class="red"><strong><?=gettext("Note ");?>:</strong></span>
<?= gettext("If you leave the date field empty, the reset will be executed each day at the time you did specify using the minutes and hour field."); ?>
</p>
<?php if ($pconfig['pppoe_pr_preset']): ?>
@@ -674,55 +674,55 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp"
<td valign="top" class="vncell"><?= gettext("Dial On Demand"); ?></td>
<td class="vtable">
<input type="checkbox" value="on" id="ondemand" name="ondemand" <?php if (isset($pconfig['ondemand'])) echo "checked"; ?>> <?= gettext("Enable Dial-on-Demand mode"); ?>
- <br/> <span class="vexpl"><?= gettext("This option causes the interface to operate in dial-on-demand mode, allowing you to have a virtual full time connection.
- The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected."); ?> </span>
+ <br/> <span class="vexpl"><?= gettext("This option causes the interface to operate in dial-on-demand mode, allowing you to have a virtual full time connection. " .
+ "The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected."); ?> </span>
</td>
</tr>
<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
<td valign="top" class="vncell"><?= gettext("Idle Timeout"); ?></td>
<td class="vtable">
<input name="idletimeout" type="text" class="formfld unknown" id="idletimeout" size="12" value="<?=htmlspecialchars($pconfig['idletimeout']);?>"> <?= gettext("(seconds) Default is 0, which disables the timeout feature."); ?>
- <br/> <span class="vexpl"><?= gettext("If no incoming or outgoing packets are transmitted for the entered number of seconds the connection is brought down.
- <br/>When the idle timeout occurs, if the dial-on-demand option is enabled, mpd goes back into dial-on-demand mode. Otherwise, the interface is brought down and all associated routes removed."); ?></span>
+ <br/> <span class="vexpl"><?= gettext("If no incoming or outgoing packets are transmitted for the entered number of seconds the connection is brought down.");?>
+ <br/><?=gettext("When the idle timeout occurs, if the dial-on-demand option is enabled, mpd goes back into dial-on-demand mode. Otherwise, the interface is brought down and all associated routes removed."); ?></span>
</td>
</tr>
<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
<td width="22%" valign="top" class="vncell"><?= gettext("Compression"); ?></td>
<td width="78%" class="vtable">
<input type="checkbox" value="on" id="vjcomp" name="vjcomp" <?php if (isset($pconfig['vjcomp'])) echo "checked"; ?>>&nbsp;<?= gettext("Disable vjcomp(compression) (auto-negotiated by default)."); ?>
- <br/> <span class="vexpl">This option enables Van Jacobson TCP header compression, which saves several bytes per TCP data packet.
- You almost always want this option. This compression ineffective for TCP connections with enabled modern extensions like time
- stamping or SACK, which modify TCP options between sequential packets.</span>
+ <br/> <span class="vexpl"><?=gettext("This option enables Van Jacobson TCP header compression, which saves several bytes per TCP data packet. " .
+ "You almost always want this option. This compression ineffective for TCP connections with enabled modern extensions like time " .
+ "stamping or SACK, which modify TCP options between sequential packets.");?></span>
</td>
</tr>
<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
<td width="22%" valign="top" class="vncell"><?= gettext("TCPmssFix"); ?></td>
<td width="78%" class="vtable">
<input type="checkbox" value="on" id="tcpmssfix" name="tcpmssfix" <?php if (isset($pconfig['tcpmssfix'])) echo "checked"; ?>>&nbsp;<?= gettext("Disable tcpmssfix (enabled by default)."); ?>
- <br/> <span class="vexpl">This option causes mpd to adjust incoming and outgoing TCP SYN segments so that the requested maximum segment size is not greater than the amount
- allowed by the interface MTU. This is necessary in many setups to avoid problems caused by routers that drop ICMP Datagram Too Big messages. Without these messages,
- the originating machine sends data, it passes the rogue router then hits a machine that has an MTU that is not big enough for the data. Because the IP Don't Fragment option is set,
- this machine sends an ICMP Datagram Too Big message back to the originator and drops the packet. The rogue router drops the ICMP message and the originator never
- gets to discover that it must reduce the fragment size or drop the IP Don't Fragment option from its outgoing data.</span>
+ <br/> <span class="vexpl"><?=gettext("This option causes mpd to adjust incoming and outgoing TCP SYN segments so that the requested maximum segment size is not greater than the amount ".
+ "allowed by the interface MTU. This is necessary in many setups to avoid problems caused by routers that drop ICMP Datagram Too Big messages. Without these messages, ".
+ "the originating machine sends data, it passes the rogue router then hits a machine that has an MTU that is not big enough for the data. Because the IP Don't Fragment option is set, ".
+ "this machine sends an ICMP Datagram Too Big message back to the originator and drops the packet. The rogue router drops the ICMP message and the originator never ".
+ "gets to discover that it must reduce the fragment size or drop the IP Don't Fragment option from its outgoing data.");?></span>
</td>
</tr>
<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
- <td width="22%" valign="top" class="vncell">ShortSeq</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("ShortSeq");?></td>
<td width="78%" class="vtable">
<input type="checkbox" value="on" id="shortseq" name="shortseq" <?php if (isset($pconfig['shortseq'])) echo "checked"; ?>>&nbsp;<?= gettext("Disable shortseq (auto-negotiated by default)."); ?>
- <br/> <span class="vexpl"><?= gettext("This option is only meaningful if multi-link PPP is negotiated. It proscribes shorter multi-link fragment headers, saving two bytes on every frame.
- It is not necessary to disable this for connections that are not multi-link."); ?></span>
+ <br/> <span class="vexpl"><?= gettext("This option is only meaningful if multi-link PPP is negotiated. It proscribes shorter multi-link fragment headers, saving two bytes on every frame. " .
+ "It is not necessary to disable this for connections that are not multi-link."); ?></span>
</td>
</tr>
<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
- <td width="22%" valign="top" class="vncell">ACFComp</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("ACFComp"); ?></td>
<td width="78%" class="vtable">
<input type="checkbox" value="on" id="acfcomp" name="acfcomp" <?php if (isset($pconfig['acfcomp'])) echo "checked"; ?>>&nbsp;<?= gettext("Disable acfcomp(compression) (auto-negotiated by default)."); ?>
<br/> <span class="vexpl"><?= gettext("Address and control field compression. This option only applies to asynchronous link types. It saves two bytes per frame."); ?></span>
</td>
</tr>
<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
- <td width="22%" valign="top" class="vncell">ProtoComp</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("ProtoComp"); ?></td>
<td width="78%" class="vtable">
<input type="checkbox" value="on" id="protocomp" name="protocomp" <?php if (isset($pconfig['protocomp'])) echo "checked"; ?>>&nbsp;<?= gettext("Disable protocomp(compression) (auto-negotiated by default)."); ?>
<br/> <span class="vexpl"><?= gettext("Protocol field compression. This option saves one byte per frame for most frames."); ?></span>
@@ -731,7 +731,7 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp"
<tr id="advanced_" name="advanced_">
<td>&nbsp;</td>
<td>
- <p><input type="button" onClick="show_advanced(1)" value="Show advanced options"></p>
+ <p><input type="button" onClick="show_advanced(1)" value="<?=gettext("Show advanced options"); ?>"></p>
</td>
<td style="display:none" id="adv_rows" name="adv_rows"><?=$k;?></td>
<td style="display:none" id="adv_show" name="adv_show">0</td>
@@ -739,28 +739,28 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp"
<tr>
<?php for($i=0; $i < $port_count; $i++) : ?>
<tr style="display:none" id="link<?=$i;?>">
- <td width="22%" valign="top" id="linklabel<?=$i;?>" class="vncell"> Link Parameters</td>
+ <td width="22%" valign="top" id="linklabel<?=$i;?>" class="vncell"> <?=gettext("Link Parameters");?></td>
<td class="vtable">
<table name="link_parameters" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td width="22%" id="bwlabel<?=$i;?>" valign="top"class="vncell"> Bandwidth</td>
+ <td width="22%" id="bwlabel<?=$i;?>" valign="top"class="vncell"> <?=gettext("Bandwidth");?></td>
<td width="78%" class="vtable">
<br/><input name="bandwidth[]" id="bandwidth<?=$i;?>" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['bandwidth'][$i]);?>">
- <br/> <span class="vexpl">Set Bandwidth for each link ONLY for MLPPP connections and ONLY when links have different bandwidths.</span>
+ <br/> <span class="vexpl"><?=gettext("Set Bandwidth for each link ONLY for MLPPP connections and ONLY when links have different bandwidths.");?></span>
</td>
</tr>
<tr>
- <td width="22%" id="mtulabel<?=$i;?>" valign="top" class="vncell"> MTU</td>
+ <td width="22%" id="mtulabel<?=$i;?>" valign="top" class="vncell"> <?=gettext("MTU"); ?></td>
<td width="78%" class="vtable">
<input name="mtu[]" id="mtu<?=$i;?>" type="text" class="formfld unknown" size="6" value="<?=htmlspecialchars($pconfig['mtu'][$i]);?>">
- <br> <span class="vexpl">MTU will default to 1492.</span>
+ <br> <span class="vexpl"><?=gettext("MTU will default to 1492.");?></span>
</td>
</tr>
<tr>
- <td width="22%" id="mrulabel<?=$i;?>" valign="top" class="vncell"> MRU</td>
+ <td width="22%" id="mrulabel<?=$i;?>" valign="top" class="vncell"> <?=gettext("MRU"); ?></td>
<td width="78%" class="vtable">
<input name="mru[]" id="mru<?=$i;?>" type="text" class="formfld unknown" size="6" value="<?=htmlspecialchars($pconfig['mru'][$i]);?>">
- <br> <span class="vexpl">MRU will default to 1492.</span>
+ <br> <span class="vexpl"><?=gettext("MRU will default to 1492.");?></span>
</td>
</tr>
</table
@@ -769,8 +769,8 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp"
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save">
- <input type="button" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
+ <input type="button" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
<input name="ptpid" type="hidden" value="<?=htmlspecialchars($pconfig['ptpid']);?>">
<?php if (isset($id) && $a_ppps[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
diff --git a/usr/local/www/interfaces_qinq.php b/usr/local/www/interfaces_qinq.php
index f25a5dc..a91d045 100755
--- a/usr/local/www/interfaces_qinq.php
+++ b/usr/local/www/interfaces_qinq.php
@@ -39,6 +39,7 @@
##|-PRIV
require("guiconfig.inc");
+require_once("functions.inc");
if (!is_array($config['qinqs']['qinqentry']))
$config['qinqs']['qinqentry'] = array();
@@ -60,7 +61,7 @@ function qinq_inuse($num) {
if ($_GET['act'] == "del") {
/* check if still in use */
if (qinq_inuse($_GET['id'])) {
- $input_errors[] = "This QinQ cannot be deleted because it is still being used as an interface.";
+ $input_errors[] = gettext("This QinQ cannot be deleted because it is still being used as an interface.");
} else {
$id = $_GET['id'];
$qinq =& $a_qinqs[$id];
@@ -81,7 +82,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array("Interfaces","QinQ");
+$pgtitle = array(gettext("Interfaces"),gettext("QinQ"));
include("head.inc");
?>
@@ -93,16 +94,16 @@ include("head.inc");
<tr><td>
<?php
$tab_array = array();
- $tab_array[0] = array("Interface assignments", false, "interfaces_assign.php");
- $tab_array[1] = array("Interface Groups", false, "interfaces_groups.php");
- $tab_array[2] = array("Wireless", false, "interfaces_wireless.php");
- $tab_array[3] = array("VLANs", false, "interfaces_vlan.php");
- $tab_array[4] = array("QinQs", true, "interfaces_qinq.php");
- $tab_array[5] = array("PPPs", false, "interfaces_ppps.php");
- $tab_array[6] = array("GRE", false, "interfaces_gre.php");
- $tab_array[7] = array("GIF", false, "interfaces_gif.php");
- $tab_array[8] = array("Bridges", false, "interfaces_bridge.php");
- $tab_array[9] = array("LAGG", false, "interfaces_lagg.php");
+ $tab_array[0] = array(gettext("Interface assignments"), false, "interfaces_assign.php");
+ $tab_array[1] = array(gettext("Interface Groups"), false, "interfaces_groups.php");
+ $tab_array[2] = array(gettext("Wireless"), false, "interfaces_wireless.php");
+ $tab_array[3] = array(gettext("VLANs"), false, "interfaces_vlan.php");
+ $tab_array[4] = array(gettext("QinQs"), true, "interfaces_qinq.php");
+ $tab_array[5] = array(gettext("PPPs"), false, "interfaces_ppps.php");
+ $tab_array[6] = array(gettext("GRE"), false, "interfaces_gre.php");
+ $tab_array[7] = array(gettext("GIF"), false, "interfaces_gif.php");
+ $tab_array[8] = array(gettext("Bridges"), false, "interfaces_bridge.php");
+ $tab_array[9] = array(gettext("LAGG"), false, "interfaces_lagg.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -111,10 +112,10 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="15%" class="listhdrr">Interface</td>
- <td width="10%" class="listhdrr">Tag</td>
- <td width="20%" class="listhdrr">QinQ members</td>
- <td width="45%" class="listhdr">Description</td>
+ <td width="15%" class="listhdrr"><?=gettext("Interface");?></td>
+ <td width="10%" class="listhdrr"><?=gettext("Tag");?></td>
+ <td width="20%" class="listhdrr"><?=gettext("QinQ members");?></td>
+ <td width="45%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list"></td>
</tr>
<?php $i = 0; foreach ($a_qinqs as $qinq): ?>
@@ -137,7 +138,7 @@ include("head.inc");
<?=htmlspecialchars($qinq['descr']);?>&nbsp;
</td>
<td valign="middle" nowrap class="list"> <a href="interfaces_qinq_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
- &nbsp;<a href="interfaces_qinq.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this QinQ?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ &nbsp;<a href="interfaces_qinq.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this QinQ?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
@@ -146,9 +147,9 @@ include("head.inc");
</tr>
<tr>
<td colspan="3" class="list"><p class="vexpl"><span class="red"><strong>
- Note:<br>
+ <?=gettext("Note");?>:<br>
</strong></span>
- Not all drivers/NICs support 802.1Q QinQ tagging properly. On cards that do not explicitly support it, QinQ tagging will still work, but the reduced MTU may cause problems. See the <?=$g['product_name']?> handbook for information on supported cards. </p>
+ <?php printf(gettext("Not all drivers/NICs support 802.1Q QinQ tagging properly. On cards that do not explicitly support it, QinQ tagging will still work, but the reduced MTU may cause problems. See the %s handbook for information on supported cards."), $g['product_name']);?></p>
</td>
<td class="list">&nbsp;</td>
</tr>
diff --git a/usr/local/www/interfaces_vlan.php b/usr/local/www/interfaces_vlan.php
index cd8975c..1206d20 100755
--- a/usr/local/www/interfaces_vlan.php
+++ b/usr/local/www/interfaces_vlan.php
@@ -62,7 +62,7 @@ function vlan_inuse($num) {
if ($_GET['act'] == "del") {
/* check if still in use */
if (vlan_inuse($_GET['id'])) {
- $input_errors[] = "This VLAN cannot be deleted because it is still being used as an interface.";
+ $input_errors[] = gettext("This VLAN cannot be deleted because it is still being used as an interface.");
} else {
mwexec("/sbin/ifconfig " . $a_vlans[$_GET['id']]['vlanif'] . " destroy");
unset($a_vlans[$_GET['id']]);
@@ -75,7 +75,7 @@ if ($_GET['act'] == "del") {
}
-$pgtitle = array("Interfaces","VLAN");
+$pgtitle = array(gettext("Interfaces"),gettext("VLAN"));
include("head.inc");
?>
@@ -87,16 +87,16 @@ include("head.inc");
<tr><td>
<?php
$tab_array = array();
- $tab_array[0] = array("Interface assignments", false, "interfaces_assign.php");
- $tab_array[1] = array("Interface Groups", false, "interfaces_groups.php");
- $tab_array[2] = array("Wireless", false, "interfaces_wireless.php");
- $tab_array[3] = array("VLANs", true, "interfaces_vlan.php");
- $tab_array[4] = array("QinQs", false, "interfaces_qinq.php");
- $tab_array[5] = array("PPPs", false, "interfaces_ppps.php");
- $tab_array[6] = array("GRE", false, "interfaces_gre.php");
- $tab_array[7] = array("GIF", false, "interfaces_gif.php");
- $tab_array[8] = array("Bridges", false, "interfaces_bridge.php");
- $tab_array[9] = array("LAGG", false, "interfaces_lagg.php");
+ $tab_array[0] = array(gettext("Interface assignments"), false, "interfaces_assign.php");
+ $tab_array[1] = array(gettext("Interface Groups"), false, "interfaces_groups.php");
+ $tab_array[2] = array(gettext("Wireless"), false, "interfaces_wireless.php");
+ $tab_array[3] = array(gettext("VLANs"), true, "interfaces_vlan.php");
+ $tab_array[4] = array(gettext("QinQs"), false, "interfaces_qinq.php");
+ $tab_array[5] = array(gettext("PPPs"), false, "interfaces_ppps.php");
+ $tab_array[6] = array(gettext("GRE"), false, "interfaces_gre.php");
+ $tab_array[7] = array(gettext("GIF"), false, "interfaces_gif.php");
+ $tab_array[8] = array(gettext("Bridges"), false, "interfaces_bridge.php");
+ $tab_array[9] = array(gettext("LAGG"), false, "interfaces_lagg.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -105,9 +105,9 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="20%" class="listhdrr">Interface</td>
- <td width="20%" class="listhdrr">VLAN tag</td>
- <td width="50%" class="listhdr">Description</td>
+ <td width="20%" class="listhdrr"><?=gettext("Interface");?></td>
+ <td width="20%" class="listhdrr"><?=gettext("VLAN tag");?></td>
+ <td width="50%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list"></td>
</tr>
<?php $i = 0; foreach ($a_vlans as $vlan): ?>
@@ -122,18 +122,18 @@ include("head.inc");
<?=htmlspecialchars($vlan['descr']);?>&nbsp;
</td>
<td valign="middle" nowrap class="list"> <a href="interfaces_vlan_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
- &nbsp;<a href="interfaces_vlan.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this VLAN?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ &nbsp;<a href="interfaces_vlan.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this VLAN?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
<td class="list" colspan="3">&nbsp;</td>
- <td class="list"> <a href="interfaces_vlan_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
+ <td class="list"> <a href="interfaces_vlan_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="<F12>17" border="0"></a></td>
</tr>
<tr>
<td colspan="3" class="list"><p class="vexpl"><span class="red"><strong>
- Note:<br>
+ <?=gettext("Note");?>:<br>
</strong></span>
- Not all drivers/NICs support 802.1Q VLAN tagging properly. On cards that do not explicitly support it, VLAN tagging will still work, but the reduced MTU may cause problems. See the <?=$g['product_name']?> handbook for information on supported cards. </p>
+ <?php printf(gettext("Not all drivers/NICs support 802.1Q VLAN tagging properly. On cards that do not explicitly support it, VLAN tagging will still work, but the reduced MTU may cause problems. See the %s handbook for information on supported cards."),$g['product_name']);?> </p>
</td>
<td class="list">&nbsp;</td>
</tr>
diff --git a/usr/local/www/interfaces_vlan_edit.php b/usr/local/www/interfaces_vlan_edit.php
index db676f7..3f26441 100755
--- a/usr/local/www/interfaces_vlan_edit.php
+++ b/usr/local/www/interfaces_vlan_edit.php
@@ -72,12 +72,12 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "if tag");
- $reqdfieldsn = explode(",", "Parent interface,VLAN tag");
+ $reqdfieldsn = array(gettext("Parent interface"),gettext("VLAN tag"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if ($_POST['tag'] && (!is_numericint($_POST['tag']) || ($_POST['tag'] < '1') || ($_POST['tag'] > '4094'))) {
- $input_errors[] = "The VLAN tag must be an integer between 1 and 4094.";
+ $input_errors[] = gettext("The VLAN tag must be an integer between 1 and 4094.");
}
foreach ($a_vlans as $vlan) {
@@ -85,14 +85,14 @@ if ($_POST) {
continue;
if (($vlan['if'] == $_POST['if']) && ($vlan['tag'] == $_POST['tag'])) {
- $input_errors[] = "A VLAN with the tag {$vlan['tag']} is already defined on this interface.";
+ $input_errors[] = sprintf(gettext("A VLAN with the tag %s is already defined on this interface."),$vlan['tag']);
break;
}
}
if (is_array($config['qinqs']['qinqentry'])) {
foreach ($config['qinqs']['qinqentry'] as $qinq)
if ($qinq['tag'] == $_POST['tag'] && $qinq['if'] == $_POST['if'])
- $input_errors[] = "A QinQ VLAN exists with this tag please remove it to use this tag with.";
+ $input_errors[] = gettext("A QinQ VLAN exists with this tag please remove it to use this tag with.");
}
if (!$input_errors) {
@@ -104,7 +104,7 @@ if ($_POST) {
$vlan['vlanif'] = interface_vlan_configure($vlan);
if ($vlan['vlanif'] == "" || !stristr($vlan['vlanif'], "vlan"))
- $input_errors[] = "Error occured creating interface, please retry.";
+ $input_errors[] = gettext("Error occured creating interface, please retry.");
else {
if (isset($id) && $a_vlans[$id])
$a_vlans[$id] = $vlan;
@@ -123,7 +123,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Firewall","VLAN","Edit");
+$pgtitle = array(gettext("Firewall"),gettext("VLAN"),gettext("Edit"));
include("head.inc");
?>
@@ -134,10 +134,10 @@ include("head.inc");
<form action="interfaces_vlan_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">VLAN configuration</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("VLAN configuration");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Parent interface</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Parent interface");?></td>
<td width="78%" class="vtable">
<select name="if" class="formselect">
<?php
@@ -153,27 +153,27 @@ include("head.inc");
?>
</select>
<br/>
- <span class="vexpl">Only VLAN capable interfaces will be shown.</span></td>
+ <span class="vexpl"><?=gettext("Only VLAN capable interfaces will be shown.");?></span></td>
</tr>
<tr>
- <td valign="top" class="vncellreq">VLAN tag </td>
+ <td valign="top" class="vncellreq"><?=gettext("VLAN tag ");?></td>
<td class="vtable">
<input name="tag" type="text" class="formfld unknown" id="tag" size="6" value="<?=htmlspecialchars($pconfig['tag']);?>">
<br>
- <span class="vexpl">802.1Q VLAN tag (between 1 and 4094) </span></td>
+ <span class="vexpl"><?=gettext("802.1Q VLAN tag (between 1 and 4094) ");?></span></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here ".
+ "for your reference (not parsed).");?></span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input type="hidden" name="vlanif" value="<?=$pconfig['vlanif']; ?>">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input type="button" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input type="button" value="<?=gettext("Cancel");?>" onclick="history.back()">
<?php if (isset($id) && $a_vlans[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
diff --git a/usr/local/www/interfaces_wireless.php b/usr/local/www/interfaces_wireless.php
index 42fd149..3e1c755 100644
--- a/usr/local/www/interfaces_wireless.php
+++ b/usr/local/www/interfaces_wireless.php
@@ -60,7 +60,7 @@ function clone_inuse($num) {
if ($_GET['act'] == "del") {
/* check if still in use */
if (clone_inuse($_GET['id'])) {
- $input_errors[] = "This wireless clone cannot be deleted because it is assigned as an interface.";
+ $input_errors[] = gettext("This wireless clone cannot be deleted because it is assigned as an interface.");
} else {
mwexec("/sbin/ifconfig " . $a_clones[$_GET['id']]['cloneif'] . " destroy");
unset($a_clones[$_GET['id']]);
@@ -73,7 +73,7 @@ if ($_GET['act'] == "del") {
}
-$pgtitle = array("Interfaces","Wireless");
+$pgtitle = array(gettext("Interfaces"),gettext("Wireless"));
include("head.inc");
?>
@@ -85,16 +85,16 @@ include("head.inc");
<tr><td>
<?php
$tab_array = array();
- $tab_array[0] = array("Interface assignments", false, "interfaces_assign.php");
- $tab_array[1] = array("Interface Groups", false, "interfaces_groups.php");
- $tab_array[2] = array("Wireless", true, "interfaces_wireless.php");
- $tab_array[3] = array("VLANs", false, "interfaces_vlan.php");
- $tab_array[4] = array("QinQs", false, "interfaces_qinq.php");
- $tab_array[5] = array("PPPs", false, "interfaces_ppps.php");
- $tab_array[6] = array("GRE", false, "interfaces_gre.php");
- $tab_array[7] = array("GIF", false, "interfaces_gif.php");
- $tab_array[8] = array("Bridges", false, "interfaces_bridge.php");
- $tab_array[9] = array("LAGG", false, "interfaces_lagg.php");
+ $tab_array[0] = array(gettext("Interface assignments"), false, "interfaces_assign.php");
+ $tab_array[1] = array(gettext("Interface Groups"), false, "interfaces_groups.php");
+ $tab_array[2] = array(gettext("Wireless"), true, "interfaces_wireless.php");
+ $tab_array[3] = array(gettext("VLANs"), false, "interfaces_vlan.php");
+ $tab_array[4] = array(gettext("QinQs"), false, "interfaces_qinq.php");
+ $tab_array[5] = array(gettext("PPPs"), false, "interfaces_ppps.php");
+ $tab_array[6] = array(gettext("GRE"), false, "interfaces_gre.php");
+ $tab_array[7] = array(gettext("GIF"), false, "interfaces_gif.php");
+ $tab_array[8] = array(gettext("Bridges"), false, "interfaces_bridge.php");
+ $tab_array[9] = array(gettext("LAGG"), false, "interfaces_lagg.php");
display_top_tabs($tab_array);
?>
</td></tr>
@@ -103,9 +103,9 @@ include("head.inc");
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="20%" class="listhdrr">Interface</td>
- <td width="20%" class="listhdrr">Mode</td>
- <td width="50%" class="listhdr">Description</td>
+ <td width="20%" class="listhdrr"><?=gettext("Interface");?></td>
+ <td width="20%" class="listhdrr"><?=gettext("Mode");?></td>
+ <td width="50%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list"></td>
</tr>
<?php $i = 0;
@@ -121,7 +121,7 @@ include("head.inc");
<?=htmlspecialchars($clone['descr']);?>&nbsp;
</td>
<td valign="middle" nowrap class="list"> <a href="interfaces_wireless_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
- &nbsp;<a href="interfaces_wireless.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this wireless clone?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ &nbsp;<a href="interfaces_wireless.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this wireless clone?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
@@ -130,9 +130,9 @@ include("head.inc");
</tr>
<tr>
<td colspan="3" class="list"><p class="vexpl"><span class="red"><strong>
- Note:<br>
+ <?=gettext("Note");?>:<br>
</strong></span>
- Here you can configure clones of wireless interfaces, which can be assigned as separate independent interfaces. Only available on wireless chipsets that support this, with limitations on the number that can be created in each mode.
+ <?=gettext("Here you can configure clones of wireless interfaces, which can be assigned as separate independent interfaces. Only available on wireless chipsets that support this, with limitations on the number that can be created in each mode.");?>
</td>
<td class="list">&nbsp;</td>
</tr>
diff --git a/usr/local/www/interfaces_wireless_edit.php b/usr/local/www/interfaces_wireless_edit.php
index 1e9419e..4108413 100644
--- a/usr/local/www/interfaces_wireless_edit.php
+++ b/usr/local/www/interfaces_wireless_edit.php
@@ -81,7 +81,7 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "if mode");
- $reqdfieldsn = explode(",", "Parent interface,Mode");
+ $reqdfieldsn = array(gettext("Parent interface"),gettext("Mode"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -113,22 +113,22 @@ if ($_POST) {
if (isset($id) && $a_clones[$id]) {
if (clone_inuse($id)) {
if ($clone['if'] != $a_clones[$id]['if'])
- $input_errors[] = "This wireless clone cannot be modified because it is still assigned as an interface.";
+ $input_errors[] = gettext("This wireless clone cannot be modified because it is still assigned as an interface.");
else if ($clone['mode'] != $a_clones[$id]['mode'])
- $input_errors[] = "Use the configuration page for the assigned interface to change the mode.";
+ $input_errors[] = gettext("Use the configuration page for the assigned interface to change the mode.");
}
}
if (!$input_errors) {
if (!interface_wireless_clone($clone['cloneif'], $clone)) {
- $input_errors[] = "Error creating interface with mode {$wlan_modes[$clone['mode']]}. The {$clone['if']} interface may not support creating more clones with the selected mode.";
+ $input_errors[] = sprintf(gettext("Error creating interface with mode %s. The %s interface may not support creating more clones with the selected mode."), $wlan_modes[$clone['mode']], $clone['if']);
} else {
if (isset($id) && $a_clones[$id]) {
if ($clone['if'] != $a_clones[$id]['if'])
mwexec("/sbin/ifconfig " . $a_clones[$id]['cloneif'] . " destroy");
- $input_errors[] = "Created with id {$id}";
+ $input_errors[] = sprintf(gettext("Created with id %s"), $id);
$a_clones[$id] = $clone;
} else {
- $input_errors[] = "Created without id";
+ $input_errors[] = gettext("Created without id");
$a_clones[] = $clone;
}
@@ -142,7 +142,7 @@ if ($_POST) {
}
}
-$pgtitle = array("Firewall","Wireless","Edit");
+$pgtitle = array(gettext("Firewall"),gettext("Wireless"),gettext("Edit"));
include("head.inc");
?>
@@ -153,10 +153,10 @@ include("head.inc");
<form action="interfaces_wireless_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">Wireless clone configuration</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Wireless clone configuration");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Parent interface</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Parent interface");?></td>
<td width="78%" class="vtable">
<select name="if" class="formselect">
<?php
@@ -173,26 +173,26 @@ include("head.inc");
</select></td>
</tr>
<tr>
- <td valign="top" class="vncellreq">Mode</td>
+ <td valign="top" class="vncellreq"><?=gettext("Mode");?></td>
<td class="vtable">
<select name="mode" class="formselect">
- <option <? if ($pconfig['mode'] == 'bss') echo "selected";?> value="bss">Infrastructure (BSS)</option>
- <option <? if ($pconfig['mode'] == 'adhoc') echo "selected";?> value="adhoc">Ad-hoc (IBSS)</option>
- <option <? if ($pconfig['mode'] == 'hostap') echo "selected";?> value="hostap">Access Point</option>
+ <option <? if ($pconfig['mode'] == 'bss') echo "selected";?> value="bss"><?=gettext("Infrastructure (BSS)");?></option>
+ <option <? if ($pconfig['mode'] == 'adhoc') echo "selected";?> value="adhoc"><?=gettext("Ad-hoc (IBSS)");?></option>
+ <option <? if ($pconfig['mode'] == 'hostap') echo "selected";?> value="hostap"><?=gettext("Access Point");?></option>
</select></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br> <span class="vexpl"><?=gettext("You may enter a description here ".
+ "for your reference (not parsed).");?></span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input type="hidden" name="cloneif" value="<?=$pconfig['cloneif']; ?>">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input type="button" value="Cancel" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input type="button" value="<?=gettext("Cancel");?>" onclick="history.back()">
<?php if (isset($id) && $a_clones[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
OpenPOWER on IntegriCloud