From: Jo-Philipp Wich Date: Tue, 14 Aug 2012 15:31:26 +0000 (+0000) Subject: libs/web: export translatef() into templates X-Git-Tag: 0.11.0~348 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b7026b156d54bf48b7f88b702df87e5ece2f41b5;p=project%2Fluci.git libs/web: export translatef() into templates --- diff --git a/libs/web/luasrc/dispatcher.lua b/libs/web/luasrc/dispatcher.lua index 9c0bf60b88..9e5b78d5e9 100644 --- a/libs/web/luasrc/dispatcher.lua +++ b/libs/web/luasrc/dispatcher.lua @@ -304,6 +304,7 @@ function dispatch(request) write = luci.http.write; include = function(name) tpl.Template(name):render(getfenv(2)) end; translate = i18n.translate; + translatef = i18n.translatef; export = function(k, v) if tpl.context.viewns[k] == nil then tpl.context.viewns[k] = v end end; striptags = util.striptags; pcdata = util.pcdata;