diff --git a/package/gluon-luci-node-role/Makefile b/package/gluon-luci-node-role/Makefile index 5e0fbb00..ded7bd3f 100644 --- a/package/gluon-luci-node-role/Makefile +++ b/package/gluon-luci-node-role/Makefile @@ -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 diff --git a/package/gluon-luci-node-role/files/usr/lib/lua/luci/controller/admin/noderole.lua b/package/gluon-luci-node-role/files/usr/lib/lua/luci/controller/admin/noderole.lua index dcde01f1..cfca1275 100644 --- a/package/gluon-luci-node-role/files/usr/lib/lua/luci/controller/admin/noderole.lua +++ b/package/gluon-luci-node-role/files/usr/lib/lua/luci/controller/admin/noderole.lua @@ -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 diff --git a/package/gluon-luci-node-role/files/usr/lib/lua/luci/model/cbi/admin/noderole.lua b/package/gluon-luci-node-role/files/usr/lib/lua/luci/model/cbi/admin/noderole.lua index 1d6d1798..d2ab51a7 100644 --- a/package/gluon-luci-node-role/files/usr/lib/lua/luci/model/cbi/admin/noderole.lua +++ b/package/gluon-luci-node-role/files/usr/lib/lua/luci/model/cbi/admin/noderole.lua @@ -1,23 +1,21 @@ 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.reset = false +f = SimpleForm("role", i18n.translate("Node role")) 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 diff --git a/package/gluon-luci-node-role/i18n/de.po b/package/gluon-luci-node-role/i18n/de.po new file mode 100644 index 00000000..e3037b26 --- /dev/null +++ b/package/gluon-luci-node-role/i18n/de.po @@ -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 \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." diff --git a/package/gluon-luci-node-role/i18n/gluon-luci-node-role.pot b/package/gluon-luci-node-role/i18n/gluon-luci-node-role.pot new file mode 100644 index 00000000..acf6dd79 --- /dev/null +++ b/package/gluon-luci-node-role/i18n/gluon-luci-node-role.pot @@ -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 ""