From 7c765875884d6866c53b63757731b079bace2e9b Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 31 Oct 2009 15:54:11 +0000 Subject: all: change most translate statements to new format, some need manual cleanup --- .../luasrc/model/cbi/luci_fw/miniportfw.lua | 6 ++-- .../luci-fw/luasrc/model/cbi/luci_fw/redirect.lua | 8 +++--- .../luci-fw/luasrc/model/cbi/luci_fw/rrule.lua | 22 +++++++-------- .../luci-fw/luasrc/model/cbi/luci_fw/traffic.lua | 20 +++++++------- .../luci-fw/luasrc/model/cbi/luci_fw/trule.lua | 32 +++++++++++----------- .../luci-fw/luasrc/model/cbi/luci_fw/zones.lua | 20 +++++++------- 6 files changed, 54 insertions(+), 54 deletions(-) (limited to 'applications/luci-fw/luasrc/model') diff --git a/applications/luci-fw/luasrc/model/cbi/luci_fw/miniportfw.lua b/applications/luci-fw/luasrc/model/cbi/luci_fw/miniportfw.lua index b192b610c2..ed849f4cc8 100644 --- a/applications/luci-fw/luasrc/model/cbi/luci_fw/miniportfw.lua +++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/miniportfw.lua @@ -12,7 +12,7 @@ You may obtain a copy of the License at $Id$ ]]-- require("luci.sys") -m = Map("firewall", translate("fw_portfw"), translate("fw_portfw1")) +m = Map("firewall", translate("Port forwarding"), translate("Port forwarding allows to provide network services in the internal network to an external network.")) s = m:section(TypedSection, "redirect", "") @@ -23,10 +23,10 @@ s.template = "cbi/tblsection" s.addremove = true s.anonymous = true -name = s:option(Value, "_name", translate("name"), translate("cbi_optional")) +name = s:option(Value, "_name", translate("Name"), translate(" (optional)")) name.size = 10 -proto = s:option(ListValue, "proto", translate("protocol")) +proto = s:option(ListValue, "proto", translate("Protocol")) proto:value("tcp", "TCP") proto:value("udp", "UDP") proto:value("tcpudp", "TCP+UDP") diff --git a/applications/luci-fw/luasrc/model/cbi/luci_fw/redirect.lua b/applications/luci-fw/luasrc/model/cbi/luci_fw/redirect.lua index 3aa1066f52..52a3c39d67 100644 --- a/applications/luci-fw/luasrc/model/cbi/luci_fw/redirect.lua +++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/redirect.lua @@ -12,7 +12,7 @@ You may obtain a copy of the License at $Id$ ]]-- require("luci.sys") -m = Map("firewall", translate("fw_redirect"), translate("fw_redirect_desc")) +m = Map("firewall", translate("Traffic Redirection"), translate("Traffic redirection allows you to change the destination address of forwarded packets.")) s = m:section(TypedSection, "redirect", "") @@ -21,17 +21,17 @@ s.addremove = true s.anonymous = true s.extedit = luci.dispatcher.build_url("admin", "network", "firewall", "redirect", "%s") -name = s:option(Value, "_name", translate("name"), translate("cbi_optional")) +name = s:option(Value, "_name", translate("Name"), translate(" (optional)")) name.size = 10 -iface = s:option(ListValue, "src", translate("fw_zone")) +iface = s:option(ListValue, "src", translate("Zone")) iface.default = "wan" luci.model.uci.cursor():foreach("firewall", "zone", function (section) iface:value(section.name) end) -proto = s:option(ListValue, "proto", translate("protocol")) +proto = s:option(ListValue, "proto", translate("Protocol")) proto:value("tcp", "TCP") proto:value("udp", "UDP") proto:value("tcpudp", "TCP+UDP") diff --git a/applications/luci-fw/luasrc/model/cbi/luci_fw/rrule.lua b/applications/luci-fw/luasrc/model/cbi/luci_fw/rrule.lua index 25be2e9efe..2800cec72b 100644 --- a/applications/luci-fw/luasrc/model/cbi/luci_fw/rrule.lua +++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/rrule.lua @@ -14,56 +14,56 @@ $Id$ require("luci.sys") arg[1] = arg[1] or "" -m = Map("firewall", translate("fw_redirect"), translate("fw_redirect_desc")) +m = Map("firewall", translate("Traffic Redirection"), translate("Traffic redirection allows you to change the destination address of forwarded packets.")) s = m:section(NamedSection, arg[1], "redirect", "") s.anonymous = true s.addremove = false -back = s:option(DummyValue, "_overview", translate("overview")) +back = s:option(DummyValue, "_overview", translate("Overview")) back.value = "" back.titleref = luci.dispatcher.build_url("admin", "network", "firewall", "redirect") -name = s:option(Value, "_name", translate("name")) +name = s:option(Value, "_name", translate("Name")) name.rmempty = true name.size = 10 -iface = s:option(ListValue, "src", translate("fw_zone")) +iface = s:option(ListValue, "src", translate("Zone")) iface.default = "wan" luci.model.uci.cursor():foreach("firewall", "zone", function (section) iface:value(section.name) end) -s:option(Value, "src_ip", translate("firewall_redirect_srcip")).optional = true -s:option(Value, "src_mac", translate("firewall_redirect_srcmac")).optional = true +s:option(Value, "src_ip", translate("Source address")).optional = true +s:option(Value, "src_mac", translate("Source MAC")).optional = true -sport = s:option(Value, "src_port", translate("firewall_rule_srcport")) +sport = s:option(Value, "src_port", translate("Source port")) sport.optional = true sport:depends("proto", "tcp") sport:depends("proto", "udp") sport:depends("proto", "tcpudp") -proto = s:option(ListValue, "proto", translate("protocol")) +proto = s:option(ListValue, "proto", translate("Protocol")) proto.optional = true proto:value("") proto:value("tcp", "TCP") proto:value("udp", "UDP") proto:value("tcpudp", "TCP+UDP") -dport = s:option(Value, "src_dport", translate("firewall_redirect_srcdport")) +dport = s:option(Value, "src_dport", translate("External port")) dport.size = 5 dport:depends("proto", "tcp") dport:depends("proto", "udp") dport:depends("proto", "tcpudp") -to = s:option(Value, "dest_ip", translate("firewall_redirect_destip")) +to = s:option(Value, "dest_ip", translate("Internal address")) for i, dataset in ipairs(luci.sys.net.arptable()) do to:value(dataset["IP address"]) end -toport = s:option(Value, "dest_port", translate("firewall_redirect_destport")) +toport = s:option(Value, "dest_port", translate("Internal port (optional)")) toport.optional = true toport.size = 5 diff --git a/applications/luci-fw/luasrc/model/cbi/luci_fw/traffic.lua b/applications/luci-fw/luasrc/model/cbi/luci_fw/traffic.lua index c3efdd8557..f4c5630a39 100644 --- a/applications/luci-fw/luasrc/model/cbi/luci_fw/traffic.lua +++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/traffic.lua @@ -13,15 +13,15 @@ You may obtain a copy of the License at $Id$ ]]-- -m = Map("firewall", translate("fw_traffic")) -s = m:section(TypedSection, "forwarding", translate("fw_forwarding"), translate("fw_forwarding1")) +m = Map("firewall", translate("Traffic Control")) +s = m:section(TypedSection, "forwarding", translate("Zone-to-Zone traffic"), translate("Here you can specify which network traffic is allowed to flow between network zones. Only new connections will be matched. Packets belonging to already open connections are automatically allowed to pass the firewall. If you experience occasional connection problems try enabling MSS Clamping otherwise disable it for performance reasons.")) s.template = "cbi/tblsection" s.addremove = true s.anonymous = true -iface = s:option(ListValue, "src", translate("fw_src")) -oface = s:option(ListValue, "dest", translate("fw_dest")) -s:option(Flag, "mtu_fix", translate("fw_mtufix")) +iface = s:option(ListValue, "src", translate("Source")) +oface = s:option(ListValue, "dest", translate("Destination")) +s:option(Flag, "mtu_fix", translate("MSS Clamping")) luci.model.uci.cursor():foreach("firewall", "zone", function (section) @@ -54,10 +54,10 @@ function s.parse(self, ...) end end -s:option(DummyValue, "_name", translate("name")) -s:option(DummyValue, "proto", translate("protocol")) +s:option(DummyValue, "_name", translate("Name")) +s:option(DummyValue, "proto", translate("Protocol")) -src = s:option(DummyValue, "src", translate("fw_src")) +src = s:option(DummyValue, "src", translate("Source")) function src.cfgvalue(self, s) return "%s:%s:%s" % { self.map:get(s, "src") or "*", @@ -66,10 +66,10 @@ function src.cfgvalue(self, s) } end -dest = s:option(DummyValue, "dest", translate("fw_dest")) +dest = s:option(DummyValue, "dest", translate("Destination")) function dest.cfgvalue(self, s) return "%s:%s:%s" % { - self.map:get(s, "dest") or translate("device", "device"), + self.map:get(s, "dest") or translate("Device"), self.map:get(s, "dest_ip") or "0.0.0.0/0", self.map:get(s, "dest_port") or "*" } diff --git a/applications/luci-fw/luasrc/model/cbi/luci_fw/trule.lua b/applications/luci-fw/luasrc/model/cbi/luci_fw/trule.lua index c7aab0f5bb..be2e685eb9 100644 --- a/applications/luci-fw/luasrc/model/cbi/luci_fw/trule.lua +++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/trule.lua @@ -12,25 +12,25 @@ You may obtain a copy of the License at $Id$ ]]-- arg[1] = arg[1] or "" -m = Map("firewall", translate("firewall_rule"), translate("firewall_rule_desc")) +m = Map("firewall", translate("Advanced Rules"), translate("Advanced rules let you customize the firewall to your needs. Only new connections will be matched. Packets belonging to already open connections are automatically allowed to pass the firewall.")) s = m:section(NamedSection, arg[1], "rule", "") s.anonymous = true s.addremove = false -back = s:option(DummyValue, "_overview", translate("overview")) +back = s:option(DummyValue, "_overview", translate("Overview")) back.value = "" back.titleref = luci.dispatcher.build_url("admin", "network", "firewall", "rule") -name = s:option(Value, "_name", translate("name")..translate("cbi_optional")) +name = s:option(Value, "_name", translate("Name")..translate(" (optional)")) name.rmempty = true -iface = s:option(ListValue, "src", translate("fw_src")) +iface = s:option(ListValue, "src", translate("Source")) iface.rmempty = true -oface = s:option(ListValue, "dest", translate("fw_dest")) -oface:value("", translate("device", "device")) +oface = s:option(ListValue, "dest", translate("Destination")) +oface:value("", translate("Device")) oface.rmempty = true luci.model.uci.cursor():foreach("firewall", "zone", @@ -39,7 +39,7 @@ luci.model.uci.cursor():foreach("firewall", "zone", oface:value(section.name) end) -proto = s:option(Value, "proto", translate("protocol")) +proto = s:option(Value, "proto", translate("Protocol")) proto.optional = true proto:value("") proto:value("tcpudp", "TCP+UDP") @@ -47,26 +47,26 @@ proto:value("tcp", "TCP") proto:value("udp", "UDP") proto:value("icmp", "ICMP") -s:option(Value, "src_ip", translate("firewall_rule_srcip")).optional = true -s:option(Value, "dest_ip", translate("firewall_rule_destip")).optional = true -s:option(Value, "src_mac", translate("firewall_rule_srcmac")).optional = true +s:option(Value, "src_ip", translate("Source address")).optional = true +s:option(Value, "dest_ip", translate("Destination address")).optional = true +s:option(Value, "src_mac", translate("Source MAC-Address")).optional = true -sport = s:option(Value, "src_port", translate("firewall_rule_srcport")) +sport = s:option(Value, "src_port", translate("Source port")) sport:depends("proto", "tcp") sport:depends("proto", "udp") sport:depends("proto", "tcpudp") -dport = s:option(Value, "dest_port", translate("firewall_rule_destport")) +dport = s:option(Value, "dest_port", translate("Destination port")) dport:depends("proto", "tcp") dport:depends("proto", "udp") dport:depends("proto", "tcpudp") -jump = s:option(ListValue, "target", translate("firewall_rule_target")) +jump = s:option(ListValue, "target", translate("Action")) jump.rmempty = true jump.default = "ACCEPT" -jump:value("DROP", translate("fw_drop")) -jump:value("ACCEPT", translate("fw_accept")) -jump:value("REJECT", translate("fw_reject")) +jump:value("DROP", translate("drop")) +jump:value("ACCEPT", translate("accept")) +jump:value("REJECT", translate("reject")) return m diff --git a/applications/luci-fw/luasrc/model/cbi/luci_fw/zones.lua b/applications/luci-fw/luasrc/model/cbi/luci_fw/zones.lua index 81a0f65cf7..d9f5ce6d89 100644 --- a/applications/luci-fw/luasrc/model/cbi/luci_fw/zones.lua +++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/zones.lua @@ -12,14 +12,14 @@ You may obtain a copy of the License at $Id$ ]]-- require("luci.tools.webadmin") -m = Map("firewall", translate("fw_fw"), translate("fw_fw1")) +m = Map("firewall", translate("Firewall"), translate("The firewall creates zones over your network interfaces to control network traffic flow.")) s = m:section(TypedSection, "defaults") s.anonymous = true s:option(Flag, "syn_flood") -local di = s:option(Flag, "drop_invalid", translate("fw_dropinvalid")) +local di = s:option(Flag, "drop_invalid", translate("Drop invalid packets")) di.rmempty = false function di.cfgvalue(...) return AbstractValue.cfgvalue(...) or "1" @@ -31,18 +31,18 @@ p[2] = s:option(ListValue, "output") p[3] = s:option(ListValue, "forward") for i, v in ipairs(p) do - v:value("REJECT", translate("fw_reject")) - v:value("DROP", translate("fw_drop")) - v:value("ACCEPT", translate("fw_accept")) + v:value("REJECT", translate("reject")) + v:value("DROP", translate("drop")) + v:value("ACCEPT", translate("accept")) end -s = m:section(TypedSection, "zone", translate("fw_zones")) +s = m:section(TypedSection, "zone", translate("Zones")) s.template = "cbi/tblsection" s.anonymous = true s.addremove = true -name = s:option(Value, "name", translate("name")) +name = s:option(Value, "name", translate("Name")) name.size = 8 p = {} @@ -51,9 +51,9 @@ p[2] = s:option(ListValue, "output") p[3] = s:option(ListValue, "forward") for i, v in ipairs(p) do - v:value("REJECT", translate("fw_reject")) - v:value("DROP", translate("fw_drop")) - v:value("ACCEPT", translate("fw_accept")) + v:value("REJECT", translate("reject")) + v:value("DROP", translate("drop")) + v:value("ACCEPT", translate("accept")) end s:option(Flag, "masq") -- cgit v1.2.3