Commit caea4e1b authored by Fabian Franz's avatar Fabian Franz Committed by Franco Fichtner

work on #259

parent d4cd4fcb
...@@ -107,7 +107,7 @@ endif; ?> ...@@ -107,7 +107,7 @@ endif; ?>
<a href="?order=<?=$_GET['order']; <a href="?order=<?=$_GET['order'];
?>&amp;showact=<?=$_GET['showact']; ?>&amp;showact=<?=$_GET['showact'];
?>&amp;act=del&amp;zone=<?=$cpzone; ?>&amp;act=del&amp;zone=<?=$cpzone;
?>&amp;id=<?=$cpent->sessionid;?>" onclick="return confirm('Do you really want to disconnect this client?')"><span class="glyphicon glyphicon-remove"></span></a></td> ?>&amp;id=<?=$cpent->sessionid;?>" onclick="return confirm('<?= gettext('Do you really want to disconnect this client?');?>')"><span class="glyphicon glyphicon-remove"></span></a></td>
</tr> </tr>
<?php <?php
endforeach; ?> endforeach; ?>
......
...@@ -61,14 +61,14 @@ if (is_array($config['virtualip']['vip'])) { ...@@ -61,14 +61,14 @@ if (is_array($config['virtualip']['vip'])) {
<td width="65%" class="listr"> <td width="65%" class="listr">
<?php <?php
if ($carp_enabled == false) { if ($carp_enabled == false) {
$status = "DISABLED"; $status = gettext("DISABLED");
echo "<span class=\"glyphicon glyphicon-remove text-danger\" title=\"$status\" alt=\"$status\" ></span>"; echo "<span class=\"glyphicon glyphicon-remove text-danger\" title=\"$status\" alt=\"$status\" ></span>";
} else { } else {
if ($status == "MASTER") { if ($status == gettext("MASTER")) {
echo "<span class=\"glyphicon glyphicon-play text-success\" title=\"$status\" alt=\"$status\" ></span>"; echo "<span class=\"glyphicon glyphicon-play text-success\" title=\"$status\" alt=\"$status\" ></span>";
} elseif ($status == "BACKUP") { } elseif ($status == gettext("BACKUP")) {
echo "<span class=\"glyphicon glyphicon-play text-muted\" title=\"$status\" alt=\"$status\" ></span>"; echo "<span class=\"glyphicon glyphicon-play text-muted\" title=\"$status\" alt=\"$status\" ></span>";
} elseif ($status == "INIT") { } elseif ($status == gettext("INIT")) {
echo "<span class=\"glyphicon glyphicon-info-sign\" title=\"$status\" alt=\"$status\" ></span>"; echo "<span class=\"glyphicon glyphicon-info-sign\" title=\"$status\" alt=\"$status\" ></span>";
} }
} }
...@@ -81,7 +81,7 @@ if ($ipaddress) { ...@@ -81,7 +81,7 @@ if ($ipaddress) {
} }
} else { } else {
?> ?>
<tr><td class="listr">No CARP Interfaces Defined. Click <a href="carp_status.php">here</a> to configure CARP.</td></tr> <tr><td class="listr"><?= gettext('No CARP Interfaces Defined. Click <a href="carp_status.php">here</a> to configure CARP.') ?></td></tr>
<?php <?php
} ?> } ?>
</table> </table>
...@@ -64,7 +64,7 @@ if ($_REQUEST['getdyndnsstatus']) { ...@@ -64,7 +64,7 @@ if ($_REQUEST['getdyndnsstatus']) {
echo htmlspecialchars($cached_ip); echo htmlspecialchars($cached_ip);
echo "</font>"; echo "</font>";
} else { } else {
echo "N/A " . date("H:i:s"); echo gettext("N/A ") . date("H:i:s");
} }
} }
exit; exit;
......
...@@ -36,9 +36,9 @@ function gmirror_html_status() { ...@@ -36,9 +36,9 @@ function gmirror_html_status() {
$output = ""; $output = "";
if (count($mirrors) > 0) { if (count($mirrors) > 0) {
$output .= "<tr>\n"; $output .= "<tr>\n";
$output .= "<td width=\"40%\" class=\"vncellt\">Name</td>\n"; $output .= "<td width=\"40%\" class=\"vncellt\">".gettext('Name')."</td>\n";
$output .= "<td width=\"40%\" class=\"vncellt\">Status</td>\n"; $output .= "<td width=\"40%\" class=\"vncellt\">".gettext('Status')."</td>\n";
$output .= "<td width=\"20%\" class=\"vncellt\">Component</td>\n"; $output .= "<td width=\"20%\" class=\"vncellt\">".gettext('Component')."</td>\n";
$output .= "</tr>\n"; $output .= "</tr>\n";
foreach ($mirrors as $mirror => $name) { foreach ($mirrors as $mirror => $name) {
$components = count($name["components"]); $components = count($name["components"]);
...@@ -57,7 +57,7 @@ function gmirror_html_status() { ...@@ -57,7 +57,7 @@ function gmirror_html_status() {
} }
} }
} else { } else {
$output .= "<tr><td colspan=\"3\" class=\"listr\">No Mirrors Found</td></tr>\n"; $output .= "<tr><td colspan=\"3\" class=\"listr\">".gettext('No Mirrors Found')."</td></tr>\n";
} }
// $output .= "<tr><td colspan=\"3\" class=\"listr\">Updated at " . date("F j, Y, g:i:s a") . "</td></tr>\n"; // $output .= "<tr><td colspan=\"3\" class=\"listr\">Updated at " . date("F j, Y, g:i:s a") . "</td></tr>\n";
return $output; return $output;
......
...@@ -61,13 +61,13 @@ foreach ($ifdescrs as $ifdescr => $ifname) { ...@@ -61,13 +61,13 @@ foreach ($ifdescrs as $ifdescr => $ifname) {
$array_in_errors[] = $ifinfo['inerrs']; $array_in_errors[] = $ifinfo['inerrs'];
$array_out_errors[] = $ifinfo['outerrs']; $array_out_errors[] = $ifinfo['outerrs'];
} else { } else {
$array_in_errors[] = "n/a"; $array_in_errors[] = gettext("n/a");
$array_out_errors[] = "n/a"; $array_out_errors[] = gettext("n/a");
} }
if (isset($ifinfo['collisions'])) { if (isset($ifinfo['collisions'])) {
$array_collisions[] = htmlspecialchars($ifinfo['collisions']); $array_collisions[] = htmlspecialchars($ifinfo['collisions']);
} else { } else {
$array_collisions[] = "n/a"; $array_collisions[] = gettext("n/a");
} }
} }
......
...@@ -69,9 +69,9 @@ function display_widget_tabs(& $tab_array) { ...@@ -69,9 +69,9 @@ function display_widget_tabs(& $tab_array) {
if (isset($config['ipsec']['phase1'])) { if (isset($config['ipsec']['phase1'])) {
echo "<div>&nbsp;</div>\n"; echo "<div>&nbsp;</div>\n";
$tab_array = array(); $tab_array = array();
$tab_array[0] = array("Overview", true, "ipsec-Overview"); $tab_array[0] = array(gettext("Overview"), true, "ipsec-Overview");
$tab_array[1] = array("Tunnels", false, "ipsec-tunnel"); $tab_array[1] = array(gettext("Tunnels"), false, "ipsec-tunnel");
$tab_array[2] = array("Mobile", false, "ipsec-mobile"); $tab_array[2] = array(gettext("Mobile"), false, "ipsec-mobile");
display_widget_tabs($tab_array); display_widget_tabs($tab_array);
$spd = ipsec_dump_spd(); $spd = ipsec_dump_spd();
...@@ -201,9 +201,9 @@ if (isset($config['ipsec']['phase2'])) { ...@@ -201,9 +201,9 @@ if (isset($config['ipsec']['phase2'])) {
<div id="ipsec-mobile" style="display:none;background-color:#EEEEEE;"> <div id="ipsec-mobile" style="display:none;background-color:#EEEEEE;">
<div style="padding: 10px"> <div style="padding: 10px">
<div style="display:table-row;"> <div style="display:table-row;">
<div class="widgetsubheader" style="display:table-cell;width:140px">User</div> <div class="widgetsubheader" style="display:table-cell;width:140px"><?= gettext('User') ?></div>
<div class="widgetsubheader" style="display:table-cell;width:130px">IP</div> <div class="widgetsubheader" style="display:table-cell;width:130px"><?= gettext('IP') ?></div>
<div class="widgetsubheader" style="display:table-cell;width:30px">Status</div> <div class="widgetsubheader" style="display:table-cell;width:30px"><?= gettext('Status') ?></div>
</div> </div>
<div style="max-height:105px;overflow:auto;"> <div style="max-height:105px;overflow:auto;">
<?php <?php
...@@ -243,11 +243,11 @@ else { ...@@ -243,11 +243,11 @@ else {
<span class="vexpl"> <span class="vexpl">
<span class="red"> <span class="red">
<strong> <strong>
Note: There are no configured IPsec Tunnels<br /> <?= gettext('Note: There are no configured IPsec Tunnels') ?><br />
</strong> </strong>
</span> </span>
You can configure your IPsec <?= gettext('You can configure your IPsec') ?>
<a href="vpn_ipsec.php">here</a>. <a href="vpn_ipsec.php"><?= gettext('here') ?></a>.
</span> </span>
</td> </td>
</tr> </tr>
......
...@@ -65,9 +65,9 @@ if (!$nentries) { ...@@ -65,9 +65,9 @@ if (!$nentries) {
<table class="table table-stiped" bgcolor="#990000" width="100%" border="0" cellspacing="0" cellpadding="0" summary="load balancer"> <table class="table table-stiped" bgcolor="#990000" width="100%" border="0" cellspacing="0" cellpadding="0" summary="load balancer">
<thead> <thead>
<td width="10%" class="listhdrr">Server</td> <td width="10%" class="listhdrr"><?= gettext('Server') ?></td>
<td width="10%" class="listhdrr">Pool</td> <td width="10%" class="listhdrr"><?= gettext('Pool') ?></td>
<td width="30%" class="listhdr">Description</td> <td width="30%" class="listhdr"><?= gettext('Description') ?></td>
</thead> </thead>
<?php $i = 0; foreach ($a_vs as $vsent) : <?php $i = 0; foreach ($a_vs as $vsent) :
?> ?>
...@@ -76,20 +76,20 @@ if (!$nentries) { ...@@ -76,20 +76,20 @@ if (!$nentries) {
switch (trim($rdr_a[$vsent['name']]['status'])) { switch (trim($rdr_a[$vsent['name']]['status'])) {
case 'active': case 'active':
$bgcolor = "#90EE90"; // lightgreen $bgcolor = "#90EE90"; // lightgreen
$rdr_a[$vsent['name']]['status'] = "Active"; $rdr_a[$vsent['name']]['status'] = gettext("Active");
break; break;
case 'down': case 'down':
$bgcolor = "#F08080"; // lightcoral $bgcolor = "#F08080"; // lightcoral
$rdr_a[$vsent['name']]['status'] = "Down"; $rdr_a[$vsent['name']]['status'] = gettext("Down");
break; break;
default: default:
$bgcolor = "#D3D3D3"; // lightgray $bgcolor = "#D3D3D3"; // lightgray
$rdr_a[$vsent['name']]['status'] = 'Unknown - relayd not running?'; $rdr_a[$vsent['name']]['status'] = gettext('Unknown - relayd not running?');
} }
?> ?>
<td class="listlr"> <td class="listlr">
<?=$vsent['name'];?><br /> <?=$vsent['name'];?><br />
<span style="background-color: <?=$bgcolor?>; display: block"><i><?=$rdr_a[$vsent['name']]['status']?></i></span> <span style="background-color: <?=$bgcolor?>; display: block"><i><?= $rdr_a[$vsent['name']]['status'] ?></i></span>
<?=$vsent['ipaddr'].":".$vsent['port'];?><br /> <?=$vsent['ipaddr'].":".$vsent['port'];?><br />
</td> </td>
<td class="listr" align="center" > <td class="listr" align="center" >
......
...@@ -150,7 +150,7 @@ function format_log_line(row) { ...@@ -150,7 +150,7 @@ function format_log_line(row) {
<tbody> <tbody>
<tr> <tr>
<td> <td>
Number of lines to display: <?= gettext('Number of lines to display:') ?>
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -187,13 +187,13 @@ if ($nentriesinterfaces == "All") { ...@@ -187,13 +187,13 @@ if ($nentriesinterfaces == "All") {
</tr> </tr>
<tr> <tr>
<td> <td>
Interfaces: <?= gettext('Interfaces:'); ?>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<select id="filterlogentriesinterfaces" name="filterlogentriesinterfaces" class="formselect"> <select id="filterlogentriesinterfaces" name="filterlogentriesinterfaces" class="formselect">
<option value="All">ALL</option> <option value="All"><?= gettext('ALL') ?></option>
<?php <?php
$interfaces = get_configured_interface_with_descr(); $interfaces = get_configured_interface_with_descr();
foreach ($interfaces as $iface => $ifacename) : foreach ($interfaces as $iface => $ifacename) :
...@@ -213,7 +213,7 @@ endforeach; ...@@ -213,7 +213,7 @@ endforeach;
</tr> </tr>
<tr> <tr>
<td> <td>
<input id="submita" name="submita" type="submit" class="btn btn-primary formbtn" value="Save" /> <input id="submita" name="submita" type="submit" class="btn btn-primary formbtn" value="<?= gettext('Save') ?>" />
</td> </td>
</tr> </tr>
</tbody> </tbody>
......
...@@ -133,7 +133,7 @@ if ($_REQUEST['updateme']) { ...@@ -133,7 +133,7 @@ if ($_REQUEST['updateme']) {
<td width="60%" class="listr"> <td width="60%" class="listr">
<?php if ($ntpq_counter == 0) : <?php if ($ntpq_counter == 0) :
?> ?>
No active peers available <?= gettext('No active peers available') ?>
<?php <?php
else : else :
?> ?>
...@@ -145,7 +145,7 @@ endif; ?> ...@@ -145,7 +145,7 @@ endif; ?>
<?php if (($gps_ok) && ($gps_lat) && ($gps_lon)) : <?php if (($gps_ok) && ($gps_lat) && ($gps_lon)) :
?> ?>
<tr> <tr>
<td width="40%" class="vncellt">Clock location</td> <td width="40%" class="vncellt"><?= gettext('Clock location') ?></td>
<td width="60%" class="listr"> <td width="60%" class="listr">
<a target="_gmaps" href="http://maps.google.com/?q=<?php echo $gps_lat; ?>,<?php echo $gps_lon; ?>"> <a target="_gmaps" href="http://maps.google.com/?q=<?php echo $gps_lat; ?>,<?php echo $gps_lon; ?>">
<?php <?php
...@@ -159,17 +159,17 @@ endif; ?> ...@@ -159,17 +159,17 @@ endif; ?>
<?php if (isset($gps_sat) || isset($gps_satview)) : <?php if (isset($gps_sat) || isset($gps_satview)) :
?> ?>
<tr> <tr>
<td width="40%" class="vncellt">Satellites</td> <td width="40%" class="vncellt"><?= gettext('Satellites') ?></td>
<td width="60%" class="listr"> <td width="60%" class="listr">
<?php <?php
if (isset($gps_satview)) { if (isset($gps_satview)) {
echo 'in view ' . intval($gps_satview); echo gettext('in view ') . intval($gps_satview);
} }
if (isset($gps_sat) && isset($gps_satview)) { if (isset($gps_sat) && isset($gps_satview)) {
echo ', '; echo ', ';
} }
if (isset($gps_sat)) { if (isset($gps_sat)) {
echo 'in use ' . $gps_sat; echo gettext('in use ') . $gps_sat;
} }
?> ?>
</td> </td>
......
...@@ -183,14 +183,14 @@ endforeach; ?> ...@@ -183,14 +183,14 @@ endforeach; ?>
<table class="table table-striped" style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0"> <table class="table table-striped" style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr> <tr>
<td colspan="6" class="listtopic"> <td colspan="6" class="listtopic">
Peer to Peer Server Instance Statistics <?= gettext('Peer to Peer Server Instance Statistics') ?>
</td> </td>
</tr> </tr>
<tr> <tr>
<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0"> <table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr> <tr>
<td class="listhdrr">Name/Time</td> <td class="listhdrr"><?= gettext('Name/Time') ?></td>
<td class="listhdrr">Remote/Virtual IP</td> <td class="listhdrr"><?= gettext('Remote/Virtual IP') ?></td>
</tr> </tr>
<?php foreach ($sk_servers as $sk_server) : <?php foreach ($sk_servers as $sk_server) :
...@@ -236,14 +236,14 @@ endforeach; ?> ...@@ -236,14 +236,14 @@ endforeach; ?>
<table class="table table-striped" style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0"> <table class="table table-striped" style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr> <tr>
<td colspan="6" class="listtopic"> <td colspan="6" class="listtopic">
Client Instance Statistics <?= gettext('Client Instance Statistics') ?>
</td> </td>
</tr> </tr>
<tr> <tr>
<table class="table table-striped" style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0"> <table class="table table-striped" style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr> <tr>
<td class="listhdrr">Name/Time</td> <td class="listhdrr"><?= gettext('Name/Time') ?></td>
<td class="listhdrr">Remote/Virtual IP</td> <td class="listhdrr"><?= gettext('Remote/Virtual IP') ?></td>
</tr> </tr>
<?php foreach ($clients as $client) : <?php foreach ($clients as $client) :
...@@ -286,9 +286,9 @@ endforeach; ?> ...@@ -286,9 +286,9 @@ endforeach; ?>
} }
if ($DisplayNote) { if ($DisplayNote) {
echo "<br /><b>NOTE:</b> You need to bind each OpenVPN client to enable its management daemon: use 'Local port' setting in the OpenVPN client screen"; echo "<br /><b>".gettext('NOTE:')."</b> ".gettext("You need to bind each OpenVPN client to enable its management daemon: use 'Local port' setting in the OpenVPN client screen");
} }
if ((empty($clients)) && (empty($servers)) && (empty($sk_servers))) { if ((empty($clients)) && (empty($servers)) && (empty($sk_servers))) {
echo "No OpenVPN instance defined"; echo gettext("No OpenVPN instance defined");
} }
...@@ -82,7 +82,7 @@ if ($_POST) { ...@@ -82,7 +82,7 @@ if ($_POST) {
</tr> </tr>
<tr> <tr>
<td> <td>
<input id="submita" name="submita" type="submit" class="btn btn-primary formbtn" value="Upload" /> <input id="submita" name="submita" type="submit" class="btn btn-primary formbtn" value="<?= gettext('Upload') ?>" />
</td> </td>
</tr> </tr>
</table> </table>
......
...@@ -95,7 +95,7 @@ if ($config['widgets']['rssfeed']) { ...@@ -95,7 +95,7 @@ if ($config['widgets']['rssfeed']) {
</tr> </tr>
<tr> <tr>
<td> <td>
Display number of items: <?= gettext('Display number of items:') ?>
</td> </td>
<td> <td>
<select name='rssmaxitems' id='rssmaxitems'> <select name='rssmaxitems' id='rssmaxitems'>
...@@ -110,7 +110,7 @@ if ($config['widgets']['rssfeed']) { ...@@ -110,7 +110,7 @@ if ($config['widgets']['rssfeed']) {
</tr> </tr>
<tr> <tr>
<td> <td>
Widget height: <?= gettext('Widget height:') ?>
</td> </td>
<td> <td>
<select name='rsswidgetheight' id='rsswidgetheight'> <select name='rsswidgetheight' id='rsswidgetheight'>
...@@ -125,7 +125,7 @@ if ($config['widgets']['rssfeed']) { ...@@ -125,7 +125,7 @@ if ($config['widgets']['rssfeed']) {
</tr> </tr>
<tr> <tr>
<td> <td>
Show how many characters from story: <?= gettext('Show how many characters from story:') ?>
</td> </td>
<td> <td>
<select name='rsswidgettextlength' id='rsswidgettextlength'> <select name='rsswidgettextlength' id='rsswidgettextlength'>
...@@ -140,7 +140,7 @@ if ($config['widgets']['rssfeed']) { ...@@ -140,7 +140,7 @@ if ($config['widgets']['rssfeed']) {
</tr> </tr>
<tr> <tr>
<td colspan="2"> <td colspan="2">
<input id="submitc" name="submitc" type="submit" class="btn btn-primary formbtn" value="Save" /> <input id="submitc" name="submitc" type="submit" class="btn btn-primary formbtn" value="<?= gettext('Save') ?>" />
</td> </td>
</tr> </tr>
</table> </table>
......
...@@ -49,7 +49,7 @@ if (isset($_POST['servicestatusfilter'])) { ...@@ -49,7 +49,7 @@ if (isset($_POST['servicestatusfilter'])) {
<input type="hidden" id="services_status-config" name="services_status-config" value="" /> <input type="hidden" id="services_status-config" name="services_status-config" value="" />
<div id="services_status-settings" class="widgetconfigdiv" style="display:none;"> <div id="services_status-settings" class="widgetconfigdiv" style="display:none;">
<form action="/widgets/widgets/services_status.widget.php" method="post" name="iformd"> <form action="/widgets/widgets/services_status.widget.php" method="post" name="iformd">
Comma separated list of services to NOT display in the widget<br /> <?= gettext('Comma separated list of services to NOT display in the widget') ?><br />
<input type="text" size="30" name="servicestatusfilter" class="formfld unknown" id="servicestatusfilter" value="<?= $config['widgets']['servicestatusfilter'] ?>" /> <input type="text" size="30" name="servicestatusfilter" class="formfld unknown" id="servicestatusfilter" value="<?= $config['widgets']['servicestatusfilter'] ?>" />
<input id="submitd" name="submitd" type="submit" class="btn btn-primary" value="Save" /> <input id="submitd" name="submitd" type="submit" class="btn btn-primary" value="Save" />
</form> </form>
...@@ -57,9 +57,9 @@ if (isset($_POST['servicestatusfilter'])) { ...@@ -57,9 +57,9 @@ if (isset($_POST['servicestatusfilter'])) {
<table class="table table-striped" width="100%" border="0" cellpadding="0" cellspacing="0" summary="services"> <table class="table table-striped" width="100%" border="0" cellpadding="0" cellspacing="0" summary="services">
<tr> <tr>
<td class="widgetsubheader" align="center"><b>Service</b></td> <td class="widgetsubheader" align="center"><b><?= gettext('Service') ?></b></td>
<td class="widgetsubheader" align="center"><b>Description</b></td> <td class="widgetsubheader" align="center"><b><?= gettext('Description') ?></b></td>
<td class="widgetsubheader" align="center"><b>Status</b></td> <td class="widgetsubheader" align="center"><b><?= gettext('Status') ?></b></td>
<td class="widgetsubheader">&nbsp;</td> <td class="widgetsubheader">&nbsp;</td>
</tr> </tr>
<?php <?php
......
...@@ -52,13 +52,16 @@ if (count($devs) > 0) { ...@@ -52,13 +52,16 @@ if (count($devs) > 0) {
$dev_ident = exec("diskinfo -v /dev/$dev | grep ident | awk '{print $1}'"); ## get identifier from drive $dev_ident = exec("diskinfo -v /dev/$dev | grep ident | awk '{print $1}'"); ## get identifier from drive
$dev_state = trim(exec("smartctl -H /dev/$dev | awk -F: '/^SMART overall-health self-assessment test result/ {print $2;exit} $dev_state = trim(exec("smartctl -H /dev/$dev | awk -F: '/^SMART overall-health self-assessment test result/ {print $2;exit}
/^SMART Health Status/ {print $2;exit}'")); ## get SMART state from drive /^SMART Health Status/ {print $2;exit}'")); ## get SMART state from drive
$dev_state_translated = "";
switch ($dev_state) { switch ($dev_state) {
case "PASSED": case "PASSED":
case "OK": case "OK":
$dev_state_translated = gettext('OK');
$color = "#90EE90"; $color = "#90EE90";
break; break;
case "": case "":
$dev_state = "Unknown"; $dev_state = "Unknown";
$dev_state_translated = gettext('Unknown');
$color = "#C0B788"; $color = "#C0B788";
break; break;
default: default:
...@@ -69,7 +72,7 @@ if (count($devs) > 0) { ...@@ -69,7 +72,7 @@ if (count($devs) > 0) {
<tr> <tr>
<td class="listlr"><?php echo $dev; ?></td> <td class="listlr"><?php echo $dev; ?></td>
<td class="listr" align="center"><?php echo $dev_ident; ?></td> <td class="listr" align="center"><?php echo $dev_ident; ?></td>
<td class="listr" align="center"><span style="background-color:<?php echo $color; ?>">&nbsp;<?php echo $dev_state; ?>&nbsp;</span></td> <td class="listr" align="center"><span style="background-color:<?php echo $color; ?>">&nbsp;<?php echo $dev_state_translated ?>&nbsp;</span></td>
</tr> </tr>
<?php <?php
} }
......
...@@ -44,9 +44,9 @@ if (isset($_REQUEST['getupdatestatus'])) { ...@@ -44,9 +44,9 @@ if (isset($_REQUEST['getupdatestatus'])) {
} elseif ($pkg_status["repository"]=="error") { } elseif ($pkg_status["repository"]=="error") {
echo "<span class='text-danger'>".gettext("Repository Problem")."</span><br/><span class='btn-link' onclick='checkupdate()'>".gettext("Click to retry")."</span>"; echo "<span class='text-danger'>".gettext("Repository Problem")."</span><br/><span class='btn-link' onclick='checkupdate()'>".gettext("Click to retry")."</span>";
} elseif ($pkg_status["updates"]=="0") { } elseif ($pkg_status["updates"]=="0") {
echo "<span class='text-info'>".gettext("Your system is up to date.")."</span><br/><span class='btn-link' onclick='checkupdate()'>Click to check for updates</span>"; echo "<span class='text-info'>".gettext("Your system is up to date.")."</span><br/><span class='btn-link' onclick='checkupdate()'>".gettext('Click to check for updates')."</span>";
} else { } else {
echo "<span class='text-info'>".gettext("There are ").$pkg_status["updates"].gettext(" update(s) available.")."</span><br/><a href='/ui/core/firmware/#checkupdate'>".gettext("Click to upgrade")."</a> | <span class='btn-link' onclick='checkupdate()'>Re-check now</span>"; echo "<span class='text-info'>".gettext("There are ").$pkg_status["updates"].gettext(" update(s) available.")."</span><br/><a href='/ui/core/firmware/#checkupdate'>".gettext("Click to upgrade")."</a> | <span class='btn-link' onclick='checkupdate()'>".gettext('Re-check now')."</span>";
} }
exit; exit;
...@@ -104,7 +104,7 @@ endif; ?> ...@@ -104,7 +104,7 @@ endif; ?>
</tr> </tr>
<tr> <tr>
<td> <td>
Updates <?= gettext('Updates') ?>
</td> </td>
<td> <td>
<div id='updatestatus'><span class='btn-link' onclick='checkupdate()'><?=gettext("Click to check for updates");?></span></div> <div id='updatestatus'><span class='btn-link' onclick='checkupdate()'><?=gettext("Click to check for updates");?></span></div>
...@@ -229,7 +229,7 @@ endif; ?> ...@@ -229,7 +229,7 @@ endif; ?>
<span class="sr-only"></span> <span class="sr-only"></span>
</div> </div>
</div> </div>
<span id="cpumeter">(Updating in 10 seconds)</span> <span id="cpumeter">(<?= gettext('Updating in 10 seconds') ?>)</span>
</td> </td>
</tr> </tr>
<tr> <tr>
......
...@@ -66,7 +66,7 @@ if(is_numeric($_POST['logfiltercount'])) { ...@@ -66,7 +66,7 @@ if(is_numeric($_POST['logfiltercount'])) {
</td> </td>
<td> <td>
<input id="submit" name="submit" type="submit" class="btn btn-primary formbtn" value="Save" autocomplete="off"> <input id="submit" name="submit" type="submit" class="btn btn-primary formbtn" value="<?= gettext('Save') ?>" autocomplete="off">
</td> </td>
</tr> </tr>
......
...@@ -178,15 +178,15 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) ...@@ -178,15 +178,15 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue)
<table class="table table-striped" width="100%" border="0" summary="thermal sensors widget"> <table class="table table-striped" width="100%" border="0" summary="thermal sensors widget">
<tr> <tr>
<td align="left" colspan="2"> <td align="left" colspan="2">
<span style="font-weight: bold" >Thresholds in &deg;C (1 to 100):</span> <span style="font-weight: bold" ><?= gettext('Thresholds in &deg;C (1 to 100):') ?></span>
</td> </td>
<td align="right" colspan="1"> <td align="right" colspan="1">
<span style="font-weight: bold" >Display settings:</span> <span style="font-weight: bold" ><?= gettext('Display settings:') ?></span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
Zone Warning: <?= gettext('Zone Warning:') ?>
</td> </td>
<td> <td>
<input type="text" maxlength="3" size="3" class="formfld unknown" <input type="text" maxlength="3" size="3" class="formfld unknown"
...@@ -195,7 +195,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) ...@@ -195,7 +195,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue)
value="<?= $thermal_sensors_widget_zoneWarningTempThreshold; ?>" /> value="<?= $thermal_sensors_widget_zoneWarningTempThreshold; ?>" />
</td> </td>
<td> <td>
<label for="thermal_sensors_widget_show_raw_output">Show raw output (no graph): </label> <label for="thermal_sensors_widget_show_raw_output"><?= gettext('Show raw output (no graph):') ?> </label>
<input type="checkbox" <input type="checkbox"
id="thermal_sensors_widget_show_raw_output" id="thermal_sensors_widget_show_raw_output"
name="thermal_sensors_widget_show_raw_output" name="thermal_sensors_widget_show_raw_output"
...@@ -205,7 +205,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) ...@@ -205,7 +205,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue)
</tr> </tr>
<tr> <tr>
<td> <td>
Zone Critical: <?= gettext('Zone Critical:') ?>
</td> </td>
<td> <td>
<input type="text" maxlength="3" size="3" class="formfld unknown" <input type="text" maxlength="3" size="3" class="formfld unknown"
...@@ -214,7 +214,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) ...@@ -214,7 +214,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue)
value="<?= $thermal_sensors_widget_zoneCriticalTempThreshold; ?>" /> value="<?= $thermal_sensors_widget_zoneCriticalTempThreshold; ?>" />
</td> </td>
<td> <td>
<label for="thermal_sensors_widget_show_full_sensor_name">Show full sensor name: </label> <label for="thermal_sensors_widget_show_full_sensor_name"><?= gettext('Show full sensor name:') ?> </label>
<input type="checkbox" <input type="checkbox"
id="thermal_sensors_widget_show_full_sensor_name" id="thermal_sensors_widget_show_full_sensor_name"
name="thermal_sensors_widget_show_full_sensor_name" name="thermal_sensors_widget_show_full_sensor_name"
...@@ -224,7 +224,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) ...@@ -224,7 +224,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue)
</tr> </tr>
<tr> <tr>
<td> <td>
Core Warning: <?= gettext('Core Warning:') ?>
</td> </td>
<td> <td>
<input type="text" maxlength="3" size="3" class="formfld unknown" <input type="text" maxlength="3" size="3" class="formfld unknown"
...@@ -233,7 +233,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) ...@@ -233,7 +233,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue)
value="<?= $thermal_sensors_widget_coreWarningTempThreshold ?>" /> value="<?= $thermal_sensors_widget_coreWarningTempThreshold ?>" />
</td> </td>
<td> <td>
<label for="thermal_sensors_widget_pulsate_warning">Pulsate Warning: </label> <label for="thermal_sensors_widget_pulsate_warning"><?= gettext('Pulsate Warning:') ?> </label>
<input type="checkbox" <input type="checkbox"
id="thermal_sensors_widget_pulsate_warning" id="thermal_sensors_widget_pulsate_warning"
name="thermal_sensors_widget_pulsate_warning" name="thermal_sensors_widget_pulsate_warning"
...@@ -243,7 +243,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) ...@@ -243,7 +243,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue)
</tr> </tr>
<tr> <tr>
<td> <td>
Core Critical: <?= gettext('Core Critical:') ?>
</td> </td>
<td> <td>
<input type="text" maxlength="3" size="3" class="formfld unknown" <input type="text" maxlength="3" size="3" class="formfld unknown"
...@@ -252,7 +252,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) ...@@ -252,7 +252,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue)
value="<?= $thermal_sensors_widget_coreCriticalTempThreshold ?>" /> value="<?= $thermal_sensors_widget_coreCriticalTempThreshold ?>" />
</td> </td>
<td> <td>
<label for="thermal_sensors_widget_pulsate_critical">Pulsate Critical: </label> <label for="thermal_sensors_widget_pulsate_critical"><?= gettext('Pulsate Critical:') ?> </label>
<input type="checkbox" <input type="checkbox"
id="thermal_sensors_widget_pulsate_critical" id="thermal_sensors_widget_pulsate_critical"
name="thermal_sensors_widget_pulsate_critical" name="thermal_sensors_widget_pulsate_critical"
...@@ -262,13 +262,13 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) ...@@ -262,13 +262,13 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue)
</tr> </tr>
<tr> <tr>
<td colspan="3"> <td colspan="3">
<input type="submit" id="thermal_sensors_widget_submit" name="thermal_sensors_widget_submit" class="btn btn-primary formbtn" value="Save" /> <input type="submit" id="thermal_sensors_widget_submit" name="thermal_sensors_widget_submit" class="btn btn-primary formbtn" value="<?= gettext('Save') ?>" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="3"> <td colspan="3">
<span>* You can configure a proper Thermal Sensor / Module under <br /> <span>* <?= gettext('You can configure a proper Thermal Sensor / Module under <br />
&nbsp;&nbsp;&nbsp;<a href="system_advanced_misc.php">System &gt; Advanced &gt; Miscellaneous : Thermal Sensors section</a>.</span> &nbsp;&nbsp;&nbsp;<a href="system_advanced_misc.php">System &gt; Advanced &gt; Miscellaneous : Thermal Sensors section</a>.') ?></span>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -277,7 +277,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) ...@@ -277,7 +277,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue)
<div style="padding: 5px"> <div style="padding: 5px">
<div id="thermalSensorsContainer" class="listr"> <div id="thermalSensorsContainer" class="listr">
(Updating...)<br /><br /> (<?= gettext('Updating...') ?>)<br /><br />
</div> </div>
</div> </div>
......
...@@ -111,7 +111,7 @@ if (isset($a_config["scale_type"])) { ...@@ -111,7 +111,7 @@ if (isset($a_config["scale_type"])) {
<tr> <tr>
<td> <td>
Default AutoScale: <?= gettext('Default AutoScale:') ?>
</td> </td>
</tr> </tr>
<?php <?php
...@@ -145,12 +145,12 @@ if (isset($a_config["scale_type"])) { ...@@ -145,12 +145,12 @@ if (isset($a_config["scale_type"])) {
}?>><?= $i ?></option> }?>><?= $i ?></option>
<?php <?php
} ?> } ?>
</select>&nbsp; Seconds<br />&nbsp; &nbsp; &nbsp; <b>Note:</b> changing this setting will increase CPU utilization<br /><br /> </select>&nbsp; <?= gettext('Seconds') ?><br />&nbsp; &nbsp; &nbsp; <b><?= gettext('Note:') ?></b> <?= gettext('changing this setting will increase CPU utilization') ?><br /><br />
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<input id="submit_settings" name="submit_settings" type="submit" class="formbtn btn btn-primary" value="Save Settings" /> <input id="submit_settings" name="submit_settings" type="submit" class="formbtn btn btn-primary" value="<?= gettext('Save Settings') ?>" />
</td> </td>
</tr> </tr>
</tbody> </tbody>
......
...@@ -76,4 +76,4 @@ if (count($wolcomputers) > 0) { ...@@ -76,4 +76,4 @@ if (count($wolcomputers) > 0) {
} }
?> ?>
</table> </table>
<center><a href="status_dhcp_leases.php" class="navlink">DHCP Leases Status</a></center> <center><a href="status_dhcp_leases.php" class="navlink"><?= gettext('DHCP Leases Status') ?></a></center>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment