Преглед на файлове

gluon-config-mode-core: use translated messages from the site configuration

Matthias Schiffer преди 9 години
родител
ревизия
ce82baf0ad

+ 0 - 5
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))

+ 0 - 2
package/gluon-config-mode-core/check_site.lua

@@ -1,2 +0,0 @@
-need_string 'config_mode.msg_welcome'
-need_string 'config_mode.msg_reboot'

+ 2 - 2
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

+ 2 - 2
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'
 -%>
 
 <h2><%:Welcome!%></h2>
 <p>
-	<%= 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}) %>
 </p>
 
 <% if not self.embedded then %>