X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=applications%2Fluci-app-travelmate%2Fluasrc%2Fview%2Ftravelmate%2Fwifi_scan.htm;h=a8f63a17e28e3a8124acee31eb219a8ae734a097;hb=8f5604ee9e24c33dc53be979b73f28c712570bca;hp=aea194cde2fa49f515325a89eb515c628f3432d0;hpb=c67066ebbf2fcd6b3c82ba2145404a6246b2e33f;p=project%2Fluci.git diff --git a/applications/luci-app-travelmate/luasrc/view/travelmate/wifi_scan.htm b/applications/luci-app-travelmate/luasrc/view/travelmate/wifi_scan.htm index aea194cde..a8f63a17e 100644 --- a/applications/luci-app-travelmate/luasrc/view/travelmate/wifi_scan.htm +++ b/applications/luci-app-travelmate/luasrc/view/travelmate/wifi_scan.htm @@ -7,7 +7,8 @@ This is free software, licensed under the Apache License, Version 2.0 local sys = require("luci.sys") local utl = require("luci.util") local dev = luci.http.formvalue("device") - local iw = luci.sys.wifi.getiwinfo(dev) + local iw = luci.sys.wifi.getiwinfo(dev) + local wpa_label = {translate("WPA"), translate("WPA2"), translate("WPA/WPA2")} if not iw then luci.http.redirect(luci.dispatcher.build_url("admin/services/travelmate/stations")) @@ -17,7 +18,7 @@ This is free software, licensed under the Apache License, Version 2.0 if info.wep == true then return translate("WEP") elseif info.wpa > 0 then - return translatef("%s (%s/%s)", (info.wpa == 3) and translate("WPA/WPA2") or (info.wpa == 2 and "WPA2" or "WPA"), table.concat(info.auth_suites), table.concat(info.group_ciphers)) + return "%s (%s/%s)" %{wpa_label[info.wpa], table.concat(info.auth_suites), table.concat(info.group_ciphers)} elseif info.enabled then return translate("Unknown") else