mirror of https://github.com/openwrt/luci.git
* core: Added shortcut translatef for translate and format
parent
0200ca38eb
commit
c6c50b3ec6
|
@ -56,3 +56,8 @@ end
|
||||||
function translate(key, default)
|
function translate(key, default)
|
||||||
return table[key] or default
|
return table[key] or default
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Translate shourtcut with sprintf/string.format inclusion
|
||||||
|
function translatef(key, default, ...)
|
||||||
|
return translate(key, default):format(...)
|
||||||
|
end
|
Loading…
Reference in New Issue