modules/admin-full: use format_wifi_encryption() in wifi_join.htm to make encryption translatable
This commit is contained in:
parent
d7f865b6b2
commit
6b128c0281
1 changed files with 9 additions and 7 deletions
|
@ -50,18 +50,20 @@ $Id$
|
||||||
end
|
end
|
||||||
|
|
||||||
function format_wifi_encryption(info)
|
function format_wifi_encryption(info)
|
||||||
if info.wep == true and not info.wpa_version then
|
if info.wep == true then
|
||||||
return "WEP"
|
return "WEP"
|
||||||
elseif info.wpa then
|
elseif info.wpa > 0 then
|
||||||
return "<abbr title='Pairwise: %s / Group: %s'>%s - %s</abbr>" % {
|
return translatef("<abbr title='Pairwise: %s / Group: %s'>%s - %s</abbr>",
|
||||||
table.concat(info.pair_ciphers, ", "),
|
table.concat(info.pair_ciphers, ", "),
|
||||||
table.concat(info.group_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"),
|
or (info.wpa == 2 and "WPA2" or "WPA"),
|
||||||
table.concat(info.auth_suites, ", ")
|
table.concat(info.auth_suites, ", ")
|
||||||
}
|
)
|
||||||
|
elseif info.enabled then
|
||||||
|
return "<em>%s</em>" % translate("unknown")
|
||||||
else
|
else
|
||||||
return "<em>None</em>"
|
return "<em>%s</em>" % translate("open")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -113,7 +115,7 @@ $Id$
|
||||||
<strong>Channel:</strong> <%=net.channel%> |
|
<strong>Channel:</strong> <%=net.channel%> |
|
||||||
<strong>Mode:</strong> <%=net.mode%> |
|
<strong>Mode:</strong> <%=net.mode%> |
|
||||||
<strong>BSSID:</strong> <%=net.bssid%> |
|
<strong>BSSID:</strong> <%=net.bssid%> |
|
||||||
<strong>Encryption:</strong> <%=net.encryption.description or translate("Open")%>
|
<strong>Encryption:</strong> <%=format_wifi_encryption(net.encryption)%>
|
||||||
</td>
|
</td>
|
||||||
<td class="cbi-value-field" style="width:40px">
|
<td class="cbi-value-field" style="width:40px">
|
||||||
<form action="<%=REQUEST_URI%>" method="post">
|
<form action="<%=REQUEST_URI%>" method="post">
|
||||||
|
|
Loading…
Reference in a new issue