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
|
include $(GLUONDIR)/include/package.mk
|
||||||
|
|
||||||
|
PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
|
||||||
|
|
||||||
define Package/gluon-config-mode-reboot-ffhh
|
define Package/gluon-config-mode-reboot-ffhh
|
||||||
SECTION:=gluon
|
SECTION:=gluon
|
||||||
CATEGORY:=Gluon
|
CATEGORY:=Gluon
|
||||||
|
@ -28,9 +30,5 @@ define Package/gluon-config-mode-reboot-ffhh/install
|
||||||
$(CP) ./files/* $(1)/
|
$(CP) ./files/* $(1)/
|
||||||
endef
|
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))
|
$(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 uci = luci.model.uci.cursor()
|
||||||
local meshvpn_enabled = uci:get("fastd", "mesh_vpn", "enabled", "0")
|
local meshvpn_enabled = uci:get("fastd", "mesh_vpn", "enabled", "0")
|
||||||
|
|
||||||
if meshvpn_enabled == "1" then
|
if meshvpn_enabled == "1" then
|
||||||
return nil
|
return nil
|
||||||
else
|
else
|
||||||
|
local i18n = require "luci.i18n"
|
||||||
local site = require 'gluon.site_config'
|
local site = require 'gluon.site_config'
|
||||||
local sysconfig = require 'gluon.sysconfig'
|
local sysconfig = require 'gluon.sysconfig'
|
||||||
|
|
||||||
local hostname = uci:get_first("system", "system", "hostname")
|
local hostname = uci:get_first("system", "system", "hostname")
|
||||||
|
|
||||||
|
local msg = [[<p>]] .. i18n.translate('gluon-config-mode:nopubkey') .. [[</p>]]
|
||||||
|
|
||||||
return function ()
|
return function ()
|
||||||
luci.template.render_string(msg, { hostname=hostname
|
luci.template.render_string(msg, { hostname=hostname
|
||||||
, site=site
|
, site=site
|
||||||
|
|
Loading…
Reference in a new issue