summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-full/luasrc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-08-14 12:45:06 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-08-14 12:45:06 +0000
commit6b128c028146d6a7a0ed630f4be07c1d67cf8fc1 (patch)
tree1261979c7d23ede0025a506d9a72757724dc79ae /modules/admin-full/luasrc
parentd7f865b6b2d6fa791bcf8508773fe69d91584901 (diff)
modules/admin-full: use format_wifi_encryption() in wifi_join.htm to make encryption translatable
Diffstat (limited to 'modules/admin-full/luasrc')
-rw-r--r--modules/admin-full/luasrc/view/admin_network/wifi_join.htm16
1 files changed, 9 insertions, 7 deletions
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 03407b839d..2455b7d6f0 100644
--- a/modules/admin-full/luasrc/view/admin_network/wifi_join.htm
+++ b/modules/admin-full/luasrc/view/admin_network/wifi_join.htm
@@ -50,18 +50,20 @@ $Id$
end
function format_wifi_encryption(info)
- if info.wep == true and not info.wpa_version then
+ if info.wep == true then
return "WEP"
- elseif info.wpa then
- return "<abbr title='Pairwise: %s / Group: %s'>%s - %s</abbr>" % {
+ elseif info.wpa > 0 then
+ return translatef("<abbr title='Pairwise: %s / Group: %s'>%s - %s</abbr>",
table.concat(info.pair_ciphers, ", "),
table.concat(info.group_ciphers, ", "),
- (info.wpa == 3) and "mixed WPA/WPA2"
+ (info.wpa == 3) and translate("mixed WPA/WPA2")
or (info.wpa == 2 and "WPA2" or "WPA"),
table.concat(info.auth_suites, ", ")
- }
+ )
+ elseif info.enabled then
+ return "<em>%s</em>" % translate("unknown")
else
- return "<em>None</em>"
+ return "<em>%s</em>" % translate("open")
end
end
@@ -113,7 +115,7 @@ $Id$
<strong>Channel:</strong> <%=net.channel%> |
<strong>Mode:</strong> <%=net.mode%> |
<strong>BSSID:</strong> <%=net.bssid%> |
- <strong>Encryption:</strong> <%=net.encryption.description or translate("Open")%>
+ <strong>Encryption:</strong> <%=format_wifi_encryption(net.encryption)%>
</td>
<td class="cbi-value-field" style="width:40px">
<form action="<%=REQUEST_URI%>" method="post">