From 35237c2ca1aa21299405c985a2312c9163d43d63 Mon Sep 17 00:00:00 2001 From: Karsten Date: Wed, 27 Dec 2017 03:11:49 +0100 Subject: [PATCH] gluon-web-network: make 'PoE Power Port[0-9]' translatable (#1173) --- package/gluon-web-network/i18n/de.po | 3 +++ package/gluon-web-network/i18n/fr.po | 3 +++ package/gluon-web-network/i18n/gluon-web-network.pot | 3 +++ .../luasrc/lib/gluon/web/model/admin/network.lua | 10 +++++++++- 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/package/gluon-web-network/i18n/de.po b/package/gluon-web-network/i18n/de.po index 194a41dd..15bcbc76 100644 --- a/package/gluon-web-network/i18n/de.po +++ b/package/gluon-web-network/i18n/de.po @@ -22,6 +22,9 @@ msgstr "Deaktiviert" msgid "Enable PoE Passthrough" msgstr "PoE-Passthrough aktivieren" +msgid "Enable PoE Power Port %s" +msgstr "PoE-Ausgabe auf Port %s aktivieren" + msgid "Enable meshing on the LAN interface" msgstr "Mesh auf dem LAN-Port aktivieren" diff --git a/package/gluon-web-network/i18n/fr.po b/package/gluon-web-network/i18n/fr.po index 0b880036..e2ed57c6 100644 --- a/package/gluon-web-network/i18n/fr.po +++ b/package/gluon-web-network/i18n/fr.po @@ -22,6 +22,9 @@ msgstr "Désactivé" msgid "Enable PoE Passthrough" msgstr "" +msgid "Enable PoE Power Port %s" +msgstr "" + msgid "Enable meshing on the LAN interface" msgstr "Activer le réseau MESH sur le port LAN" diff --git a/package/gluon-web-network/i18n/gluon-web-network.pot b/package/gluon-web-network/i18n/gluon-web-network.pot index ebc795f4..2259a7da 100644 --- a/package/gluon-web-network/i18n/gluon-web-network.pot +++ b/package/gluon-web-network/i18n/gluon-web-network.pot @@ -13,6 +13,9 @@ msgstr "" msgid "Enable PoE Passthrough" msgstr "" +msgid "Enable PoE Power Port %s" +msgstr "" + msgid "Enable meshing on the LAN interface" msgstr "" diff --git a/package/gluon-web-network/luasrc/lib/gluon/web/model/admin/network.lua b/package/gluon-web-network/luasrc/lib/gluon/web/model/admin/network.lua index b828768e..5e7cbb4f 100644 --- a/package/gluon-web-network/luasrc/lib/gluon/web/model/admin/network.lua +++ b/package/gluon-web-network/luasrc/lib/gluon/web/model/admin/network.lua @@ -128,7 +128,15 @@ uci:foreach("system", "gpio_switch", function(s) if not section then section = f:section(Section) end - local poe = section:option(Flag, s[".name"], translate("Enable " .. s.name)) + + local port = s.name:match("^PoE Power Port(%d*)$") + local name + if port then + name = translatef("Enable PoE Power Port %s", port) + else + name = translate("Enable " .. s.name) + end + local poe = section:option(Flag, s[".name"], name) poe.default = uci:get_bool("system", s[".name"], "value") function poe:write(data)