function interfaceWarnings() -- display status and warning messages at the top of the page
local warnings = ""
if interfaceNumber <= 250 then
- warnings = "<strong>There are currently " .. interfaceNumber .. " of 250 supported interfaces configured</strong>"
+ warnings = "<strong>" .. translatef("There are currently %d of 250 supported interfaces configured", interfaceNumber) .. "</strong>"
else
- warnings = "<font color=\"ff0000\"><strong>WARNING: " .. interfaceNumber .. " interfaces are configured exceeding the maximum of 250!</strong></font>"
+ warnings = "<font color=\"ff0000\"><strong>" .. translatef("WARNING: %d interfaces are configured exceeding the maximum of 250!", interfaceNumber) .. "</strong></font>"
end
if errorReliabilityList ~= " " then
- warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>WARNING: some interfaces have a higher reliability requirement than there are tracking IP addresses!</strong></font>"
+ warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: some interfaces have a higher reliability requirement than there are tracking IP addresses!") .. "</strong></font>"
end
if errorRouteList ~= " " then
- warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>WARNING: some interfaces have no default route in the main routing table!</strong></font>"
+ warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: some interfaces have no default route in the main routing table!") .. "</strong></font>"
end
if errorNetConfigList ~= " " then
- warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>WARNING: some interfaces are configured incorrectly or not at all in /etc/config/network!</strong></font>"
+ warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: some interfaces are configured incorrectly or not at all in /etc/config/network!") .. "</strong></font>"
end
if errorNoMetricList ~= " " then
- warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>WARNING: some interfaces have no metric configured in /etc/config/network!</strong></font>"
+ warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: some interfaces have no metric configured in /etc/config/network!") .. "</strong></font>"
end
if errorDuplicateMetricList ~= " " then
- warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>WARNING: some interfaces have duplicate metrics configured in /etc/config/network!</strong></font>"
+ warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: some interfaces have duplicate metrics configured in /etc/config/network!") .. "</strong></font>"
end
return warnings
end
m5 = Map("mwan3", translate("MWAN Interface Configuration"),
- translate(interfaceWarnings()))
+ interfaceWarnings())
m5:append(Template("mwan/config_css"))
function interfaceWarnings() -- display warning messages at the top of the page
local warns, lineBreak = "", ""
if errorReliability == 1 then
- warns = "<font color=\"ff0000\"><strong>WARNING: this interface has a higher reliability requirement than there are tracking IP addresses!</strong></font>"
+ warns = "<font color=\"ff0000\"><strong>" .. translate("WARNING: this interface has a higher reliability requirement than there are tracking IP addresses!") .. "</strong></font>"
lineBreak = "<br /><br />"
end
if errorRoute == 1 then
- warns = warns .. lineBreak .. "<font color=\"ff0000\"><strong>WARNING: this interface has no default route in the main routing table!</strong></font>"
+ warns = warns .. lineBreak .. "<font color=\"ff0000\"><strong>" .. translate("WARNING: this interface has no default route in the main routing table!") .. "</strong></font>"
lineBreak = "<br /><br />"
end
if errorNetConfig == 1 then
- warns = warns .. lineBreak .. "<font color=\"ff0000\"><strong>WARNING: this interface is configured incorrectly or not at all in /etc/config/network!</strong></font>"
+ warns = warns .. lineBreak .. "<font color=\"ff0000\"><strong>" .. translate("WARNING: this interface is configured incorrectly or not at all in /etc/config/network!") .. "</strong></font>"
lineBreak = "<br /><br />"
end
if errorNoMetric == 1 then
- warns = warns .. lineBreak .. "<font color=\"ff0000\"><strong>WARNING: this interface has no metric configured in /etc/config/network!</strong></font>"
+ warns = warns .. lineBreak .. "<font color=\"ff0000\"><strong>" .. translate("WARNING: this interface has no metric configured in /etc/config/network!") .. "</strong></font>"
elseif errorDuplicateMetric == 1 then
- warns = warns .. lineBreak .. "<font color=\"ff0000\"><strong>WARNING: this and other interfaces have duplicate metrics configured in /etc/config/network!</strong></font>"
+ warns = warns .. lineBreak .. "<font color=\"ff0000\"><strong>" .. translate("WARNING: this and other interfaces have duplicate metrics configured in /etc/config/network!") .. "</strong></font>"
end
return warns
end
interfaceCheck()
-m5 = Map("mwan3", translate("MWAN Interface Configuration - " .. arg[1]),
- translate(interfaceWarnings()))
+m5 = Map("mwan3", translatef("MWAN Interface Configuration - %s", arg[1]),
+ interfaceWarnings())
m5.redirect = dsp.build_url("admin", "network", "mwan", "configuration", "interface")
arg[1] = arg[1] or ""
-m5 = Map("mwan3", translate("MWAN Member Configuration - ") .. arg[1])
+m5 = Map("mwan3", translatef("MWAN Member Configuration - %s", arg[1]))
m5.redirect = dsp.build_url("admin", "network", "mwan", "configuration", "member")
function policyWarn() -- display status and warning messages at the top of the page
if nameTooLong == 1 then
- return "<font color=\"ff0000\"><strong>WARNING: Some policies have names exceeding the maximum of 15 characters!</strong></font>"
+ return "<font color=\"ff0000\"><strong>" .. translate("WARNING: Some policies have names exceeding the maximum of 15 characters!") .. "</strong></font>"
else
return ""
end
m5 = Map("mwan3", translate("MWAN Policy Configuration"),
- translate(policyWarn()))
+ policyWarn())
m5:append(Template("mwan/config_css"))
function policyWarn() -- display status and warning messages at the top of the page
if nameTooLong == 1 then
- return "<font color=\"ff0000\"><strong>WARNING: this policy's name is " .. policyNameLength .. " characters exceeding the maximum of 15!</strong></font>"
+ return "<font color=\"ff0000\"><strong>" .. translatef("WARNING: this policy's name is %d characters exceeding the maximum of 15!", policyNameLength) .. "</strong></font>"
else
return ""
end
policyCheck()
-m5 = Map("mwan3", translate("MWAN Policy Configuration - " .. arg[1]),
- translate(policyWarn()))
+m5 = Map("mwan3", translatef("MWAN Policy Configuration - %s", arg[1]),
+ policyWarn())
m5.redirect = dsp.build_url("admin", "network", "mwan", "configuration", "policy")
function ruleWarn() -- display warning messages at the top of the page
if error_protocol_list ~= " " then
- return "<font color=\"ff0000\"><strong>WARNING: some rules have a port configured with no or improper protocol specified! Please configure a specific protocol!</strong></font>"
+ return "<font color=\"ff0000\"><strong>" .. translate("WARNING: some rules have a port configured with no or improper protocol specified! Please configure a specific protocol!") .. "</strong></font>"
else
return ""
end
m5 = Map("mwan3", translate("MWAN Rule Configuration"),
- translate(ruleWarn()))
+ ruleWarn())
m5:append(Template("mwan/config_css"))
function ruleWarn() -- display warning message at the top of the page
if error_protocol == 1 then
- return "<font color=\"ff0000\"><strong>WARNING: this rule is incorrectly configured with no or improper protocol specified! Please configure a specific protocol!</strong></font>"
+ return "<font color=\"ff0000\"><strong>" .. translate("WARNING: this rule is incorrectly configured with no or improper protocol specified! Please configure a specific protocol!") .. "</strong></font>"
else
return ""
end
ruleCheck()
-m5 = Map("mwan3", translate("MWAN Rule Configuration - ") .. arg[1],
- translate(ruleWarn()))
+m5 = Map("mwan3", translatef("MWAN Rule Configuration - %s", arg[1]),
+ ruleWarn())
m5.redirect = dsp.build_url("admin", "network", "mwan", "configuration", "rule")