gluon-config-mode-mesh-vpn: add translations
This commit is contained in:
parent
ce82baf0ad
commit
7896f91f86
@ -7,6 +7,9 @@ PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
|||||||
|
|
||||||
include $(GLUONDIR)/include/package.mk
|
include $(GLUONDIR)/include/package.mk
|
||||||
|
|
||||||
|
PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
|
||||||
|
|
||||||
|
|
||||||
define Package/gluon-config-mode-mesh-vpn
|
define Package/gluon-config-mode-mesh-vpn
|
||||||
SECTION:=gluon
|
SECTION:=gluon
|
||||||
CATEGORY:=Gluon
|
CATEGORY:=Gluon
|
||||||
@ -22,15 +25,12 @@ define Build/Configure
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
|
$(call GluonBuildI18N,gluon-config-mode-mesh-vpn,i18n)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/gluon-config-mode-mesh-vpn/install
|
define Package/gluon-config-mode-mesh-vpn/install
|
||||||
$(CP) ./files/* $(1)/
|
$(CP) ./files/* $(1)/
|
||||||
endef
|
$(call GluonInstallI18N,gluon-config-mode-mesh-vpn,$(1))
|
||||||
|
|
||||||
define Package/gluon-config-mode-mesh-vpn/postinst
|
|
||||||
#!/bin/sh
|
|
||||||
$(call GluonCheckSite,check_site.lua)
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,gluon-config-mode-mesh-vpn))
|
$(eval $(call BuildPackage,gluon-config-mode-mesh-vpn))
|
||||||
|
@ -1 +0,0 @@
|
|||||||
need_string 'config_mode.msg_pubkey'
|
|
@ -1,18 +1,10 @@
|
|||||||
local msg = [[<p>
|
|
||||||
<%= luci.template.render_string(site.config_mode.msg_pubkey) %>
|
|
||||||
</p>
|
|
||||||
<div class="the-key">
|
|
||||||
# <%= hostname %>
|
|
||||||
<br/>
|
|
||||||
<%= pubkey %>
|
|
||||||
</div>]]
|
|
||||||
|
|
||||||
local uci = luci.model.uci.cursor()
|
local uci = luci.model.uci.cursor()
|
||||||
local meshvpn_enabled = uci:get("fastd", "mesh_vpn", "enabled", "0")
|
local meshvpn_enabled = uci:get("fastd", "mesh_vpn", "enabled", "0")
|
||||||
|
|
||||||
if meshvpn_enabled ~= "1" then
|
if meshvpn_enabled ~= "1" then
|
||||||
return nil
|
return nil
|
||||||
else
|
else
|
||||||
|
local i18n = require "luci.i18n"
|
||||||
local util = require "luci.util"
|
local util = require "luci.util"
|
||||||
local site = require 'gluon.site_config'
|
local site = require 'gluon.site_config'
|
||||||
local sysconfig = require 'gluon.sysconfig'
|
local sysconfig = require 'gluon.sysconfig'
|
||||||
@ -20,6 +12,13 @@ else
|
|||||||
local pubkey = util.exec("/etc/init.d/fastd show_key " .. "mesh_vpn")
|
local pubkey = util.exec("/etc/init.d/fastd show_key " .. "mesh_vpn")
|
||||||
local hostname = uci:get_first("system", "system", "hostname")
|
local hostname = uci:get_first("system", "system", "hostname")
|
||||||
|
|
||||||
|
local msg = [[<p>]] .. i18n.translate('gluon-config-mode:pubkey') .. [[</p>
|
||||||
|
<div class="the-key">
|
||||||
|
# <%= hostname %>
|
||||||
|
<br/>
|
||||||
|
<%= pubkey %>
|
||||||
|
</div>]]
|
||||||
|
|
||||||
return function ()
|
return function ()
|
||||||
luci.template.render_string(msg, { pubkey=pubkey
|
luci.template.render_string(msg, { pubkey=pubkey
|
||||||
, hostname=hostname
|
, hostname=hostname
|
||||||
|
@ -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,
|
local msg = i18n.translate('Your internet connection can be used to establish an ' ..
|
||||||
[[Dein Knoten kann deine Internetverbindung nutzen um darüber
|
'encrypted connection with other nodes. ' ..
|
||||||
eine verschlüsselte Verbindung zu anderen Freifunkknoten aufzubauen.
|
'Enable this option if there are no other nodes reachable ' ..
|
||||||
Die dafür genutzte Bandbreite kannst du beschränken.
|
'over WLAN in your vicinity or you want to make a part of ' ..
|
||||||
Aktiviere die Option, falls keine per WLAN erreichbaren
|
'your connection\'s bandwidth available for the network. You can limit how ' ..
|
||||||
Nachbarknoten in deiner Nähe sind oder du deine Internetverbindung
|
'much bandwidth the node will use at most.')
|
||||||
für Freifunk zur Verfügung stellen möchtest.]])
|
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
|
||||||
|
36
package/gluon-config-mode-mesh-vpn/i18n/de.po
Normal file
36
package/gluon-config-mode-mesh-vpn/i18n/de.po
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
|
"PO-Revision-Date: 2015-03-19 22:05+0100\n"
|
||||||
|
"Last-Translator: Matthias Schiffer <mschiffer@universe-factory.net>\n"
|
||||||
|
"Language-Team: German\n"
|
||||||
|
"Language: de\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
msgid "Downstream (kbit/s)"
|
||||||
|
msgstr "Downstream (kbit/s)"
|
||||||
|
|
||||||
|
msgid "Limit bandwidth"
|
||||||
|
msgstr "Bandbreite begrenzen"
|
||||||
|
|
||||||
|
msgid "Upstream (kbit/s)"
|
||||||
|
msgstr "Upstream (kbit/s)"
|
||||||
|
|
||||||
|
msgid "Use internet connection (mesh VPN)"
|
||||||
|
msgstr "Internetverbindung nutzen (Mesh-VPN)"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"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."
|
||||||
|
msgstr ""
|
||||||
|
"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."
|
36
package/gluon-config-mode-mesh-vpn/i18n/en.po
Normal file
36
package/gluon-config-mode-mesh-vpn/i18n/en.po
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
|
"PO-Revision-Date: 2015-03-19 22:08+0100\n"
|
||||||
|
"Last-Translator: Matthias Schiffer <mschiffer@universe-factory.net>\n"
|
||||||
|
"Language-Team: English\n"
|
||||||
|
"Language: en\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
msgid "Downstream (kbit/s)"
|
||||||
|
msgstr "Downstream (kbit/s)"
|
||||||
|
|
||||||
|
msgid "Limit bandwidth"
|
||||||
|
msgstr "Limit bandwidth"
|
||||||
|
|
||||||
|
msgid "Upstream (kbit/s)"
|
||||||
|
msgstr "Upstream (kbit/s)"
|
||||||
|
|
||||||
|
msgid "Use internet connection (mesh VPN)"
|
||||||
|
msgstr "Use internet connection (mesh VPN)"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"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."
|
||||||
|
msgstr ""
|
||||||
|
"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."
|
@ -0,0 +1,22 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr "Content-Type: text/plain; charset=UTF-8"
|
||||||
|
|
||||||
|
msgid "Downstream (kbit/s)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Limit bandwidth"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Upstream (kbit/s)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Use internet connection (mesh VPN)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"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."
|
||||||
|
msgstr ""
|
Loading…
Reference in New Issue
Block a user