Browse Source

gluon-config-mode-hostname: add translations

Matthias Schiffer 9 years ago
parent
commit
325eeb4f69

+ 5 - 0
package/gluon-config-mode-hostname/Makefile

@@ -7,6 +7,9 @@ PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
 
 include $(GLUONDIR)/include/package.mk
 
+PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
+
+
 define Package/gluon-config-mode-hostname
   SECTION:=gluon
   CATEGORY:=Gluon
@@ -22,10 +25,12 @@ define Build/Configure
 endef
 
 define Build/Compile
+	$(call GluonBuildI18N,gluon-config-mode-hostname)
 endef
 
 define Package/gluon-config-mode-hostname/install
 	$(CP) ./files/* $(1)/
+	$(call GluonInstallI18N,gluon-config-mode-hostname,$(1))
 endef
 
 $(eval $(call BuildPackage,gluon-config-mode-hostname))

+ 2 - 1
package/gluon-config-mode-hostname/files/lib/gluon/config-mode/wizard/0100-hostname.lua

@@ -1,11 +1,12 @@
 local cbi = require "luci.cbi"
+local i18n = require "luci.i18n"
 local uci = luci.model.uci.cursor()
 
 local M = {}
 
 function M.section(form)
   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.rmempty = false
   o.datatype = "hostname"

+ 14 - 0
package/gluon-config-mode-hostname/i18n/de.po

@@ -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"

+ 14 - 0
package/gluon-config-mode-hostname/i18n/en.po

@@ -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"

+ 5 - 0
package/gluon-config-mode-hostname/i18n/gluon-config-mode-hostname.pot

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