gluon-luci-node-role: add translations

This commit is contained in:
Kokel 2015-04-26 17:34:05 +02:00 committed by kokel
parent 6ee65907a4
commit 0c80e7863f
5 changed files with 53 additions and 9 deletions

View File

@ -8,6 +8,8 @@ PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(GLUONDIR)/include/package.mk
PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
define Package/gluon-luci-node-role
SECTION:=gluon
CATEGORY:=Gluon
@ -23,10 +25,12 @@ define Build/Configure
endef
define Build/Compile
$(call GluonBuildI18N,gluon-luci-node-role,i18n)
endef
define Package/gluon-luci-node-role/install
$(CP) ./files/* $(1)/
$(call GluonInstallI18N,gluon-luci-node-role,$(1))
endef
define Package/gluon-luci-node-role/postinst

View File

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

View File

@ -1,23 +1,22 @@
local f, s, o
local site = require 'gluon.site_config'
local i18n = require "luci.i18n"
local uci = luci.model.uci.cursor()
local config = 'gluon-node-info'
-- where to read the configuration from
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.submit = "Fertig"
s = f:section(SimpleSection, nil, [[
Wenn dein Freifunk-Router 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.
]])
s = f:section(SimpleSection, nil, i18n.translate(
"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."))
o = s:option(ListValue, "role", "Rolle")
o = s:option(ListValue, "role", i18n.translate("Role"))
o.default = role
o.rmempty = false
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 ""