gluon-config-mode-core: make welcome and reboot message optional

Make use of our new _translate() function.
This commit is contained in:
Matthias Schiffer 2017-02-22 19:07:42 +01:00
parent 1d7b4482b7
commit f458d788c8
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
2 changed files with 7 additions and 3 deletions

View File

@ -1,9 +1,12 @@
<%-
local sysconfig = require 'gluon.sysconfig'
local msg = _translate('gluon-config-mode:welcome')
if not msg then return end
-%>
<p>
<%=
renderer.render_string(translate('gluon-config-mode:welcome'), {
<%
renderer.render_string(msg, {
hostname = hostname,
sysconfig = sysconfig,
})

View File

@ -7,7 +7,8 @@ local uci = require("simple-uci").cursor()
local hostname = pretty_hostname.get(uci)
local contact = uci:get_first('gluon-node-info', 'owner', 'contact')
local msg = translate('gluon-config-mode:reboot')
local msg = _translate('gluon-config-mode:reboot')
if not msg then return end
renderer.render_string(msg, {
hostname = hostname,