From 9b888c18e372a28f612e5bad06aed6398527d394 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 1 Nov 2009 17:30:15 +0000 Subject: [PATCH] libs: fix some more translation errors --- libs/cbi/luasrc/view/cbi/dynlist.htm | 2 +- libs/core/luasrc/model/network/wireless.lua | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/libs/cbi/luasrc/view/cbi/dynlist.htm b/libs/cbi/luasrc/view/cbi/dynlist.htm index aa794c65f..8e2bda8f9 100644 --- a/libs/cbi/luasrc/view/cbi/dynlist.htm +++ b/libs/cbi/luasrc/view/cbi/dynlist.htm @@ -37,7 +37,7 @@ $Id$ -%> }, '<%- if not self.rmempty and not self.optional then -%> <%-:cbi_select-%> - <%- end -%>', '<%:-- custom --%>'); + <%- end -%>', '<%: -- custom -- %>'); <% end -%> <% if i <= #vals then %>
diff --git a/libs/core/luasrc/model/network/wireless.lua b/libs/core/luasrc/model/network/wireless.lua index 1dfc70e88..37819bd12 100644 --- a/libs/core/luasrc/model/network/wireless.lua +++ b/libs/core/luasrc/model/network/wireless.lua @@ -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)") } -- 2.25.1