diff options
Diffstat (limited to 'modules/admin-full')
12 files changed, 69 insertions, 69 deletions
diff --git a/modules/admin-full/luasrc/view/admin_network/diagnostics.htm b/modules/admin-full/luasrc/view/admin_network/diagnostics.htm index 953b98839..a991f9a48 100644 --- a/modules/admin-full/luasrc/view/admin_network/diagnostics.htm +++ b/modules/admin-full/luasrc/view/admin_network/diagnostics.htm @@ -66,17 +66,17 @@ $Id$ <div style="width:30%; float:left; text-align:center"> <input style="width: 50%" type="text" value="openwrt.org" name="ping" /> - <input type="button" value="Ping" class="cbi-button cbi-button-apply" onclick="update_status(this.form.ping)" /> + <input type="button" value="<%:Ping%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.ping)" /> </div> <div style="width:30%; float:left; text-align:center"> <input style="width: 50%" type="text" value="openwrt.org" name="traceroute" /> - <input type="button" value="Traceroute" class="cbi-button cbi-button-apply" onclick="update_status(this.form.traceroute)" /> + <input type="button" value="<%:Traceroute%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.traceroute)" /> </div> <div style="width:30%; float:left; text-align:center"> <input style="width: 50%" type="text" value="openwrt.org" name="nslookup" /> - <input type="button" value="Nslookup" class="cbi-button cbi-button-apply" onclick="update_status(this.form.nslookup)" /> + <input type="button" value="<%:Nslookup%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.nslookup)" /> </div> <br style="clear:both" /><br /> diff --git a/modules/admin-full/luasrc/view/admin_network/iface_overview.htm b/modules/admin-full/luasrc/view/admin_network/iface_overview.htm index 9580a9dca..1312b4c16 100644 --- a/modules/admin-full/luasrc/view/admin_network/iface_overview.htm +++ b/modules/admin-full/luasrc/view/admin_network/iface_overview.htm @@ -134,7 +134,7 @@ You may obtain a copy of the License at if (ifc.type != 'tunnel') { - html += String.format('<strong><%:MAC Address%>:</strong> %s<br />', ifc.macaddr); + html += String.format('<strong><%:MAC-Address%>:</strong> %s<br />', ifc.macaddr); } html += String.format( diff --git a/modules/admin-full/luasrc/view/admin_network/iface_status.htm b/modules/admin-full/luasrc/view/admin_network/iface_status.htm index 428c42fec..813638396 100644 --- a/modules/admin-full/luasrc/view/admin_network/iface_status.htm +++ b/modules/admin-full/luasrc/view/admin_network/iface_status.htm @@ -27,7 +27,7 @@ if (ifc.type != 'tunnel') { - html += String.format('<strong><%:MAC Address%>:</strong> %s<br />', ifc.macaddr); + html += String.format('<strong><%:MAC-Address%>:</strong> %s<br />', ifc.macaddr); } html += String.format( diff --git a/modules/admin-full/luasrc/view/admin_network/wifi_join.htm b/modules/admin-full/luasrc/view/admin_network/wifi_join.htm index 2455b7d6f..d7376e785 100644 --- a/modules/admin-full/luasrc/view/admin_network/wifi_join.htm +++ b/modules/admin-full/luasrc/view/admin_network/wifi_join.htm @@ -105,13 +105,13 @@ $Id$ <% for i, net in ipairs(scanlist(3)) do net.encryption = net.encryption or { } %> <tr class="cbi-section-table-row cbi-rowstyle-<%=1 + ((i-1) % 2)%>"> <td class="cbi-value-field" style="width:16px; padding:3px"> - <abbr title="Signal: <%=net.signal%> dB / Quality: <%=net.quality%>/<%=net.quality_max%>"> + <abbr title="<%:Signal%>: <%=net.signal%> <%:dB%> / <%:Quality%>: <%=net.quality%>/<%=net.quality_max%>"> <img src="<%=guess_wifi_signal(net)%>" /><br /> <small><%=percent_wifi_signal(net)%>%</small> </abbr> </td> <td class="cbi-value-field" style="vertical-align:middle; text-align:left; padding:3px"> - <big><strong><%=net.ssid and utl.pcdata(net.ssid) or "<em>hidden</em>"%></strong></big><br /> + <big><strong><%=net.ssid and utl.pcdata(net.ssid) or "<em>%s</em>" % translate("hidden")%></strong></big><br /> <strong>Channel:</strong> <%=net.channel%> | <strong>Mode:</strong> <%=net.mode%> | <strong>BSSID:</strong> <%=net.bssid%> | diff --git a/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm b/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm index 4ba01a5d1..1f59a1830 100644 --- a/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm +++ b/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm @@ -43,7 +43,7 @@ $Id$ -- wl.o if name == "wl" then - local name = "Broadcom 802.11%s Wireless Controller" % bands + local name = translatef("Broadcom 802.11%s Wireless Controller", bands) local nm = 0 local fd = nixio.open("/proc/bus/pci/devices", "r") @@ -53,7 +53,7 @@ $Id$ if ln:match("wl$") then if nm == idx then local version = ln:match("^%S+%s+%S%S%S%S([0-9a-f]+)") - name = string.format( + name = translatef( "Broadcom BCM%04x 802.11 Wireless Controller", tonumber(version, 16) ) @@ -71,23 +71,23 @@ $Id$ -- madwifi elseif name == "ath" or name == "wifi" then - return "Atheros 802.11%s Wireless Controller" % bands + return translatef("Atheros 802.11%s Wireless Controller", bands) -- ralink elseif name == "ra" then - return "RaLink 802.11%s Wireless Controller" % bands + return translatef("RaLink 802.11%s Wireless Controller", bands) -- hermes elseif name == "eth" then - return "Hermes 802.11b Wireless Controller" + return translate("Hermes 802.11b Wireless Controller") -- hostap elseif name == "wlan" and fs.isdirectory("/proc/net/hostap/" .. ifname) then - return "Prism2/2.5/3 802.11b Wireless Controller" + return translate("Prism2/2.5/3 802.11b Wireless Controller") -- dunno yet else - return "Generic 802.11%s Wireless Controller" % bands + return translatef("Generic 802.11%s Wireless Controller", bands) end end @@ -204,7 +204,7 @@ $Id$ var sig = document.getElementById(iw.id + '-iw-signal'); if (sig) sig.innerHTML = String.format( - '<img src="%s" title="<%:Signal%>: %d dBm / <%:Noise%>: %d dBm" /><br />' + + '<img src="%s" title="<%:Signal%>: %d <%:dBm%> / <%:Noise%>: %d <%:dBm%>" /><br />' + '<small>%d%%</small>', icon, iw.signal, iw.noise, p ); @@ -256,8 +256,8 @@ $Id$ { if (is_assoc) dev.innerHTML = String.format( - '<strong><%:Channel%>:</strong> %s (%s GHz) | ' + - '<strong><%:Bitrate%>:</strong> %s Mb/s', + '<strong><%:Channel%>:</strong> %s (%s <%:GHz%>) | ' + + '<strong><%:Bitrate%>:</strong> %s <%:Mbit/s%>', iw.channel ? iw.channel : '?', iw.frequency ? iw.frequency : '?', iw.bitrate ? iw.bitrate : '?' @@ -296,7 +296,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[j].signal, assoclist[j].noise ); @@ -306,17 +306,17 @@ $Id$ tr.insertCell(-1).innerHTML = arptable[assoclist[j].bssid] ? arptable[assoclist[j].bssid] : '?'; - tr.insertCell(-1).innerHTML = String.format('%d dBm', assoclist[j].signal); - tr.insertCell(-1).innerHTML = String.format('%d dBm', assoclist[j].noise); + tr.insertCell(-1).innerHTML = String.format('%d <%:dBm%>', assoclist[j].signal); + tr.insertCell(-1).innerHTML = String.format('%d <%:dBm%>', assoclist[j].noise); tr.insertCell(-1).innerHTML = (assoclist[j].rx_mcs > -1) - ? String.format('%.1f Mbit/s, MCS %d, %dMHz', assoclist[j].rx_rate / 1000, assoclist[j].rx_mcs, assoclist[j].rx_40mhz ? 40 : 20) - : String.format('%.1f Mbit/s', assoclist[j].rx_rate / 1000) + ? String.format('%.1f <%:Mbit/s%>, MCS %d, %d<%:MHz%>', assoclist[j].rx_rate / 1000, assoclist[j].rx_mcs, assoclist[j].rx_40mhz ? 40 : 20) + : String.format('%.1f <%:Mbit/s%>', assoclist[j].rx_rate / 1000) ; tr.insertCell(-1).innerHTML = (assoclist[j].tx_mcs > -1) - ? String.format('%.1f Mbit/s, MCS %d, %dMHz', assoclist[j].tx_rate / 1000, assoclist[j].tx_mcs, assoclist[j].tx_40mhz ? 40 : 20) - : String.format('%.1f Mbit/s', assoclist[j].tx_rate / 1000) + ? String.format('%.1f <%:Mbit/s%>, MCS %d, %d<%:MHz%>', assoclist[j].tx_rate / 1000, assoclist[j].tx_mcs, assoclist[j].tx_40mhz ? 40 : 20) + : String.format('%.1f <%:Mbit/s%>', assoclist[j].tx_rate / 1000) ; rowstyle = (rowstyle == 1) ? 2 : 1; @@ -414,8 +414,8 @@ $Id$ <tr class="cbi-section-table-titles"> <th class="cbi-section-table-cell"></th> <th class="cbi-section-table-cell"><%:SSID%></th> - <th class="cbi-section-table-cell"><%:MAC%></th> - <th class="cbi-section-table-cell"><%:Address%></th> + <th class="cbi-section-table-cell"><%:MAC-Address%></th> + <th class="cbi-section-table-cell"><%:IPv4-Address%></th> <th class="cbi-section-table-cell"><%:Signal%></th> <th class="cbi-section-table-cell"><%:Noise%></th> <th class="cbi-section-table-cell"><%:RX Rate%></th> diff --git a/modules/admin-full/luasrc/view/admin_network/wifi_status.htm b/modules/admin-full/luasrc/view/admin_network/wifi_status.htm index 900071b89..2484fd3c6 100644 --- a/modules/admin-full/luasrc/view/admin_network/wifi_status.htm +++ b/modules/admin-full/luasrc/view/admin_network/wifi_status.htm @@ -27,7 +27,7 @@ var s = document.getElementById('<%=self.option%>-iw-signal'); if (s) s.innerHTML = String.format( - '<img src="%s" title="<%:Signal%>: %d dBm / <%:Noise%>: %d dBm" /><br />' + + '<img src="%s" title="<%:Signal%>: %d <%:dBm%> / <%:Noise%>: %d <%:dBm%>" /><br />' + '<small>%d%%</small>', icon, iw.signal, iw.noise, p ); @@ -38,11 +38,11 @@ '<strong><%:SSID%>:</strong> %h<br />' + '<strong><%:BSSID%>:</strong> %s | ' + '<strong><%:Encryption%>:</strong> %s<br />' + - '<strong><%:Channel%>:</strong> %d (%.3f GHz) | ' + - '<strong><%:Tx-Power%>:</strong> %d dBm<br />' + - '<strong><%:Signal%>:</strong> %d dBm | ' + - '<strong><%:Noise%>:</strong> %d dBm<br />' + - '<strong><%:Bit Rate%>:</strong> %.1f MBit/s | ' + + '<strong><%:Channel%>:</strong> %d (%.3f <%:GHz%>) | ' + + '<strong><%:Tx-Power%>:</strong> %d <%:dBm%><br />' + + '<strong><%:Signal%>:</strong> %d <%:dBm%> | ' + + '<strong><%:Noise%>:</strong> %d <%:dBm%><br />' + + '<strong><%:Bitrate%>:</strong> %.1f <%:Mbit/s%> | ' + '<strong><%:Country%>:</strong> %s', iw.mode, iw.ssid, iw.bssid, iw.encryption ? iw.encryption : '<%:None%>', diff --git a/modules/admin-full/luasrc/view/admin_status/bandwidth.htm b/modules/admin-full/luasrc/view/admin_status/bandwidth.htm index 003c3ebdc..0c53c95be 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 18e590d2d..4f2a651a5 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 152436318..ff8382bf0 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> diff --git a/modules/admin-full/luasrc/view/admin_uci/apply.htm b/modules/admin-full/luasrc/view/admin_uci/apply.htm index e3231c6b5..f6a68126d 100644 --- a/modules/admin-full/luasrc/view/admin_uci/apply.htm +++ b/modules/admin-full/luasrc/view/admin_uci/apply.htm @@ -15,7 +15,7 @@ $Id$ <%+header%> -<h2><a id="content" name="content"><%:Configuration / Apply%></a></h2> +<h2><a id="content" name="content"><%:Configuration%> / <%:Apply%></a></h2> <% if changes then %> <%+cbi/apply_xhr%> diff --git a/modules/admin-full/luasrc/view/admin_uci/changes.htm b/modules/admin-full/luasrc/view/admin_uci/changes.htm index 159a7b5f0..2415de316 100644 --- a/modules/admin-full/luasrc/view/admin_uci/changes.htm +++ b/modules/admin-full/luasrc/view/admin_uci/changes.htm @@ -15,7 +15,7 @@ $Id$ <%+header%> -<h2><a id="content" name="content"><%:Configuration / Changes%></a></h2> +<h2><a id="content" name="content"><%:Configuration%> / <%:Changes%></a></h2> <% if changes then %> <%+admin_uci/changelog%> diff --git a/modules/admin-full/luasrc/view/admin_uci/revert.htm b/modules/admin-full/luasrc/view/admin_uci/revert.htm index f6460cf99..739b75204 100644 --- a/modules/admin-full/luasrc/view/admin_uci/revert.htm +++ b/modules/admin-full/luasrc/view/admin_uci/revert.htm @@ -15,7 +15,7 @@ $Id$ <%+header%> -<h2><a id="content" name="content"><%:Configuration / Revert%></a></h2> +<h2><a id="content" name="content"><%:Configuration%> / <%:Revert%></a></h2> <% if changes then %> <%+cbi/apply_xhr%> |