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