diff options
Diffstat (limited to 'usr/local/www')
34 files changed, 548 insertions, 548 deletions
diff --git a/usr/local/www/diag_arp.php b/usr/local/www/diag_arp.php index 3aff783..4a6e92c 100755 --- a/usr/local/www/diag_arp.php +++ b/usr/local/www/diag_arp.php @@ -205,15 +205,15 @@ if(count($pools) > 0) { // Put this in an easy to use form $dhcpmac = array(); $dhcpip = array(); - + foreach ($leases as $value) { - $dhcpmac[$value['mac']] = $value['hostname']; - $dhcpip[$value['ip']] = $value['hostname']; + $dhcpmac[$value['mac']] = $value['hostname']; + $dhcpip[$value['ip']] = $value['hostname']; } exec("/usr/sbin/arp -an",$rawdata); -$i = 0; +$i = 0; /* if list */ $ifdescrs = get_configured_interface_with_descr(); @@ -225,7 +225,7 @@ foreach ($ifdescrs as $key =>$interface) { $data = array(); foreach ($rawdata as $line) { $elements = explode(' ',$line); - + if ($elements[3] != "(incomplete)") { $arpent = array(); $arpent['ip'] = trim(str_replace(array('(',')'),'',$elements[1])); @@ -238,28 +238,28 @@ foreach ($rawdata as $line) { function getHostName($mac,$ip) { global $dhcpmac, $dhcpip; - + if ($dhcpmac[$mac]) return $dhcpmac[$mac]; else if ($dhcpip[$ip]) return $dhcpip[$ip]; else if(gethostbyaddr($ip) <> "" and gethostbyaddr($ip) <> $ip) return gethostbyaddr($ip); - else - return ""; + else + return ""; } -$pgtitle = array(gettext("Diagnostics"),gettext("ARP Table")); +$pgtitle = array("Diagnostics","ARP Table"); include("head.inc"); ?> <body link="#000000" vlink="#000000" alink="#000000"> - + <?php include("fbegin.inc"); ?> <div id="loading"> - <img src="/themes/{$g['theme']}/images/misc/loader.gif"><?= gettext("Loading, please wait..."); ?> + <img src="/themes/{$g['theme']}/images/misc/loader.gif"> Loading, please wait... <p/> </div> @@ -276,7 +276,7 @@ foreach ($data as &$entry) { $dns = trim(getHostName($entry['mac'], $entry['ip'])); if(trim($dns)) $entry['dnsresolve'] = "$dns"; - else + else $entry['dnsresolve'] = "Z_ "; } @@ -289,10 +289,10 @@ $data = msort($data, "dnsresolve"); <td> <table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> - <td class="listhdrr"><?= gettext("IP address"); ?></td> - <td class="listhdrr"><?= gettext("MAC address"); ?></td> - <td class="listhdrr"><?= gettext("Hostname"); ?></td> - <td class="listhdr"><?= gettext("Interface"); ?></td> + <td class="listhdrr">IP address</td> + <td class="listhdrr">MAC address</td> + <td class="listhdrr">Hostname</td> + <td class="listhdr">Interface</td> <td class="list"></td> </tr> <?php foreach ($data as $entry): ?> diff --git a/usr/local/www/diag_authentication.php b/usr/local/www/diag_authentication.php index 91874d4..f6ed771 100755 --- a/usr/local/www/diag_authentication.php +++ b/usr/local/www/diag_authentication.php @@ -49,30 +49,30 @@ if ($_POST) { $authcfg = auth_get_authserver($_POST['authmode']); if (!$authcfg) - $input_errors[] = $_POST['authmode'] . " " . gettext("is not a valid authentication server"); + $input_errors[] = "{$_POST['authmode']} is not a valid authentication server "; if (empty($_POST['username']) || empty($_POST['password'])) - $input_errors[] = gettext("A username and password must be specified."); + $input_errors[] = "A username and password must be specified."; if (!$input_errors) { if (authenticate_user($_POST['username'], $_POST['password'], $authcfg)) { - $savemsg = gettext("User") . ": " . $_POST['username'] . " " . gettext("authenticated sucessfully."); + $savemsg = "User: {$_POST['username']} authenticated sucessfully."; $groups = getUserGroups($_POST['username'], $authcfg); - $savemsg .= "<br />" + gettext("This user is member of this groups") + ": <br />"; + $savemsg .= "<br />This user is member of this groups: <br />"; foreach ($groups as $group) $savemsg .= "{$group} "; } else { - $input_errors[] = gettext("Authentication failed."); + $input_errors[] = "Authentication failed."; } } } -$pgtitle = array(gettext("Diagnostics"),gettext("Authentication")); +$pgtitle = array("Diagnostics","Authentication"); include("head.inc"); ?> <body link="#000000" vlink="#000000" alink="#000000"> - + <?php include("fbegin.inc"); ?> <?php if ($input_errors) print_input_errors($input_errors);?> <?php if ($savemsg) print_info_box($savemsg);?> @@ -87,7 +87,7 @@ include("head.inc"); <form id="iform" name="iform" action="diag_authentication.php" method="post"> <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="6"> <tr> - <td width="22%" valign="top" class="vncell"><?=gettext("Authentication Server"); ?></td> + <td width="22%" valign="top" class="vncell">Authentication Server</td> <td width="78%" class="vtable"> <select name='authmode' id='authmode' class="formselect" > <?php @@ -103,13 +103,13 @@ include("head.inc"); </td> </tr> <tr> - <td width="22%" valign="top" class="vncell"><?=gettext("Username"); ?></td> + <td width="22%" valign="top" class="vncell">Username</td> <td width="78%" class="vtable"> <input class="formfld unknown" size='20' id='username' name='username' value='<?=$pconfig['username'];?>' /> </td> </tr> <tr> - <td width="22%" valign="top" class="vncell"><?=gettext("Password"); ?></td> + <td width="22%" valign="top" class="vncell">Password</td> <td width="78%" class="vtable"> <input class="formfld pwd" type='password' size='20' id='password' name='password' value='<?=$pconfig['password'];?>' /> </td> diff --git a/usr/local/www/diag_confbak.php b/usr/local/www/diag_confbak.php index 393f771..5d0458b 100755 --- a/usr/local/www/diag_confbak.php +++ b/usr/local/www/diag_confbak.php @@ -28,7 +28,7 @@ POSSIBILITY OF SUCH DAMAGE. */ -/* +/* pfSense_MODULE: config */ @@ -45,10 +45,9 @@ if($_GET['newver'] != "") { conf_mount_rw(); $confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache')); if(config_restore($g['conf_path'] . '/backup/config-' . $_GET['newver'] . '.xml') == 0) - - $savemsg = sprintf(gettext("Successfully reverted to timestamp %s with description \"%s\"."), date(gettext("n/j/y H:i:s"), $_GET['newver']), $confvers[$_GET['newver']]['description']); + $savemsg = "Successfully reverted to timestamp " . date("n/j/y H:i:s", $_GET['newver']) . " with description \"" . $confvers[$_GET['newver']]['description'] . "\"."; else - $savemsg = gettext("Unable to revert to the selected configuration."); + $savemsg = "Unable to revert to the selected configuration."; conf_mount_ro(); } @@ -56,7 +55,7 @@ if($_GET['rmver'] != "") { conf_mount_rw(); $confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache')); unlink_if_exists($g['conf_path'] . '/backup/config-' . $_GET['rmver'] . '.xml'); - $savemsg = sprintf(gettext("Deleted backup with timestamp %s and description \"%s\"."), date(gettext("n/j/y H:i:s"), $_GET['rmver']),$confvers[$_GET['rmver']]['description']); + $savemsg = "Deleted backup with timestamp " . date("n/j/y H:i:s", $_GET['rmver']) . " and description \"" . $confvers[$_GET['rmver']]['description'] . "\"."; conf_mount_ro(); } @@ -95,7 +94,7 @@ cleanup_backupcache(); $confvers = get_backups(); unset($confvers['versions']); -$pgtitle = array(gettext("Diagnostics"),gettext("Configuration History")); +$pgtitle = array("Diagnostics","Configuration History"); include("head.inc"); ?> @@ -108,7 +107,7 @@ include("head.inc"); ?> <? if ($diff) { ?> <table align="center" valign="middle" width="100%" border="0" cellspacing="0" style="padding-top: 4px; padding-bottom: 4px;"> - <tr><td><?=gettext("Configuration diff from");?> <?php echo date(gettext("n/j/y H:i:s"), $oldtime); ?> <?=gettext("to");?> <?php echo date(gettext("n/j/y H:i:s"), $newtime); ?></td></tr> + <tr><td>Configuration diff from <?php echo date("n/j/y H:i:s", $oldtime); ?> to <?php echo date("n/j/y H:i:s", $newtime); ?></td></tr> <?php foreach ($diff as $line) { switch (substr($line, 0, 1)) { case "+": @@ -136,10 +135,10 @@ include("head.inc"); <td> <?php $tab_array = array(); - $tab_array[0] = array(gettext("Config History"), true, "diag_confbak.php"); - $tab_array[1] = array(gettext("Backup/Restore"), false, "diag_backup.php"); + $tab_array[0] = array("Config History", true, "diag_confbak.php"); + $tab_array[1] = array("Backup/Restore", false, "diag_backup.php"); display_top_tabs($tab_array); - ?> + ?> </td> </tr> <tr> @@ -150,25 +149,25 @@ include("head.inc"); <?php if (is_array($confvers)): ?> <tr> <td colspan="2" valign="middle" align="center" class="list" nowrap><input type="submit" name="diff" value="Diff"></td> - <td width="30%" class="listhdrr"><?=gettext("Date");?></td> - <td width="70%" class="listhdrr"><?=gettext("Configuration Change");?></td> + <td width="30%" class="listhdrr">Date</td> + <td width="70%" class="listhdrr">Configuration Change</td> </tr> <tr valign="top"> <td valign="middle" class="list" nowrap></td> <td class="list"> <input type="radio" name="newtime" value="current"> </td> - <td class="listlr"> <?= date(gettext("n/j/y H:i:s"), $config['revision']['time']) ?></td> + <td class="listlr"> <?= date("n/j/y H:i:s", $config['revision']['time']) ?></td> <td class="listr"> <?= $config['revision']['description'] ?></td> - <td colspan="3" valign="middle" class="list" nowrap><b><?=gettext("Current");?></b></td> + <td colspan="3" valign="middle" class="list" nowrap><b>Current</b></td> </tr> <?php $c = 0; foreach($confvers as $version): if($version['time'] != 0) - $date = date(gettext("n/j/y H:i:s"), $version['time']); + $date = date("n/j/y H:i:s", $version['time']); else - $date = gettext("Unknown"); + $date = "Unknown"; $desc = $version['description']; ?> <tr valign="top"> @@ -180,24 +179,24 @@ include("head.inc"); <input type="radio" name="newtime" value="<?php echo $version['time'];?>"> <? } else { ?> - <? } + <? } $c++; ?> </td> <td class="listlr"> <?= $date ?></td> <td class="listr"> <?= $desc ?></td> <td valign="middle" class="list" nowrap> - <a href="diag_confbak.php?newver=<?=$version['time'];?>" onclick="return confirm('<?=gettext("Revert to this configuration?");?>'")> - <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="<?=gettext("Revert to this configuration");?>" title="<?=gettext("Revert to this configuration");?>"> + <a href="diag_confbak.php?newver=<?=$version['time'];?>" onclick="return confirm('Revert to this configuration?')"> + <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" alt="Revert to this configuration" title="Revert to this configuration"> </a> </td> <td valign="middle" class="list" nowrap> - <a href="diag_confbak.php?rmver=<?=$version['time'];?>" onclick="return confirm('<?=gettext("Delete this configuration backup?");?>')"> - <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="<?=gettext("Remove this backup");?>" title="<?=gettext("Remove this backup");?>"> + <a href="diag_confbak.php?rmver=<?=$version['time'];?>" onclick="return confirm('Delete this configuration backup?')"> + <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="Remove this backup" title="Remove this backup"> </a> </td> <td valign="middle" class="list" nowrap> <a href="diag_confbak.php?getcfg=<?=$version['time'];?>"> - <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_down.gif" width="17" height="17" border="0" alt="<?=gettext("Download this backup");?>" title="<?=gettext("Download this backup");?>"> + <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_down.gif" width="17" height="17" border="0" alt="Download this backup" title="Download this backup"> </a> </td> </tr> @@ -209,7 +208,7 @@ include("head.inc"); <?php else: ?> <tr> <td> - <?php print_info_box(gettext("No backups found.")); ?> + <?php print_info_box("No backups found."); ?> </td> </tr> <?php endif; ?> diff --git a/usr/local/www/diag_defaults.php b/usr/local/www/diag_defaults.php index cde9d54..c462abd 100755 --- a/usr/local/www/diag_defaults.php +++ b/usr/local/www/diag_defaults.php @@ -48,14 +48,14 @@ if ($_POST) { if ($_POST['Submit'] != " No ") { reset_factory_defaults(); system_reboot(); - $rebootmsg = gettext("The system has been reset to factory defaults and is now rebooting. This may take one minute."); + $rebootmsg = "The system has been reset to factory defaults and is now rebooting. This may take one minute."; } else { header("Location: index.php"); exit; } } -$pgtitle = array(gettext("Diagnostics"),gettext("Factory defaults")); +$pgtitle = array("Diagnostics","Factory defaults"); include("head.inc"); ?> @@ -64,22 +64,21 @@ include("head.inc"); <?php include("fbegin.inc"); ?> <?php if ($rebootmsg): echo print_info_box($rebootmsg); else: ?> <form action="diag_defaults.php" method="post"> - <p><strong> <?=gettext("If you click") . " "" . gettext("Yes") . "", " . gettext("the firewall will")?>: - + <p><strong>If you click "Yes", the firewall will: + <ul> - <li><?=gettext("Reset to factory defaults");?></li> - <li><?=gettext("LAN IP address will be reset to 192.168.1.1");?></li> - <li><?=gettext("System will be configured as a DHCP server on the default LAN interface");?></li> - <li><?=gettext("Reboot after changes are installed");?></li> - <li><?=gettext("WAN interface will be set to obtain an address automatically from a DHCP server");?></li> - <li><?=gettext("webConfigurator admin username will be reset to 'admin'");?></li> - <li><?=gettext("webConfigurator admin password will be reset to");?> '<?=$g['product_name']?>'</li> - + <li>Reset to factory defaults</li> + <li>LAN IP address will be reset to 192.168.1.1</li> + <li>System will be configured as a DHCP server on the default LAN interface</li> + <li>Reboot after changes are installed</li> + <li>WAN interface will be set to obtain an address automatically from a DHCP server</li> + <li>webConfigurator admin username will be reset to 'admin'</li> + <li>webConfigurator admin password will be reset to '<?=$g['product_name']?>'</li> </ul> - <?=gettext("Are you sure you want to proceed?");?></strong></p> + Are you sure you want to proceed?</strong></p> <p> - <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("Yes");?> "> - <input name="Submit" type="submit" class="formbtn" value=" <?=gettext("No");?> "> + <input name="Submit" type="submit" class="formbtn" value=" Yes "> + <input name="Submit" type="submit" class="formbtn" value=" No "> </p> </form> <?php endif; ?> diff --git a/usr/local/www/diag_dump_states.php b/usr/local/www/diag_dump_states.php index a98b943..50cdb32 100755 --- a/usr/local/www/diag_dump_states.php +++ b/usr/local/www/diag_dump_states.php @@ -50,7 +50,7 @@ if($_GET['action']) { $retval = mwexec("/sbin/pfctl -k '{$srcip}' -k '{$dstip}'"); echo htmlentities("|{$srcip}|{$dstip}|{$retval}|"); } else { - echo gettext("invalid input"); + echo "invalid input"; } exit; } @@ -132,7 +132,7 @@ include("head.inc"); <form action="<?=$_SERVER['SCRIPT_NAME'];?>" method="get"> <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> - <td><?=gettext("Current state count");?>: <?=$current_statecount?></td> + <td>Current state count: <?=$current_statecount?></td> <td style="font-weight:bold;" align="right"> <?=gettext("Filter expression");?>: <input type="text" name="filter" class="formfld search" value="<?=$_GET['filter'];?>" size="30" /> diff --git a/usr/local/www/diag_ipsec.php b/usr/local/www/diag_ipsec.php index 99b9864..a77d261 100644 --- a/usr/local/www/diag_ipsec.php +++ b/usr/local/www/diag_ipsec.php @@ -45,7 +45,7 @@ global $g; -$pgtitle = array(gettext("Status"),gettext("IPsec")); +$pgtitle = array("Status","IPsec"); require("guiconfig.inc"); include("head.inc"); @@ -69,10 +69,10 @@ $sad = ipsec_dump_sad(); <td> <?php $tab_array = array(); - $tab_array[0] = array(gettext("Overview"), true, "diag_ipsec.php"); - $tab_array[1] = array(gettext("SAD"), false, "diag_ipsec_sad.php"); - $tab_array[2] = array(gettext("SPD"), false, "diag_ipsec_spd.php"); - $tab_array[3] = array(gettext("Logs"), false, "diag_logs_ipsec.php"); + $tab_array[0] = array("Overview", true, "diag_ipsec.php"); + $tab_array[1] = array("SAD", false, "diag_ipsec_sad.php"); + $tab_array[2] = array("SPD", false, "diag_ipsec_spd.php"); + $tab_array[3] = array("Logs", false, "diag_logs_ipsec.php"); display_top_tabs($tab_array); ?> </td> @@ -82,12 +82,12 @@ $sad = ipsec_dump_sad(); <div id="mainarea"> <table width="100%" border="0" cellpadding="6" cellspacing="0" class="tabcont sortable"> <tr> - <td nowrap class="listhdrr"><?=gettext("Local IP");?></td> - <td nowrap class="listhdrr"><?=gettext("Remote IP");?></a></td> - <td nowrap class="listhdrr"><?=gettext("Local Network");?></td> - <td nowrap class="listhdrr"><?=gettext("Remote Network");?></a></td> - <td nowrap class="listhdrr"><?=gettext("Description");?></a></td> - <td nowrap class="listhdrr"><?=gettext("Status");?></td> + <td nowrap class="listhdrr">Local IP</td> + <td nowrap class="listhdrr">Remote IP</a></td> + <td nowrap class="listhdrr">Local Network</td> + <td nowrap class="listhdrr">Remote Network</a></td> + <td nowrap class="listhdrr">Description</a></td> + <td nowrap class="listhdrr">Status</td> </tr> <?php foreach ($a_phase2 as $ph2ent) { @@ -132,9 +132,9 @@ $sad = ipsec_dump_sad(); <span class="vexpl"> <span class="red"> - <strong><?=gettext("Note");?>:<br /></strong> + <strong>Note:<br /></strong> </span> - <?=gettext("You can configure your IPsec");?> + You can configure your IPsec <a href="vpn_ipsec.php">here</a>. </span> diff --git a/usr/local/www/diag_ipsec_spd.php b/usr/local/www/diag_ipsec_spd.php index 8621e59..3d44b62 100755 --- a/usr/local/www/diag_ipsec_spd.php +++ b/usr/local/www/diag_ipsec_spd.php @@ -46,7 +46,7 @@ require("guiconfig.inc"); require("ipsec.inc"); -$pgtitle = array(gettext("Status"),gettext("IPsec"),gettext("SPD")); +$pgtitle = array("Status","IPsec","SPD"); include("head.inc"); /* delete any SP? */ @@ -69,10 +69,10 @@ $spd = ipsec_dump_spd(); <td> <?php $tab_array = array(); - $tab_array[0] = array(gettext("Overview"), false, "diag_ipsec.php"); - $tab_array[1] = array(gettext("SAD"), false, "diag_ipsec_sad.php"); - $tab_array[2] = array(gettext("SPD"), true, "diag_ipsec_spd.php"); - $tab_array[3] = array(gettext("Logs"), false, "diag_logs_ipsec.php"); + $tab_array[0] = array("Overview", false, "diag_ipsec.php"); + $tab_array[1] = array("SAD", false, "diag_ipsec_sad.php"); + $tab_array[2] = array("SPD", true, "diag_ipsec_spd.php"); + $tab_array[3] = array("Logs", false, "diag_logs_ipsec.php"); display_top_tabs($tab_array); ?> </td> @@ -83,11 +83,11 @@ $spd = ipsec_dump_spd(); <table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0"> <?php if (count($spd)): ?> <tr> - <td nowrap class="listhdrr"><?= gettext("Source"); ?></td> - <td nowrap class="listhdrr"><?= gettext("Destination"); ?></td> - <td nowrap class="listhdrr"><?= gettext("Direction"); ?></td> - <td nowrap class="listhdrr"><?= gettext("Protocol"); ?></td> - <td nowrap class="listhdrr"><?= gettext("Tunnel endpoints"); ?></td> + <td nowrap class="listhdrr">Source</td> + <td nowrap class="listhdrr">Destination</td> + <td nowrap class="listhdrr">Direction</td> + <td nowrap class="listhdrr">Protocol</td> + <td nowrap class="listhdrr">Tunnel endpoints</td> <td nowrap class="list"></td> </tr> <?php foreach ($spd as $sp): ?> @@ -105,7 +105,7 @@ $spd = ipsec_dump_spd(); $args .= "&dstid=".rawurlencode($sp['dstid']); $args .= "&dir=".rawurlencode($sp['dir']); ?> - <a href="diag_ipsec_spd.php?act=del&<?=$args;?>" onclick="return confirm('<?= gettext("Do you really want to delete this security policy?"); ?>')"> + <a href="diag_ipsec_spd.php?act=del&<?=$args;?>" onclick="return confirm('Do you really want to delete this security policy?')"> <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"> </a> </td> @@ -116,19 +116,19 @@ $spd = ipsec_dump_spd(); <table class="tabcont" border="0" cellspacing="0" cellpadding="6"> <tr> <td width="16"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_in.gif" width="11" height="11"></td> - <td><?= gettext("incoming (as seen by firewall)"); ?></td> + <td>incoming (as seen by firewall)</td> </tr> <tr> <td colspan="5" height="4"></td> </tr> <tr> <td><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_out.gif" width="11" height="11"></td> - <td><?= gettext("outgoing (as seen by firewall)"); ?></td> + <td>outgoing (as seen by firewall)</td> </tr> <?php else: ?> <tr> <td> - <p><strong><?= gettext("No IPsec security policies."); ?></strong></p> + <p><strong>No IPsec security policies.</strong></p> </td> </tr> <?php endif; ?> @@ -140,8 +140,8 @@ $spd = ipsec_dump_spd(); <p> <span class="vexpl"> -<span class="red"><strong><?= gettext("Note"); ?>:<br></strong></span> -<?= gettext("You can configure your IPsec"); ?> <a href="vpn_ipsec.php"><?= gettext("here"); ?></a>. +<span class="red"><strong>Note:<br></strong></span> +You can configure your IPsec <a href="vpn_ipsec.php">here</a>. </span> <?php include("fend.inc"); ?> diff --git a/usr/local/www/diag_logs.php b/usr/local/www/diag_logs.php index 145d480..85b61df 100755 --- a/usr/local/www/diag_logs.php +++ b/usr/local/www/diag_logs.php @@ -62,7 +62,7 @@ if ($_POST['filtertext']) if ($filtertext) $filtertextmeta="?filtertext=$filtertext"; -$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("System")); +$pgtitle = array("Status","System logs","System"); include("head.inc"); ?> @@ -74,17 +74,17 @@ include("head.inc"); <td> <?php $tab_array = array(); - $tab_array[] = array(gettext("System"), true, "diag_logs.php"); - $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php"); - $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php"); - $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php"); - $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php"); - $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php"); - $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php"); - $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php"); - $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php"); - $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php"); - $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php"); + $tab_array[] = array("System", true, "diag_logs.php"); + $tab_array[] = array("Firewall", false, "diag_logs_filter.php"); + $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php"); + $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php"); + $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php"); + $tab_array[] = array("PPP", false, "diag_logs_ppp.php"); + $tab_array[] = array("VPN", false, "diag_logs_vpn.php"); + $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php"); + $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php"); + $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php"); + $tab_array[] = array("Settings", false, "diag_logs_settings.php"); display_top_tabs($tab_array); ?> </td> @@ -94,7 +94,7 @@ include("head.inc"); <div id="mainarea"> <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> - <td colspan="2" class="listtopic"><?php printf(gettext("Last %s system log entries"),$nentries); ?></td> + <td colspan="2" class="listtopic">Last <?=$nentries;?> system log entries</td> </tr> <?php if($filtertext) @@ -110,7 +110,7 @@ include("head.inc"); </td> <td align="right" valign="top" > <form id="clearform" name="clearform" action="diag_logs.php" method="post" style="margin-top: 14px;"> - <input id="filtertext" name="filtertext" value="<?=$filtertext;?>" /> + <input id="filtertext" name="filtertext" value="<?=gettext($filtertext);?>" /> <input id="filtersubmit" name="filtersubmit" type="submit" class="formbtn" value="<?=gettext("Filter");?>" /> </form> </td> diff --git a/usr/local/www/diag_logs_auth.php b/usr/local/www/diag_logs_auth.php index a6e9730..700b6dc 100755 --- a/usr/local/www/diag_logs_auth.php +++ b/usr/local/www/diag_logs_auth.php @@ -51,7 +51,7 @@ if (!$nentries) if ($_POST['clear']) clear_log_file($portal_logfile); -$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Portal Auth")); +$pgtitle = array("Status","System logs","Portal Auth"); include("head.inc"); ?> @@ -62,17 +62,17 @@ include("head.inc"); <tr><td> <?php $tab_array = array(); - $tab_array[] = array(gettext("System"), false, "diag_logs.php"); - $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php"); - $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php"); - $tab_array[] = array(gettext("Portal Auth"), true, "diag_logs_auth.php"); - $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php"); - $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php"); - $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php"); - $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php"); - $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php"); - $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php"); - $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php"); + $tab_array[] = array("System", false, "diag_logs.php"); + $tab_array[] = array("Firewall", false, "diag_logs_filter.php"); + $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php"); + $tab_array[] = array("Portal Auth", true, "diag_logs_auth.php"); + $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php"); + $tab_array[] = array("PPP", false, "diag_logs_ppp.php"); + $tab_array[] = array("VPN", false, "diag_logs_vpn.php"); + $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php"); + $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php"); + $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php"); + $tab_array[] = array("Settings", false, "diag_logs_settings.php"); display_top_tabs($tab_array); ?> </td></tr> @@ -82,11 +82,11 @@ include("head.inc"); <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2" class="listtopic"> - <?php printf(gettext("Last %s Portal Auth log entries"),$nentries);?></td> + Last <?=$nentries;?> Portal Auth log entries</td> </tr> <?php dump_clog($portal_logfile, $nentries, true); ?> <tr><td><br><form action="diag_logs_auth.php" method="post"> - <input name="clear" type="submit" class="formbtn" value="<?= gettext("Clear log"); ?>"></td></tr> + <input name="clear" type="submit" class="formbtn" value="Clear log"></td></tr> </table> </div> </form> diff --git a/usr/local/www/diag_logs_dhcp.php b/usr/local/www/diag_logs_dhcp.php index ffc51c4..b95b969 100755 --- a/usr/local/www/diag_logs_dhcp.php +++ b/usr/local/www/diag_logs_dhcp.php @@ -53,7 +53,7 @@ if (!$nentries) if ($_POST['clear']) clear_log_file($dhcpd_logfile); -$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("DHCP")); +$pgtitle = array("Status","System logs","DHCP"); include("head.inc"); ?> @@ -64,17 +64,17 @@ include("head.inc"); <tr><td> <?php $tab_array = array(); - $tab_array[] = array(gettext("System"), false, "diag_logs.php"); - $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php"); - $tab_array[] = array(gettext("DHCP"), true, "diag_logs_dhcp.php"); - $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php"); - $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php"); - $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php"); - $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php"); - $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php"); - $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php"); - $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php"); - $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php"); + $tab_array[] = array("System", false, "diag_logs.php"); + $tab_array[] = array("Firewall", false, "diag_logs_filter.php"); + $tab_array[] = array("DHCP", true, "diag_logs_dhcp.php"); + $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php"); + $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php"); + $tab_array[] = array("PPP", false, "diag_logs_ppp.php"); + $tab_array[] = array("VPN", false, "diag_logs_vpn.php"); + $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php"); + $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php"); + $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php"); + $tab_array[] = array("Settings", false, "diag_logs_settings.php"); display_top_tabs($tab_array); ?> </td></tr> @@ -84,11 +84,11 @@ include("head.inc"); <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2" class="listtopic"> - <?php printf(gettext("Last %s DHCP service log entries"), $nentries);?></td> + Last <?=$nentries;?> DHCP service log entries</td> </tr> <?php dump_clog($dhcpd_logfile, $nentries); ?> <tr><td><br><form action="diag_logs_dhcp.php" method="post"> - <input name="clear" type="submit" class="formbtn" value="<?= gettext("Clear log");?>"></td></tr> + <input name="clear" type="submit" class="formbtn" value="Clear log"></td></tr> </table> </div> </form> diff --git a/usr/local/www/diag_logs_filter.php b/usr/local/www/diag_logs_filter.php index 02b2591..9d8d9cd 100755 --- a/usr/local/www/diag_logs_filter.php +++ b/usr/local/www/diag_logs_filter.php @@ -53,7 +53,7 @@ if($_GET['getrulenum'] or $_POST['getrulenum']) { $rulenum = $_POST['getrulenum']; list($rulenum, $type) = explode(',', $rulenum); $rule = find_rule_by_number($rulenum, $type); - echo gettext("The rule that triggered this action is") . ":\n\n{$rule}"; + echo "The rule that triggered this action is:\n\n{$rule}"; exit; } @@ -87,7 +87,7 @@ if (!$nentries) if ($_POST['clear']) clear_log_file($filter_logfile); -$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Firewall")); +$pgtitle = array("Status","System logs","Firewall"); include("head.inc"); ?> @@ -98,17 +98,17 @@ include("head.inc"); <tr><td> <?php $tab_array = array(); - $tab_array[] = array(gettext("System"), false, "diag_logs.php"); - $tab_array[] = array(gettext("Firewall"), true, "diag_logs_filter.php"); - $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php"); - $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php"); - $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php"); - $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php"); - $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php"); - $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php"); - $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php"); - $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php"); - $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php"); + $tab_array[] = array("System", false, "diag_logs.php"); + $tab_array[] = array("Firewall", true, "diag_logs_filter.php"); + $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php"); + $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php"); + $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php"); + $tab_array[] = array("PPP", false, "diag_logs_ppp.php"); + $tab_array[] = array("VPN", false, "diag_logs_vpn.php"); + $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php"); + $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php"); + $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php"); + $tab_array[] = array("Settings", false, "diag_logs_settings.php"); display_top_tabs($tab_array); ?> </td></tr> @@ -117,7 +117,7 @@ include("head.inc"); <div id="mainarea"> <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="6" align="left"> - <?=gettext("Normal View");?> | <a href="diag_logs_filter_dynamic.php"><?=gettext("Dynamic View");?></a> | <a href="diag_logs_filter_summary.php"><?=gettext("Summary View");?></a><br/><br/> + Normal View | <a href="diag_logs_filter_dynamic.php">Dynamic View</a> | <a href="diag_logs_filter_summary.php">Summary View</a><br/><br/> </td></tr> <?php if (!isset($config['syslog']['rawfilter'])): $filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 100, $filtertext); @@ -125,19 +125,19 @@ include("head.inc"); <tr> <td colspan="6" class="listtopic"> <?php if (!$filtertext) { ?> - <?php printf(gettext("Last %s firewall log entries."),count($filterlog));?> + Last <?php echo count($filterlog);?> firewall log entries. <?php } else { ?> - <?php echo count($filterlog). ' ' . gettext("matched log entries."); ?> + <?php echo count($filterlog);?> matched log entries. <?php } ?> - <?php printf(gettext("Max(%s)"),$nentries);?> + (Max <?php echo $nentries;?>) </tr> <tr> - <td width="10%" class="listhdrr"><?=gettext("Act");?></td> - <td width="10%" class="listhdrr"><?=gettext("Time");?></td> - <td width="15%" class="listhdrr"><?=gettext("If");?></td> - <td width="25%" class="listhdrr"><?=gettext("Source");?></td> - <td width="25%" class="listhdrr"><?=gettext("Destination");?></td> - <td width="15%" class="listhdrr"><?=gettext("Proto");?></td> + <td width="10%" class="listhdrr">Act</td> + <td width="10%" class="listhdrr">Time</td> + <td width="15%" class="listhdrr">If</td> + <td width="25%" class="listhdrr">Source</td> + <td width="25%" class="listhdrr">Destination</td> + <td width="15%" class="listhdrr">Proto</td> </tr><?php foreach ($filterlog as $filterent): ?> <tr> <td class="listlr" nowrap align="middle"> @@ -155,13 +155,13 @@ include("head.inc"); $dststr = $filterent['dstip'] . get_port_with_service($filterent['dstport'], $proto); ?> <td class="listr" nowrap> - <a href="diag_dns.php?host=<?php echo $filterent['srcip']; ?>" title="<?=gettext("Reverse Resolve with DNS");?>"><img border="0" src="/themes/nervecenter/images/icons/icon_log.gif"></a> - <a href="easyrule.php?<?php echo "action=block&int={$int}&src={$filterent['srcip']}"; ?>" title="<?=gettext("Easy Rule: Add to Block List");?>" onclick="return confirm('<?=gettext("Do you really want to add this BLOCK rule?")."\n\n".gettext("Easy Rule is still experimental.")."\n".gettext("Continue at risk of your own peril.")."\n".gettext("Backups are also nice.")?>')"><img border="0" src="/themes/nervecenter/images/icons/icon_block_add.gif"></a> + <a href="diag_dns.php?host=<?php echo $filterent['srcip']; ?>" title="Reverse Resolve with DNS"><img border="0" src="/themes/nervecenter/images/icons/icon_log.gif"></a> + <a href="easyrule.php?<?php echo "action=block&int={$int}&src={$filterent['srcip']}"; ?>" title="Easy Rule: Add to Block List" onclick="return confirm('Do you really want to add this BLOCK rule?\n\nEasy Rule is still experimental.\nContinue at risk of your own peril.\nBackups are also nice.')"><img border="0" src="/themes/nervecenter/images/icons/icon_block_add.gif"></a> <?php echo $srcstr;?> </td> <td class="listr" nowrap> - <a href="diag_dns.php?host=<?php echo $filterent['dstip']; ?>" title="<?=gettext("Reverse Resolve with DNS");?>"><img border="0" src="/themes/nervecenter/images/icons/icon_log.gif"></a> - <a href="easyrule.php?<?php echo "action=pass&int={$int}&proto={$proto}&src={$filterent['srcip']}&dst={$filterent['dstip']}&dstport={$filterent['dstport']}"; ?>" title="<?=gettext("Easy Rule: Pass this traffic");?>" onclick="return confirm('<?=gettext("Do you really want to add this PASS rule?")."\n\n".gettext("Easy Rule is still experimental.")."\n".gettext("Continue at risk of your own peril.")."\n".gettext("Backups are also nice.");?>')"><img border="0" src="/themes/nervecenter/images/icons/icon_pass_add.gif"></a> + <a href="diag_dns.php?host=<?php echo $filterent['dstip']; ?>" title="Reverse Resolve with DNS"><img border="0" src="/themes/nervecenter/images/icons/icon_log.gif"></a> + <a href="easyrule.php?<?php echo "action=pass&int={$int}&proto={$proto}&src={$filterent['srcip']}&dst={$filterent['dstip']}&dstport={$filterent['dstport']}"; ?>" title="Easy Rule: Pass this traffic" onclick="return confirm('Do you really want to add this PASS rule?\n\nEasy Rule is still experimental.\nContinue at risk of your own peril.\nBackups are also nice.')"><img border="0" src="/themes/nervecenter/images/icons/icon_pass_add.gif"></a> <?php echo $dststr;?> </td> <?php @@ -173,7 +173,7 @@ include("head.inc"); <?php else: ?> <tr> <td colspan="2" class="listtopic"> - <?php printf(gettext("Last %s firewall log entries"),$nentries);?></td> + Last <?php echo $nentries;?> firewall log entries</td> </tr> <?php if($filtertext) diff --git a/usr/local/www/diag_logs_filter_dynamic.php b/usr/local/www/diag_logs_filter_dynamic.php index 52a2076..a07b52b 100755 --- a/usr/local/www/diag_logs_filter_dynamic.php +++ b/usr/local/www/diag_logs_filter_dynamic.php @@ -58,7 +58,7 @@ if ($_POST['clear']) $filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 100); -$pgtitle = array(gettext("Diagnostics"),gettext("System logs"),gettext("Firewall")); +$pgtitle = array("Diagnostics","System logs","Firewall"); include("head.inc"); ?> @@ -97,17 +97,17 @@ include("head.inc"); <tr><td> <?php $tab_array = array(); - $tab_array[] = array(gettext("System"), false, "diag_logs.php"); - $tab_array[] = array(gettext("Firewall"), true, "diag_logs_filter.php"); - $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php"); - $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php"); - $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php"); - $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php"); - $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php"); - $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php"); - $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php"); - $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php"); - $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php"); + $tab_array[] = array("System", false, "diag_logs.php"); + $tab_array[] = array("Firewall", true, "diag_logs_filter.php"); + $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php"); + $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php"); + $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php"); + $tab_array[] = array("PPP", false, "diag_logs_ppp.php"); + $tab_array[] = array("VPN", false, "diag_logs_vpn.php"); + $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php"); + $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php"); + $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php"); + $tab_array[] = array("Settings", false, "diag_logs_settings.php"); display_top_tabs($tab_array); ?> </td></tr> @@ -115,19 +115,19 @@ include("head.inc"); <td> <div id="mainarea"> <div class="tabcont"> - <a href="diag_logs_filter.php"><?=gettext("Normal View");?></a> | <?=gettext("Dynamic View");?> | <a href="diag_logs_filter_summary.php"><?=gettext("Summary View");?></a> + <a href="diag_logs_filter.php">Normal View</a> | Dynamic View | <a href="diag_logs_filter_summary.php">Summary View</a> </div> <div class="listtopic"> - <?php printf(gettext("Last %s records"),$nentries);?>; <?=gettext("Pause");?>:<input valign="middle" type="checkbox" onClick="javascript:toggle_pause();"> + Last <?php echo $nentries; ?> records; Pause:<input valign="middle" type="checkbox" onClick="javascript:toggle_pause();"> </div> <div id="log"> <div class="log-header"> - <span class="log-action"><?=gettext("Act");?></span> - <span class="log-time"><?=gettext("Time");?></span> - <span class="log-interface"><?=gettext("If");?></span> - <span class="log-source"><?=gettext("Source");?></span> - <span class="log-destination"><?=gettext("Destination");?></span> - <span class="log-protocol"><?=gettext("Proto");?></span> + <span class="log-action">Act</span> + <span class="log-time">Time</span> + <span class="log-interface">If</span> + <span class="log-source">Source</span> + <span class="log-destination">Destination</span> + <span class="log-protocol">Proto</span> </div> <?php $counter=0; foreach ($filterlog as $filterent): ?> <div class="log-entry"<?php echo is_first_row($counter, count($filterlog)); ?>> diff --git a/usr/local/www/diag_logs_filter_summary.php b/usr/local/www/diag_logs_filter_summary.php index 1171b89..4904127 100644 --- a/usr/local/www/diag_logs_filter_summary.php +++ b/usr/local/www/diag_logs_filter_summary.php @@ -31,7 +31,7 @@ pfSense_MODULE: filter */ -$pgtitle = gettext("Diagnostics").": ".gettext("System logs").": ".gettext("Firewall Log Summary"); +$pgtitle = "Diagnostics: System logs: Firewall Log Summary"; require_once("guiconfig.inc"); include_once("filter_log.inc"); @@ -42,13 +42,13 @@ $entriesperblock = 5; $filterlog = conv_log_filter($filter_logfile, $lines, $lines); $gotlines = count($filterlog); $fields = array( - 'act' => gettext("Actions"), - 'interface' => gettext("Interfaces"), - 'proto' => gettext("Protocols"), - 'srcip' => gettext("Source IPs"), - 'dstip' => gettext("Destination IPs"), - 'srcport' => gettext("Source Ports"), - 'dstport' => gettext("Destination Ports")); + 'act' => "Actions", + 'interface' => "Interfaces", + 'proto' => "Protocols", + 'srcip' => "Source IPs", + 'dstip' => "Destination IPs", + 'srcport' => "Source Ports", + 'dstport' => "Destination Ports"); $summary = array(); foreach (array_keys($fields) as $f) { @@ -68,7 +68,7 @@ function stat_block($summary, $stat, $num) { global $gotlines, $fields; uasort($summary[$stat] , 'cmp'); print '<table width="200px" cellpadding="3" cellspacing="0" border="1">'; - print "<tr><th colspan='2'>{$fields[$stat]} ".gettext("data")."</th></tr>"; + print "<tr><th colspan='2'>{$fields[$stat]} data</th></tr>"; $k = array_keys($summary[$stat]); $total = 0; $numentries = 0; @@ -78,7 +78,7 @@ function stat_block($summary, $stat, $num) { $numentries++; $outstr = $k[$i]; if (is_ipaddr($outstr)) { - $outstr = "<a href=\"diag_dns.php?host={$outstr}\" title=\"".gettext("Reverse Resolve with DNS")."\"><img border=\"0\" src=\"/themes/nervecenter/images/icons/icon_log.gif\"></a> {$outstr}"; + $outstr = "<a href=\"diag_dns.php?host={$outstr}\" title=\"Reverse Resolve with DNS\"><img border=\"0\" src=\"/themes/nervecenter/images/icons/icon_log.gif\"></a> {$outstr}"; } elseif (substr_count($outstr, '/') == 1) { list($proto, $port) = explode('/', $outstr); $service = getservbyport($port, strtolower($proto)); @@ -181,17 +181,17 @@ include("head.inc"); ?> <tr><td> <?php $tab_array = array(); - $tab_array[] = array(gettext("System"), false, "diag_logs.php"); - $tab_array[] = array(gettext("Firewall"), true, "diag_logs_filter.php"); - $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php"); - $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php"); - $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php"); - $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php"); - $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php"); - $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php"); - $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php"); - $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php"); - $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php"); + $tab_array[] = array("System", false, "diag_logs.php"); + $tab_array[] = array("Firewall", true, "diag_logs_filter.php"); + $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php"); + $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php"); + $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php"); + $tab_array[] = array("PPP", false, "diag_logs_ppp.php"); + $tab_array[] = array("VPN", false, "diag_logs_vpn.php"); + $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php"); + $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php"); + $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php"); + $tab_array[] = array("Settings", false, "diag_logs_settings.php"); display_top_tabs($tab_array); ?> </td></tr> @@ -200,12 +200,12 @@ include("head.inc"); ?> <div id="mainarea"> <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" align="center"> <tr><td colspan="6" align="left"> - <a href="diag_logs_filter.php"><?=gettext("Normal View");?></a> | <a href="diag_logs_filter_dynamic.php"><?=gettext("Dynamic View");?></a> | <?=gettext("Summary View");?><br/><br/> + <a href="diag_logs_filter.php">Normal View</a> | <a href="diag_logs_filter_dynamic.php">Dynamic View</a> | Summary View<br/><br/> </td></tr> <tr><td align="center"> -<?php printf (gettext("This is a firewall log summary, of the last %s lines of the firewall log (Max %s)."), $gotlines, $lines)?><br /> -<?=gettext("NOTE: IE8 users must enable compatibility view.")?> +This is a firewall log summary, of the last <?php echo $gotlines; ?> lines of the firewall log (Max <?php echo $lines; ?>).<br /> +NOTE: IE8 users must enable compatibility view. <?php foreach(array_keys($fields) as $field) { diff --git a/usr/local/www/diag_logs_ipsec.php b/usr/local/www/diag_logs_ipsec.php index 9de5494..039193b 100755 --- a/usr/local/www/diag_logs_ipsec.php +++ b/usr/local/www/diag_logs_ipsec.php @@ -73,7 +73,7 @@ if ($_POST['clear']) $ipsec_logarr = return_clog($ipsec_logfile, $nentries); -$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("IPsec VPN")); +$pgtitle = array("Status","System logs","IPsec VPN"); include("head.inc"); ?> @@ -84,17 +84,17 @@ include("head.inc"); <td> <?php $tab_array = array(); - $tab_array[] = array(gettext("System"), false, "diag_logs.php"); - $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php"); - $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php"); - $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php"); - $tab_array[] = array(gettext("IPsec"), true, "diag_logs_ipsec.php"); - $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php"); - $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php"); - $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php"); - $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php"); - $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php"); - $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php"); + $tab_array[] = array("System", false, "diag_logs.php"); + $tab_array[] = array("Firewall", false, "diag_logs_filter.php"); + $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php"); + $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php"); + $tab_array[] = array("IPsec", true, "diag_logs_ipsec.php"); + $tab_array[] = array("PPP", false, "diag_logs_ppp.php"); + $tab_array[] = array("VPN", false, "diag_logs_vpn.php"); + $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php"); + $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php"); + $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php"); + $tab_array[] = array("Settings", false, "diag_logs_settings.php"); display_top_tabs($tab_array); ?> </td> @@ -104,7 +104,7 @@ include("head.inc"); <div id="mainarea"> <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> - <td colspan="2" class="listtopic"><?php printf(gettext("Last %s IPsec log entries"),$nentries);?></td> + <td colspan="2" class="listtopic">Last <?=$nentries;?> IPsec log entries</td> </tr> <?php foreach($ipsec_logarr as $logent){ @@ -116,7 +116,7 @@ include("head.inc"); $logent = preg_replace($search, $replace, $logent); } else { $searchs = "/(racoon: )([A-Z:].*?)([0-9].+\.[0-9].+.[0-9].+.[0-9].+\[[0-9].+\])(.*)/i"; - $replaces = "$1<strong><font color=red>[".gettext("Unknown Gateway/Dynamic")."]</font></strong>: $2$3$4"; + $replaces = "$1<strong><font color=red>[Unknown Gateway/Dynamic]</font></strong>: $2$3$4"; $logent = preg_replace($searchs, $replaces, $logent); } $logent = preg_split("/\s+/", $logent, 6); diff --git a/usr/local/www/diag_logs_ntpd.php b/usr/local/www/diag_logs_ntpd.php index 588c0e2..d168f70 100644 --- a/usr/local/www/diag_logs_ntpd.php +++ b/usr/local/www/diag_logs_ntpd.php @@ -51,7 +51,7 @@ if (!$nentries) if ($_POST['clear']) clear_log_file($ntpd_logfile); -$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("OpenNTPD")); +$pgtitle = array("Status","System logs","OpenNTPD"); include("head.inc"); ?> @@ -62,17 +62,17 @@ include("head.inc"); <tr><td> <?php $tab_array = array(); - $tab_array[] = array(gettext("System"), false, "diag_logs.php"); - $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php"); - $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php"); - $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php"); - $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php"); - $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php"); - $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php"); - $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php"); - $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php"); - $tab_array[] = array(gettext("OpenNTPD"), true, "diag_logs_ntpd.php"); - $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php"); + $tab_array[] = array("System", false, "diag_logs.php"); + $tab_array[] = array("Firewall", false, "diag_logs_filter.php"); + $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php"); + $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php"); + $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php"); + $tab_array[] = array("PPP", false, "diag_logs_ppp.php"); + $tab_array[] = array("VPN", false, "diag_logs_vpn.php"); + $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php"); + $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php"); + $tab_array[] = array("OpenNTPD", true, "diag_logs_ntpd.php"); + $tab_array[] = array("Settings", false, "diag_logs_settings.php"); display_top_tabs($tab_array); ?> </td></tr> @@ -82,7 +82,7 @@ include("head.inc"); <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2" class="listtopic"> - <?php printf(gettext("Last %s OpenNTPD log entries"), $nentries);?></td> + Last <?=$nentries;?> OpenNTPD log entries</td> </tr> <?php dump_clog($ntpd_logfile, $nentries); ?> <tr><td><br> diff --git a/usr/local/www/diag_logs_openvpn.php b/usr/local/www/diag_logs_openvpn.php index f052ad9..aa50856 100644 --- a/usr/local/www/diag_logs_openvpn.php +++ b/usr/local/www/diag_logs_openvpn.php @@ -42,7 +42,7 @@ ##|*MATCH=diag_logs_openvpn.php* ##|-PRIV -$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("OpenVPN")); +$pgtitle = array("Status","System logs","OpenVPN"); require("guiconfig.inc"); require_once("vpn.inc"); @@ -66,17 +66,17 @@ include("head.inc"); <td> <?php $tab_array = array(); - $tab_array[] = array(gettext("System"), false, "diag_logs.php"); - $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php"); - $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php"); - $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php"); - $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php"); - $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php"); - $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php"); - $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php"); - $tab_array[] = array(gettext("OpenVPN"), true, "diag_logs_openvpn.php"); - $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php"); - $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php"); + $tab_array[] = array("System", false, "diag_logs.php"); + $tab_array[] = array("Firewall", false, "diag_logs_filter.php"); + $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php"); + $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php"); + $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php"); + $tab_array[] = array("PPP", false, "diag_logs_ppp.php"); + $tab_array[] = array("VPN", false, "diag_logs_vpn.php"); + $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php"); + $tab_array[] = array("OpenVPN", true, "diag_logs_openvpn.php"); + $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php"); + $tab_array[] = array("Settings", false, "diag_logs_settings.php"); display_top_tabs($tab_array); ?> </td> @@ -86,7 +86,7 @@ include("head.inc"); <div id="mainarea"> <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> - <td colspan="2" class="listtopic"><?php printf(gettext("Last %s OpenVPN log entries"),$nentries)?></td> + <td colspan="2" class="listtopic">Last <?=$nentries;?> OpenVPN log entries</td> </tr> <?php dump_clog($openvpn_logfile, $nentries); ?> <tr> diff --git a/usr/local/www/diag_logs_ppp.php b/usr/local/www/diag_logs_ppp.php index 52eb40b..470d33d 100755 --- a/usr/local/www/diag_logs_ppp.php +++ b/usr/local/www/diag_logs_ppp.php @@ -56,7 +56,7 @@ if ($_POST['clear']) $ppp_logarr = return_clog($ppp_logfile, $nentries); -$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("PPP")); +$pgtitle = array("Status","System logs","PPP"); include("head.inc"); ?> @@ -67,17 +67,17 @@ include("head.inc"); <td> <?php $tab_array = array(); - $tab_array[] = array(gettext("System"), false, "diag_logs.php"); - $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php"); - $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php"); - $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php"); - $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php"); - $tab_array[] = array(gettext("PPP"), true, "diag_logs_ppp.php"); - $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php"); - $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php"); - $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php"); - $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php"); - $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php"); + $tab_array[] = array("System", false, "diag_logs.php"); + $tab_array[] = array("Firewall", false, "diag_logs_filter.php"); + $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php"); + $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php"); + $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php"); + $tab_array[] = array("PPP", true, "diag_logs_ppp.php"); + $tab_array[] = array("VPN", false, "diag_logs_vpn.php"); + $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php"); + $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php"); + $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php"); + $tab_array[] = array("Settings", false, "diag_logs_settings.php"); display_top_tabs($tab_array); ?> </td> @@ -87,7 +87,7 @@ include("head.inc"); <div id="mainarea"> <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> - <td colspan="2" class="listtopic"><?php printf (gettext("Last <?=$nentries;?> PPP log entries"),$nentries);?></td> + <td colspan="2" class="listtopic">Last <?=$nentries;?> PPP log entries</td> </tr> <?php foreach($ppp_logarr as $logent){ @@ -95,7 +95,7 @@ include("head.inc"); $logent = preg_replace($search, $replace, $logent); } else { $searchs = "/(racoon: )([A-Z:].*?)([0-9].+\.[0-9].+.[0-9].+.[0-9].+\[[0-9].+\])(.*)/i"; - $replaces = "$1<strong><font color=red>[".gettext("Unknown Gateway/Dynamic")."]</font></strong>: $2$3$4"; + $replaces = "$1<strong><font color=red>[Unknown Gateway/Dynamic]</font></strong>: $2$3$4"; $logent = preg_replace($searchs, $replaces, $logent); } $logent = preg_split("/\s+/", $logent, 6); diff --git a/usr/local/www/diag_logs_relayd.php b/usr/local/www/diag_logs_relayd.php index 8ce35b8..f267c74 100755 --- a/usr/local/www/diag_logs_relayd.php +++ b/usr/local/www/diag_logs_relayd.php @@ -52,7 +52,7 @@ if (!$nentries) if ($_POST['clear']) clear_log_file($relayd_logfile); -$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Load Balancer")); +$pgtitle = array("Status","System logs","Load Balancer"); include("head.inc"); ?> @@ -63,17 +63,17 @@ include("head.inc"); <tr><td> <?php $tab_array = array(); - $tab_array[] = array(gettext("System"), false, "diag_logs.php"); - $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php"); - $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php"); - $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php"); - $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php"); - $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php"); - $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php"); - $tab_array[] = array(gettext("Load Balancer"), true, "diag_logs_relayd.php"); - $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php"); - $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php"); - $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php"); + $tab_array[] = array("System", false, "diag_logs.php"); + $tab_array[] = array("Firewall", false, "diag_logs_filter.php"); + $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php"); + $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php"); + $tab_array[] = array("PPP", false, "diag_logs_ppp.php"); + $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php"); + $tab_array[] = array("VPN", false, "diag_logs_vpn.php"); + $tab_array[] = array("Load Balancer", true, "diag_logs_relayd.php"); + $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php"); + $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php"); + $tab_array[] = array("Settings", false, "diag_logs_settings.php"); display_top_tabs($tab_array); ?> </td></tr> @@ -83,7 +83,7 @@ include("head.inc"); <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2" class="listtopic"> - <?php printf(gettext("Last %s Load Balancer log entries"),$nentries);?></td> + Last <?=$nentries;?> Load Balancer log entries</td> </tr> <?php dump_clog($relayd_logfile, $nentries); ?> <tr><td><br><form action="diag_logs_relayd.php" method="post"> diff --git a/usr/local/www/diag_logs_settings.php b/usr/local/www/diag_logs_settings.php index b86da2c..f2b7861 100755 --- a/usr/local/www/diag_logs_settings.php +++ b/usr/local/www/diag_logs_settings.php @@ -73,20 +73,20 @@ if ($_POST) { /* input validation */ if ($_POST['enable'] && !is_ipaddr($_POST['remoteserver'])) { - $input_errors[] = gettext("A valid IP address must be specified for remote syslog server #1."); + $input_errors[] = "A valid IP address must be specified for remote syslog server #1."; } if ($_POST['enable'] && $_POST['remoteserver2'] && !is_ipaddr($_POST['remoteserver2'])) { - $input_errors[] = gettext("A valid IP address must be specified for remote syslog server #2."); + $input_errors[] = "A valid IP address must be specified for remote syslog server #2."; } if ($_POST['enable'] && $_POST['remoteserver3'] && !is_ipaddr($_POST['remoteserver3'])) { - $input_errors[] = gettext("A valid IP address must be specified for remote syslog server #3."); + $input_errors[] = "A valid IP address must be specified for remote syslog server #3."; } if ($_POST['enable'] && !is_ipaddr($_POST['remoteserver'])) { - $input_errors[] = gettext("A valid IP address must be specified."); + $input_errors[] = "A valid IP address must be specified."; } if (($_POST['nentries'] < 5) || ($_POST['nentries'] > 2000)) { - $input_errors[] = gettext("Number of log entries to show must be between 5 and 2000."); + $input_errors[] = "Number of log entries to show must be between 5 and 2000."; } if (!$input_errors) { @@ -123,7 +123,7 @@ if ($_POST) { } } -$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("Settings")); +$pgtitle = array("Status","System logs","Settings"); include("head.inc"); ?> @@ -166,17 +166,17 @@ function enable_change(enable_over) { <tr><td> <?php $tab_array = array(); - $tab_array[] = array(gettext("System"), false, "diag_logs.php"); - $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php"); - $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php"); - $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php"); - $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php"); - $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php"); - $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php"); - $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php"); - $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php"); - $tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php"); - $tab_array[] = array(gettext("Settings"), true, "diag_logs_settings.php"); + $tab_array[] = array("System", false, "diag_logs.php"); + $tab_array[] = array("Firewall", false, "diag_logs_filter.php"); + $tab_array[] = array("DHCP", false, "diag_logs_dhcp.php"); + $tab_array[] = array("Portal Auth", false, "diag_logs_auth.php"); + $tab_array[] = array("IPsec", false, "diag_logs_ipsec.php"); + $tab_array[] = array("PPP", false, "diag_logs_ppp.php"); + $tab_array[] = array("VPN", false, "diag_logs_vpn.php"); + $tab_array[] = array("Load Balancer", false, "diag_logs_relayd.php"); + $tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php"); + $tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php"); + $tab_array[] = array("Settings", true, "diag_logs_settings.php"); display_top_tabs($tab_array); ?> </td></tr> @@ -187,44 +187,46 @@ function enable_change(enable_over) { <tr> <td width="22%" valign="top" class="vtable"> </td> <td width="78%" class="vtable"> <input name="reverse" type="checkbox" id="reverse" value="yes" <?php if ($pconfig['reverse']) echo "checked"; ?>> - <strong><?=gettext("Show log entries in reverse order (newest entries on top)");?></strong></td> + <strong>Show log entries in reverse order (newest entries + on top)</strong></td> </tr> <tr> <td width="22%" valign="top" class="vtable"> </td> - <td width="78%" class="vtable"><?=gettext("Number of log entries to show") . ":"?> + <td width="78%" class="vtable">Number of log entries to + show: <input name="nentries" id="nentries" type="text" class="formfld unknown" size="4" value="<?=htmlspecialchars($pconfig['nentries']);?>"></td> </tr> <tr> <td valign="top" class="vtable"> </td> <td class="vtable"> <input name="logdefaultblock" type="checkbox" id="logdefaultblock" value="yes" <?php if ($pconfig['logdefaultblock']) echo "checked"; ?>> - <strong><?=gettext("Log packets blocked by the default rule");?></strong><br> - <?=gettext("Hint: packets that are blocked by the " . - "implicit default block rule will not be logged anymore " . - "if you uncheck this option. Per-rule logging options are not affected.");?></td> + <strong>Log packets blocked by the default rule</strong><br> + Hint: packets that are blocked by the + implicit default block rule will not be logged anymore + if you uncheck this option. Per-rule logging options are not affected.</td> </tr> <tr> <td valign="top" class="vtable"> </td> <td class="vtable"> <input name="rawfilter" type="checkbox" id="rawfilter" value="yes" <?php if ($pconfig['rawfilter']) echo "checked"; ?>> - <strong><?=gettext("Show raw filter logs");?></strong><br> - <?=gettext("Hint: If this is checked, filter logs are shown as generated by the packet filter, without any formatting. This will reveal more detailed information.");?></td> + <strong>Show raw filter logs</strong><br> + Hint: If this is checked, filter logs are shown as generated by the packet filter, without any formatting. This will reveal more detailed information. </td> </tr> <tr> <td width="22%" valign="top" class="vtable"> </td> <td width="78%" class="vtable"> <input name="disablelocallogging" type="checkbox" id="disablelocallogging" value="yes" <?php if ($pconfig['disablelocallogging']) echo "checked"; ?> onClick="enable_change(false)"> - <strong><?=gettext("Disable writing log files to the local RAM disk");?></strong></td> + <strong>Disable writing log files to the local RAM disk</strong></td> </tr> <tr> <td width="22%" valign="top" class="vtable"> </td> <td width="78%" class="vtable"> <input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(false)"> - <strong><?=gettext("Enable syslog'ing to remote syslog server");?></strong></td> + <strong>Enable syslog'ing to remote syslog server</strong></td> </tr> <tr> - <td width="22%" valign="top" class="vncell"><?=gettext("Remote syslog servers");?></td> + <td width="22%" valign="top" class="vncell">Remote syslog servers</td> <td width="78%" class="vtable"> <table> <tr> <td> - <?=gettext("Server") . " 1";?> + Server 1 </td> <td> <input name="remoteserver" id="remoteserver" type="text" class="formfld host" size="20" value="<?=htmlspecialchars($pconfig['remoteserver']);?>"> @@ -232,7 +234,7 @@ function enable_change(enable_over) { </tr> <tr> <td> - <?=gettext("Server") . " 2";?> + Server 2 </td> <td> <input name="remoteserver2" id="remoteserver2" type="text" class="formfld host" size="20" value="<?=htmlspecialchars($pconfig['remoteserver2']);?>"> @@ -240,7 +242,7 @@ function enable_change(enable_over) { </tr> <tr> <td> - <?=gettext("Server") . " 3";?> + Server 3 </td> <td> <input name="remoteserver3" id="remoteserver3" type="text" class="formfld host" size="20" value="<?=htmlspecialchars($pconfig['remoteserver3']);?>"> @@ -251,17 +253,17 @@ function enable_change(enable_over) { </td> <td> - <?=gettext("IP addresses of remote syslog servers");?> + IP addresses of remote syslog servers </td> </table> <input name="system" id="system" type="checkbox" value="yes" onclick="enable_change(false)" <?php if ($pconfig['system']) echo "checked"; ?>> - <?=gettext("system events");?><br> <input name="filter" id="filter" type="checkbox" value="yes" <?php if ($pconfig['filter']) echo "checked"; ?>> - <?=gettext("firewall events");?><br> <input name="dhcp" id="dhcp" type="checkbox" value="yes" <?php if ($pconfig['dhcp']) echo "checked"; ?>> - <?=gettext("DHCP service events");?><br> <input name="portalauth" id="portalauth" type="checkbox" value="yes" <?php if ($pconfig['portalauth']) echo "checked"; ?>> - <?=gettext("Portal Auth");?><br> <input name="vpn" id="vpn" type="checkbox" value="yes" <?php if ($pconfig['vpn']) echo "checked"; ?>> - <?=gettext("PPTP VPN events");?> + system events <br> <input name="filter" id="filter" type="checkbox" value="yes" <?php if ($pconfig['filter']) echo "checked"; ?>> + firewall events<br> <input name="dhcp" id="dhcp" type="checkbox" value="yes" <?php if ($pconfig['dhcp']) echo "checked"; ?>> + DHCP service events<br> <input name="portalauth" id="portalauth" type="checkbox" value="yes" <?php if ($pconfig['portalauth']) echo "checked"; ?>> + Portal Auth<br> <input name="vpn" id="vpn" type="checkbox" value="yes" <?php if ($pconfig['vpn']) echo "checked"; ?>> + PPTP VPN events <br> <input name="logall" id="logall" type="checkbox" value="yes" <?php if ($pconfig['logall']) echo "checked"; ?>> - <?=gettext("Everything");?> + Everything </td> </tr> <tr> @@ -271,10 +273,10 @@ function enable_change(enable_over) { </tr> <tr> <td width="22%" height="53" valign="top"> </td> - <td width="78%"><strong><span class="red"><?=gettext("Note") . ":"?></span></strong><br> - <?=gettext("syslog sends UDP datagrams to port 514 on the specified " . - "remote syslog server. Be sure to set syslogd on the " . - "remote server to accept syslog messages from");?> <?=$g['product_name']?>. + <td width="78%"><strong><span class="red">Note:</span></strong><br> + syslog sends UDP datagrams to port 514 on the specified + remote syslog server. Be sure to set syslogd on the + remote server to accept syslog messages from <?=$g['product_name']?>. </td> </tr> </table> diff --git a/usr/local/www/diag_nanobsd.php b/usr/local/www/diag_nanobsd.php index 3409a34..3e9bed1 100755 --- a/usr/local/www/diag_nanobsd.php +++ b/usr/local/www/diag_nanobsd.php @@ -46,7 +46,7 @@ ini_set('max_input_time', '9999'); require_once("guiconfig.inc"); require_once("config.inc"); -$pgtitle = array(gettext("Diagnostics"), gettext("NanoBSD")); +$pgtitle = array("Diagnostics","NanoBSD"); include("head.inc"); // Survey slice info @@ -70,12 +70,12 @@ if($_POST['bootslice']) { echo <<<EOF <div id="loading"> <img src="/themes/metallic/images/misc/loader.gif"> - gettext("Setting slice information, please wait...") + Setting slice information, please wait... <p/> </div> EOF; nanobsd_switch_boot_slice(); - $savemsg = gettext("The boot slice has been set to") . " " . nanobsd_get_active_slice(); + $savemsg = "The boot slice has been set to " . nanobsd_get_active_slice(); // Survey slice info nanobsd_detect_slice_info(); @@ -85,14 +85,14 @@ if($_POST['destslice']) { echo <<<EOF <div id="loading"> <img src="/themes/metallic/images/misc/loader.gif"> - gettext("Duplicating slice. Please wait, this will take a moment...") + Duplicating slice. Please wait, this will take a moment... <p/> </div> EOF; if(nanobsd_clone_slice($_POST['destslice'])) { - $savemsg = gettext("The slice has been duplicated.") . "<p/>" . gettext("If you would like to boot from this newly duplicated slice please set it using the bootup information area."); + $savemsg = "The slice has been duplicated.<p/>If you would like to boot from this newly duplicated slice please set it using the bootup information area."; } else { - $savemsg = gettext("There was an error while duplicating the slice. Operation aborted."); + $savemsg = "There was an error while duplicating the slice. Operation aborted."; } // Re-Survey slice info nanobsd_detect_slice_info(); @@ -113,28 +113,28 @@ if ($savemsg) <div class="tabcont"> <span class="vexpl"> <span class="red"> - <strong><?=gettext("NOTE") . ":"?> </strong> + <strong>NOTE: </strong> </span> - <?=gettext("The options on this page are intended for use by advanced users only.")?> + The options on this page are intended for use by advanced users only. <br/> </span> <p/> <table width="100%" border="0" cellpadding="6" cellspacing="0"> <tr> - <td colspan="2" valign="top" class="listtopic"><?=gettext("Bootup information");?></td> + <td colspan="2" valign="top" class="listtopic">Bootup information</td> </tr> <tr> - <td width="22%" valign="top" class="vncell"><?=gettext("NanoBSD Image size");?></td> + <td width="22%" valign="top" class="vncell">NanoBSD Image size</td> <td width="78%" class="vtable"> <?php echo $NANOBSD_SIZE; ?> </td> </tr> <tr> - <td width="22%" valign="top" class="vncell"><?=gettext("Bootup");?></td> + <td width="22%" valign="top" class="vncell">Bootup</td> <td width="78%" class="vtable"> <form action="diag_nanobsd.php" method="post" name="iform"> - <?=gettext("Bootup slice is currently");?>: <?php echo $ACTIVE_SLICE; ?> - <br/><br/><?=gettext("This will switch the bootup slice to the alternate slice.");?> + Bootup slice is currently: <?php echo $ACTIVE_SLICE; ?> + <br/><br/>This will switch the bootup slice to the alternate slice. <br/> <input type='hidden' name='bootslice' value='switch'> <input type='submit' value='Switch Slice'></form> @@ -144,20 +144,20 @@ if ($savemsg) <td colspan="2" valign="top" class=""> </td> </tr> <tr> - <td colspan="2" valign="top" class="listtopic"><?=gettext("Duplicate bootup slice to alternate");?></td> + <td colspan="2" valign="top" class="listtopic">Duplicate bootup slice to alternate</td> </tr> <tr> - <td width="22%" valign="top" class="vncell"><?=gettext("Duplicate bootup slice");?></td> + <td width="22%" valign="top" class="vncell">Duplicate bootup slice</td> <td width="78%" class="vtable"> <form action="diag_nanobsd.php" method="post" name="iform"> - <?=gettext("Destination slice");?>: + Destination slice: <select name='destslice'> <option value='<?php echo $COMPLETE_PATH; ?>'> <?php echo "{$COMPLETE_BOOT_PATH} -> {$TOFLASH}"; ?> </option> </select> <br/> - <?=gettext("This will duplicate the bootup slice to the alternate slice. Use this if you would like to duplicate the known good working boot partition to the alternate.");?> + This will duplicate the bootup slice to the alternate slice. Use this if you would like to duplicate the known good working boot partition to the alternate. </td> </tr> <tr> @@ -168,10 +168,10 @@ if ($savemsg) <td colspan="2" valign="top" class=""> </td> </tr> <tr> - <td colspan="2" valign="top" class="listtopic"><?=gettext("View upgrade log");?></td> + <td colspan="2" valign="top" class="listtopic">View upgrade log</td> </tr> <tr> - <td width="22%" valign="top" class="vncell"><?=gettext("View previous upgrade log");?></td> + <td width="22%" valign="top" class="vncell">View previous upgrade log</td> <td width="78%" class="vtable"> <?php if($_POST['viewupgradelog']) { diff --git a/usr/local/www/diag_overload_tables.php b/usr/local/www/diag_overload_tables.php index 4bb470d..235e868 100644 --- a/usr/local/www/diag_overload_tables.php +++ b/usr/local/www/diag_overload_tables.php @@ -41,7 +41,7 @@ ##|*MATCH=diag_overload_tables.php* ##|-PRIV -$pgtitle = array(gettext("Diagnostics"), gettext("Overload tables")); +$pgtitle = array("Diagnostics", "Overload tables"); require_once("guiconfig.inc"); @@ -96,7 +96,7 @@ include("fbegin.inc"); } </script> -<?=gettext("Table");?>: +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 @@ include("fbegin.inc"); <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> - <td class="listhdrr"><?=gettext("IP Address");?></td> + <td class="listhdrr">IP Address</td> </tr> <?php $count = 0; foreach($entries as $entryA): ?> <?php $entry = trim($entryA); ?> @@ -124,14 +124,14 @@ include("fbegin.inc"); <?php $count++; endforeach; ?> <?php if($count == 0) - echo "<tr><td>" . gettext("No entries exist in this table.") . "</td></tr>"; + echo "<tr><td>No entries exist in this table.</td></tr>"; ?> </table> <?php if($count > 0) - echo "<p/>" . gettext("Delete") . " <a href='diag_overload_tables.php?deleteall=true&type={$tablename}'>" . gettext("all") . "</a> " . gettext("entries in this table."); + echo "<p/>Delete <a href='diag_overload_tables.php?deleteall=true&type={$tablename}'>all</a> entries in this table." ?> diff --git a/usr/local/www/diag_packet_capture.php b/usr/local/www/diag_packet_capture.php index e49d969..68248ea 100644 --- a/usr/local/www/diag_packet_capture.php +++ b/usr/local/www/diag_packet_capture.php @@ -35,7 +35,7 @@ ##|*MATCH=diag_packet_capture.php* ##|-PRIV -$pgtitle = array(gettext("Diagnostics"), gettext("Packet Capture")); +$pgtitle = array("Diagnostics", "Packet Capture"); require_once("guiconfig.inc"); require_once("pfsense-utils.inc"); @@ -64,14 +64,14 @@ if ($_POST) { } if ($_POST['startbtn'] != "" ) { - $action = gettext("Start"); + $action = "Start"; //delete previous packet capture if it exists if (file_exists($fp.$fn)) unlink ($fp.$fn); } elseif ($_POST['stopbtn']!= "") { - $action = gettext("Stop"); + $action = "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,6 +95,7 @@ if ($_POST) { } else { $do_tcpdump = false; } +$pgtitle = "Diagnostics: Packet Capture"; include("head.inc"); ?> <body link="#000000" vlink="#0000CC" alink="#0000CC"> @@ -109,10 +110,10 @@ include("fbegin.inc"); <form action="diag_packet_capture.php" method="post" name="iform" id="iform"> <table width="100%" border="0" cellpadding="6" cellspacing="0"> <tr> - <td colspan="2" valign="top" class="listtopic"><?=gettext("Packet capture");?></td> + <td colspan="2" valign="top" class="listtopic">Packet capture</td> </tr> <tr> - <td width="17%" valign="top" class="vncellreq"><?=gettext("Interface");?></td> + <td width="17%" valign="top" class="vncellreq">Interface</td> <td width="83%" class="vtable"> <select name="interface"> <?php @@ -124,58 +125,56 @@ include("fbegin.inc"); </option> <?php endforeach;?> </select> - <br/><?=gettext("Select the interface the traffic will be passing through. Typically this will be the WAN interface.");?> + <br/>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"><?=gettext("Host Address");?></td> + <td width="17%" valign="top" class="vncellreq">Host Address</td> <td width="83%" class="vtable"> <input name="host" type="text" class="formfld host" id="host" size="20" value="<?=htmlspecialchars($host);?>"> - <br/><?=gettext("This value is either the Source or Destination IP address. The packet capture will look for this address in either field.");?> - <br/><?=gettext("This value can be a domain name or IP address.");?> - <br/><?=gettext("If you leave this field blank, all packets on the specified interface will be captured. ");?> + <br/>This value is either the Source or Destination IP address. The packet capture will look for this address in either field. + <br/>This value can be a domain name or IP address. + <br/>If you leave this field blank, all packets on the specified interface will be captured. </td> </tr> <tr> - <td width="17%" valign="top" class="vncellreq"><?=gettext("Port");?></td> + <td width="17%" valign="top" class="vncellreq">Port</td> <td width="83%" class="vtable"> <input name="port" type="text" class="formfld unknown" id="port" size="5" value="<?=$port;?>"> - <br/><?=gettext("The port can be either the source or destination port. The packet capture will look for this port in either field.");?> - <br/><?=gettext("Leave blank if you do not want to filter by port.");?> + <br/>The port can be either the source or destination port. The packet capture will look for this port in either field. + <br/>Leave blank if you do not want to filter by port. </td> </tr> <tr> - <td width="17%" valign="top" class="vncellreq"><?=gettext("Packet Length");?></td> + <td width="17%" valign="top" class="vncellreq">Packet Length</td> <td width="83%" class="vtable"> <input name="snaplen" type="text" class="formfld unknown" id="snaplen" size="5" value="<?=$snaplen;?>"> - <br/><?=gettext("The Packet length is the number of bytes the packet will capture for each payload. Default value is 1500.");?> + <br/>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"><?=gettext("Count");?></td> + <td width="17%" valign="top" class="vncellreq">Count</td> <td width="83%" class="vtable"> <input name="count" type="text" class="formfld unknown" id="count" size="5" value="<?=$count;?>"> - <br/><?=gettext("This is the number of packets the packet capture will grab. Default value is 100.") . "<br/>" . gettext("Enter 0 (zero) for no count limit.");?> + <br/>This is the number of packets the packet capture will grab. Default value is 100. <br/>Enter 0 (zero) for no count limit. </tr> <tr> - <td width="17%" valign="top" class="vncellreq"><?=gettext("Level of Detail");?></td> + <td width="17%" valign="top" class="vncellreq">Level of Detail</td> <td width="83%" class="vtable"> <select name="detail" type="text" class="formselect" id="detail" size="1"> - <option value="-q" <?php if ($detail == "-q") echo "selected"; ?>><?=gettext("Normal");?></option> - <option value="-v" <?php if ($detail == "-v") echo "selected"; ?>><?=gettext("Medium");?></option> - <option value="-vv" <?php if ($detail == "-vv") echo "selected"; ?>><?=gettext("High");?></option> - <option value="-vv -e" <?php if ($detail == "-vv -e") echo "selected"; ?>><?=gettext("Full");?></option> + <option value="-q" <?php if ($detail == "-q") echo "selected"; ?>>Normal</option> + <option value="-v" <?php if ($detail == "-v") echo "selected"; ?>>Medium</option> + <option value="-vv" <?php if ($detail == "-vv") echo "selected"; ?>>High</option> + <option value="-vv -e" <?php if ($detail == "-vv -e") echo "selected"; ?>>Full</option> </select> - <br/><?=gettext("This is the level of detail that will be displayed after hitting 'Stop' when the packets have been captured.") . "<br/><b>" . - gettext("Note") . ":</b> " . - gettext("This option does not affect the level of detail when downloading the packet capture.");?> + <br/>This is the level of detail that will be displayed after hitting 'Stop' when the packets have been captured. <br/><b>Note:</b> This option does not affect the level of detail when downloading the packet capture. </tr> <tr> - <td width="17%" valign="top" class="vncellreq"><?=gettext("Reverse DNS Lookup");?></td> + <td width="17%" valign="top" class="vncellreq">Reverse DNS Lookup</td> <td width="83%" class="vtable"> <input name="dnsquery" type="checkbox"<?php if($_POST['dnsquery']) echo " CHECKED"; ?>> - <br/><?=gettext("This check box will cause the packet capture to perform a reverse DNS lookup associated with all IP addresses.");?> - <br/><b><?=gettext("Note");?>: </b><?=gettext("This option can cause delays for large packet captures.");?> + <br/>This check box will cause the packet capture to perform a reverse DNS lookup associated with all IP addresses. + <br/><b>Note: </b>This option can cause delays for large packet captures. </td> </tr> <tr> @@ -191,14 +190,14 @@ include("fbegin.inc"); if ($processcheck != false) $processisrunning = true; - if (($action == gettext("Stop") or $action == "") and $processisrunning != true) - echo "<input type=\"submit\" name=\"startbtn\" value=\"" . gettext("Start") . "\"> "; + if (($action == "Stop" or $action == "") and $processisrunning != true) + echo "<input type=\"submit\" name=\"startbtn\" value=\"Start\"> "; else { - echo "<input type=\"submit\" name=\"stopbtn\" value=\"" . gettext("Stop") . "\"> "; + echo "<input type=\"submit\" name=\"stopbtn\" value=\"Stop\"> "; } if (file_exists($fp.$fn) and $processisrunning != true) { - echo "<input type=\"submit\" name=\"downloadbtn\" value=\"" . gettext("Download Capture") . "\">"; - echo " (" . gettext("The packet capture file was last updated") . ": " . date("F jS, Y g:i:s a.", filemtime($fp.$fn)) . ")"; + echo "<input type=\"submit\" name=\"downloadbtn\" value=\"Download Capture\">"; + echo " (The packet capture file was last updated: " . date("F jS, Y g:i:s a.", filemtime($fp.$fn)) . ")"; } ?> </td> @@ -208,7 +207,7 @@ include("fbegin.inc"); <?php echo "<font face='terminal' size='2'>"; if ($processisrunning == true) - echo("<strong>" . gettext("Packet Capture is running.") . "</strong><br/>"); + echo("<strong>Packet Capture is running.</strong><br/>"); if ($do_tcpdump) { @@ -235,12 +234,12 @@ include("fbegin.inc"); $selectedif = convert_friendly_interface_to_real_interface_name($selectedif); - if ($action == gettext("Start")) { - echo("<strong>" . gettext("Packet Capture is running.") . "</strong><br/>"); + if ($action == "Start") { + echo("<strong>Packet Capture is running.</strong><br/>"); mwexec_bg ("/usr/sbin/tcpdump -i $selectedif $searchcount -s $packetlength -w $fp$fn $searchhost $searchport"); } else { //action = stop - echo("<strong>" . gettext("Packet Capture stopped.") . "<br/><br/>" . gettext("Packets Captured") . ":</strong><br/>"); + echo("<strong>Packet Capture stopped. <br/><br/>Packets Captured:</strong><br/>"); ?> <textarea style="width:98%" name="code" rows="15" cols="66" wrap="off" readonly="readonly"> <?php diff --git a/usr/local/www/diag_patterns.php b/usr/local/www/diag_patterns.php index 09f5472..2e1d264 100755 --- a/usr/local/www/diag_patterns.php +++ b/usr/local/www/diag_patterns.php @@ -40,13 +40,13 @@ require("guiconfig.inc"); //Move the upload file to /usr/local/share/protocols (is_uploaded_file must use tmp_name as argument) -if (($_POST['submit'] == gettext("Upload")) && is_uploaded_file($_FILES['ulfile']['tmp_name'])) { +if (($_POST['submit'] == "Upload") && is_uploaded_file($_FILES['ulfile']['tmp_name'])) { if(fileExtension($_FILES['ulfile']['name'])) { move_uploaded_file($_FILES['ulfile']['tmp_name'], "/usr/local/share/protocols/" . $_FILES['ulfile']['name']); - $ulmsg = gettext("Uploaded file to") . " /usr/local/share/protocols/" . htmlentities($_FILES['ulfile']['name']); + $ulmsg = "Uploaded file to /usr/local/share/protocols/" . htmlentities($_FILES['ulfile']['name']); } else - $ulmsg = gettext("Warning: You must upload a file with .pat extension."); + $ulmsg = "Warning: You must upload a file with .pat extension."; } //Check if file has correct extension (.pat) @@ -55,7 +55,7 @@ function fileExtension($nameFile) { return ($format == ".pat"); } -$pgtitle = array(gettext("Diagnostics"), gettext("Add layer7 pattern")); +$pgtitle = array("Diagnostics","Add layer7 pattern"); include("head.inc"); ?> @@ -95,24 +95,24 @@ pre { </head> <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include("fbegin.inc"); ?> -<p><strong><?=gettext("You can upload new layer7 patterns to your system!");?></strong></p> +<p><strong>You can upload new layer7 patterns to your system!</strong></p> <?php if ($ulmsg) echo "<p class=\"red\"><strong>" . $ulmsg . "</strong></p>\n"; ?> <div id="niftyOutter"> <form action="diag_patterns.php" method="POST" enctype="multipart/form-data" name="frmPattern"> <table> <tr> - <td colspan="2" valign="top" class="vnsepcell"><?=gettext("Upload");?></td> + <td colspan="2" valign="top" class="vnsepcell">Upload</td> </tr> <tr> - <td align="right"><?=gettext("File to upload");?>:</td> + <td align="right">File to upload:</td> <td valign="top" class="label"> <input name="ulfile" type="file" class="formfld file" id="ulfile"> </td></tr> <tr> <td valign="top"> </td> <td valign="top" class="label"> - <input name="submit" type="submit" class="button" id="upload" value="<?=gettext("Upload");?>"></td> + <input name="submit" type="submit" class="button" id="upload" value="Upload"></td> </tr> <tr> <td colspan="2" valign="top" height="16"></td> diff --git a/usr/local/www/diag_resetstate.php b/usr/local/www/diag_resetstate.php index f56a65b..04819d0 100755 --- a/usr/local/www/diag_resetstate.php +++ b/usr/local/www/diag_resetstate.php @@ -51,11 +51,11 @@ if ($_POST) { filter_flush_state_table(); if ($savemsg) $savemsg .= " "; - $savemsg .= gettext("The state table has been flushed successfully."); + $savemsg .= "The state table has been flushed successfully."; } } -$pgtitle = array(gettext("Diagnostics"), gettext("Reset state")); +$pgtitle = array("Diagnostics","Reset state"); include("head.inc"); ?> @@ -68,8 +68,8 @@ include("head.inc"); <tr><td> <?php $tab_array = array(); - $tab_array[0] = array(gettext("States"), false, "diag_dump_states.php"); - $tab_array[1] = array(gettext("Reset States"), true, "diag_resetstate.php"); + $tab_array[0] = array("States", false, "diag_dump_states.php"); + $tab_array[1] = array("Reset States", true, "diag_resetstate.php"); display_top_tabs($tab_array); ?> </td></tr> @@ -80,27 +80,27 @@ include("head.inc"); <td width="22%" valign="top" class="vtable"> </td> <td width="78%" class="vtable"> <p> <input name="statetable" type="checkbox" id="statetable" value="yes" checked> - <strong><?= gettext("Firewall state table"); ?></strong><br> + <strong>Firewall state table</strong><br> <span class="vexpl"><br> - <?=gettext("Resetting the state tables will remove all entries from " . - "the corresponding tables. This means that all open connections " . - "will be broken and will have to be re-established. This " . - "may be necessary after making substantial changes to the " . - "firewall and/or NAT rules, especially if there are IP protocol " . - "mappings (e.g. for PPTP or IPv6) with open connections."); ?><br> + Resetting the state tables will remove all entries from + the corresponding tables. This means that all open connections + will be broken and will have to be re-established. This + may be necessary after making substantial changes to the + firewall and/or NAT rules, especially if there are IP protocol + mappings (e.g. for PPTP or IPv6) with open connections.<br> <br> - </span><span class="vexpl"><?=gettext("The firewall will normally leave " . - "the state tables intact when changing rules."); ?><br> + </span><span class="vexpl">The firewall will normally leave + the state tables intact when changing rules.<br> <br> - <?=gettext("NOTE: If you reset the firewall state table, the browser " . - "session may appear to be hung after clicking "Reset". " . - "Simply refresh the page to continue."); ?></span></p> + NOTE: If you reset the firewall state table, the browser + session may appear to be hung after clicking "Reset". + Simply refresh the page to continue.</span></p> </td> </tr> <tr> <td width="22%" valign="top"> </td> <td width="78%"> - <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Reset"); ?>"> + <input name="Submit" type="submit" class="formbtn" value="Reset"> </td> </tr> </table> diff --git a/usr/local/www/diag_routes.php b/usr/local/www/diag_routes.php index 5adc7b3..94b94fd 100644 --- a/usr/local/www/diag_routes.php +++ b/usr/local/www/diag_routes.php @@ -33,6 +33,7 @@ pfSense_BUILDER_BINARIES: /usr/bin/netstat pfSense_MODULE: routing */ + ##|+PRIV ##|*IDENT=page-diagnostics-routingtables ##|*NAME=Diagnostics: Routing tables page @@ -42,7 +43,7 @@ include('guiconfig.inc'); -$pgtitle = array(gettext("Diagnostics"),gettext("Routing tables")); +$pgtitle = array("Diagnostics","Routing tables"); include('head.inc'); @@ -55,11 +56,11 @@ include('head.inc'); <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="6"> <tr> -<td class="vncellreq" width="22%"><?=gettext("Name resolution");?></td> +<td class="vncellreq" width="22%">Name resolution</td> <td class="vtable" width="78%"> -<input type="checkbox" class="formfld" name="resolve" value="yes" <?php if ($_POST['resolve'] == 'yes') echo 'checked'; ?>><?=gettext("Enable");?></input> +<input type="checkbox" class="formfld" name="resolve" value="yes" <?php if ($_POST['resolve'] == 'yes') echo 'checked'; ?>> Enable</input> <br /> -<span class="expl"><?=gettext("Enable this to attempt to resolve names when displaying the tables.");?></span> +<span class="expl">Enable this to attempt to resolve names when displaying the tables.</span> </td> </tr> @@ -69,7 +70,7 @@ include('head.inc'); <input type="submit" class="formbtn" name="submit" value="<?=gettext("Show"); ?>" /> <br /> <br /> -<span class="vexpl"><span class="red"><strong><?=gettext("Note")?>:</strong></span><?=gettext("By enabling name resolution, the query should take a bit longer. You can stop it at"."any time by clicking the Stop button in your browser");?>.</span> +<span class="vexpl"><span class="red"><strong>Note:</strong></span> By enabling name resolution, the query should take a bit longer. You can stop it at any time by clicking the Stop button in your browser.</span> </td> </tr> diff --git a/usr/local/www/diag_system_activity.php b/usr/local/www/diag_system_activity.php index b94dc92..18e6842 100644 --- a/usr/local/www/diag_system_activity.php +++ b/usr/local/www/diag_system_activity.php @@ -43,7 +43,7 @@ require("guiconfig.inc"); $pfSversion = str_replace("\n", "", file_get_contents("/etc/version")); -$pgtitle = gettext("Diagnostics: System Activity"); +$pgtitle = "Diagnostics: System Activity"; if($_REQUEST['getactivity']) { $text = `/usr/bin/top -HS`; @@ -98,7 +98,7 @@ include("head.inc"); <table> <tr><td> <div name='cpuactivitydiv' id='cpuactivitydiv'> - <b><?=gettext("Gathering CPU activity, please wait...");?> + <b>Gathering CPU activity, please wait... </div> </td></tr> </table> diff --git a/usr/local/www/diag_system_pftop.php b/usr/local/www/diag_system_pftop.php index 4818534..9778e8a 100644 --- a/usr/local/www/diag_system_pftop.php +++ b/usr/local/www/diag_system_pftop.php @@ -42,7 +42,7 @@ require("guiconfig.inc"); $pfSversion = str_replace("\n", "", file_get_contents("/etc/version")); -$pgtitle = gettext("Diagnostics: PFTop"); +$pgtitle = "Diagnostics: PFTop"; if($_REQUEST['getactivity']) { if($_REQUEST['sorttype']) @@ -99,18 +99,18 @@ else <?=gettext("Sort type"); ?>: <select name='sorttype' id='sorttype' onChange='this.form.submit();'> <option value='<?=$sorttype?>'><?=$sorttype?></option> - <option value='age'><?=gettext("age");?></option> - <option value='bytes'><?=gettext("bytes");?></option> - <option value='dest'><?=gettext("dest");?></option> - <option value='dport'><?=gettext("dport");?></option> - <option value='exp'><?=gettext("exp");?></option> - <option value='none'><?=gettext("none");?></option> - <option value='peak'><?=gettext("peak");?></option> - <option value='pkt'><?=gettext("pkt");?></option> - <option value='rate'><?=gettext("rate");?></option> - <option value='size'><?=gettext("size");?></option> - <option value='sport'><?=gettext("sport");?></option> - <option value='src'><?=gettext("src");?></option> + <option value='age'>age</option> + <option value='bytes'>bytes</option> + <option value='dest'>dest</option> + <option value='dport'>dport</option> + <option value='exp'>exp</option> + <option value='none'>none</option> + <option value='peak'>peak</option> + <option value='pkt'>pkt</option> + <option value='rate'>rate</option> + <option value='size'>size</option> + <option value='sport'>sport</option> + <option value='src'>src</option> </select> <p/> <table width="100%" border="0" cellpadding="0" cellspacing="0"> @@ -123,7 +123,7 @@ else <table> <tr><td> <div name='cpuactivitydiv' id='cpuactivitydiv'> - <b><?=gettext("Gathering pfTOP activity, please wait...");?> + <b>Gathering pfTOP activity, please wait... </div> </td></tr> </table> diff --git a/usr/local/www/load_balancer_monitor.php b/usr/local/www/load_balancer_monitor.php index 86f7530..79068fe 100755 --- a/usr/local/www/load_balancer_monitor.php +++ b/usr/local/www/load_balancer_monitor.php @@ -69,7 +69,7 @@ if ($_GET['act'] == "del") { if (is_array($config['load_balancer']['lbpool'])) { foreach ($config['load_balancer']['pool'] as $pool) { if ($pool['monitor'] == $a_monitor[$_GET['id']]['name']) { - $input_errors[] = "This entry cannot be deleted because it is still referenced by at least one pool."; + $input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one pool."); break; } } @@ -85,7 +85,7 @@ if ($_GET['act'] == "del") { } } -$pgtitle = array("Services", "Load Balancer","Monitor"); +$pgtitle = array(gettext("Services", "Load Balancer","Monitor")); #$statusurl = "status_lb_vs.php"; $statusurl = "status_lb_pool.php"; $logurl = "diag_logs_relayd.php"; @@ -99,7 +99,7 @@ include("head.inc"); <?php if ($input_errors) print_input_errors($input_errors); ?> <?php if ($savemsg) print_info_box($savemsg); ?> <?php if (is_subsystem_dirty('loadbalancer')): ?><p> -<?php print_info_box_np("The load balancer configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br> +<?php print_info_box_np(gettext("The load balancer configuration has been changed.<br>You must apply the changes in order for them to take effect."));?><br> <?php endif; ?> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td class="tabnavtbl"> diff --git a/usr/local/www/load_balancer_monitor_edit.php b/usr/local/www/load_balancer_monitor_edit.php index 934be05..a302492 100755 --- a/usr/local/www/load_balancer_monitor_edit.php +++ b/usr/local/www/load_balancer_monitor_edit.php @@ -92,7 +92,7 @@ if ($_POST) { /* Ensure that our monitor names are unique */ for ($i=0; isset($config['load_balancer']['monitor_type'][$i]); $i++) if (($_POST['name'] == $config['load_balancer']['monitor_type'][$i]['name']) && ($i != $id)) - $input_errors[] = "This monitor name has already been used. Monitor names must be unique."; + $input_errors[] = gettext("This monitor name has already been used. Monitor names must be unique."); switch($_POST['type']) { case 'icmp': { @@ -106,17 +106,17 @@ if ($_POST) { if (is_array($pconfig['options'])) { if (isset($pconfig['options']['host']) && $pconfig['options']['host'] != "") { if (!is_hostname($pconfig['options']['host'])) { - $input_errors[] = "The hostname can only contain the characters A-Z, 0-9 and '-'."; + $input_errors[] = gettext("The hostname can only contain the characters A-Z, 0-9 and '-'."); } } if (isset($pconfig['options']['code']) && $pconfig['options']['code'] != "") { // Check code if(!is_rfc2616_code($pconfig['options']['code'])) { - $input_errors[] = "HTTP(s) codes must be from RFC2616."; + $input_errors[] = gettext("HTTP(s) codes must be from RFC2616."); } } if (!isset($pconfig['options']['path']) || $pconfig['options']['path'] == "") { - $input_errors[] = "The path to monitor must be set."; + $input_errors[] = gettext("The path to monitor must be set."); } } break; @@ -187,7 +187,7 @@ if ($_POST) { } } -$pgtitle = array("Services", "Load Balancer","Monitor","Edit"); +$pgtitle = array(gettext("Services", "Load Balancer","Monitor","Edit")); #$statusurl = "status_lb_vs.php"; $statusurl = "status_lb_pool.php"; $logurl = "diag_logs_relayd.php"; @@ -226,16 +226,16 @@ function updateType(t){ <form action="load_balancer_monitor_edit.php" method="post" name="iform" id="iform"> <table width="100%" border="0" cellpadding="6" cellspacing="0"> <tr> - <td colspan="2" valign="top" class="listtopic">Edit Load Balancer - Monitor entry</td> + <td colspan="2" valign="top" class="listtopic">gettext("Edit Load Balancer - Monitor entry")</td> </tr> <tr align="left"> - <td width="22%" valign="top" class="vncellreq">Name</td> + <td width="22%" valign="top" class="vncellreq">gettext("Name")</td> <td width="78%" class="vtable" colspan="2"> <input name="name" type="text" <?if(isset($pconfig['name'])) echo "value=\"{$pconfig['name']}\"";?> size="16" maxlength="16"> </td> </tr> <tr align="left"> - <td width="22%" valign="top" class="vncellreq">Description</td> + <td width="22%" valign="top" class="vncellreq">gettext("Description")</td> <td width="78%" class="vtable" colspan="2"> <input name="desc" type="text" <?if(isset($pconfig['desc'])) echo "value=\"{$pconfig['desc']}\"";?>size="64"> </td> @@ -266,19 +266,19 @@ function updateType(t){ <td width="78%" class="vtable" colspan="2"> <table width="100%" border="0" cellpadding="6" cellspacing="0"> <tr align="left"> - <td valign="top" align="right" class="vtable">Path</td> + <td valign="top" align="right" class="vtable">gettext("Path")</td> <td class="vtable" colspan="2"> <input name="http_options_path" type="text" <?if(isset($pconfig['options']['path'])) echo "value=\"{$pconfig['options']['path']}\"";?>size="64"> </td> </tr> <tr align="left"> - <td valign="top" align="right" class="vtable">Host</td> + <td valign="top" align="right" class="vtable">gettext("Host")</td> <td class="vtable" colspan="2"> - <input name="http_options_host" type="text" <?if(isset($pconfig['options']['host'])) echo "value=\"{$pconfig['options']['host']}\"";?>size="64"><br/>Hostname for Host: header if needed. + <input name="http_options_host" type="text" <?if(isset($pconfig['options']['host'])) echo "value=\"{$pconfig['options']['host']}\"";?>size="64"><br/>gettext("Hostname for Host: header if needed.") </td> </td> <tr align="left"> - <td valign="top" align="right" class="vtable">HTTP Code</td> + <td valign="top" align="right" class="vtable">gettext("HTTP Code")</td> <td class="vtable" colspan="2"> <?= print_rfc2616_select("http_options_code", $pconfig['options']['code']); ?> </td> @@ -307,11 +307,11 @@ function updateType(t){ <tr align="left"> <td valign="top" align="right" class="vtable">Host</td> <td class="vtable" colspan="2"> - <input name="https_options_host" type="text" <?if(isset($pconfig['options']['host'])) echo "value=\"{$pconfig['options']['host']}\"";?>size="64"><br/>Hostname for Host: header if needed. + <input name="https_options_host" type="text" <?if(isset($pconfig['options']['host'])) echo "value=\"{$pconfig['options']['host']}\"";?>size="64"><br/>gettext("Hostname for Host: header if needed.") </td> </td> <tr align="left"> - <td valign="top" align="right" class="vtable">HTTP Code</td> + <td valign="top" align="right" class="vtable">gettext("HTTP Code")</td> <td class="vtable" colspan="2"> <?= print_rfc2616_select("https_options_code", $pconfig['options']['code']); ?> </td> @@ -329,17 +329,17 @@ function updateType(t){ </td> </tr> <tr align="left" id="send"<?= $pconfig['type'] == "send" ? "" : " style=\"display:none;\""?>> - <td width="22%" valign="top" class="vncellreq">Send/Expect</td> + <td width="22%" valign="top" class="vncellreq">gettext("Send/Expect")</td> <td width="78%" class="vtable" colspan="2"> <table width="100%" border="0" cellpadding="6" cellspacing="0"> <tr align="left"> - <td valign="top" align="right" class="vtable">Send string</td> + <td valign="top" align="right" class="vtable">gettext("Send string")</td> <td class="vtable" colspan="2"> <input name="send_options_send" type="text" <?if(isset($pconfig['options']['send'])) echo "value=\"{$pconfig['options']['send']}\"";?>size="64"> </td> </tr> <tr align="left"> - <td valign="top" align="right" class="vtable">Expect string</td> + <td valign="top" align="right" class="vtable">gettext("Expect string")</td> <td class="vtable" colspan="2"> <input name="send_options_expect" type="text" <?if(isset($pconfig['options']['expect'])) echo "value=\"{$pconfig['options']['expect']}\"";?>size="64"> </td> diff --git a/usr/local/www/services_rfc2136.php b/usr/local/www/services_rfc2136.php index 80edc0b..87e328e 100644 --- a/usr/local/www/services_rfc2136.php +++ b/usr/local/www/services_rfc2136.php @@ -52,7 +52,7 @@ if ($_GET['act'] == "del") { exit; } -$pgtitle = array("Services", "RFC 2136 clients"); +$pgtitle = array(gettext("Services"), gettext("RFC 2136 clients")); include("head.inc"); ?> @@ -65,8 +65,8 @@ include("head.inc"); <tr><td> <?php $tab_array = array(); - $tab_array[] = array("DynDns", false, "services_dyndns.php"); - $tab_array[] = array("RFC 2136", true, "services_rfc2136.php"); + $tab_array[] = array(gettext("DynDns"), false, "services_dyndns.php"); + $tab_array[] = array(gettext("RFC 2136"), true, "services_rfc2136.php"); display_top_tabs($tab_array); ?> </td></tr> @@ -76,8 +76,8 @@ include("head.inc"); <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="5%" class="listhdrr"></td> - <td width="25%" class="listhdrr">Hostname</td> - <td width="60%" class="listhdr">Description</td> + <td width="25%" class="listhdrr"><?=gettext("Hostname");?></td> + <td width="60%" class="listhdr"><?=gettext("Description");?></td> <td width="10%" class="list"></td> </tr> <?php $i = 0; foreach ($a_rfc2136 as $rfc2136): ?> @@ -96,7 +96,7 @@ include("head.inc"); <?=htmlspecialchars($rfc2136['descr']);?> </td> <td valign="middle" nowrap class="list"> <a href="services_rfc2136_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a> - <a href="services_rfc2136.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this client?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td> + <a href="services_rfc2136.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this client?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td> </tr> <?php $i++; endforeach; ?> <tr> @@ -105,9 +105,9 @@ include("head.inc"); </tr> <tr> <td colspan="3" class="list"><p class="vexpl"><span class="red"><strong> - Note:<br> + <?=gettext("Note:")?><br> </strong></span> - Add something meaningful here. + <?=gettext("Add something meaningful here.");?> </td> <td class="list"> </td> </tr> diff --git a/usr/local/www/services_rfc2136_edit.php b/usr/local/www/services_rfc2136_edit.php index 97f8770..c360d03 100644 --- a/usr/local/www/services_rfc2136_edit.php +++ b/usr/local/www/services_rfc2136_edit.php @@ -68,16 +68,16 @@ if ($_POST) { $reqdfields = array(); $reqdfieldsn = array(); $reqdfields = array_merge($reqdfields, explode(" ", "host ttl keyname keydata")); - $reqdfieldsn = array_merge($reqdfieldsn, explode(",", "Hostname,TTL,Key name,Key")); + $reqdfieldsn = array_merge($reqdfieldsn, array(gettext("Hostname"), gettext("TTL"), gettext("Key name"), gettext("Key")); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); if (($_POST['host'] && !is_domain($_POST['host']))) - $input_errors[] = "The DNS update host name contains invalid characters."; + $input_errors[] = gettext("The DNS update host name contains invalid characters."); if (($_POST['ttl'] && !is_numericint($_POST['ttl']))) - $input_errors[] = "The DNS update TTL must be an integer."; + $input_errors[] = gettext("The DNS update TTL must be an integer."); if (($_POST['keyname'] && !is_domain($_POST['keyname']))) - $input_errors[] = "The DNS update key name contains invalid characters."; + $input_errors[] = gettext("The DNS update key name contains invalid characters."); if (!$input_errors) { $rfc2136 = array(); @@ -97,7 +97,7 @@ if ($_POST) { else $a_rfc2136[] = $rfc2136; - write_config("New/Edited RFC2136 dnsupdate entry was posted."); + write_config(gettext("New/Edited RFC2136 dnsupdate entry was posted.")); $retval = services_dnsupdate_process(); @@ -106,7 +106,7 @@ if ($_POST) { } } -$pgtitle = array("Services","RFC 2136 client", "Edit"); +$pgtitle = array(gettext("Services"),gettext("RFC 2136 client"), gettext("Edit")); include("head.inc"); ?> @@ -120,18 +120,18 @@ include("head.inc"); <tr> <td colspan="2" valign="top" class="optsect_t"> <table border="0" cellspacing="0" cellpadding="0" width="100%"> - <tr><td class="optsect_s"><strong>RFC 2136 client</strong></td></tr> + <tr><td class="optsect_s"><strong><?=gettext("RFC 2136 client");?></strong></td></tr> </table> </td> </tr> <tr> - <td width="22%" valign="top" class="vncellreq">Enable</td> + <td width="22%" valign="top" class="vncellreq"><?=gettext("Enable");?></td> <td width="78%" class="vtable"> <input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?>> </td> </tr> <tr> - <td width="22%" valign="top" class="vncellreq">Interface to monitor</td> + <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface to monitor");?></td> <td width="78%" class="vtable"> <select name="interface" class="formselect" id="interface"> <?php $iflist = get_configured_interface_with_descr(); @@ -143,7 +143,7 @@ include("head.inc"); </td> </tr> <tr> - <td width="22%" valign="top" class="vncellreq">Hostname</td> + <td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname");?></td> <td width="78%" class="vtable"> <input name="host" type="text" class="formfld unknown" id="host" size="30" value="<?=htmlspecialchars($pconfig['host']);?>"> </td> @@ -152,43 +152,43 @@ include("head.inc"); <td valign="top" class="vncellreq">TTL</td> <td class="vtable"> <input name="ttl" type="text" class="formfld unknown" id="ttl" size="6" value="<?=htmlspecialchars($pconfig['ttl']);?>"> - seconds</td> + <?=gettext("seconds");?></td> </tr> <tr> - <td valign="top" class="vncellreq">Key name</td> + <td valign="top" class="vncellreq"><?=gettext("Key name");?></td> <td class="vtable"> <input name="keyname" type="text" class="formfld unknown" id="keyname" size="30" value="<?=htmlspecialchars($pconfig['keyname']);?>"> <br> - This must match the setting on the DNS server.</td> + <?=gettext("This must match the setting on the DNS server.");?></td> </tr> <tr> - <td valign="top" class="vncellreq">Key type </td> + <td valign="top" class="vncellreq"><?=gettext("Key type ");?></td> <td class="vtable"> - <input name="keytype" type="radio" value="zone" <?php if ($pconfig['keytype'] == "zone") echo "checked"; ?>> Zone + <input name="keytype" type="radio" value="<?=gettext("zone");?>" <?php if ($pconfig['keytype'] == "zone") echo "checked"; ?>> <?=gettext("Zone");?> <input name="keytype" type="radio" value="host" <?php if ($pconfig['keytype'] == "host") echo "checked"; ?>> Host - <input name="keytype" type="radio" value="user" <?php if ($pconfig['keytype'] == "user") echo "checked"; ?>> User + <input name="keytype" type="radio" value="<?=gettext("user");?>" <?php if ($pconfig['keytype'] == "user") echo "checked"; ?>><?=gettext(" User");?> </tr> <tr> - <td valign="top" class="vncellreq">Key</td> + <td valign="top" class="vncellreq"><?=gettext("Key");?></td> <td class="vtable"> <input name="keydata" type="text" class="formfld unknown" id="keydata" size="70" value="<?=htmlspecialchars($pconfig['keydata']);?>"> <br> - Paste an HMAC-MD5 key here.</td> + <?=gettext("Paste an HMAC-MD5 key here.");?></td> </tr> <tr> - <td width="22%" valign="top" class="vncellreq">Server</td> + <td width="22%" valign="top" class="vncellreq"><?=gettext("Server");?></td> <td width="78%" class="vtable"> <input name="server" type="text" class+"formfld" id="server" size="30" value="<?=htmlspecialchars($pconfig['server'])?>"> </td> </tr> <tr> - <td width="22%" valign="top" class="vncellreq">Protocol</td> + <td width="22%" valign="top" class="vncellreq"><?=gettext("Protocol");?></td> <td width="78%" class="vtable"> - <input name="usetcp" type="checkbox" id="usetcp" value="yes" <?php if ($pconfig['usetcp']) echo "checked"; ?>> - <strong>Use TCP instead of UDP</strong></td> + <input name="usetcp" type="checkbox" id="usetcp" value="<?=gettext("yes");?>" <?php if ($pconfig['usetcp']) echo "checked"; ?>> + <strong><?=gettext("Use TCP instead of UDP");?></strong></td> </tr> <tr> - <td width="22%" valign="top" class="vncellreq">Description</td> + <td width="22%" valign="top" class="vncellreq"><?=gettext("Description");?></td> <td width="78%" class="vtable"> <input name="descr" type="text" class="formfld unknown" id="descr" size="60" value="<?=htmlspecialchars($pconfig['descr']);?>"> </td> @@ -196,8 +196,8 @@ include("head.inc"); <tr> <td width="22%" valign="top"> </td> <td width="78%"> - <input name="Submit" type="submit" class="formbtn" value="Save" onClick="enable_change(true)"> - <a href="services_rfc2136.php"><input name="Cancel" type="button" class="formbtn" value="Cancel"></a> + <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onClick="enable_change(true)"> + <a href="services_rfc2136.php"><input name="Cancel" type="button" class="formbtn" value="<?=gettext("Cancel");?>"></a> <?php if (isset($id) && $a_rfc2136[$id]): ?> <input name="id" type="hidden" value="<?=$id;?>"> <?php endif; ?> @@ -205,10 +205,10 @@ include("head.inc"); </tr> <tr> <td width="22%" valign="top"> </td> - <td width="78%"><span class="vexpl"><span class="red"><strong>Note:<br> - </strong></span>You must configure a DNS server in <a href="system.php">System: - General setup</a> or allow the DNS server list to be overridden - by DHCP/PPP on WAN for dynamic DNS updates to work.</span></td> + <td width="78%"><span class="vexpl"><span class="red"><strong><?=gettext("Note:");?><br> + </strong></span><?php printf(gettext("You must configure a DNS server in %sSystem: + General setup %sor allow the DNS server list to be overridden + by DHCP/PPP on WAN for dynamic DNS updates to work."),'<a href="system.php">', '</a>');?></span></td> </tr> </table> </form> diff --git a/usr/local/www/services_snmp.php b/usr/local/www/services_snmp.php index 9540d98..6fc970c 100755 --- a/usr/local/www/services_snmp.php +++ b/usr/local/www/services_snmp.php @@ -84,11 +84,11 @@ if ($_POST) { /* input validation */ if ($_POST['enable']) { $reqdfields = explode(" ", "rocommunity"); - $reqdfieldsn = explode(",", "Community"); + $reqdfieldsn = array(gettext("Community")); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); $reqdfields = explode(" ", "pollport"); - $reqdfieldsn = explode(",", "Polling Port"); + $reqdfieldsn = array(gettext("Polling Port")); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); @@ -96,15 +96,15 @@ if ($_POST) { if ($_POST['trapenable']) { $reqdfields = explode(" ", "trapserver"); - $reqdfieldsn = explode(",", "Trap server"); + $reqdfieldsn = array(gettext("Trap server")); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); $reqdfields = explode(" ", "trapserverport"); - $reqdfieldsn = explode(",", "Trap server port"); + $reqdfieldsn = array(gettext("Trap server port")); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); $reqdfields = explode(" ", "trapstring"); - $reqdfieldsn = explode(",", "Trap string"); + $reqdfieldsn = array(gettext("Trap string")); do_input_validation($_POST, $reqdfields, $reqdfields, $reqdfieldsn, &$input_errors); } @@ -149,7 +149,7 @@ if ($_POST) { } } -$pgtitle = array("Services","SNMP"); +$pgtitle = array(gettext("Services"),gettext("SNMP")); include("head.inc"); ?> @@ -259,38 +259,38 @@ function enable_change(whichone) { <tr> <td colspan="2" valign="top" class="optsect_t"> <table border="0" cellspacing="0" cellpadding="0" width="100%"> - <tr><td class="optsect_s"><strong>SNMP Daemon</strong></td> - <td align="right" class="optsect_s"><input name="enable" id="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(this)"> <strong>Enable</strong></td></tr> + <tr><td class="optsect_s"><strong><?=gettext("SNMP Daemon");?></strong></td> + <td align="right" class="optsect_s"><input name="enable" id="enable" type="checkbox" value="<?=gettext("yes");?>" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(this)"> <strong><?=gettext("Enable");?></strong></td></tr> </table></td> </tr> <tr> - <td width="22%" valign="top" class="vncellreq">Polling Port </td> + <td width="22%" valign="top" class="vncellreq"><?=gettext("Polling Port ");?></td> <td width="78%" class="vtable"> <input name="pollport" type="text" class="formfld unknown" id="pollport" size="40" value="<?=$pconfig['pollport'] ? htmlspecialchars($pconfig['pollport']) : htmlspecialchars(161);?>"> - <br>Enter the port to accept polling events on (default 161)</br> + <br><?=gettext("Enter the port to accept polling events on (default 161)");?></br> </td> </tr> <tr> - <td width="22%" valign="top" class="vncell">System location</td> + <td width="22%" valign="top" class="vncell"><?=gettext("System location");?></td> <td width="78%" class="vtable"> <input name="syslocation" type="text" class="formfld unknown" id="syslocation" size="40" value="<?=htmlspecialchars($pconfig['syslocation']);?>"> </td> </tr> <tr> - <td width="22%" valign="top" class="vncell">System contact</td> + <td width="22%" valign="top" class="vncell"><?=gettext("System contact");?></td> <td width="78%" class="vtable"> <input name="syscontact" type="text" class="formfld unknown" id="syscontact" size="40" value="<?=htmlspecialchars($pconfig['syscontact']);?>"> </td> </tr> <tr> - <td width="22%" valign="top" class="vncellreq">Read Community String</td> + <td width="22%" valign="top" class="vncellreq"><?=gettext("Read Community String");?></td> <td width="78%" class="vtable"> <input name="rocommunity" type="text" class="formfld unknown" id="rocommunity" size="40" value="<?=htmlspecialchars($pconfig['rocommunity']);?>"> - <br>In most cases, "public" is used here</br> + <br><?=gettext("In most cases, "public" is used here");?></br> </td> </tr> @@ -319,33 +319,33 @@ function enable_change(whichone) { <tr> <td colspan="2" valign="top" class="optsect_t"> <table border="0" cellspacing="0" cellpadding="0" width="100%"> - <tr><td class="optsect_s"><strong>SNMP Traps</strong></td> - <td align="right" class="optsect_s"><input name="trapenable" id="trapenable" type="checkbox" value="yes" <?php if ($pconfig['trapenable']) echo "checked"; ?> onClick="enable_change(this)"> <strong>Enable</strong></td></tr> + <tr><td class="optsect_s"><strong><?=gettext("SNMP Traps");?></strong></td> + <td align="right" class="optsect_s"><input name="trapenable" id="trapenable" type="checkbox" value="<?=gettext("yes");?>" <?php if ($pconfig['trapenable']) echo "checked"; ?> onClick="enable_change(this)"> <strong><?=gettext("Enable");?></strong></td></tr> </table></td> </tr> <tr> - <td width="22%" valign="top" class="vncellreq">Trap server</td> + <td width="22%" valign="top" class="vncellreq"><?=gettext("Trap server");?></td> <td width="78%" class="vtable"> <input name="trapserver" type="text" class="formfld unknown" id="trapserver" size="40" value="<?=htmlspecialchars($pconfig['trapserver']);?>"> - <br>Enter trap server name</br> + <br><?=gettext("Enter trap server name");?></br> </td> </tr> <tr> - <td width="22%" valign="top" class="vncellreq">Trap server port </td> + <td width="22%" valign="top" class="vncellreq"><?=gettext("Trap server port ");?></td> <td width="78%" class="vtable"> <input name="trapserverport" type="text" class="formfld unknown" id="trapserverport" size="40" value="<?=$pconfig['trapserverport'] ? htmlspecialchars($pconfig['trapserverport']) : htmlspecialchars(162);?>"> - <br>Enter the port to send the traps to (default 162)</br> + <br><?=gettext("Enter the port to send the traps to (default 162)");?></br> </td> </tr> <tr> - <td width="22%" valign="top" class="vncellreq">Enter the SNMP trap string</td> + <td width="22%" valign="top" class="vncellreq"><?=gettext("Enter the SNMP trap string");?></td> <td width="78%" class="vtable"> <input name="trapstring" type="text" class="formfld unknown" id="trapstring" size="40" value="<?=htmlspecialchars($pconfig['trapstring']);?>"> - <br>Trap string</br> + <br><?=gettext("Trap string");?></br> </td> </tr> @@ -354,37 +354,37 @@ function enable_change(whichone) { <tr> <td colspan="2" valign="top" class="optsect_t"> <table border="0" cellspacing="0" cellpadding="0" width="100%"> - <tr><td class="optsect_s"><strong>Modules</strong></td> + <tr><td class="optsect_s"><strong><?=gettext("Modules");?></strong></td> <td align="right" class="optsect_s"> </td></tr> </table></td> </tr> <tr> - <td width="22%" valign="top" class="vncellreq">SNMP Modules</td> + <td width="22%" valign="top" class="vncellreq"><?=gettext("SNMP Modules");?></td> <td width="78%" class="vtable"> - <input name="mibii" type="checkbox" id="mibii" value="yes" <?php if ($pconfig['mibii']) echo "checked"; ?> >MibII + <input name="mibii" type="checkbox" id="mibii" value="<?=gettext("yes");?>" <?php if ($pconfig['mibii']) echo "checked"; ?> >MibII <br /> - <input name="netgraph" type="checkbox" id="netgraph" value="yes" <?php if ($pconfig['netgraph']) echo "checked"; ?> >Netgraph + <input name="netgraph" type="checkbox" id="netgraph" value="<?=gettext("yes");?>" <?php if ($pconfig['netgraph']) echo "checked"; ?> >Netgraph <br /> - <input name="pf" type="checkbox" id="pf" value="yes" <?php if ($pconfig['pf']) echo "checked"; ?> >PF + <input name="pf" type="checkbox" id="pf" value="<?=gettext("yes");?>" <?php if ($pconfig['pf']) echo "checked"; ?> >PF <br /> - <input name="hostres" type="checkbox" id="hostres" value="yes" <?php if ($pconfig['hostres']) echo "checked"; ?> >Host Resources + <input name="hostres" type="checkbox" id="hostres" value="<?=gettext("yes");?>" <?php if ($pconfig['hostres']) echo "checked"; ?> ><?=gettext("Host Resources");?> </td> </tr> <?php if(!$config['interfaces']['lan']): ?> <tr> <td width="22%" valign="top" class="vtable"></td> <td width="78%" class="vtable"> - <input name="bindlan" type="checkbox" value="yes" <?php if ($pconfig['bindlan']) echo "checked"; ?>> <strong>Bind to LAN interface only</strong> + <input name="bindlan" type="checkbox" value="<?=gettext("yes");?>" <?php if ($pconfig['bindlan']) echo "checked"; ?>> <strong><?=gettext("Bind to LAN interface only");?></strong> <br> - This option can be useful when trying to access the SNMP agent - by the LAN interface's IP address through a VPN tunnel terminated on the WAN interface.</td> + <?=gettext("This option can be useful when trying to access the SNMP agent". + " by the LAN interface's IP address through a VPN tunnel terminated on the WAN interface.");?></td> </tr> <?php endif; ?> <tr> <td width="22%" valign="top"> </td> <td width="78%"> - <input name="Submit" type="submit" class="formbtn" value="Save" onClick="enable_change(true)"> + <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onClick="enable_change(true)"> </td> </tr> </table> diff --git a/usr/local/www/services_wol.php b/usr/local/www/services_wol.php index faf0bf9..a45a730 100755 --- a/usr/local/www/services_wol.php +++ b/usr/local/www/services_wol.php @@ -58,10 +58,10 @@ if($_GET['wakeall'] <> "") { get_interface_subnet($if)); /* Execute wol command and check return code. */ if(!mwexec("/usr/local/bin/wol -i {$bcip} {$mac}")){ - $savemsg .= "Sent magic packet to {$mac} ({$description}).<br>"; + $savemsg .= printf(gettext("Sent magic packet to %s (%s).<br>"),$mac, $description); } else { - $savemsg .= "Please check the <a href=\"/diag_logs.php\">system log</a>, the wol command for {$description} ({$mac}) did not complete successfully.<br>"; + $savemsg .= printf(gettext("Please check the %ssystem log%s, the wol command for %s (%s) did not complete successfully.<br>"),'<a href=\"/diag_logs.php\">','</a>',$description,$mac); } } } @@ -83,9 +83,9 @@ if ($_POST || $_GET['mac']) { /* input validation */ if (!$mac || !is_macaddr($mac)) - $input_errors[] = "A valid MAC address must be specified."; + $input_errors[] = gettext("A valid MAC address must be specified."); if (!$if) - $input_errors[] = "A valid interface must be specified."; + $input_errors[] = gettext("A valid interface must be specified."); if (!$input_errors) { /* determine broadcast address */ @@ -93,10 +93,10 @@ if ($_POST || $_GET['mac']) { get_interface_subnet($if)); /* Execute wol command and check return code. */ if(!mwexec("/usr/local/bin/wol -i {$bcip} {$mac}")){ - $savemsg .= "Sent magic packet to {$mac}."; + $savemsg .= printf(gettext("Sent magic packet to %s."),$mac); } else { - $savemsg .= "Please check the <a href=\"/diag_logs.php\">system log</a>, the wol command for {$mac} did not complete successfully.<br>"; + $savemsg .= printf(gettext("Please check the %ssystem log%s, the wol command for %s did not complete successfully.<br>"),'<a href=\"/diag_logs.php\">', '</a>', $mac); } } } @@ -110,7 +110,7 @@ if ($_GET['act'] == "del") { } } -$pgtitle = array("Services","Wake on LAN"); +$pgtitle = array(gettext("Services"),gettext("Wake on LAN")); include("head.inc"); ?> @@ -122,10 +122,10 @@ include("head.inc"); <form action="services_wol.php" method="post" name="iform" id="iform"> <table width="100%" border="0" cellpadding="6" cellspacing="0"> <tr> - <td colspan="2" valign="top" class="listtopic">Wake on LAN</td> + <td colspan="2" valign="top" class="listtopic"><?=gettext("Wake on LAN");?></td> </tr> <tr> - <td width="22%" valign="top" class="vncellreq">Interface</td> + <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface");?></td> <td width="78%" class="vtable"> <select name="interface" class="formselect"> <?php @@ -136,29 +136,29 @@ include("head.inc"); </option> <?php endforeach; ?> </select> <br> - <span class="vexpl">Choose which interface the host to be woken up is connected to.</span></td> + <span class="vexpl"><?=gettext("Choose which interface the host to be woken up is connected to.");?></span></td> </tr> <tr> - <td width="22%" valign="top" class="vncellreq">MAC address</td> + <td width="22%" valign="top" class="vncellreq"><?=gettext("MAC address");?></td> <td width="78%" class="vtable"> <input name="mac" type="text" class="formfld unknown" id="mac" size="20" value="<?=htmlspecialchars($mac);?>"> <br> - Enter a MAC address <span class="vexpl"> in the following format: xx:xx:xx:xx:xx:xx</span></td></tr> + <?=gettext("Enter a MAC address ");?><span class="vexpl"><?=gettext(" in the following format: xx:xx:xx:xx:xx:xx");?></span></td></tr> <tr> <td width="22%" valign="top"> </td> <td width="78%"> - <input name="Submit" type="submit" class="formbtn" value="Send"> + <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Send");?>"> </td> </tr> </table> <br> - Wake all clients at once: <a href="services_wol.php?wakeall=true"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_wol_all.gif" width="17" height="17" border="0"></a><p/> - Or Click the MAC address to wake up an individual device: + <?=gettext("Wake all clients at once: ");?><a href="services_wol.php?wakeall=true"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_wol_all.gif" width="17" height="17" border="0"></a><p/> + <?=gettext("Or Click the MAC address to wake up an individual device:");?> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> - <td width="15%" class="listhdrr">Interface</td> - <td width="25%" class="listhdrr">MAC address</td> - <td width="50%" class="listhdr">Description</td> + <td width="15%" class="listhdrr"><?=gettext("Interface");?></td> + <td width="25%" class="listhdrr"><?=gettext("MAC address");?></td> + <td width="50%" class="listhdr"><?=gettext("Description");?></td> <td width="10%" class="list"> <table border="0" cellspacing="0" cellpadding="1"> <tr> @@ -187,7 +187,7 @@ include("head.inc"); <table border="0" cellspacing="0" cellpadding="1"> <tr> <td valign="middle"><a href="services_wol_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a></td> - <td valign="middle"><a href="services_wol.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this entry?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td> + <td valign="middle"><a href="services_wol.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this entry?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td> </tr> </table> </td> @@ -209,9 +209,9 @@ include("head.inc"); <span class="vexpl"> <span class="red"> <strong> - Note:<br> + <?=gettext("Note:");?><br> </strong> - </span>This service can be used to wake up (power on) computers by sending special "Magic Packets". The NIC in the computer that is to be woken up must support Wake on LAN and has to be configured properly (WOL cable, BIOS settings). + </span><?=gettext("This service can be used to wake up (power on) computers by sending special "Magic Packets". The NIC in the computer that is to be woken up must support Wake on LAN and has to be configured properly (WOL cable, BIOS settings). ");?> </span> </form> diff --git a/usr/local/www/services_wol_edit.php b/usr/local/www/services_wol_edit.php index 04a7f2f..f495abf 100755 --- a/usr/local/www/services_wol_edit.php +++ b/usr/local/www/services_wol_edit.php @@ -79,7 +79,7 @@ if ($_POST) { /* input validation */ $reqdfields = explode(" ", "interface mac"); - $reqdfieldsn = explode(",", "Interface,MAC address"); + $reqdfieldsn = array(gettext("Interface"),gettext("MAC address")); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); @@ -87,7 +87,7 @@ if ($_POST) { $_POST['mac'] = strtolower(str_replace("-", ":", $_POST['mac'])); if (($_POST['mac'] && !is_macaddr($_POST['mac']))) { - $input_errors[] = "A valid MAC address must be specified."; + $input_errors[] = gettext("A valid MAC address must be specified."); } if (!$input_errors) { @@ -109,7 +109,7 @@ if ($_POST) { } } -$pgtitle = array("Services","Wake on LAN","Edit"); +$pgtitle = array(gettext("Services"),gettext("Wake on LAN"),gettext("Edit")); include("head.inc"); ?> @@ -120,10 +120,10 @@ include("head.inc"); <form action="services_wol_edit.php" method="post" name="iform" id="iform"> <table width="100%" border="0" cellpadding="6" cellspacing="0"> <tr> - <td colspan="2" valign="top" class="listtopic">Edit WOL entry</td> + <td colspan="2" valign="top" class="listtopic"><?=gettext("Edit WOL entry");?></td> </tr> <tr> - <td width="22%" valign="top" class="vncellreq">Interface</td> + <td width="22%" valign="top" class="vncellreq"><?=gettext("Interface");?></td> <td width="78%" class="vtable"> <select name="interface" class="formfld"> <?php @@ -134,27 +134,27 @@ include("head.inc"); </option> <?php endforeach; ?> </select> <br> - <span class="vexpl">Choose which interface this host is connected to.</span></td> + <span class="vexpl"><?=gettext("Choose which interface this host is connected to.");?></span></td> </tr> <tr> - <td width="22%" valign="top" class="vncellreq">MAC address</td> + <td width="22%" valign="top" class="vncellreq"><?=gettext("MAC address");?></td> <td width="78%" class="vtable"> <input name="mac" type="text" class="formfld" id="mac" size="20" value="<?=htmlspecialchars($pconfig['mac']);?>"> <br> - <span class="vexpl">Enter a MAC address in the following format: - xx:xx:xx:xx:xx:xx<em></em></span></td> + <span class="vexpl"><?=gettext("Enter a MAC address in the following format: ". + "xx:xx:xx:xx:xx:xx");?><em></em></span></td> </tr> <tr> - <td width="22%" valign="top" class="vncell">Description</td> + <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td> <td width="78%" class="vtable"> <input name="descr" type="text" class="formfld" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>"> - <br> <span class="vexpl">You may enter a description here - for your reference (not parsed).</span></td> + <br> <span class="vexpl"><?=gettext("You may enter a description here". + " for your reference (not parsed).");?></span></td> </tr> <tr> <td width="22%" valign="top"> </td> <td width="78%"> - <input name="Submit" type="submit" class="formbtn" value="Save"> <input class="formbtn" type="button" value="Cancel" onclick="history.back()"> + <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()"> <?php if (isset($id) && $a_wol[$id]): ?> <input name="id" type="hidden" value="<?=$id;?>"> <?php endif; ?> |