gluon-web-network: show pretty interface names

This commit is contained in:
lemoer 2022-10-30 14:15:34 +01:00
parent f0b2e632d0
commit d46c5f89c5
4 changed files with 26 additions and 29 deletions

View File

@ -28,15 +28,6 @@ msgstr "PoE-Passthrough aktivieren"
msgid "Enable PoE Power Port %s"
msgstr "PoE-Ausgabe auf Port %s aktivieren"
msgid "Enable meshing on the Ethernet interface"
msgstr "Mesh auf dem Ethernet-Port aktivieren"
msgid "Enable meshing on the LAN interface"
msgstr "Mesh auf dem LAN-Port aktivieren"
msgid "Enable meshing on the WAN interface"
msgstr "Mesh auf dem WAN-Port aktivieren"
msgid "Gateway"
msgstr "Gateway"
@ -49,6 +40,12 @@ msgstr "IPv4"
msgid "IPv6"
msgstr "IPv6"
msgid "Interface"
msgstr "Interface"
msgid "LAN Interfaces"
msgstr "LAN-Interfaces"
msgid "Netmask"
msgstr "Netzmaske"
@ -61,5 +58,8 @@ msgstr "Statisch"
msgid "Static DNS servers"
msgstr "Statische DNS-Server"
msgid "WAN Interfaces"
msgstr "WAN-Interfaces"
msgid "WAN connection"
msgstr "WAN-Verbindung"

View File

@ -28,15 +28,6 @@ msgstr ""
msgid "Enable PoE Power Port %s"
msgstr ""
msgid "Enable meshing on the Ethernet interface"
msgstr ""
msgid "Enable meshing on the LAN interface"
msgstr "Activer le réseau MESH sur le port LAN"
msgid "Enable meshing on the WAN interface"
msgstr "Activer le réseau MESH sur les ports WAN"
msgid "Gateway"
msgstr "Passerelle"

View File

@ -19,15 +19,6 @@ msgstr ""
msgid "Enable PoE Power Port %s"
msgstr ""
msgid "Enable meshing on the Ethernet interface"
msgstr ""
msgid "Enable meshing on the LAN interface"
msgstr ""
msgid "Enable meshing on the WAN interface"
msgstr ""
msgid "Gateway"
msgstr ""
@ -40,6 +31,12 @@ msgstr ""
msgid "IPv6"
msgstr ""
msgid "Interface"
msgstr ""
msgid "LAN Interfaces"
msgstr ""
msgid "Netmask"
msgstr ""
@ -52,5 +49,8 @@ msgstr ""
msgid "Static DNS servers"
msgstr ""
msgid "WAN Interfaces"
msgstr ""
msgid "WAN connection"
msgstr ""

View File

@ -75,12 +75,18 @@ end
s = f:section(Section)
local pretty_ifnames = {
["/wan"] = translate("WAN Interfaces"),
["/single"] = translate("Interface"),
["/lan"] = translate("LAN Interfaces")
}
uci:foreach('gluon', 'interface', function(config)
local section_name = config['.name']
local ifaces = s:option(MultiListValue, section_name, config.name)
local ifaces = s:option(MultiListValue, section_name, pretty_ifnames[config.name] or config.name)
ifaces.orientation = 'horizontal'
ifaces:value('uplink', 'Uplink') -- TODO: Uplink and Client should be mutually exclusive.
ifaces:value('uplink', 'Uplink')
ifaces:value('mesh', 'Mesh')
ifaces:value('client', 'Client')