* Completed cleanup of German translation
[project/luci.git] / modules / freifunk / luasrc / controller / freifunk / freifunk.lua
index 39ae5fe..78cb92f 100644 (file)
@@ -1,6 +1,21 @@
+--[[
+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$
+]]--
 module("luci.controller.freifunk.freifunk", package.seeall)
 
 function index()
+       local i18n = luci.i18n.translate
+
        local page  = node()
        page.target = alias("freifunk")
 
@@ -10,6 +25,7 @@ function index()
        page.order    = 5
        page.setuser  = "nobody"
        page.setgroup = "nogroup"
+       page.i18n     = "freifunk"
        
        local page  = node("freifunk", "index")
        page.target = template("freifunk/index")
@@ -28,10 +44,14 @@ function index()
        page.setuser  = false
        page.setgroup = false
        
-       assign({"freifunk", "status", "routes"}, node("admin", "status", "routes"), "Routingtabelle", 10)
-       assign({"freifunk", "status", "iwscan"}, node("admin", "status", "iwscan"), "WLAN-Scan", 20)
+       assign({"freifunk", "status", "routes"}, {"admin", "status", "routes"}, "Routingtabelle", 10)
+       assign({"freifunk", "status", "iwscan"}, {"admin", "status", "iwscan"}, "WLAN-Scan", 20)
+       
+       assign({"freifunk", "olsr"}, {"admin", "status", "olsr"}, "OLSR", 30)
        
-       assign({"freifunk", "olsr"}, node("admin", "status", "olsr"), "OLSR", 30)
+       if luci.fs.isfile("/etc/config/luci_statistics") then
+               assign({"freifunk", "statistics"}, {"admin", "statistics", "graph"}, i18n("stat_statistics", "Statistiken"), 40)
+       end
        
        local page  = node("admin", "index", "freifunk")
        page.target = cbi("freifunk/freifunk")