diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-12-19 07:49:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-19 07:49:56 +0100 |
commit | e3b91d1a62d36b68a07d0de940bff7002c1b621d (patch) | |
tree | a49f7c9063b597c6eeee01890cfb1b020b7ea8e9 /modules | |
parent | 91a73bebfbe387324a2bb27c034a435b113c1c74 (diff) | |
parent | a56935c241f84f5870057555b9d029a7732ef049 (diff) |
Merge pull request #2350 from TDT-AG/pr/20181204-luci-mod-system
luci-mod-system: add translation for led trigger names
Diffstat (limited to 'modules')
-rw-r--r-- | modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua b/modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua index 8ae38c0db..312e74249 100644 --- a/modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua +++ b/modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua @@ -44,7 +44,37 @@ trigger = s:option(ListValue, "trigger", translate("Trigger")) local triggers = fs.readfile(sysfs_path .. leds[1] .. "/trigger") for t in triggers:gmatch("[%w-]+") do - trigger:value(t, translate(t:gsub("-", ""))) + if t == "default-on" then + trigger:value(t, translatef("Always on (%s)", t)) + elseif t == "none" then + trigger:value(t, translatef("Always off (%s)", t)) + elseif t == "timer" then + trigger:value(t, translatef("Custom flash intervall (%s)", t)) + elseif t == "netdev" then + trigger:value(t, translatef("Network device activity (%s)", t)) + elseif t == "heartbeat" then + trigger:value(t, translatef("Heartbeat intervall (%s)", t)) + elseif t == "nand-disk" then + trigger:value(t, translatef("Flashmemory write access (%s)", t)) + elseif t == "mtd" then + trigger:value(t, translatef("Flashmemory write access (%s)", t)) + elseif t:match("mmc[0-9]") then + trigger:value(t, translatef("Flashmemory write access (%s)", t)) + elseif t:match("switch[0-9]") then + trigger:value(t, translatef("Switchport activity (%s)", t)) + elseif t:match("phy[0-9]rx") then + trigger:value(t, translatef("Wi-Fi data reception (%s)", t)) + elseif t:match("phy[0-9]tx") then + trigger:value(t, translatef("Wi-Fi data transmission (%s)", t)) + elseif t:match("phy[0-9]assoc") then + trigger:value(t, translatef("Wi-Fi client association (%s)", t)) + elseif t:match("phy[0-9]radio") then + trigger:value(t, translatef("Wi-Fi on (%s)", t)) + elseif t:match("phy[0-9]tpt") then + trigger:value(t, translatef("Wi-Fi activity (%s)", t)) + else + trigger:value(t, translate(t:gsub("-", ""))) + end end |