Merge 434da00e49
into f3ba4d0d0c
This commit is contained in:
commit
bc234d0b91
@ -31,6 +31,13 @@ msgstr ""
|
||||
"<%= pubkey %>"
|
||||
"</div>"
|
||||
|
||||
msgid "gluon-config-mode:novpn"
|
||||
msgstr ""
|
||||
"<p><div class=\"the-key\">Du hast ausgewählt, <strong>kein Mesh-VPN</strong> "
|
||||
"zu nutzen. Dein Knoten kann also nur dann eine Verbindung zum Freifunk Netz "
|
||||
"aufbauen, wenn andere Freifunk-Router in WLAN-Reichweite sind."
|
||||
"</div></p>"
|
||||
|
||||
msgid "gluon-config-mode:reboot"
|
||||
msgstr ""
|
||||
"<p>Dein Knoten <em><%= escape(hostname) %></em> startet gerade neu und wird "
|
||||
|
@ -28,6 +28,12 @@ msgstr ""
|
||||
"<%= pubkey %>"
|
||||
"</div>"
|
||||
|
||||
msgid "gluon-config-mode:novpn"
|
||||
msgstr ""
|
||||
"<p><div class=\"the-key\">You have selected <strong>not</strong> to use the mesh VPN. "
|
||||
"Your node will only be able to connect to the Freifunk network if other nodes in reach "
|
||||
"already have a connection.</div></p>"
|
||||
|
||||
msgid "gluon-config-mode:reboot"
|
||||
msgstr ""
|
||||
"<p>Your node <em><%= escape(hostname) %></em> is currently rebooting and will "
|
||||
|
@ -31,6 +31,12 @@ msgstr ""
|
||||
"<%= pubkey %>"
|
||||
"</div>"
|
||||
|
||||
msgid "gluon-config-mode:novpn"
|
||||
msgstr ""
|
||||
"<p><div class=\"the-key\">Vous avez choisi de <strong>ne pas utiliser</strong> "
|
||||
"le réseau VPN. Votre nœud ne pourra se connecter au réseau Freifunk que si "
|
||||
"d'autres nœuds à portée ont déjà une connexion.</div></p>"
|
||||
|
||||
msgid "gluon-config-mode:reboot"
|
||||
msgstr ""
|
||||
"<p>Votre nœud <em><%= escape(hostname) %></em> es en train de redémarrer et "
|
||||
|
@ -7,6 +7,9 @@ msgstr ""
|
||||
msgid "gluon-config-mode:pubkey"
|
||||
msgstr ""
|
||||
|
||||
msgid "gluon-config-mode:novpn"
|
||||
msgstr ""
|
||||
|
||||
msgid "gluon-config-mode:reboot"
|
||||
msgstr ""
|
||||
|
||||
|
@ -368,6 +368,9 @@ gluon-config-mode:welcome
|
||||
gluon-config-mode:pubkey
|
||||
Information about the public VPN key on the reboot page.
|
||||
|
||||
gluon-config-mode:novpn
|
||||
Information shown on the reboot page, if the mesh VPN was not selected.
|
||||
|
||||
gluon-config-mode:altitude-label
|
||||
Label for the ``altitude`` field
|
||||
|
||||
|
@ -1,33 +1,34 @@
|
||||
local uci = luci.model.uci.cursor()
|
||||
local meshvpn_enabled = uci:get("fastd", "mesh_vpn", "enabled", "0")
|
||||
|
||||
local i18n = require "luci.i18n"
|
||||
local util = require "luci.util"
|
||||
|
||||
local gluon_luci = require 'gluon.luci'
|
||||
local site = require 'gluon.site_config'
|
||||
local sysconfig = require 'gluon.sysconfig'
|
||||
|
||||
local pretty_hostname = require 'pretty_hostname'
|
||||
|
||||
local pubkey = ""
|
||||
local hostname = pretty_hostname.get(uci)
|
||||
local contact = uci:get_first("gluon-node-info", "owner", "contact")
|
||||
|
||||
if meshvpn_enabled ~= "1" then
|
||||
return nil
|
||||
local msg = i18n.translate('gluon-config-mode:novpn')
|
||||
else
|
||||
local i18n = require "luci.i18n"
|
||||
local util = require "luci.util"
|
||||
|
||||
local gluon_luci = require 'gluon.luci'
|
||||
local site = require 'gluon.site_config'
|
||||
local sysconfig = require 'gluon.sysconfig'
|
||||
|
||||
local pretty_hostname = require 'pretty_hostname'
|
||||
|
||||
local pubkey = util.trim(util.exec("/etc/init.d/fastd show_key " .. "mesh_vpn"))
|
||||
local hostname = pretty_hostname.get(uci)
|
||||
local contact = uci:get_first("gluon-node-info", "owner", "contact")
|
||||
|
||||
pubkey = util.trim(util.exec("/etc/init.d/fastd show_key " .. "mesh_vpn"))
|
||||
local msg = i18n.translate('gluon-config-mode:pubkey')
|
||||
|
||||
return function ()
|
||||
luci.template.render_string(msg, {
|
||||
pubkey = pubkey,
|
||||
hostname = hostname,
|
||||
site = site,
|
||||
sysconfig = sysconfig,
|
||||
contact = contact,
|
||||
escape = gluon_luci.escape,
|
||||
urlescape = gluon_luci.urlescape,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
return function ()
|
||||
luci.template.render_string(msg, {
|
||||
pubkey = pubkey,
|
||||
hostname = hostname,
|
||||
site = site,
|
||||
sysconfig = sysconfig,
|
||||
contact = contact,
|
||||
escape = gluon_luci.escape,
|
||||
urlescape = gluon_luci.urlescape,
|
||||
})
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user