summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-04-05 01:16:25 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-04-05 01:16:25 +0000
commit03c4a61b2ad1267bb0b37cc74badb7e6c44c6867 (patch)
treede93635d23196d4be07362fb7e046de3f5907f2a /applications
parent08ceafc2e965cef633ea918d6561e30cadf8ca95 (diff)
[PATCH 1/2] firewall: add description strings
The luci-fw application was lacking some important description strings. This adds them and updates the associated translation template.
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-fw/luasrc/model/cbi/luci_fw/miniportfw.lua13
-rw-r--r--applications/luci-fw/luasrc/model/cbi/luci_fw/redirect.lua12
-rw-r--r--applications/luci-fw/luasrc/model/cbi/luci_fw/rrule.lua26
-rw-r--r--applications/luci-fw/luasrc/model/cbi/luci_fw/traffic.lua15
-rw-r--r--applications/luci-fw/luasrc/model/cbi/luci_fw/trule.lua16
-rw-r--r--applications/luci-fw/luasrc/model/cbi/luci_fw/zones.lua20
6 files changed, 64 insertions, 38 deletions
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 ed849f4cc..44b15f2c7 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,9 @@ You may obtain a copy of the License at
$Id$
]]--
require("luci.sys")
-m = Map("firewall", translate("Port forwarding"), translate("Port forwarding allows to provide network services in the internal network to an external network."))
+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,7 +25,7 @@ s.template = "cbi/tblsection"
s.addremove = true
s.anonymous = true
-name = s:option(Value, "_name", translate("Name"), translate(" (optional)"))
+name = s:option(Value, "_name", translate("Name"), translate("(optional)"))
name.size = 10
proto = s:option(ListValue, "proto", translate("Protocol"))
@@ -31,15 +33,16 @@ proto:value("tcp", "TCP")
proto:value("udp", "UDP")
proto:value("tcpudp", "TCP+UDP")
-dport = s:option(Value, "src_dport")
+dport = s:option(Value, "src_dport", translate("External port"))
dport.size = 5
-to = s:option(Value, "dest_ip")
+to = s:option(Value, "dest_ip", translate("Internal IP address"))
for i, dataset in ipairs(luci.sys.net.arptable()) do
to:value(dataset["IP address"])
end
-toport = s:option(Value, "dest_port")
+toport = s:option(Value, "dest_port", translate("Internal port"),
+ translate("(optional)"))
toport.size = 5
return m
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 52a3c39d6..da87015c8 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,9 @@ You may obtain a copy of the License at
$Id$
]]--
require("luci.sys")
-m = Map("firewall", translate("Traffic Redirection"), translate("Traffic redirection allows you to change the destination address of forwarded packets."))
+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,7 +23,7 @@ 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(" (optional)"))
+name = s:option(Value, "_name", translate("Name"), translate("(optional)"))
name.size = 10
iface = s:option(ListValue, "src", translate("Zone"))
@@ -36,15 +38,15 @@ proto:value("tcp", "TCP")
proto:value("udp", "UDP")
proto:value("tcpudp", "TCP+UDP")
-dport = s:option(Value, "src_dport")
+dport = s:option(Value, "src_dport", translate("Source port"))
dport.size = 5
-to = s:option(Value, "dest_ip")
+to = s:option(Value, "dest_ip", translate("Destination IP"))
for i, dataset in ipairs(luci.sys.net.arptable()) do
to:value(dataset["IP address"])
end
-toport = s:option(Value, "dest_port")
+toport = s:option(Value, "dest_port", translate("Destination port"))
toport.size = 5
return m
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 2800cec72..63e014444 100644
--- a/applications/luci-fw/luasrc/model/cbi/luci_fw/rrule.lua
+++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/rrule.lua
@@ -14,7 +14,9 @@ $Id$
require("luci.sys")
arg[1] = arg[1] or ""
-m = Map("firewall", translate("Traffic Redirection"), translate("Traffic redirection allows you to change the destination address of forwarded packets."))
+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", "")
@@ -29,17 +31,19 @@ name = s:option(Value, "_name", translate("Name"))
name.rmempty = true
name.size = 10
-iface = s:option(ListValue, "src", translate("Zone"))
+iface = s:option(ListValue, "src", translate("Source zone"))
iface.default = "wan"
luci.model.uci.cursor():foreach("firewall", "zone",
function (section)
iface:value(section.name)
end)
-s:option(Value, "src_ip", translate("Source address")).optional = true
-s:option(Value, "src_mac", translate("Source MAC")).optional = true
+s:option(Value, "src_ip", translate("Source IP address")).optional = true
+s:option(Value, "src_mac", translate("Source MAC-address")).optional = true
-sport = s:option(Value, "src_port", translate("Source port"))
+sport = s:option(Value, "src_port", translate("Source port"),
+ translate("Match incoming traffic originating from the given " ..
+ "source port or port range on the client host"))
sport.optional = true
sport:depends("proto", "tcp")
sport:depends("proto", "udp")
@@ -52,18 +56,24 @@ proto:value("tcp", "TCP")
proto:value("udp", "UDP")
proto:value("tcpudp", "TCP+UDP")
-dport = s:option(Value, "src_dport", translate("External port"))
+dport = s:option(Value, "src_dport", translate("External port"),
+ translate("Match incoming traffic directed at the given " ..
+ "destination port or port range on this host"))
dport.size = 5
dport:depends("proto", "tcp")
dport:depends("proto", "udp")
dport:depends("proto", "tcpudp")
-to = s:option(Value, "dest_ip", translate("Internal address"))
+to = s:option(Value, "dest_ip", translate("Internal IP address"),
+ translate("Redirect matched incoming traffic to the specified " ..
+ "internal host"))
for i, dataset in ipairs(luci.sys.net.arptable()) do
to:value(dataset["IP address"])
end
-toport = s:option(Value, "dest_port", translate("Internal port (optional)"))
+toport = s:option(Value, "dest_port", translate("Internal port (optional)"),
+ translate("Redirect matched incoming traffic to the given port on " ..
+ "the internal host"))
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 eaaaf6cb9..3bdc6db4c 100644
--- a/applications/luci-fw/luasrc/model/cbi/luci_fw/traffic.lua
+++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/traffic.lua
@@ -14,7 +14,14 @@ $Id$
]]--
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 = 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
@@ -30,7 +37,7 @@ luci.model.uci.cursor():foreach("firewall", "zone",
-s = m:section(TypedSection, "rule")
+s = m:section(TypedSection, "rule", translate("Rules"))
s.addremove = true
s.anonymous = true
s.template = "cbi/tblsection"
@@ -75,7 +82,7 @@ function dest.cfgvalue(self, s)
end
-s:option(DummyValue, "target")
+s:option(DummyValue, "target", translate("Action"))
-return m \ No newline at end of file
+return m
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 be2e685eb..57e1427e3 100644
--- a/applications/luci-fw/luasrc/model/cbi/luci_fw/trule.lua
+++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/trule.lua
@@ -12,7 +12,11 @@ You may obtain a copy of the License at
$Id$
]]--
arg[1] = arg[1] or ""
-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."))
+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
@@ -23,14 +27,14 @@ back.value = ""
back.titleref = luci.dispatcher.build_url("admin", "network", "firewall", "rule")
-name = s:option(Value, "_name", translate("Name")..translate(" (optional)"))
+name = s:option(Value, "_name", translate("Name").." "..translate("(optional)"))
name.rmempty = true
-iface = s:option(ListValue, "src", translate("Source"))
+iface = s:option(ListValue, "src", translate("Source zone"))
iface.rmempty = true
-oface = s:option(ListValue, "dest", translate("Destination"))
-oface:value("", translate("Device"))
+oface = s:option(ListValue, "dest", translate("Destination zone"))
+oface:value("", translate("any"))
oface.rmempty = true
luci.model.uci.cursor():foreach("firewall", "zone",
@@ -49,7 +53,7 @@ proto:value("icmp", "ICMP")
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
+s:option(Value, "src_mac", translate("Source MAC-address")).optional = true
sport = s:option(Value, "src_port", translate("Source port"))
sport:depends("proto", "tcp")
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 3c31d957f..70473bb77 100644
--- a/applications/luci-fw/luasrc/model/cbi/luci_fw/zones.lua
+++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/zones.lua
@@ -25,7 +25,7 @@ s = m:section(TypedSection, "defaults")
s.anonymous = true
s.addremove = false
-s:option(Flag, "syn_flood")
+s:option(Flag, "syn_flood", translate("Enable SYN-flood protection"))
local di = s:option(Flag, "drop_invalid", translate("Drop invalid packets"))
di.rmempty = false
@@ -34,9 +34,9 @@ function di.cfgvalue(...)
end
p = {}
-p[1] = s:option(ListValue, "input")
-p[2] = s:option(ListValue, "output")
-p[3] = s:option(ListValue, "forward")
+p[1] = s:option(ListValue, "input", translate("Input"))
+p[2] = s:option(ListValue, "output", translate("Output"))
+p[3] = s:option(ListValue, "forward", translate("Forward"))
for i, v in ipairs(p) do
v:value("REJECT", translate("reject"))
@@ -54,9 +54,9 @@ name = s:option(Value, "name", translate("Name"))
name.size = 8
p = {}
-p[1] = s:option(ListValue, "input")
-p[2] = s:option(ListValue, "output")
-p[3] = s:option(ListValue, "forward")
+p[1] = s:option(ListValue, "input", translate("input"))
+p[2] = s:option(ListValue, "output", translate("output"))
+p[3] = s:option(ListValue, "forward", translate("forward"))
for i, v in ipairs(p) do
v:value("REJECT", translate("reject"))
@@ -64,10 +64,10 @@ for i, v in ipairs(p) do
v:value("ACCEPT", translate("accept"))
end
-s:option(Flag, "masq")
-s:option(Flag, "mtu_fix", translate("MSS Clamping"))
+s:option(Flag, "masq", translate("Masquerading"))
+s:option(Flag, "mtu_fix", translate("MSS clamping"))
-net = s:option(MultiValue, "network")
+net = s:option(MultiValue, "network", translate("Network"))
net.template = "cbi/network_netlist"
net.widget = "checkbox"
net.rmempty = true