luci-app-mwan3: Fix luci tools cannot detect translate()
[project/luci.git] / applications / luci-app-mwan3 / luasrc / model / cbi / mwan / ruleconfig.lua
index f7fb341..25a96f5 100644 (file)
@@ -13,7 +13,7 @@ end
 
 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
@@ -45,8 +45,8 @@ error_protocol = 0
 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")