diff --git a/gluon-config-mode-reboot-ffhh/Makefile b/gluon-config-mode-reboot-ffhh/Makefile index 8370714..476cfd6 100644 --- a/gluon-config-mode-reboot-ffhh/Makefile +++ b/gluon-config-mode-reboot-ffhh/Makefile @@ -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)) + diff --git a/gluon-config-mode-reboot-ffhh/check_site.lua b/gluon-config-mode-reboot-ffhh/check_site.lua deleted file mode 100644 index 8017c24..0000000 --- a/gluon-config-mode-reboot-ffhh/check_site.lua +++ /dev/null @@ -1 +0,0 @@ -need_string 'config_mode.msg_nopubkey' diff --git a/gluon-config-mode-reboot-ffhh/files/lib/gluon/config-mode/reboot/0101-nopubkey.lua b/gluon-config-mode-reboot-ffhh/files/lib/gluon/config-mode/reboot/0101-nopubkey.lua index 806633d..3aa2c85 100644 --- a/gluon-config-mode-reboot-ffhh/files/lib/gluon/config-mode/reboot/0101-nopubkey.lua +++ b/gluon-config-mode-reboot-ffhh/files/lib/gluon/config-mode/reboot/0101-nopubkey.lua @@ -1,18 +1,17 @@ -local msg = [[

- <%= luci.template.render_string(site.config_mode.msg_nopubkey) %> -

]] - 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 = [[

]] .. i18n.translate('gluon-config-mode:nopubkey') .. [[

]] + return function () luci.template.render_string(msg, { hostname=hostname , site=site