From 325eeb4f69c7941b4f4ad623e1976e04cde92367 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 19 Mar 2015 00:57:16 +0100 Subject: [PATCH] gluon-config-mode-hostname: add translations --- package/gluon-config-mode-hostname/Makefile | 5 +++++ .../lib/gluon/config-mode/wizard/0100-hostname.lua | 3 ++- package/gluon-config-mode-hostname/i18n/de.po | 14 ++++++++++++++ package/gluon-config-mode-hostname/i18n/en.po | 14 ++++++++++++++ .../i18n/gluon-config-mode-hostname.pot | 5 +++++ 5 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 package/gluon-config-mode-hostname/i18n/de.po create mode 100644 package/gluon-config-mode-hostname/i18n/en.po create mode 100644 package/gluon-config-mode-hostname/i18n/gluon-config-mode-hostname.pot diff --git a/package/gluon-config-mode-hostname/Makefile b/package/gluon-config-mode-hostname/Makefile index f08c1e68..9eabeb68 100644 --- a/package/gluon-config-mode-hostname/Makefile +++ b/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)) diff --git a/package/gluon-config-mode-hostname/files/lib/gluon/config-mode/wizard/0100-hostname.lua b/package/gluon-config-mode-hostname/files/lib/gluon/config-mode/wizard/0100-hostname.lua index a8c041a2..cf8bbf89 100644 --- a/package/gluon-config-mode-hostname/files/lib/gluon/config-mode/wizard/0100-hostname.lua +++ b/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" diff --git a/package/gluon-config-mode-hostname/i18n/de.po b/package/gluon-config-mode-hostname/i18n/de.po new file mode 100644 index 00000000..f1d2a765 --- /dev/null +++ b/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 \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" diff --git a/package/gluon-config-mode-hostname/i18n/en.po b/package/gluon-config-mode-hostname/i18n/en.po new file mode 100644 index 00000000..3bd5cb5c --- /dev/null +++ b/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 \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" diff --git a/package/gluon-config-mode-hostname/i18n/gluon-config-mode-hostname.pot b/package/gluon-config-mode-hostname/i18n/gluon-config-mode-hostname.pot new file mode 100644 index 00000000..dbaafc0b --- /dev/null +++ b/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 ""