libs: fix some more translation errors
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 1 Nov 2009 17:30:15 +0000 (17:30 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 1 Nov 2009 17:30:15 +0000 (17:30 +0000)
libs/cbi/luasrc/view/cbi/dynlist.htm
libs/core/luasrc/model/network/wireless.lua

index aa794c65f52914881130bfd7111afdcdb0424db5..8e2bda8f9873e66530288c1ae6c81d61c747dbcf 100644 (file)
@@ -37,7 +37,7 @@ $Id$
                        -%>
                        }, '<%- if not self.rmempty and not self.optional then -%>
                                <%-:cbi_select-%>
-                       <%- end -%>', '<%:-- custom --%>');
+                       <%- end -%>', '<%: -- custom -- %>');
                </script>
        <% end -%>
 <% if i <= #vals then %><br />
index 1dfc70e88e6bbd4ff7da015ea2376ac3f93c0f89..37819bd1235b4eb4b67ea004fcb3291b9b9cf627 100644 (file)
@@ -63,10 +63,21 @@ function init(self, cursor)
                end)
 end
 
+local function _mode(m)
+       if     m == "ap"      then m = "AP"
+       elseif m == "sta"     then m = "Client"
+       elseif m == "adhoc"   then m = "Ad-Hoc"
+       elseif m == "mesh"    then m = "Mesh"
+       elseif m == "monitor" then m = "Monitor"
+       end
+
+       return m or "Client"
+end
+
 function shortname(self, iface)
        if iface.dev and iface.dev.wifi then
                return "%s %q" %{
-                       i18n.translate(iface.dev.wifi.mode or "Client"), 
+                       i18n.translate(_mode(iface.dev.wifi.mode)),
                        iface.dev.wifi.ssid or iface.dev.wifi.bssid
                                or i18n.translate("(hidden)")
                }