diff --git a/docs/site-example/i18n/de.po b/docs/site-example/i18n/de.po index 6eb0e469..af7d2346 100644 --- a/docs/site-example/i18n/de.po +++ b/docs/site-example/i18n/de.po @@ -31,6 +31,13 @@ msgstr "" "<%= pubkey %>" "" +msgid "gluon-config-mode:novpn" +msgstr "" +"

Du hast ausgewählt, kein Mesh-VPN " +"zu nutzen. Dein Knoten kann also nur dann eine Verbindung zum Freifunk Netz " +"aufbauen, wenn andere Freifunk-Router in WLAN-Reichweite sind." +"

" + msgid "gluon-config-mode:reboot" msgstr "" "

Dein Knoten <%= escape(hostname) %> startet gerade neu und wird " diff --git a/docs/site-example/i18n/en.po b/docs/site-example/i18n/en.po index 7df16365..38562756 100644 --- a/docs/site-example/i18n/en.po +++ b/docs/site-example/i18n/en.po @@ -28,6 +28,12 @@ msgstr "" "<%= pubkey %>" "" +msgid "gluon-config-mode:novpn" +msgstr "" +"

You have selected not 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.

" + msgid "gluon-config-mode:reboot" msgstr "" "

Your node <%= escape(hostname) %> is currently rebooting and will " diff --git a/docs/site-example/i18n/fr.po b/docs/site-example/i18n/fr.po index 2e05db22..af9a34b5 100644 --- a/docs/site-example/i18n/fr.po +++ b/docs/site-example/i18n/fr.po @@ -31,6 +31,12 @@ msgstr "" "<%= pubkey %>" "" +msgid "gluon-config-mode:novpn" +msgstr "" +"

Vous avez choisi de ne pas utiliser " +"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.

" + msgid "gluon-config-mode:reboot" msgstr "" "

Votre nœud <%= escape(hostname) %> es en train de redémarrer et " diff --git a/docs/site-example/i18n/gluon-site.pot b/docs/site-example/i18n/gluon-site.pot index a161a12b..7fe3293c 100644 --- a/docs/site-example/i18n/gluon-site.pot +++ b/docs/site-example/i18n/gluon-site.pot @@ -7,6 +7,9 @@ msgstr "" msgid "gluon-config-mode:pubkey" msgstr "" +msgid "gluon-config-mode:novpn" +msgstr "" + msgid "gluon-config-mode:reboot" msgstr "" diff --git a/docs/user/site.rst b/docs/user/site.rst index 42ef85c6..9612100a 100644 --- a/docs/user/site.rst +++ b/docs/user/site.rst @@ -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 diff --git a/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/reboot/0100-mesh-vpn.lua b/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/reboot/0100-mesh-vpn.lua index 07b6d228..0e707154 100644 --- a/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/reboot/0100-mesh-vpn.lua +++ b/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/reboot/0100-mesh-vpn.lua @@ -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