From b39a315ce81f102814f51623d69a1dbe4e6b76a8 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 19 Mar 2015 02:10:08 +0100 Subject: [PATCH] gluon-config-mode-core: add translations --- gluon/gluon-config-mode-core/Makefile | 2 ++ .../model/cbi/gluon-config-mode/wizard.lua | 2 +- .../view/gluon-config-mode/cbi/wizard.htm | 34 ++++--------------- .../luci/view/gluon-config-mode/reboot.htm | 2 +- gluon/gluon-config-mode-core/i18n/de.po | 24 +++++++++++++ gluon/gluon-config-mode-core/i18n/en.po | 24 +++++++++++++ .../i18n/gluon-config-mode-core.pot | 14 ++++++++ 7 files changed, 72 insertions(+), 30 deletions(-) create mode 100644 gluon/gluon-config-mode-core/i18n/de.po create mode 100644 gluon/gluon-config-mode-core/i18n/en.po create mode 100644 gluon/gluon-config-mode-core/i18n/gluon-config-mode-core.pot diff --git a/gluon/gluon-config-mode-core/Makefile b/gluon/gluon-config-mode-core/Makefile index 33ab8a9..5104996 100644 --- a/gluon/gluon-config-mode-core/Makefile +++ b/gluon/gluon-config-mode-core/Makefile @@ -28,10 +28,12 @@ define Build/Configure endef define Build/Compile + $(call GluonBuildI18N,gluon-config-mode-core) endef define Package/gluon-config-mode-core/install $(CP) ./files/* $(1)/ + $(call GluonInstallI18N,gluon-config-mode-core,$(1)) endef define Package/gluon-config-mode-core/postinst diff --git a/gluon/gluon-config-mode-core/files/usr/lib/lua/luci/model/cbi/gluon-config-mode/wizard.lua b/gluon/gluon-config-mode-core/files/usr/lib/lua/luci/model/cbi/gluon-config-mode/wizard.lua index dd6029b..706543b 100644 --- a/gluon/gluon-config-mode-core/files/usr/lib/lua/luci/model/cbi/gluon-config-mode/wizard.lua +++ b/gluon/gluon-config-mode-core/files/usr/lib/lua/luci/model/cbi/gluon-config-mode/wizard.lua @@ -1,4 +1,5 @@ local wizard_dir = "/lib/gluon/config-mode/wizard/" +local i18n = luci.i18n local uci = luci.model.uci.cursor() local fs = require "luci.fs" local f, s @@ -17,7 +18,6 @@ end f = SimpleForm("wizard") f.reset = false f.template = "gluon-config-mode/cbi/wizard" -f.submit = "Speichern & Neustarten" for _, s in ipairs(wizard) do s.section(f) diff --git a/gluon/gluon-config-mode-core/files/usr/lib/lua/luci/view/gluon-config-mode/cbi/wizard.htm b/gluon/gluon-config-mode-core/files/usr/lib/lua/luci/view/gluon-config-mode/cbi/wizard.htm index cadfb00..ee0b2f8 100644 --- a/gluon/gluon-config-mode-core/files/usr/lib/lua/luci/view/gluon-config-mode/cbi/wizard.htm +++ b/gluon/gluon-config-mode-core/files/usr/lib/lua/luci/view/gluon-config-mode/cbi/wizard.htm @@ -4,7 +4,7 @@ local template = require 'luci.template' -%> -

Willkommen!

+

<%:Welcome!%>

<%= template.render_string(site.config_mode.msg_welcome, {hostname=hostname, sysconfig=sysconfig}) %>

@@ -31,37 +31,15 @@ <% if not self.embedded then %>
<%- - if type(self.hidden) == "table" then - for k, v in pairs(self.hidden) do + if type(self.hidden) == "table" then + for k, v in pairs(self.hidden) do -%> - + <%- + end end - end %> -<% if redirect then %> -
- -
-<% end %> -<%- if self.flow and self.flow.skip then %> - -<% end %> -<%- if self.submit ~= false then %> - -<% end %> -<%- if self.reset ~= false then %> - -<% end %> -<%- if self.cancel ~= false and self.on_cancel then %> - -<% end %> +
diff --git a/gluon/gluon-config-mode-core/files/usr/lib/lua/luci/view/gluon-config-mode/reboot.htm b/gluon/gluon-config-mode-core/files/usr/lib/lua/luci/view/gluon-config-mode/reboot.htm index dd547f3..e8f32d9 100644 --- a/gluon/gluon-config-mode-core/files/usr/lib/lua/luci/view/gluon-config-mode/reboot.htm +++ b/gluon/gluon-config-mode-core/files/usr/lib/lua/luci/view/gluon-config-mode/reboot.htm @@ -9,7 +9,7 @@
-

Dein Freifunkknoten ist nun fertig eingerichtet.

+

<%:Your node's setup is now complete.%>

<% for k, v in ipairs(parts) do v() end %>
diff --git a/gluon/gluon-config-mode-core/i18n/de.po b/gluon/gluon-config-mode-core/i18n/de.po new file mode 100644 index 0000000..6f852f4 --- /dev/null +++ b/gluon/gluon-config-mode-core/i18n/de.po @@ -0,0 +1,24 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"PO-Revision-Date: 2015-03-19 02:07+0100\n" +"Last-Translator: Matthias Schiffer \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" + +#, fuzzy +msgid "Save & restart" +msgstr "Speichern & Neustarten" + +msgid "Welcome!" +msgstr "Willkommen!" + +msgid "Wizard" +msgstr "Wizard" + +msgid "Your node's setup is now complete." +msgstr "Dein Freifunkknoten ist nun fertig eingerichtet." diff --git a/gluon/gluon-config-mode-core/i18n/en.po b/gluon/gluon-config-mode-core/i18n/en.po new file mode 100644 index 0000000..d0758a0 --- /dev/null +++ b/gluon/gluon-config-mode-core/i18n/en.po @@ -0,0 +1,24 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"PO-Revision-Date: 2015-03-19 02:07+0100\n" +"Last-Translator: Matthias Schiffer \n" +"Language-Team: English\n" +"Language: en\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" + +#, fuzzy +msgid "Save & restart" +msgstr "Save & restart" + +msgid "Welcome!" +msgstr "Welcome!" + +msgid "Wizard" +msgstr "Wizard" + +msgid "Your node's setup is now complete." +msgstr "Your node's setup is now complete." diff --git a/gluon/gluon-config-mode-core/i18n/gluon-config-mode-core.pot b/gluon/gluon-config-mode-core/i18n/gluon-config-mode-core.pot new file mode 100644 index 0000000..a80d3b9 --- /dev/null +++ b/gluon/gluon-config-mode-core/i18n/gluon-config-mode-core.pot @@ -0,0 +1,14 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +msgid "Save & restart" +msgstr "" + +msgid "Welcome!" +msgstr "" + +msgid "Wizard" +msgstr "" + +msgid "Your node's setup is now complete." +msgstr ""