summaryrefslogtreecommitdiffhomepage
path: root/modules/freifunk
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-08-12 13:16:27 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-08-12 13:16:27 +0000
commit1d76d8a2158ec397322e54da0b6ad3ca4cadb621 (patch)
tree4c4044d2ca009fa88c154379e439bb2dc784b3a4 /modules/freifunk
parenta8ac3b344f5dee7a79455faa0c699e561464cf4d (diff)
applications, modules: remove i18n handling from controller modules as it moved to the themes now
Diffstat (limited to 'modules/freifunk')
-rw-r--r--modules/freifunk/luasrc/controller/freifunk/freifunk.lua75
-rw-r--r--modules/freifunk/luasrc/controller/freifunk/remote_update.lua4
2 files changed, 40 insertions, 39 deletions
diff --git a/modules/freifunk/luasrc/controller/freifunk/freifunk.lua b/modules/freifunk/luasrc/controller/freifunk/freifunk.lua
index a536fea0a..445f8b410 100644
--- a/modules/freifunk/luasrc/controller/freifunk/freifunk.lua
+++ b/modules/freifunk/luasrc/controller/freifunk/freifunk.lua
@@ -11,21 +11,22 @@ You may obtain a copy of the License at
$Id$
]]--
+
module("luci.controller.freifunk.freifunk", package.seeall)
function index()
- local i18n = luci.i18n.translate
local uci = require "luci.model.uci".cursor()
+ local page
-- Frontend
- local page = node()
- page.lock = true
- page.target = alias("freifunk")
+ page = node()
+ page.lock = true
+ page.target = alias("freifunk")
page.subindex = true
- page.index = false
+ page.index = false
- local page = node("freifunk")
- page.title = i18n("Freifunk")
+ page = node("freifunk")
+ page.title = _("Freifunk")
page.target = alias("freifunk", "index")
page.order = 5
page.setuser = "nobody"
@@ -33,70 +34,70 @@ function index()
page.i18n = "freifunk"
page.index = true
- local page = node("freifunk", "index")
- page.target = template("freifunk/index")
- page.title = i18n("Overview")
- page.order = 10
+ page = node("freifunk", "index")
+ page.target = template("freifunk/index")
+ page.title = _("Overview")
+ page.order = 10
page.indexignore = true
- local page = node("freifunk", "index", "contact")
- page.target = template("freifunk/contact")
- page.title = i18n("Contact")
+ page = node("freifunk", "index", "contact")
+ page.target = template("freifunk/contact")
+ page.title = _("Contact")
page.order = 10
- local page = node("freifunk", "status")
- page.target = template("freifunk/public_status")
- page.title = i18n("Status")
- page.order = 20
- page.i18n = "base"
+ page = node("freifunk", "status")
+ page.target = template("freifunk/public_status")
+ page.title = _("Status")
+ page.order = 20
+ page.i18n = "base"
page.setuser = false
- page.setgroup = false
+ page.setgroup = false
entry({"freifunk", "status.json"}, call("jsonstatus"))
entry({"freifunk", "status", "zeroes"}, call("zeroes"), "Testdownload")
entry({"freifunk", "status", "public_status_json"}, call("public_status_json")).leaf = true
- assign({"freifunk", "olsr"}, {"admin", "status", "olsr"}, i18n("OLSR"), 30)
+ assign({"freifunk", "olsr"}, {"admin", "status", "olsr"}, _("OLSR"), 30)
if nixio.fs.access("/etc/config/luci_statistics") then
- assign({"freifunk", "graph"}, {"admin", "statistics", "graph"}, i18n("Statistics"), 40)
+ assign({"freifunk", "graph"}, {"admin", "statistics", "graph"}, _("Statistics"), 40)
end
-- backend
- assign({"mini", "freifunk"}, {"admin", "freifunk"}, i18n("Freifunk"), 5)
- entry({"admin", "freifunk"}, alias("admin", "freifunk", "index"), i18n("Freifunk"), 5)
+ assign({"mini", "freifunk"}, {"admin", "freifunk"}, _("Freifunk"), 5)
+ entry({"admin", "freifunk"}, alias("admin", "freifunk", "index"), _("Freifunk"), 5)
- local page = node("admin", "freifunk")
+ page = node("admin", "freifunk")
page.target = template("freifunk/adminindex")
- page.title = i18n("Freifunk")
+ page.title = _("Freifunk")
page.order = 5
- local page = node("admin", "freifunk", "basics")
+ page = node("admin", "freifunk", "basics")
page.target = cbi("freifunk/basics")
- page.title = i18n("Basic Settings")
+ page.title = _("Basic Settings")
page.order = 5
- local page = node("admin", "freifunk", "basics", "profile")
+ page = node("admin", "freifunk", "basics", "profile")
page.target = cbi("freifunk/profile")
- page.title = i18n("Profile")
+ page.title = _("Profile")
page.order = 10
- local page = node("admin", "freifunk", "basics", "profile_expert")
+ page = node("admin", "freifunk", "basics", "profile_expert")
page.target = cbi("freifunk/profile_expert")
- page.title = i18n("Profile (Expert)")
+ page.title = _("Profile (Expert)")
page.order = 20
- local page = node("admin", "freifunk", "Index-Page")
+ page = node("admin", "freifunk", "Index-Page")
page.target = cbi("freifunk/user_index")
- page.title = i18n("Index Page")
+ page.title = _("Index Page")
page.order = 50
- local page = node("admin", "freifunk", "contact")
+ page = node("admin", "freifunk", "contact")
page.target = cbi("freifunk/contact")
- page.title = i18n("Contact")
+ page.title = _("Contact")
page.order = 15
- entry({"freifunk", "map"}, template("freifunk-map/frame"), i18n("Map"), 50)
+ entry({"freifunk", "map"}, template("freifunk-map/frame"), _("Map"), 50)
entry({"freifunk", "map", "content"}, template("freifunk-map/map"), nil, 51)
entry({"admin", "freifunk", "profile_error"}, template("freifunk/profile_error"))
end
diff --git a/modules/freifunk/luasrc/controller/freifunk/remote_update.lua b/modules/freifunk/luasrc/controller/freifunk/remote_update.lua
index 165c2a82c..cc8dd142d 100644
--- a/modules/freifunk/luasrc/controller/freifunk/remote_update.lua
+++ b/modules/freifunk/luasrc/controller/freifunk/remote_update.lua
@@ -14,12 +14,12 @@ You may obtain a copy of the License at
module("luci.controller.freifunk.remote_update", package.seeall)
function index()
- local i18n = luci.i18n.translate
if not nixio.fs.access("/usr/sbin/remote-update") then
return
end
+
entry({"admin", "system", "remote_update"}, call("act_remote_update"),
- i18n("Freifunk Remote Update"), 90)
+ _("Freifunk Remote Update"), 90)
end
function act_remote_update()