gluon-config-mode-reboot-ffhh: add i18n support
This commit is contained in:
parent
918d892f15
commit
818765060b
|
@ -7,6 +7,8 @@ PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
|||
|
||||
include $(GLUONDIR)/include/package.mk
|
||||
|
||||
PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
|
||||
|
||||
define Package/gluon-config-mode-reboot-ffhh
|
||||
SECTION:=gluon
|
||||
CATEGORY:=Gluon
|
||||
|
@ -28,9 +30,5 @@ define Package/gluon-config-mode-reboot-ffhh/install
|
|||
$(CP) ./files/* $(1)/
|
||||
endef
|
||||
|
||||
define Package/gluon-config-mode-reboot-ffhh/postinst
|
||||
#!/bin/sh
|
||||
$(call GluonCheckSite,check_site.lua)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,gluon-config-mode-reboot-ffhh))
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
need_string 'config_mode.msg_nopubkey'
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue