|
@@ -1,35 +1,36 @@
|
|
local cbi = require "luci.cbi"
|
|
local cbi = require "luci.cbi"
|
|
|
|
+local i18n = require "luci.i18n"
|
|
local uci = luci.model.uci.cursor()
|
|
local uci = luci.model.uci.cursor()
|
|
|
|
|
|
local M = {}
|
|
local M = {}
|
|
|
|
|
|
function M.section(form)
|
|
function M.section(form)
|
|
- local s = form:section(cbi.SimpleSection, nil,
|
|
|
|
- [[Dein Knoten kann deine Internetverbindung nutzen um darüber
|
|
|
|
- eine verschlüsselte Verbindung zu anderen Freifunkknoten aufzubauen.
|
|
|
|
- Die dafür genutzte Bandbreite kannst du beschränken.
|
|
|
|
- Aktiviere die Option, falls keine per WLAN erreichbaren
|
|
|
|
- Nachbarknoten in deiner Nähe sind oder du deine Internetverbindung
|
|
|
|
- für Freifunk zur Verfügung stellen möchtest.]])
|
|
|
|
|
|
+ local msg = i18n.translate('Your internet connection can be used to establish an ' ..
|
|
|
|
+ 'encrypted connection with other nodes. ' ..
|
|
|
|
+ 'Enable this option if there are no other nodes reachable ' ..
|
|
|
|
+ 'over WLAN in your vicinity or you want to make a part of ' ..
|
|
|
|
+ 'your connection\'s bandwidth available for the network. You can limit how ' ..
|
|
|
|
+ 'much bandwidth the node will use at most.')
|
|
|
|
+ local s = form:section(cbi.SimpleSection, nil, msg)
|
|
|
|
|
|
local o
|
|
local o
|
|
|
|
|
|
- o = s:option(cbi.Flag, "_meshvpn", "Internetverbindung nutzen (Mesh-VPN)")
|
|
|
|
|
|
+ o = s:option(cbi.Flag, "_meshvpn", i18n.translate("Use internet connection (mesh VPN)"))
|
|
o.default = uci:get_bool("fastd", "mesh_vpn", "enabled") and o.enabled or o.disabled
|
|
o.default = uci:get_bool("fastd", "mesh_vpn", "enabled") and o.enabled or o.disabled
|
|
o.rmempty = false
|
|
o.rmempty = false
|
|
|
|
|
|
- o = s:option(cbi.Flag, "_limit_enabled", "Bandbreite begrenzen")
|
|
|
|
|
|
+ o = s:option(cbi.Flag, "_limit_enabled", i18n.translate("Limit bandwidth"))
|
|
o:depends("_meshvpn", "1")
|
|
o:depends("_meshvpn", "1")
|
|
o.default = uci:get_bool("gluon-simple-tc", "mesh_vpn", "enabled") and o.enabled or o.disabled
|
|
o.default = uci:get_bool("gluon-simple-tc", "mesh_vpn", "enabled") and o.enabled or o.disabled
|
|
o.rmempty = false
|
|
o.rmempty = false
|
|
|
|
|
|
- o = s:option(cbi.Value, "_limit_ingress", "Downstream (kbit/s)")
|
|
|
|
|
|
+ o = s:option(cbi.Value, "_limit_ingress", i18n.translate("Downstream (kbit/s)"))
|
|
o:depends("_limit_enabled", "1")
|
|
o:depends("_limit_enabled", "1")
|
|
o.value = uci:get("gluon-simple-tc", "mesh_vpn", "limit_ingress")
|
|
o.value = uci:get("gluon-simple-tc", "mesh_vpn", "limit_ingress")
|
|
o.rmempty = false
|
|
o.rmempty = false
|
|
o.datatype = "integer"
|
|
o.datatype = "integer"
|
|
|
|
|
|
- o = s:option(cbi.Value, "_limit_egress", "Upstream (kbit/s)")
|
|
|
|
|
|
+ o = s:option(cbi.Value, "_limit_egress", i18n.translate("Upstream (kbit/s)"))
|
|
o:depends("_limit_enabled", "1")
|
|
o:depends("_limit_enabled", "1")
|
|
o.value = uci:get("gluon-simple-tc", "mesh_vpn", "limit_egress")
|
|
o.value = uci:get("gluon-simple-tc", "mesh_vpn", "limit_egress")
|
|
o.rmempty = false
|
|
o.rmempty = false
|