This commit is contained in:
Matthias Schiffer 2015-04-30 22:22:30 +02:00
commit 82983c871e
5 changed files with 53 additions and 10 deletions

View File

@ -8,6 +8,8 @@ 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-luci-node-role define Package/gluon-luci-node-role
SECTION:=gluon SECTION:=gluon
CATEGORY:=Gluon CATEGORY:=Gluon
@ -23,10 +25,12 @@ define Build/Configure
endef endef
define Build/Compile define Build/Compile
$(call GluonBuildI18N,gluon-luci-node-role,i18n)
endef endef
define Package/gluon-luci-node-role/install define Package/gluon-luci-node-role/install
$(CP) ./files/* $(1)/ $(CP) ./files/* $(1)/
$(call GluonInstallI18N,gluon-luci-node-role,$(1))
endef endef
define Package/gluon-luci-node-role/postinst define Package/gluon-luci-node-role/postinst

View File

@ -1,5 +1,5 @@
module("luci.controller.admin.noderole", package.seeall) module("luci.controller.admin.noderole", package.seeall)
function index() function index()
entry({"admin", "noderole"}, cbi("admin/noderole"), "Verwendungszweck", 20) entry({"admin", "noderole"}, cbi("admin/noderole"), "Node role", 20)
end end

View File

@ -1,23 +1,21 @@
local f, s, o local f, s, o
local site = require 'gluon.site_config' local site = require 'gluon.site_config'
local i18n = require "luci.i18n"
local uci = luci.model.uci.cursor() local uci = luci.model.uci.cursor()
local config = 'gluon-node-info' local config = 'gluon-node-info'
-- where to read the configuration from -- where to read the configuration from
local role = uci:get(config, uci:get_first(config, "system"), "role") local role = uci:get(config, uci:get_first(config, "system"), "role")
f = SimpleForm("role", "Verwendungszweck") f = SimpleForm("role", i18n.translate("Node role"))
f.reset = false
f.template = "admin/expertmode" f.template = "admin/expertmode"
f.submit = "Fertig"
s = f:section(SimpleSection, nil, [[ s = f:section(SimpleSection, nil, i18n.translate(
Wenn dein Freifunk-Router eine besondere Rolle im Freifunk Netz einnimmt, kannst du diese hier angeben. "If this node has a special role within the freifunk network you can specify this role here. "
Bringe bitte zuvor in Erfahrung welche Auswirkungen die zur Verfügung stehenden Rollen im Freifunk-Netz haben. .. "Please find out about the available roles and their impact first. "
Setze die Rolle nur, wenn du weißt was du machst. .. "Only change the role if you know what you are doing."))
]])
o = s:option(ListValue, "role", "Rolle") o = s:option(ListValue, "role", i18n.translate("Role"))
o.default = role o.default = role
o.rmempty = false o.rmempty = false
for role, prettyname in pairs(site.roles.list) do for role, prettyname in pairs(site.roles.list) do

View File

@ -0,0 +1,27 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2015-04-26 17:18+0200\n"
"Last-Translator: Tobias Hachmer <tobias@hachmer.de>\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 "Node role"
msgstr "Verwendungszweck"
msgid "Role"
msgstr "Rolle"
msgid ""
"If this node has a special role within the freifunk network you can specify "
"this role here. Please find out about the available roles and their impact "
"first. Only change the role if you know what you are doing."
msgstr ""
"Wenn dein Freifunk-Knoten eine besondere Rolle im Freifunk Netz einnimmt, "
"kannst du diese hier angeben. Bringe bitte zuvor in Erfahrung, welche "
"Auswirkungen die zur Verfügung stehenden Rollen im Freifunk-Netz haben. "
"Setze die Rolle nur, wenn du weißt was du machst."

View File

@ -0,0 +1,14 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
msgid "Node role"
msgstr ""
msgid "Role"
msgstr ""
msgid ""
"If this node has a special role within the freifunk network you can specify this role here. "
"Please find out about the available roles and their impact first. "
"Only change the role if you know what you are doing."
msgstr ""