summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-full/luasrc/view/admin_status
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-08-14 13:08:18 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-08-14 13:08:18 +0000
commita1415d74302e12459379437ca8d6af0ff4cf1921 (patch)
treeb21a8c74c8418a69e60610aaa07495e5ed9b3d57 /modules/admin-full/luasrc/view/admin_status
parent2c844d42d819f1d2b5f9827b3e079801f238938d (diff)
modules: make most remaining hardcoded strings translatable, patch by "BasicXP" <basicxp@ubuntu.com>
Diffstat (limited to 'modules/admin-full/luasrc/view/admin_status')
-rw-r--r--modules/admin-full/luasrc/view/admin_status/bandwidth.htm22
-rw-r--r--modules/admin-full/luasrc/view/admin_status/index.htm28
-rw-r--r--modules/admin-full/luasrc/view/admin_status/wireless.htm18
3 files changed, 34 insertions, 34 deletions
diff --git a/modules/admin-full/luasrc/view/admin_status/bandwidth.htm b/modules/admin-full/luasrc/view/admin_status/bandwidth.htm
index 003c3ebdc0..0c53c95bed 100644
--- a/modules/admin-full/luasrc/view/admin_status/bandwidth.htm
+++ b/modules/admin-full/luasrc/view/admin_status/bandwidth.htm
@@ -71,25 +71,25 @@ $Id$
function bandwidth_label(bytes, br)
{
- var uby = 'KByte';
+ var uby = '<%:kB/s%>';
var kby = (bytes / 1024);
if (kby >= 1024)
{
- uby = 'MByte';
+ uby = '<%:MB/s%>';
kby = kby / 1024;
}
- var ubi = 'KBit';
+ var ubi = '<%:kbit/s%>';
var kbi = (bytes * 8 / 1024);
if (kbi >= 1024)
{
- ubi = 'MBit';
+ ubi = '<%:Mbit/s%>';
kbi = kbi / 1024;
}
- return String.format("%f %s/s%s(%f %s/s)",
+ return String.format("%f %s%s(%f %s)",
kbi.toFixed(2), ubi,
br ? '<br />' : ' ',
kby.toFixed(2), uby
@@ -288,23 +288,23 @@ $Id$
<table style="width:100%; table-layout:fixed" cellspacing="5">
<tr>
<td style="text-align:right; vertical-align:top"><strong style="border-bottom:2px solid blue"><%:Inbound:%></strong></td>
- <td id="rx_bw_cur">0 kbit/s<br />(0 KB/s)</td>
+ <td id="rx_bw_cur">0 <%:kbit/s%><br />(0 <%:kB/s%>)</td>
<td style="text-align:right; vertical-align:top"><strong><%:Average:%></strong></td>
- <td id="rx_bw_avg">0 kbit/s<br />(0 KB/s)</td>
+ <td id="rx_bw_avg">0 <%:kbit/s%><br />(0 <%:kB/s%>)</td>
<td style="text-align:right; vertical-align:top"><strong><%:Peak:%></strong></td>
- <td id="rx_bw_peak">0 kbit/s<br />(0 KB/s)</td>
+ <td id="rx_bw_peak">0 <%:kbit/s%><br />(0 <%:kB/s%>)</td>
</tr>
<tr>
<td style="text-align:right; vertical-align:top"><strong style="border-bottom:2px solid green"><%:Outbound:%></strong></td>
- <td id="tx_bw_cur">0 kbit/s<br />(0 KB/s)</td>
+ <td id="tx_bw_cur">0 <%:kbit/s%><br />(0 <%:kB/s%>)</td>
<td style="text-align:right; vertical-align:top"><strong><%:Average:%></strong></td>
- <td id="tx_bw_avg">0 kbit/s<br />(0 KB/s)</td>
+ <td id="tx_bw_avg">0 <%:kbit/s%><br />(0 <%:kB/s%>)</td>
<td style="text-align:right; vertical-align:top"><strong><%:Peak:%></strong></td>
- <td id="tx_bw_peak">0 kbit/s<br />(0 KB/s)</td>
+ <td id="tx_bw_peak">0 <%:kbit/s%><br />(0 <%:kB/s%>)</td>
</tr>
</table>
diff --git a/modules/admin-full/luasrc/view/admin_status/index.htm b/modules/admin-full/luasrc/view/admin_status/index.htm
index 18e590d2dc..4f2a651a5d 100644
--- a/modules/admin-full/luasrc/view/admin_status/index.htm
+++ b/modules/admin-full/luasrc/view/admin_status/index.htm
@@ -302,8 +302,8 @@ $Id$
'</td><td style="text-align:left; padding:3px"><small>' +
'<strong><%:SSID%>:</strong> <a href="%s">%h</a><br />' +
'<strong><%:Mode%>:</strong> %s<br />' +
- '<strong><%:Channel%>:</strong> %d (%.3f GHz)<br />' +
- '<strong><%:Bitrate%>:</strong> %s Mb/s<br />',
+ '<strong><%:Channel%>:</strong> %d (%.3f <%:GHz%>)<br />' +
+ '<strong><%:Bitrate%>:</strong> %s <%:Mbit/s%><br />',
icon, net.signal, net.noise,
net.quality,
net.link, net.ssid,
@@ -386,7 +386,7 @@ $Id$
icon = "<%=resource%>/icons/signal-75-100.png";
tr.insertCell(-1).innerHTML = String.format(
- '<img src="%s" title="<%:Signal%>: %d dBm / <%:Noise%>: %d dBm" />',
+ '<img src="%s" title="<%:Signal%>: %d <%:dBm%> / <%:Noise%>: %d <%:dBm%>" />',
icon, assoclist[i].signal, assoclist[i].noise
);
@@ -398,17 +398,17 @@ $Id$
assoclist[i].name
);
- tr.insertCell(-1).innerHTML = String.format('%d dBm', assoclist[i].signal);
- tr.insertCell(-1).innerHTML = String.format('%d dBm', assoclist[i].noise);
+ tr.insertCell(-1).innerHTML = String.format('%d <%:dBm%>', assoclist[i].signal);
+ tr.insertCell(-1).innerHTML = String.format('%d <%:dBm%>', assoclist[i].noise);
tr.insertCell(-1).innerHTML = (assoclist[i].rx_mcs > -1)
- ? String.format('%.1f Mbit/s, MCS %d, %dMHz', assoclist[i].rx_rate / 1000, assoclist[i].rx_mcs, assoclist[i].rx_40mhz ? 40 : 20)
- : String.format('%.1f Mbit/s', assoclist[i].rx_rate / 1000)
+ ? String.format('%.1f <%:Mbit/s%>, MCS %d, %d<%:MHz%>', assoclist[i].rx_rate / 1000, assoclist[i].rx_mcs, assoclist[i].rx_40mhz ? 40 : 20)
+ : String.format('%.1f <%:Mbit/s%>', assoclist[i].rx_rate / 1000)
;
tr.insertCell(-1).innerHTML = (assoclist[i].tx_mcs > -1)
- ? String.format('%.1f Mbit/s, MCS %d, %dMHz', assoclist[i].tx_rate / 1000, assoclist[i].tx_mcs, assoclist[i].tx_40mhz ? 40 : 20)
- : String.format('%.1f Mbit/s', assoclist[i].tx_rate / 1000)
+ ? String.format('%.1f <%:Mbit/s%>, MCS %d, %d<%:MHz%>', assoclist[i].tx_rate / 1000, assoclist[i].tx_mcs, assoclist[i].tx_40mhz ? 40 : 20)
+ : String.format('%.1f <%:Mbit/s%>', assoclist[i].tx_rate / 1000)
;
}
@@ -438,23 +438,23 @@ $Id$
if (e = document.getElementById('memtotal'))
e.innerHTML = progressbar(
- (info.memfree + info.membuffers + info.memcached) + " kB",
- info.memtotal + " kB"
+ (info.memfree + info.membuffers + info.memcached) + " <%:kB%>",
+ info.memtotal + " <%:kB%>"
);
if (e = document.getElementById('memfree'))
e.innerHTML = progressbar(
- info.memfree + " kB", info.memtotal + " kB"
+ info.memfree + " <%:kB%>", info.memtotal + " <%:kB%>"
);
if (e = document.getElementById('memcache'))
e.innerHTML = progressbar(
- info.memcached + " kB", info.memtotal + " kB"
+ info.memcached + " <%:kB%>", info.memtotal + " <%:kB%>"
);
if (e = document.getElementById('membuff'))
e.innerHTML = progressbar(
- info.membuffers + " kB", info.memtotal + " kB"
+ info.membuffers + " <%:kB%>", info.memtotal + " <%:kB%>"
);
if (e = document.getElementById('conns'))
diff --git a/modules/admin-full/luasrc/view/admin_status/wireless.htm b/modules/admin-full/luasrc/view/admin_status/wireless.htm
index 1524363183..ff8382bf0b 100644
--- a/modules/admin-full/luasrc/view/admin_status/wireless.htm
+++ b/modules/admin-full/luasrc/view/admin_status/wireless.htm
@@ -286,14 +286,14 @@ $Id$
function wireless_label(dbm, noise)
{
if (noise)
- return String.format("%d dBm (SNR %d dBm)", noise_floor + dbm - 255, dbm - noise);
+ return String.format("%d <%:dBm%> (SNR %d <%:dBm%>)", noise_floor + dbm - 255, dbm - noise);
else
- return String.format("%d dBm", noise_floor + dbm - 255);
+ return String.format("%d <%:dBm%>", noise_floor + dbm - 255);
}
function rate_label(mbit)
{
- return String.format("%d MBit/s", mbit);
+ return String.format("%d <%:Mbit/s%>", mbit);
}
label_25.firstChild.data = wireless_label(1.1 * 0.25 * data_max);
@@ -338,23 +338,23 @@ $Id$
<table style="width:100%; table-layout:fixed" cellspacing="5">
<tr>
<td style="text-align:right; vertical-align:top"><strong style="border-bottom:2px solid blue"><%:Signal:%></strong></td>
- <td id="rssi_bw_cur">0 dBm</td>
+ <td id="rssi_bw_cur">0 <%:dBm%></td>
<td style="text-align:right; vertical-align:top"><strong><%:Average:%></strong></td>
- <td id="rssi_bw_avg">0 dBm</td>
+ <td id="rssi_bw_avg">0 <%:dBm%></td>
<td style="text-align:right; vertical-align:top"><strong><%:Peak:%></strong></td>
- <td id="rssi_bw_peak">0 dBm</td>
+ <td id="rssi_bw_peak">0 <%:dBm%></td>
</tr>
<tr>
<td style="text-align:right; vertical-align:top"><strong style="border-bottom:2px solid red"><%:Noise:%></strong></td>
- <td id="noise_bw_cur">0 dBm</td>
+ <td id="noise_bw_cur">0 <%:dBm%></td>
<td style="text-align:right; vertical-align:top"><strong><%:Average:%></strong></td>
- <td id="noise_bw_avg">0 dBm</td>
+ <td id="noise_bw_avg">0 <%:dBm%></td>
<td style="text-align:right; vertical-align:top"><strong><%:Peak:%></strong></td>
- <td id="noise_bw_peak">0 dBm</td>
+ <td id="noise_bw_peak">0 <%:dBm%></td>
</tr>
</table>