diff options
author | Dirk Brenken <dev@brenken.org> | 2017-12-15 19:17:07 +0100 |
---|---|---|
committer | Dirk Brenken <dev@brenken.org> | 2017-12-15 19:17:07 +0100 |
commit | 8f5604ee9e24c33dc53be979b73f28c712570bca (patch) | |
tree | acb977e4eecaac79b4c74812930319fa43cd5f06 /applications/luci-app-travelmate/luasrc/view/travelmate/wifi_scan.htm | |
parent | c67066ebbf2fcd6b3c82ba2145404a6246b2e33f (diff) |
luci-app-travelmate: sync with travelmate 1.0.0
* Various cleanups & small enhancements
Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'applications/luci-app-travelmate/luasrc/view/travelmate/wifi_scan.htm')
-rw-r--r-- | applications/luci-app-travelmate/luasrc/view/travelmate/wifi_scan.htm | 5 |
1 files changed, 3 insertions, 2 deletions
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 |