From ce82baf0ad2003164a63218e83b0189d9ab307b0 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 19 Mar 2015 22:11:43 +0100 Subject: [PATCH] gluon-config-mode-core: use translated messages from the site configuration --- package/gluon-config-mode-core/Makefile | 5 ----- package/gluon-config-mode-core/check_site.lua | 2 -- .../files/lib/gluon/config-mode/reboot/0900-msg-reboot.lua | 4 ++-- .../usr/lib/lua/luci/view/gluon-config-mode/cbi/wizard.htm | 4 ++-- 4 files changed, 4 insertions(+), 11 deletions(-) delete mode 100644 package/gluon-config-mode-core/check_site.lua diff --git a/package/gluon-config-mode-core/Makefile b/package/gluon-config-mode-core/Makefile index 329abe23..35946b27 100644 --- a/package/gluon-config-mode-core/Makefile +++ b/package/gluon-config-mode-core/Makefile @@ -36,9 +36,4 @@ define Package/gluon-config-mode-core/install $(call GluonInstallI18N,gluon-config-mode-core,$(1)) endef -define Package/gluon-config-mode-core/postinst -#!/bin/sh -$(call GluonCheckSite,check_site.lua) -endef - $(eval $(call BuildPackage,gluon-config-mode-core)) diff --git a/package/gluon-config-mode-core/check_site.lua b/package/gluon-config-mode-core/check_site.lua deleted file mode 100644 index 2ee08b0e..00000000 --- a/package/gluon-config-mode-core/check_site.lua +++ /dev/null @@ -1,2 +0,0 @@ -need_string 'config_mode.msg_welcome' -need_string 'config_mode.msg_reboot' diff --git a/package/gluon-config-mode-core/files/lib/gluon/config-mode/reboot/0900-msg-reboot.lua b/package/gluon-config-mode-core/files/lib/gluon/config-mode/reboot/0900-msg-reboot.lua index e35bf308..bf27c07f 100644 --- a/package/gluon-config-mode-core/files/lib/gluon/config-mode/reboot/0900-msg-reboot.lua +++ b/package/gluon-config-mode-core/files/lib/gluon/config-mode/reboot/0900-msg-reboot.lua @@ -1,3 +1,3 @@ -local site = require 'gluon.site_config' +local i18n = require 'luci.i18n' -return function () luci.template.render_string(site.config_mode.msg_reboot) end +return function () luci.template.render_string(i18n.translate('gluon-config-mode:reboot')) end diff --git a/package/gluon-config-mode-core/files/usr/lib/lua/luci/view/gluon-config-mode/cbi/wizard.htm b/package/gluon-config-mode-core/files/usr/lib/lua/luci/view/gluon-config-mode/cbi/wizard.htm index ee0b2f8e..d2210eca 100644 --- a/package/gluon-config-mode-core/files/usr/lib/lua/luci/view/gluon-config-mode/cbi/wizard.htm +++ b/package/gluon-config-mode-core/files/usr/lib/lua/luci/view/gluon-config-mode/cbi/wizard.htm @@ -1,12 +1,12 @@ <%- - local site = require 'gluon.site_config' local sysconfig = require 'gluon.sysconfig' + local i18n = require 'luci.i18n' local template = require 'luci.template' -%>

<%:Welcome!%>

- <%= template.render_string(site.config_mode.msg_welcome, {hostname=hostname, sysconfig=sysconfig}) %> + <%= template.render_string(i18n.translate('gluon-config-mode:welcome'), {hostname=hostname, sysconfig=sysconfig}) %>

<% if not self.embedded then %>