gluon-config-mode-mesh-vpn: add extra message if mesh-VPN was not selected
This was introduced in ffhh-packages at https://github.com/freifunkhamburg/ffhh-packages/tree/master/gluon-config-mode-reboot-ffhh
This commit is contained in:
parent
f458d788c8
commit
da7f69142f
@ -31,6 +31,13 @@ msgstr ""
|
|||||||
"<%= pubkey %>"
|
"<%= pubkey %>"
|
||||||
"</div>"
|
"</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"
|
msgid "gluon-config-mode:reboot"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"<p>Dein Knoten <em><%= pcdata(hostname) %></em> startet gerade neu und wird "
|
"<p>Dein Knoten <em><%= pcdata(hostname) %></em> startet gerade neu und wird "
|
||||||
|
@ -28,6 +28,12 @@ msgstr ""
|
|||||||
"<%= pubkey %>"
|
"<%= pubkey %>"
|
||||||
"</div>"
|
"</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"
|
msgid "gluon-config-mode:reboot"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"<p>Your node <em><%= pcdata(hostname) %></em> is currently rebooting and will "
|
"<p>Your node <em><%= pcdata(hostname) %></em> is currently rebooting and will "
|
||||||
|
@ -31,6 +31,12 @@ msgstr ""
|
|||||||
"<%= pubkey %>"
|
"<%= pubkey %>"
|
||||||
"</div>"
|
"</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"
|
msgid "gluon-config-mode:reboot"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"<p>Votre nœud <em><%= pcdata(hostname) %></em> es en train de redémarrer et "
|
"<p>Votre nœud <em><%= pcdata(hostname) %></em> es en train de redémarrer et "
|
||||||
|
@ -7,6 +7,9 @@ msgstr ""
|
|||||||
msgid "gluon-config-mode:pubkey"
|
msgid "gluon-config-mode:pubkey"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "gluon-config-mode:novpn"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "gluon-config-mode:reboot"
|
msgid "gluon-config-mode:reboot"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -368,6 +368,9 @@ gluon-config-mode:welcome
|
|||||||
gluon-config-mode:pubkey
|
gluon-config-mode:pubkey
|
||||||
Information about the public VPN key on the reboot page.
|
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
|
gluon-config-mode:altitude-label
|
||||||
Label for the ``altitude`` field
|
Label for the ``altitude`` field
|
||||||
|
|
||||||
|
@ -1,10 +1,4 @@
|
|||||||
local uci = require("simple-uci").cursor()
|
local uci = require("simple-uci").cursor()
|
||||||
local meshvpn_enabled = uci:get_bool("fastd", "mesh_vpn", "enabled")
|
|
||||||
|
|
||||||
if not meshvpn_enabled then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local lutil = require "gluon.web.util"
|
local lutil = require "gluon.web.util"
|
||||||
|
|
||||||
local site = require 'gluon.site_config'
|
local site = require 'gluon.site_config'
|
||||||
@ -13,11 +7,23 @@ local util = require "gluon.util"
|
|||||||
|
|
||||||
local pretty_hostname = require 'pretty_hostname'
|
local pretty_hostname = require 'pretty_hostname'
|
||||||
|
|
||||||
local pubkey = util.trim(lutil.exec("/etc/init.d/fastd show_key mesh_vpn"))
|
|
||||||
|
local meshvpn_enabled = uci:get_bool("fastd", "mesh_vpn", "enabled")
|
||||||
|
|
||||||
local hostname = pretty_hostname.get(uci)
|
local hostname = pretty_hostname.get(uci)
|
||||||
local contact = uci:get_first("gluon-node-info", "owner", "contact")
|
local contact = uci:get_first("gluon-node-info", "owner", "contact")
|
||||||
|
|
||||||
local msg = translate('gluon-config-mode:pubkey')
|
local pubkey
|
||||||
|
local msg
|
||||||
|
|
||||||
|
if meshvpn_enabled then
|
||||||
|
pubkey = util.trim(lutil.exec("/etc/init.d/fastd show_key mesh_vpn"))
|
||||||
|
msg = _translate('gluon-config-mode:pubkey')
|
||||||
|
else
|
||||||
|
msg = _translate('gluon-config-mode:novpn')
|
||||||
|
end
|
||||||
|
|
||||||
|
if not msg then return end
|
||||||
|
|
||||||
renderer.render_string(msg, {
|
renderer.render_string(msg, {
|
||||||
pubkey = pubkey,
|
pubkey = pubkey,
|
||||||
|
Loading…
Reference in New Issue
Block a user