gluon-config-mode-reboot-ffhh: add i18n support

This commit is contained in:
bjoern 2015-04-11 09:53:14 +02:00
commit 818765060b
3 changed files with 6 additions and 10 deletions

View file

@ -1,18 +1,17 @@
local msg = [[<p>
<%= luci.template.render_string(site.config_mode.msg_nopubkey) %>
</p>]]
local uci = luci.model.uci.cursor()
local meshvpn_enabled = uci:get("fastd", "mesh_vpn", "enabled", "0")
if meshvpn_enabled == "1" then
return nil
else
local i18n = require "luci.i18n"
local site = require 'gluon.site_config'
local sysconfig = require 'gluon.sysconfig'
local hostname = uci:get_first("system", "system", "hostname")
local msg = [[<p>]] .. i18n.translate('gluon-config-mode:nopubkey') .. [[</p>]]
return function ()
luci.template.render_string(msg, { hostname=hostname
, site=site