Skip to content

Commit

Permalink
gluon-web-network: make 'PoE Power Port[0-9]' translatable (#1173)
Browse files Browse the repository at this point in the history
  • Loading branch information
kb-light authored and neocturne committed Dec 27, 2017
1 parent f514ec1 commit 35237c2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions package/gluon-web-network/i18n/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
3 changes: 3 additions & 0 deletions package/gluon-web-network/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
3 changes: 3 additions & 0 deletions package/gluon-web-network/i18n/gluon-web-network.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 35237c2

Please sign in to comment.