gluon-config-mode-hostname: add translations

This commit is contained in:
Matthias Schiffer 2015-03-19 00:57:16 +01:00
parent c6f96c3666
commit 325eeb4f69
5 changed files with 40 additions and 1 deletions

View File

@ -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-hostname define Package/gluon-config-mode-hostname
SECTION:=gluon SECTION:=gluon
CATEGORY:=Gluon CATEGORY:=Gluon
@ -22,10 +25,12 @@ define Build/Configure
endef endef
define Build/Compile define Build/Compile
$(call GluonBuildI18N,gluon-config-mode-hostname)
endef endef
define Package/gluon-config-mode-hostname/install define Package/gluon-config-mode-hostname/install
$(CP) ./files/* $(1)/ $(CP) ./files/* $(1)/
$(call GluonInstallI18N,gluon-config-mode-hostname,$(1))
endef endef
$(eval $(call BuildPackage,gluon-config-mode-hostname)) $(eval $(call BuildPackage,gluon-config-mode-hostname))

View File

@ -1,11 +1,12 @@
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, nil) local s = form:section(cbi.SimpleSection, nil, nil)
local o = s:option(cbi.Value, "_hostname", "Name dieses Knotens") local o = s:option(cbi.Value, "_hostname", i18n.translate("Node name"))
o.value = uci:get_first("system", "system", "hostname") o.value = uci:get_first("system", "system", "hostname")
o.rmempty = false o.rmempty = false
o.datatype = "hostname" o.datatype = "hostname"

View File

@ -0,0 +1,14 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2015-03-19 00:54+0100\n"
"Last-Translator: Matthias Schiffer <mschiffer@universe-factory.net>\n"
"Language-Team: German\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Node name"
msgstr "Name dieses Knotens"

View File

@ -0,0 +1,14 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2015-03-19 00:54+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 "Node name"
msgstr "Node name"

View File

@ -0,0 +1,5 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
msgid "Node name"
msgstr ""