X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=applications%2Fluci-app-mwan3%2Fluasrc%2Fmodel%2Fcbi%2Fmwan%2Frule.lua;h=9134bbc6acaafc7d85008594c793b1568d7578fd;hb=72bcd39b9fdcf9d1aad01894c8cc72bfb1d33cb7;hp=412f369eb06f6cec831d7d0a3680dd5687c26ca2;hpb=415b99de5a5c5e023a81cc6399ee474993996284;p=project%2Fluci.git
diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/rule.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/rule.lua
index 412f369eb..9134bbc6a 100644
--- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/rule.lua
+++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/rule.lua
@@ -17,7 +17,7 @@ end
function ruleWarn() -- display warning messages at the top of the page
if error_protocol_list ~= " " then
- return "" .. translate("WARNING: some rules have a port configured with no or improper protocol specified! Please configure a specific protocol!") .. ""
+ return "" .. translate("WARNING: Some rules have a port configured with no or improper protocol specified! Please configure a specific protocol!") .. ""
else
return ""
end
@@ -33,12 +33,12 @@ error_protocol_list = " "
ruleCheck()
-m5 = Map("mwan3", translate("MWAN Rule Configuration"),
+m5 = Map("mwan3", translate("MWAN - Rules"),
ruleWarn())
m5:append(Template("mwan/config_css"))
-mwan_rule = m5:section(TypedSection, "rule", translate("Traffic Rules"),
+mwan_rule = m5:section(TypedSection, "rule", nil,
translate("Rules specify which traffic will use a particular MWAN policy based on IP address, port or protocol
" ..
"Rules are matched from top to bottom. Rules below a matching rule are ignored. Traffic not matching any rule is routed using the main routing table
" ..
"Traffic destined for known (other than default) networks is handled by the main routing table. Traffic matching a rule, but all WAN interfaces for that policy are down will be blackholed
" ..
@@ -47,14 +47,14 @@ mwan_rule = m5:section(TypedSection, "rule", translate("Traffic Rules"),
mwan_rule.addremove = true
mwan_rule.anonymous = false
mwan_rule.dynamic = false
- mwan_rule.sectionhead = "Rule"
+ mwan_rule.sectionhead = translate("Rule")
mwan_rule.sortable = true
mwan_rule.template = "cbi/tblsection"
- mwan_rule.extedit = dsp.build_url("admin", "network", "mwan", "configuration", "rule", "%s")
+ mwan_rule.extedit = dsp.build_url("admin", "network", "mwan", "rule", "%s")
function mwan_rule.create(self, section)
TypedSection.create(self, section)
m5.uci:save("mwan3")
- luci.http.redirect(dsp.build_url("admin", "network", "mwan", "configuration", "rule", section))
+ luci.http.redirect(dsp.build_url("admin", "network", "mwan", "rule", section))
end
@@ -93,10 +93,10 @@ sticky = mwan_rule:option(DummyValue, "sticky", translate("Sticky"))
function sticky.cfgvalue(self, s)
if self.map:get(s, "sticky") == "1" then
stickied = 1
- return "Yes"
+ return translate("Yes")
else
stickied = nil
- return "No"
+ return translate("No")
end
end
@@ -133,7 +133,7 @@ errors = mwan_rule:option(DummyValue, "errors", translate("Errors"))
if not string.find(error_protocol_list, " " .. s .. " ") then
return ""
else
- return ""
+ return ""
end
end