summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xusr/local/www/diag_arp.php12
-rwxr-xr-xusr/local/www/diag_authentication.php18
-rwxr-xr-xusr/local/www/diag_backup.php112
-rwxr-xr-xusr/local/www/diag_ping.php10
-rwxr-xr-xusr/local/www/diag_pkglogs.php6
-rwxr-xr-xusr/local/www/diag_resetstate.php34
-rw-r--r--usr/local/www/diag_routes.php11
-rw-r--r--usr/local/www/diag_showbogons.php6
-rw-r--r--usr/local/www/diag_states_summary.php22
-rw-r--r--usr/local/www/diag_system_activity.php4
-rw-r--r--usr/local/www/diag_system_pftop.php28
-rwxr-xr-xusr/local/www/diag_traceroute.php20
12 files changed, 141 insertions, 142 deletions
diff --git a/usr/local/www/diag_arp.php b/usr/local/www/diag_arp.php
index 4a6e92c..e202bc0 100755
--- a/usr/local/www/diag_arp.php
+++ b/usr/local/www/diag_arp.php
@@ -249,7 +249,7 @@ function getHostName($mac,$ip)
return "";
}
-$pgtitle = array("Diagnostics","ARP Table");
+$pgtitle = array(gettext("Diagnostics"),gettext("ARP Table"));
include("head.inc");
?>
@@ -259,7 +259,7 @@ include("head.inc");
<?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>
@@ -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..079e335 100755
--- a/usr/local/www/diag_authentication.php
+++ b/usr/local/www/diag_authentication.php
@@ -49,24 +49,24 @@ 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");
?>
@@ -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_backup.php b/usr/local/www/diag_backup.php
index e2cbacb..540eb47 100755
--- a/usr/local/www/diag_backup.php
+++ b/usr/local/www/diag_backup.php
@@ -99,27 +99,27 @@ function check_and_returnif_section_exists($section) {
function spit_out_select_items($area, $showall) {
global $config;
- $areas = array("aliases" => "Aliases",
- "captiveportal" => "Captive Portal",
- "voucher" => "Captive Portal Vouchers",
- "dnsmasq" => "DNS Forwarder",
- "dhcpd" => "DHCP Server",
- "filter" => "Firewall Rules",
- "interfaces" => "Interfaces",
- "ipsec" => "IPSEC",
- "nat" => "NAT",
- "ovpn" => "OpenVPN",
- "installedpackages" => "Package Manager",
- "pptpd" => "PPTP Server",
- "cron" => "Scheduled Tasks",
- "syslog" => "Syslog",
- "system" => "System",
- "staticroutes" => "Static routes",
- "sysctl" => "System tunables",
- "snmpd" => "SNMP Server",
- "shaper" => "Traffic Shaper",
- "vlans" => "VLANS",
- "wol" => "Wake on LAN"
+ $areas = array("aliases" => gettext("Aliases"),
+ "captiveportal" => gettext("Captive Portal"),
+ "voucher" => gettext("Captive Portal Vouchers"),
+ "dnsmasq" => gettext("DNS Forwarder"),
+ "dhcpd" => gettext("DHCP Server"),
+ "filter" => gettext("Firewall Rules"),
+ "interfaces" => gettext("Interfaces"),
+ "ipsec" => gettext("IPSEC"),
+ "nat" => gettext("NAT"),
+ "ovpn" => gettext("OpenVPN"),
+ "installedpackages" => gettext("Package Manager"),
+ "pptpd" => gettext("PPTP Server"),
+ "cron" => gettext("Scheduled Tasks"),
+ "syslog" => gettext("Syslog"),
+ "system" => gettext("System"),
+ "staticroutes" => gettext("Static routes"),
+ "sysctl" => gettext("System tunables"),
+ "snmpd" => gettext("SNMP Server"),
+ "shaper" => gettext("Traffic Shaper"),
+ "vlans" => gettext("VLANS"),
+ "wol" => gettext("Wake on LAN")
);
$select = "<select name=\"{$area}\" id=\"{$aread}\" ";
@@ -174,9 +174,9 @@ if ($_POST) {
if ($_POST['encrypt']) {
if(!$_POST['encrypt_password'] || !$_POST['encrypt_passconf'])
- $input_errors[] = "You must supply and confirm the password for encryption.";
+ $input_errors[] = gettext("You must supply and confirm the password for encryption.");
if($_POST['encrypt_password'] != $_POST['encrypt_passconf'])
- $input_errors[] = "The supplied 'Password' and 'Confirm' field values must match.";
+ $input_errors[] = gettext("The supplied 'Password' and 'Confirm' field values must match.");
}
if (!$input_errors) {
@@ -260,9 +260,9 @@ if ($_POST) {
if ($_POST['decrypt']) {
if(!$_POST['decrypt_password'] || !$_POST['decrypt_passconf'])
- $input_errors[] = "You must supply and confirm the password for decryption.";
+ $input_errors[] = gettext("You must supply and confirm the password for decryption.");
if($_POST['decrypt_password'] != $_POST['decrypt_passconf'])
- $input_errors[] = "The supplied 'Password' and 'Confirm' field values must match.";
+ $input_errors[] = gettext("The supplied 'Password' and 'Confirm' field values must match.");
}
if (!$input_errors) {
@@ -272,20 +272,20 @@ if ($_POST) {
/* read the file contents */
$data = file_get_contents($_FILES['conffile']['tmp_name']);
if(!$data) {
- log_error("Warning, could not read file " . $_FILES['conffile']['tmp_name']);
+ log_error(gettext("Warning, could not read file ") . $_FILES['conffile']['tmp_name']);
return 1;
}
if ($_POST['decrypt']) {
if (!tagfile_deformat($data, $data, "config.xml")) {
- $input_errors[] = "The uploaded file does not appear to contain an encrypted pfsense configuration.";
+ $input_errors[] = gettext("The uploaded file does not appear to contain an encrypted pfsense configuration.");
return 1;
}
$data = decrypt_data($data, $_POST['decrypt_password']);
}
if(stristr($data, "<m0n0wall>")) {
- log_error("Upgrading m0n0wall configuration to pfsense.");
+ log_error(gettext("Upgrading m0n0wall configuration to pfsense."));
/* m0n0wall was found in config. convert it. */
$data = str_replace("m0n0wall", "pfsense", $data);
$m0n0wall_upgrade = true;
@@ -293,15 +293,15 @@ if ($_POST) {
if($_POST['restorearea']) {
/* restore a specific area of the configuration */
if(!stristr($data, $_POST['restorearea'])) {
- $input_errors[] = "You have selected to restore an area but we could not locate the correct xml tag.";
+ $input_errors[] = gettext("You have selected to restore an area but we could not locate the correct xml tag.");
} else {
restore_config_section($_POST['restorearea'], $data);
filter_configure();
- $savemsg = "The configuration area has been restored. You may need to reboot the firewall.";
+ $savemsg = gettext("The configuration area has been restored. You may need to reboot the firewall.");
}
} else {
if(!stristr($data, "<" . $g['xml_rootobj'] . ">")) {
- $input_errors[] = "You have selected to restore the full configuration but we could not locate a " . $g['xml_rootobj'] . " tag.";
+ $input_errors[] = gettext("You have selected to restore the full configuration but we could not locate a ") . $g['xml_rootobj'] . gettext(" tag.");
} else {
/* restore the entire configuration */
file_put_contents($_FILES['conffile']['tmp_name'], $data);
@@ -435,7 +435,7 @@ if ($_POST) {
add_base_packages_menu_items();
convert_config();
conf_mount_ro();
- $savemsg = "The m0n0wall configuration has been restored and upgraded to pfSense.";
+ $savemsg = gettext("The m0n0wall configuration has been restored and upgraded to pfSense.");
mark_subsystem_dirty("restore");
}
if(isset($config['captiveportal']['enable'])) {
@@ -451,12 +451,12 @@ if ($_POST) {
exit;
}
} else {
- $input_errors[] = "The configuration could not be restored.";
+ $input_errors[] = gettext("The configuration could not be restored.");
}
}
}
} else {
- $input_errors[] = "The configuration could not be restored (file upload error).";
+ $input_errors[] = gettext("The configuration could not be restored (file upload error).");
}
}
}
@@ -466,16 +466,16 @@ if ($_POST) {
header("Location: pkg_mgr_install.php?mode=reinstallall");
exit;
} else if ($mode == "restore_ver") {
- $input_errors[] = "XXX - this feature may hose your config (do NOT backrev configs!) - billm";
+ $input_errors[] = gettext("XXX - this feature may hose your config (do NOT backrev configs!) - billm");
if ($ver2restore <> "") {
$conf_file = "{$g['cf_conf_path']}/bak/config-" . strtotime($ver2restore) . ".xml";
if (config_install($conf_file) == 0) {
mark_subsystem_dirty("restore");
} else {
- $input_errors[] = "The configuration could not be restored.";
+ $input_errors[] = gettext("The configuration could not be restored.");
}
} else {
- $input_errors[] = "No version selected.";
+ $input_errors[] = gettext("No version selected.");
}
}
}
@@ -486,7 +486,7 @@ $id = rand() . '.' . time();
$mth = ini_get('upload_progress_meter.store_method');
$dir = ini_get('upload_progress_meter.file.filename_template');
-$pgtitle = array("Diagnostics","Backup/restore");
+$pgtitle = array(gettext("Diagnostics"),gettext("Backup/restore"));
include("head.inc");
?>
@@ -527,7 +527,7 @@ function backuparea_change(obj) {
<?php if (is_subsystem_dirty('restore')): ?><p>
<form action="reboot.php" method="post">
<input name="Submit" type="hidden" value=" Yes ">
-<?php print_info_box("The firewall configuration has been changed.<br/>The firewall is now rebooting.");?><br>
+<?php print_info_box(gettext("The firewall configuration has been changed.<br/>The firewall is now rebooting."));?><br>
</form>
<?php endif; ?>
<form action="diag_backup.php" method="post" name="iform" enctype="multipart/form-data">
@@ -536,8 +536,8 @@ function backuparea_change(obj) {
<td>
<?php
$tab_array = array();
- $tab_array[0] = array("Config History", false, "diag_confbak.php");
- $tab_array[1] = array("Backup/Restore", true, "diag_backup.php");
+ $tab_array[0] = array(gettext("Config History"), false, "diag_confbak.php");
+ $tab_array[1] = array(gettext("Backup/Restore"), true, "diag_backup.php");
display_top_tabs($tab_array);
?>
</td>
@@ -547,19 +547,19 @@ function backuparea_change(obj) {
<div id="mainarea">
<table class="tabcont" align="center" width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" class="listtopic">Backup configuration</td>
+ <td colspan="2" class="listtopic"><?=gettext("Backup configuration"); ?></td>
</tr>
<tr>
<td width="22%" valign="baseline" class="vncell">&nbsp;</td>
<td width="78%" class="vtable">
- <p>Click this button to download the system configuration in XML format.<br /><br /> Backup area: <?php spit_out_select_items("backuparea", false); ?></p>
+ <p><?=gettext("Click this button to download the system configuration in XML format."); ?><br /><br /> <?=gettext("Backup area:"); ?> <?php spit_out_select_items("backuparea", false); ?></p>
<table>
<tr>
<td>
<input name="nopackages" type="checkbox" class="formcheckbox" id="nopackages">
</td>
<td>
- <span class="vexpl">Do not backup package information.</span>
+ <span class="vexpl"><?=gettext("Do not backup package information."); ?></span>
</td>
</tr>
</table>
@@ -569,7 +569,7 @@ function backuparea_change(obj) {
<input name="encrypt" type="checkbox" class="formcheckbox" id="nopackages" onClick="encrypt_change()">
</td>
<td>
- <span class="vexpl">Encrypt this configuration file.</span>
+ <span class="vexpl"><?=gettext("Encrypt this configuration file."); ?></span>
</td>
</tr>
<tr>
@@ -577,14 +577,14 @@ function backuparea_change(obj) {
<input name="donotbackuprrd" type="checkbox" class="formcheckbox" id="dotnotbackuprrd" checked>
</td>
<td>
- <span class="vexpl">Do not backup RRD data (NOTE: RRD Data can consume 4+ megabytes of config.xml space!)</span>
+ <span class="vexpl"><?=gettext("Do not backup RRD data (NOTE: RRD Data can consume 4+ megabytes of config.xml space!)"); ?></span>
</td>
</tr>
</table>
<table id="encrypt_opts">
<tr>
<td>
- <span class="vexpl">Password :</span>
+ <span class="vexpl"><?=gettext("Password"); ?> :</span>
</td>
<td>
<input name="encrypt_password" type="password" class="formfld pwd" size="20" value="" />
@@ -592,7 +592,7 @@ function backuparea_change(obj) {
</tr>
<tr>
<td>
- <span class="vexpl">confirm :</span>
+ <span class="vexpl"><?=gettext("confirm"); ?> :</span>
</td>
<td>
<input name="encrypt_passconf" type="password" class="formfld pwd" size="20" value="" />
@@ -606,12 +606,12 @@ function backuparea_change(obj) {
<td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
<tr>
- <td colspan="2" class="listtopic">Restore configuration</td>
+ <td colspan="2" class="listtopic"><?=gettext("Restore configuration"); ?></td>
</tr>
<tr>
<td width="22%" valign="baseline" class="vncell">&nbsp;</td>
<td width="78%" class="vtable">
- Open a <?=$g['[product_name']?> configuration XML file and click the button below to restore the configuration. <br /><br /> Restore area: <?php spit_out_select_items("restorearea", true); ?>
+ <?=gettext("Open a"); ?> <?=$g['[product_name']?> <?=gettext("configuration XML file and click the button below to restore the configuration."); ?> <br /><br /> <?=gettext("Restore area:"); ?> <?php spit_out_select_items("restorearea", true); ?>
<p><input name="conffile" type="file" class="formfld unknown" id="conffile" size="40"></p>
<table>
<tr>
@@ -619,14 +619,14 @@ function backuparea_change(obj) {
<input name="decrypt" type="checkbox" class="formcheckbox" id="nopackages" onClick="decrypt_change()">
</td>
<td>
- <span class="vexpl">Configuration file is encrypted.</span>
+ <span class="vexpl"><?=gettext("Configuration file is encrypted."); ?></span>
</td>
</tr>
</table>
<table id="decrypt_opts">
<tr>
<td>
- <span class="vexpl">Password :</span>
+ <span class="vexpl"><?=gettext("Password :"); ?></span>
</td>
<td>
<input name="decrypt_password" type="password" class="formfld pwd" size="20" value="" />
@@ -634,7 +634,7 @@ function backuparea_change(obj) {
</tr>
<tr>
<td>
- <span class="vexpl">confirm :</span>
+ <span class="vexpl"><?=gettext("confirm :"); ?></span>
</td>
<td>
<input name="decrypt_passconf" type="password" class="formfld pwd" size="20" value="" />
@@ -642,7 +642,7 @@ function backuparea_change(obj) {
</tr>
</table>
<p><input name="Submit" type="submit" class="formbtn" id="restore" value="Restore configuration"></p>
- <p><strong><span class="red">Note:</span></strong><br />The firewall will reboot after restoring the configuration.<br /></p>
+ <p><strong><span class="red">Note:</span></strong><br /><?=gettext("The firewall will reboot after restoring the configuration."); ?><br /></p>
</td>
</tr>
<?php if($config['installedpackages']['package'] != "") { ?>
@@ -650,12 +650,12 @@ function backuparea_change(obj) {
<td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
<tr>
- <td colspan="2" class="listtopic">Reinstall packages</td>
+ <td colspan="2" class="listtopic"><?=gettext("Reinstall packages"); ?></td>
</tr>
<tr>
<td width="22%" valign="baseline" class="vncell">&nbsp;</td>
<td width="78%" class="vtable">
- <p>Click this button to reinstall all system packages. This may take a while. <br /><br />
+ <p><?=gettext("Click this button to reinstall all system packages. This may take a while."); ?> <br /><br />
<input name="Submit" type="submit" class="formbtn" id="reinstallpackages" value="Reinstall packages">
</td>
</tr>
diff --git a/usr/local/www/diag_ping.php b/usr/local/www/diag_ping.php
index b5658f5..a7bce2e 100755
--- a/usr/local/www/diag_ping.php
+++ b/usr/local/www/diag_ping.php
@@ -40,7 +40,7 @@
##|*MATCH=diag_ping.php*
##|-PRIV
-$pgtitle = array("Diagnostics", "Ping");
+$pgtitle = array(gettext("Diagnostics"), "Ping");
require("guiconfig.inc");
define('MAX_COUNT', 10);
@@ -52,11 +52,11 @@ if ($_POST || $_REQUEST['host']) {
/* input validation */
$reqdfields = explode(" ", "host count");
- $reqdfieldsn = explode(",", "Host,Count");
+ $reqdfieldsn = array(",", gettext("Host"),gettext("Count"));
do_input_validation($_REQUEST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_REQUEST['count'] < 1) || ($_REQUEST['count'] > MAX_COUNT)) {
- $input_errors[] = "Count must be between 1 and {MAX_COUNT}";
+ $input_errors[] = sprintf(gettext("Count must be between 1 and %s"), MAX_COUNT);
}
if (!$input_errors) {
@@ -103,7 +103,7 @@ include("head.inc"); ?>
</td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Count</td>
+ <td width="22%" valign="top" class="vncellreq"><?= gettext("Count"); ?></td>
<td width="78%" class="vtable">
<select name="count" class="formfld" id="count">
<?php for ($i = 1; $i <= MAX_COUNT; $i++): ?>
@@ -121,7 +121,7 @@ include("head.inc"); ?>
<td valign="top" colspan="2">
<? if ($do_ping) {
echo "<font face='terminal' size='2'>";
- echo("<strong>Ping output:</strong><br>");
+ echo "<strong>" . gettext("Ping output") . ":</strong><br>");
echo('<pre>');
$ifaddr = get_interface_ip($interface);
if ($ifaddr)
diff --git a/usr/local/www/diag_pkglogs.php b/usr/local/www/diag_pkglogs.php
index d8f5436..a7b65c9 100755
--- a/usr/local/www/diag_pkglogs.php
+++ b/usr/local/www/diag_pkglogs.php
@@ -77,7 +77,7 @@ if(!$apkg) { // If we aren't looking for a specific package, locate the first pa
$i = $apkgid;
}
-$pgtitle = array("Status","Package logs");
+$pgtitle = array(gettext("Status"),gettext("Package logs"));
include("head.inc");
?>
@@ -88,7 +88,7 @@ include("head.inc");
<ul id="tabnav">
<?php
if($pkgwithlogging == false) {
- print_info_box("No packages with logging facilities are currently installed.");
+ print_info_box(gettext("No packages with logging facilities are currently installed."));
echo '</ul></td></tr></table>';
include("fend.inc");
exit;
@@ -112,7 +112,7 @@ include("head.inc");
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" class="listtopic">
- Last <?= $nentries ?> <?= $curtab ?> log entries</td>
+ <?= gettext("Last") $nentries $curtab gettext("log entries") ?></td>
</tr>
<?php
$package =& $config['installedpackages']['package'][$apkgid];
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 1b136ab..efc9c69 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="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_showbogons.php b/usr/local/www/diag_showbogons.php
index e3f45b3..ed93403 100644
--- a/usr/local/www/diag_showbogons.php
+++ b/usr/local/www/diag_showbogons.php
@@ -59,7 +59,7 @@ if($_POST['Download']) {
}
$bogons = file_get_contents(trim("/etc/bogons"));
-$pgtitle = "Diagnostics: Show Bogons";
+$pgtitle = array(gettext("Diagnostics:")gettext("Show Bogons"));
include("head.inc");
?>
@@ -87,7 +87,7 @@ pre { font-size: 1.15em; }
<tr>
<td>
<font size="+1">
- <b>Currently loaded bogons table:</b><p/>
+ <b><?=gettext("Currently loaded bogons table:");?></b><p/>
<pre>
<?php echo $bogons; ?>
</pre>
@@ -103,7 +103,7 @@ pre { font-size: 1.15em; }
</tr>
</table>
<p/>
-<input type="submit" name="Download" value="Download"> latest bogon data.
+<input type="submit" name="Download" value="<?=gettext("Download");?>"><?=gettext("latest bogon data.");?>
</form>
<?php include("fend.inc"); ?>
</body>
diff --git a/usr/local/www/diag_states_summary.php b/usr/local/www/diag_states_summary.php
index 40d064f..32290bb 100644
--- a/usr/local/www/diag_states_summary.php
+++ b/usr/local/www/diag_states_summary.php
@@ -121,12 +121,12 @@ function print_summary_table($label, $iparr, $sort = TRUE) { ?>
<h3><?php echo $label; ?></h3>
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
- <td class="listhdrr">IP</td>
- <td class="listhdrr"># States</td>
- <td class="listhdrr">Proto</td>
- <td class="listhdrr"># States</td>
- <td class="listhdrr">Src Ports</td>
- <td class="listhdrr">Dst Ports</td>
+ <td class="listhdrr"><?=gettext("IP");?></td>
+ <td class="listhdrr"><?=gettext("# States");?></td>
+ <td class="listhdrr"><?=gettext("Proto");?></td>
+ <td class="listhdrr"><?=gettext"(# States");?></td>
+ <td class="listhdrr"><?=gettext("Src Ports");?></td>
+ <td class="listhdrr"><?=gettext("Dst Ports");?></td>
</tr>
<?php if ($sort)
uksort($iparr, "sort_by_ip");
@@ -156,16 +156,16 @@ function print_summary_table($label, $iparr, $sort = TRUE) { ?>
<?
}
-$pgtitle = array("Diagnostics", "State Table Summary");
+$pgtitle = array(gettext("Diagnostics"),gettext("State Table Summary"));
require_once("guiconfig.inc");
include("head.inc");
include("fbegin.inc");
-print_summary_table("By Source IP", $srcipinfo);
-print_summary_table("By Destination IP", $dstipinfo);
-print_summary_table("Total per IP", $allipinfo);
-print_summary_table("By IP Pair", $pairipinfo, FALSE);
+print_summary_table(gettext("By Source IP"), $srcipinfo);
+print_summary_table(gettext("By Destination IP"), $dstipinfo);
+print_summary_table(gettext("Total per IP"), $allipinfo);
+print_summary_table(gettext("By IP Pair"), $pairipinfo, FALSE);
?>
<?php include("fend.inc"); ?>
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 6dcee5c..4ff5cec 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
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>
diff --git a/usr/local/www/diag_traceroute.php b/usr/local/www/diag_traceroute.php
index 7f30bbe..75ffadf 100755
--- a/usr/local/www/diag_traceroute.php
+++ b/usr/local/www/diag_traceroute.php
@@ -42,7 +42,7 @@
require("guiconfig.inc");
-$pgtitle = array("Diagnostics","Traceroute");
+$pgtitle = array(gettext("Diagnostics"),gettext("Traceroute"));
include("head.inc");
?>
@@ -59,11 +59,11 @@ if ($_POST || $_REQUEST['host']) {
/* input validation */
$reqdfields = explode(" ", "host ttl");
- $reqdfieldsn = explode(",", "Host,ttl");
+ $reqdfieldsn = array(gettext("Host"),gettext("ttl"));
do_input_validation($_REQUEST, $reqdfields, $reqdfieldsn, &$input_errors);
if (($_REQUEST['ttl'] < 1) || ($_REQUEST['ttl'] > MAX_TTL)) {
- $input_errors[] = "Maximum number of hops must be between 1 and {MAX_TTL}";
+ $input_errors[] = sprintf(gettext("Maximum number of hops must be between 1 and '%s'", MAX_TLL);
}
if (!$input_errors) {
@@ -83,15 +83,15 @@ if (!isset($do_traceroute)) {
<form action="diag_traceroute.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td colspan="2" valign="top" class="listtopic">Traceroute</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Traceroute");?></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Host</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Host");?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="host" type="text" class="formfld" id="host" size="20" value="<?=htmlspecialchars($host);?>"></td>
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Maximum number of hops</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Maximum number of hops");?></td>
<td width="78%" class="vtable">
<select name="ttl" class="formfld" id="ttl">
<?php for ($i = 1; $i <= MAX_TTL; $i++): ?>
@@ -101,7 +101,7 @@ if (!isset($do_traceroute)) {
</tr>
<tr>
- <td width="22%" valign="top" class="vncellreq">Use ICMP</td>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Use ICMP");?></td>
<td width="78%" class="vtable">
<input name="useicmp" type="checkbox"<?php if($_REQUEST['useicmp']) echo " CHECKED"; ?>>
</td>
@@ -109,12 +109,12 @@ if (!isset($do_traceroute)) {
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Traceroute">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Traceroute");?>">
</td>
</tr>
<tr>
<td valign="top" colspan="2">
- <p><span class="vexpl"><span class="red"><strong>Note: </strong></span> Traceroute may take a while to complete. You may hit the Stop button on your browser at any time to see the progress of failed traceroutes.<p>
+ <p><span class="vexpl"><span class="red"><b><?=gettext("Note");?>:</b></span><?=gettext("Traceroute may take a while to complete.". "You may hit the Stop button on your browser at any time to see the progress of failed traceroutes.");?><p>
<? if ($do_traceroute) {
echo "<font face='terminal' size='2'>";
echo("<br><strong>Traceroute output:</strong><br>");
@@ -133,7 +133,7 @@ if (!isset($do_traceroute)) {
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <span class="vexpl"><strong>Note: </strong></span> Multi-wan is not supported from this utility currently.
+ <span class="vexpl"><b><?=gettext("Note");?>:</b></span><?=gettext("Multi-wan is not supported from this utility currently.");?>
</td>
</tr>
</table>
OpenPOWER on IntegriCloud