* Prepare german translation cleanup
[project/luci.git] / applications / luci-fw / luasrc / model / cbi / luci_fw / portfw.lua
index e4f4fa2ac7f505be17a124c4c63238f89c5f5737..72f3d7e1d69c307fcf405cea639981ab7a245436 100644 (file)
@@ -1,28 +1,40 @@
--- ToDo: Translate, Add descriptions and help texts
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2008 Steven Barth <steven@midlink.org>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
 require("luci.sys")
-m = Map("luci_fw", "Portweiterleitung", [[Portweiterleitungen ermöglichen es interne
-Netzwerkdienste von einem anderen externen Netzwerk aus erreichbar zu machen.]])
+m = Map("luci_fw", translate("fw_portfw"), translate("fw_portfw1"))
 
-s = m:section(TypedSection, "portfw")
+s = m:section(TypedSection, "portfw", "")
 s.template  = "cbi/tblsection"
 s.addremove = true
 s.anonymous = true
 
-iface = s:option(ListValue, "iface", "Schnittstelle", "Externe Schnittstelle")
+iface = s:option(ListValue, "iface", translate("interface"))
 iface.default = "wan"
-for k, v in pairs(luci.model.uci.sections("network")) do
-       if v[".type"] == "interface" and k ~= "loopback" then
-               iface:value(k)
-       end
-end
+luci.model.uci.foreach("network", "interface",
+       function (section)
+               if section[".name"] ~= "loopback" then
+                       iface:value(section[".name"])
+               end
+       end)
 
-proto = s:option(ListValue, "proto", "Protokoll")
+proto = s:option(ListValue, "proto", translate("protocol"))
 proto:value("tcp", "TCP")
 proto:value("udp", "UDP")
 proto:value("tcpudp", "TCP + UDP")
 
-dport = s:option(Value, "dport", "Externer Port", "Port[:Endport]")
+dport = s:option(Value, "dport")
 
-to = s:option(Value, "to", "Interne Adresse", "IP-Adresse[:Zielport[-Zielendport]]")
+to = s:option(Value, "to")
 
 return m