luci-proto-ppp: add translation to ipv6 handling
authorFlorian Eckert <fe@dev.tdt.de>
Wed, 4 Apr 2018 12:04:17 +0000 (14:04 +0200)
committerYousong Zhou <yszhou4tech@gmail.com>
Mon, 7 May 2018 06:03:32 +0000 (14:03 +0800)
If there is no translation set, then on material theme the dropdown
selection displaced. To fix this add an translation to this dropdown.

The commit also changes source code whitespace shifting.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_l2tp.lua
protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_ppp.lua
protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppoa.lua
protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppoe.lua

index 506170c..604f019 100644 (file)
@@ -18,13 +18,13 @@ password = section:taboption("general", Value, "password", translate("PAP/CHAP p
 password.password = true
 
 if luci.model.network:has_ipv6() then
 password.password = true
 
 if luci.model.network:has_ipv6() then
-
-        ipv6 = section:taboption("advanced", ListValue, "ipv6")
-        ipv6:value("auto", translate("Automatic"))
-        ipv6:value("0", translate("Disabled"))
-        ipv6:value("1", translate("Manual"))
-        ipv6.default = "auto"
-
+       ipv6 = section:taboption("advanced", ListValue, "ipv6",
+               translate("Obtain IPv6-Address"),
+               translate("Enable IPv6 negotiation on the PPP link"))
+       ipv6:value("auto", translate("Automatic"))
+       ipv6:value("0", translate("Disabled"))
+       ipv6:value("1", translate("Manual"))
+       ipv6.default = "auto"
 end
 
 defaultroute = section:taboption("advanced", Flag, "defaultroute",
 end
 
 defaultroute = section:taboption("advanced", Flag, "defaultroute",
index b14db59..355d9b5 100644 (file)
@@ -30,13 +30,13 @@ password.password = true
 
 
 if luci.model.network:has_ipv6() then
 
 
 if luci.model.network:has_ipv6() then
-
-        ipv6 = section:taboption("advanced", ListValue, "ipv6")
-        ipv6:value("auto", translate("Automatic"))
-        ipv6:value("0", translate("Disabled"))
-        ipv6:value("1", translate("Manual"))
-        ipv6.default = "auto"
-
+       ipv6 = section:taboption("advanced", ListValue, "ipv6",
+               translate("Obtain IPv6-Address"),
+               translate("Enable IPv6 negotiation on the PPP link"))
+       ipv6:value("auto", translate("Automatic"))
+       ipv6:value("0", translate("Disabled"))
+       ipv6:value("1", translate("Manual"))
+       ipv6.default = "auto"
 end
 
 
 end
 
 
index 8f463e5..a5f76a3 100644 (file)
@@ -36,13 +36,13 @@ password.password = true
 
 
 if luci.model.network:has_ipv6() then
 
 
 if luci.model.network:has_ipv6() then
-
-        ipv6 = section:taboption("advanced", ListValue, "ipv6")
-        ipv6:value("auto", translate("Automatic"))
-        ipv6:value("0", translate("Disabled"))
-        ipv6:value("1", translate("Manual"))
-        ipv6.default = "auto"
-
+       ipv6 = section:taboption("advanced", ListValue, "ipv6",
+               translate("Obtain IPv6-Address"),
+               translate("Enable IPv6 negotiation on the PPP link"))
+       ipv6:value("auto", translate("Automatic"))
+       ipv6:value("0", translate("Disabled"))
+       ipv6:value("1", translate("Manual"))
+       ipv6.default = "auto"
 end
 
 
 end
 
 
index 5a05cd2..d844c01 100644 (file)
@@ -30,13 +30,13 @@ service.placeholder = translate("auto")
 
 
 if luci.model.network:has_ipv6() then
 
 
 if luci.model.network:has_ipv6() then
-
-        ipv6 = section:taboption("advanced", ListValue, "ipv6")
-        ipv6:value("auto", translate("Automatic"))
-        ipv6:value("0", translate("Disabled"))
-        ipv6:value("1", translate("Manual"))
-        ipv6.default = "auto"
-
+       ipv6 = section:taboption("advanced", ListValue, "ipv6",
+               translate("Obtain IPv6-Address"),
+               translate("Enable IPv6 negotiation on the PPP link"))
+       ipv6:value("auto", translate("Automatic"))
+       ipv6:value("0", translate("Disabled"))
+       ipv6:value("1", translate("Manual"))
+       ipv6.default = "auto"
 end
 
 
 end