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 506170c2de395f9e21b258083a2d674e1e8ced15..604f019ee61e61eb4e91fb06d4b8efa012caf0ae 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
-
-        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",
index b14db5966d0da5bd83494f7cf56c0b5136c5725b..355d9b5b399259d695c8c56db813de0591847103 100644 (file)
@@ -30,13 +30,13 @@ 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
 
 
index 8f463e5d76a2cc203dce32ef4493de18576d5fd6..a5f76a38ad4164d2fc8dfbd7ac63f08c0196773e 100644 (file)
@@ -36,13 +36,13 @@ 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
 
 
index 5a05cd20656c2ffb0edaf3cf58e2bdb7a737e8ec..d844c01db0c6b2419a036af96e69a15d3388770b 100644 (file)
@@ -30,13 +30,13 @@ service.placeholder = translate("auto")
 
 
 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