remove .i18n annotations from controller files

This commit is contained in:
Jo-Philipp Wich 2012-11-26 12:53:43 +00:00
parent 264aae7910
commit 848e43a5b4
51 changed files with 16 additions and 91 deletions

View file

@ -19,7 +19,7 @@ function index()
return
end
entry({"admin", "network", "ahcpd"}, cbi("ahcp"), _("AHCP Server"), 90).i18n = "ahcp"
entry({"admin", "network", "ahcpd"}, cbi("ahcp"), _("AHCP Server"), 90)
entry({"admin", "network", "ahcpd", "status"}, call("ahcp_status"))
end

View file

@ -17,7 +17,7 @@ module("luci.controller.asterisk", package.seeall)
function index()
entry({"admin", "services", "asterisk"}, cbi("asterisk"), "Asterisk", 80).i18n = "asterisk"
entry({"admin", "services", "asterisk"}, cbi("asterisk"), "Asterisk", 80)
entry({"admin", "services", "asterisk", "voice"}, cbi("asterisk-voice"), "Voice Functions", 1)
entry({"admin", "services", "asterisk", "meetme"}, cbi("asterisk-meetme"), "Meetme Conferences", 2)

View file

@ -14,7 +14,7 @@ You may obtain a copy of the License at
module("luci.controller.commands", package.seeall)
function index()
entry({"admin", "system", "commands"}, firstchild(), _("Custom Commands"), 80).i18n = "commands"
entry({"admin", "system", "commands"}, firstchild(), _("Custom Commands"), 80)
entry({"admin", "system", "commands", "dashboard"}, template("commands"), _("Dashboard"), 1)
entry({"admin", "system", "commands", "config"}, cbi("commands"), _("Configure"), 2)
entry({"admin", "system", "commands", "run"}, call("action_run"), nil, 3).leaf = true

View file

@ -18,7 +18,6 @@ function index()
local cc
cc = entry( { "admin", "services", "coovachilli" }, cbi("coovachilli"), _("CoovaChilli"), 90)
cc.i18n = "coovachilli"
cc.subindex = true
entry( { "admin", "services", "coovachilli", "network" }, cbi("coovachilli_network"), _("Network Configuration"), 10)

View file

@ -23,10 +23,8 @@ function index()
local page
page = entry({"admin", "services", "ddns"}, cbi("ddns/ddns"), _("Dynamic DNS"), 60)
page.i18n = "ddns"
page.dependent = true
page = entry({"mini", "network", "ddns"}, cbi("ddns/ddns", {autoapply=true}), _("Dynamic DNS"), 60)
page.i18n = "ddns"
page.dependent = true
end

View file

@ -11,8 +11,6 @@ You may obtain a copy of the License at
]]--
require("luci.i18n")
module("luci.controller.luci_diag", package.seeall)
function index()
@ -20,11 +18,9 @@ function index()
e = entry({"admin", "network", "diag_config"}, template("diag/network_config_index") , _("Configure Diagnostics"), 120)
e.index = true
e.i18n = "diag_core"
e.dependent = true
e = entry({"mini", "diag"}, template("diag/index"), _("Diagnostics"), 120)
e.index = true
e.i18n = "diag_core"
e.dependent = true
end

View file

@ -38,8 +38,6 @@ end
function parse_output(devmap, outnets, haslink, type, mini, debug)
local curnet = next(outnets, nil)
luci.i18n.loadc("diag_devinfo")
while (curnet) do
local output = outnets[curnet]["output"]
local subnet = outnets[curnet]["subnet"]

View file

@ -19,49 +19,38 @@ function index()
e = entry({"admin", "voice", "diag", "phones"}, arcombine(cbi("luci_diag/smap_devinfo"), cbi("luci_diag/smap_devinfo_config")), _("Phones"), 10)
e.leaf = true
e.subindex = true
e.i18n = "diag_devinfo"
e.dependent = true
e = entry({"admin", "voice", "diag", "phones", "config"}, cbi("luci_diag/smap_devinfo_config"), _("Configure"), 10)
e.i18n = "diag_devinfo"
e = entry({"admin", "status", "smap_devinfo"}, cbi("luci_diag/smap_devinfo"), _("SIP Devices on Network"), 120)
e.leaf = true
e.i18n = "diag_devinfo"
e.dependent = true
e = entry({"admin", "network", "diag_config", "netdiscover_devinfo_config"}, cbi("luci_diag/netdiscover_devinfo_config"), _("Network Device Scan"), 100)
e.leaf = true
e.i18n = "diag_devinfo"
e.dependent = true
e = entry({"admin", "network", "diag_config", "smap_devinfo_config"}, cbi("luci_diag/smap_devinfo_config"), _("SIP Device Scan"))
e.leaf = true
e.i18n = "diag_devinfo"
e.dependent = true
e = entry({"admin", "status", "netdiscover_devinfo"}, cbi("luci_diag/netdiscover_devinfo"), _("Devices on Network"), 90)
e.i18n = "diag_devinfo"
e.dependent = true
e = entry({"admin", "network", "mactodevinfo"}, cbi("luci_diag/mactodevinfo"), _("MAC Device Info Overrides"), 190)
e.i18n = "diag_devinfo"
e.dependent = true
e = entry({"mini", "diag", "phone_scan"}, cbi("luci_diag/smap_devinfo_mini"), _("Phone Scan"), 100)
e.i18n = "diag_devinfo"
e.dependent = true
e = entry({"mini", "voice", "phones", "phone_scan_config"}, cbi("luci_diag/smap_devinfo_config_mini"), _("Config Phone Scan"), 90)
e.i18n = "diag_devinfo"
e.dependent = true
e = entry({"mini", "diag", "netdiscover_devinfo"}, cbi("luci_diag/netdiscover_devinfo_mini"), _("Network Device Scan"), 10)
e.i18n = "diag_devinfo"
e.dependent = true
e = entry({"mini", "network", "netdiscover_devinfo_config"}, cbi("luci_diag/netdiscover_devinfo_config_mini"), _("Device Scan Config"))
e.i18n = "diag_devinfo"
e.dependent = true
end

View file

@ -83,7 +83,6 @@ function command_function(outnets, i)
end
function action_links(netdiscovermap, mini)
luci.i18n.loadc("diag_devinfo")
s = netdiscovermap:section(SimpleSection, "", translate("Actions"))
b = s:option(DummyValue, "_config", translate("Configure Scans"))
b.value = ""

View file

@ -94,7 +94,6 @@ function command_function(outnets, i)
end
function action_links(smapmap, mini)
luci.i18n.loadc("diag_devinfo")
s = smapmap:section(SimpleSection, "", translate("Actions"))
b = s:option(DummyValue, "_config", translate("Configure Scans"))
b.value = ""

View file

@ -3,7 +3,7 @@ module("luci.controller.firewall", package.seeall)
function index()
entry({"admin", "network", "firewall"},
alias("admin", "network", "firewall", "zones"),
_("Firewall"), 60).i18n = "firewall"
_("Firewall"), 60)
entry({"admin", "network", "firewall", "zones"},
arcombine(cbi("firewall/zones"), cbi("firewall/zone-details")),

View file

@ -14,5 +14,5 @@ module "luci.controller.freifunk.policy-routing"
function index()
entry({"admin", "freifunk", "policyrouting"}, cbi("freifunk/policyrouting"),
_("Policy Routing"), 60).i18n = "freifunk-policyrouting"
_("Policy Routing"), 60)
end

View file

@ -10,7 +10,6 @@ You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
]]--
luci.i18n.loadc("freifunk")
local uci = require "luci.model.uci".cursor()
m = Map("freifunk-policyrouting", translate("Policy Routing"), translate("These pages can be used to setup policy routing for certain firewall zones. "..

View file

@ -23,6 +23,5 @@ function index()
local page
page = entry({"admin", "services", "hd_idle"}, cbi("hd_idle"), _("hd-idle"), 60)
page.i18n = "hd_idle"
page.dependent = true
end

View file

@ -22,7 +22,6 @@ function index()
page.target = firstchild()
page.title = _("VoIP")
page.order = 90
page.i18n = "telephony"
entry({"admin", "telephony", "account"}, cbi("luci_ltqtapi/account") , _("Account"), 10)
entry({"admin", "telephony", "contact"}, cbi("luci_ltqtapi/contact") , _("Contacts"), 20)

View file

@ -22,7 +22,6 @@ function index()
local page
page = entry({"admin", "services", "minidlna"}, cbi("minidlna"), _("miniDLNA"))
page.i18n = "minidlna"
page.dependent = true
entry({"admin", "services", "minidlna_status"}, call("minidlna_status"))

View file

@ -1,5 +1,3 @@
<%- luci.i18n.loadc("minidlna") -%>
<script type="text/javascript">//<![CDATA[
XHR.poll(5, '<%=luci.dispatcher.build_url("admin/services/minidlna_status")%>', null,
function(x, st)

View file

@ -23,6 +23,5 @@ function index()
local page
page = entry({"admin", "system", "mmc_over_gpio"}, cbi("mmc_over_gpio"), _("MMC/SD driver configuration"), 60)
page.i18n = "mmc_over_gpio"
page.dependent = true
end

View file

@ -9,13 +9,11 @@ function index()
local page
page = entry({"admin", "network", "multiwan"}, cbi("multiwan/multiwan"), _("Multi-WAN"))
page.i18n = "multiwan"
page.dependent = true
entry({"admin", "network", "multiwan", "status"}, call("multiwan_status"))
page = entry({"mini", "network", "multiwan"}, cbi("multiwan/multiwanmini", {autoapply=true}), _("Multi-WAN"))
page.i18n = "multiwan"
page.dependent = true
end
function multiwan_status()

View file

@ -23,10 +23,8 @@ function index()
local page
page = entry({"admin", "system", "ntpc"}, cbi("ntpc/ntpc"), _("Time Synchronisation"), 50)
page.i18n = "ntpc"
page.dependent = true
page = entry({"mini", "system", "ntpc"}, cbi("ntpc/ntpcmini", {autoapply=true}), _("Time Synchronisation"), 50)
page.i18n = "ntpc"
page.dependent = true
end

View file

@ -8,7 +8,6 @@ function index()
local page = node("admin", "status", "olsr")
page.target = template("status-olsr/overview")
page.title = _("OLSR")
page.i18n = "olsr"
page.subindex = true
local page = node("admin", "status", "olsr", "neighbors")
@ -51,7 +50,6 @@ function index()
{"admin", "services", "olsrd"},
cbi("olsr/olsrd"), "OLSR"
)
ol.i18n = "olsr"
ol.subindex = true
entry(
@ -74,7 +72,6 @@ function index()
cbi("olsr/olsrddisplay"), _("Display")
)
oplg.i18n = "olsr"
oplg.leaf = true
oplg.subindex = true

View file

@ -16,7 +16,7 @@ $Id$
module("luci.controller.openvpn", package.seeall)
function index()
entry( {"admin", "services", "openvpn"}, cbi("openvpn"), _("OpenVPN") ).i18n = "openvpn"
entry( {"admin", "services", "openvpn"}, cbi("openvpn"), _("OpenVPN") )
entry( {"admin", "services", "openvpn", "basic"}, cbi("openvpn-basic"), nil ).leaf = true
entry( {"admin", "services", "openvpn", "advanced"}, cbi("openvpn-advanced"), nil ).leaf = true
end

View file

@ -16,5 +16,5 @@ module("luci.controller.ff_p2pblock", package.seeall)
function index()
entry({"admin", "network", "firewall", "p2pblock"}, cbi("luci_fw/p2pblock"),
_("P2P-Block"), 40).i18n = "p2pblock"
_("P2P-Block"), 40)
end

View file

@ -23,6 +23,5 @@ function index()
local page
page = entry({"admin", "services", "p910nd"}, cbi("p910nd"), _("p910nd - Printer server"), 60)
page.i18n = "p910nd"
page.dependent = true
end

View file

@ -19,7 +19,7 @@ function index()
return
end
entry({"admin", "services", "polipo"}, alias("admin", "services", "polipo", "config"), _("Polipo")).i18n = "polipo"
entry({"admin", "services", "polipo"}, alias("admin", "services", "polipo", "config"), _("Polipo"))
entry({"admin", "services", "polipo", "status"}, template("polipo_status"), _("Status"))
entry({"admin", "services", "polipo", "config"}, cbi("polipo"), _("Configuration"))
end

View file

@ -22,10 +22,8 @@ function index()
local page
page = entry({"admin", "network", "qos"}, cbi("qos/qos"), _("QoS"))
page.i18n = "qos"
page.dependent = true
page = entry({"mini", "network", "qos"}, cbi("qos/qosmini", {autoapply=true}), _("QoS"))
page.i18n = "qos"
page.dependent = true
end

View file

@ -19,7 +19,7 @@ function index()
return
end
entry({"admin", "network", "radvd"}, cbi("radvd"), _("Radvd"), 61).i18n = "radvd"
entry({"admin", "network", "radvd"}, cbi("radvd"), _("Radvd"), 61)
entry({"admin", "network", "radvd", "interface"}, cbi("radvd/interface"), nil).leaf = true
entry({"admin", "network", "radvd", "prefix"}, cbi("radvd/prefix"), nil).leaf = true
entry({"admin", "network", "radvd", "route"}, cbi("radvd/route"), nil).leaf = true

View file

@ -23,6 +23,5 @@ function index()
local page
page = entry({"admin", "services", "samba"}, cbi("samba"), _("Network Shares"))
page.i18n = "samba"
page.dependent = true
end

View file

@ -1,28 +1,25 @@
module("luci.controller.splash.splash", package.seeall)
luci.i18n.loadc("splash")
local uci = luci.model.uci.cursor()
local util = require "luci.util"
function index()
entry({"admin", "services", "splash"}, cbi("splash/splash"), _("Client-Splash"), 90).i18n = "freifunk"
entry({"admin", "services", "splash"}, cbi("splash/splash"), _("Client-Splash"), 90)
entry({"admin", "services", "splash", "splashtext" }, form("splash/splashtext"), _("Splashtext"), 10)
local e
e = node("splash")
e.target = call("action_dispatch")
e.i18n = "freifunk"
node("splash", "activate").target = call("action_activate")
node("splash", "splash").target = template("splash_splash/splash")
node("splash", "blocked").target = template("splash/blocked")
entry({"admin", "status", "splash"}, call("action_status_admin"), _("Client-Splash")).i18n = "freifunk"
entry({"admin", "status", "splash"}, call("action_status_admin"), _("Client-Splash"))
local page = node("splash", "publicstatus")
page.target = call("action_status_public")
page.i18n = "freifunk"
page.leaf = true
end

View file

@ -9,7 +9,6 @@ You may obtain a copy of the License at
]]--
require("luci.model.uci")
luci.i18n.loadc("splash")
m = Map("luci_splash", translate("Client-Splash"), translate("Client-Splash is a hotspot authentification system for wireless mesh networks."))

View file

@ -13,7 +13,6 @@ You may obtain a copy of the License at
]]--
local fs = require "nixio.fs"
luci.i18n.loadc("splash")
local splashtextfile = "/usr/lib/luci-splash/splashtext.html"

View file

@ -19,7 +19,6 @@ local ipt = require "luci.sys.iptparser".IptParser()
local uci = require "luci.model.uci".cursor_state()
local wat = require "luci.tools.webadmin"
local fs = require "nixio.fs"
luci.i18n.loadc("splash")
local clients = { }
local leasetime = tonumber(uci:get("luci_splash", "general", "leasetime") or 1) * 60 * 60

View file

@ -67,7 +67,6 @@ function index()
-- create toplevel menu nodes
local st = entry({"admin", "statistics"}, template("admin_statistics/index"), _("Statistics"), 80)
st.i18n = "statistics"
st.index = true
entry({"admin", "statistics", "collectd"}, cbi("luci_statistics/collectd"), _("Collectd"), 10).subindex = true
@ -82,7 +81,6 @@ function index()
)
e.index = true
e.i18n = "rrdtool"
for j, plugin in luci.util.vspairs( plugins ) do
_entry(
@ -97,7 +95,6 @@ function index()
-- output views
local page = entry( { "admin", "statistics", "graph" }, template("admin_statistics/index"), _("Graphs"), 80)
page.i18n = "statistics"
page.setuser = "nobody"
page.setgroup = "nogroup"

View file

@ -25,9 +25,6 @@ Instance = luci.util.class()
function Instance.__init__( self, graph )
self.i18n = luci.i18n
self.graph = graph
self.i18n.loadc("rrdtool")
self.i18n.loadc("statistics")
end
function Instance._subst( self, str, val )

View file

@ -20,7 +20,7 @@ function index()
return
end
entry({"admin", "services", "tinyproxy"}, alias("admin", "services", "tinyproxy", "config"), _("Tinyproxy")).i18n = "tinyproxy"
entry({"admin", "services", "tinyproxy"}, alias("admin", "services", "tinyproxy", "config"), _("Tinyproxy"))
entry({"admin", "services", "tinyproxy", "status"}, template("tinyproxy_status"), _("Status"))
entry({"admin", "services", "tinyproxy", "config"}, cbi("tinyproxy"), _("Configuration"))
end

View file

@ -15,14 +15,11 @@ $Id$
module("luci.controller.transmission", package.seeall)
function index()
require("luci.i18n")
luci.i18n.loadc("transmission")
if not nixio.fs.access("/etc/config/transmission") then
return
end
local page = entry({"admin", "services", "transmission"}, cbi("transmission"), _("Transmission"))
page.i18n = "transmission"
page.dependent = true
end

View file

@ -23,11 +23,9 @@ function index()
local page
page = entry({"admin", "services", "upnp"}, cbi("upnp/upnp"), _("UPNP"))
page.i18n = "upnp"
page.dependent = true
page = entry({"mini", "network", "upnp"}, cbi("upnp/upnpmini", {autoapply=true}), _("UPNP"))
page.i18n = "upnp"
page.dependent = true
entry({"admin", "services", "upnp", "status"}, call("act_status")).leaf = true

View file

@ -1,5 +1,3 @@
<%- luci.i18n.loadc("upnp") -%>
<script type="text/javascript">//<![CDATA[
function upnp_delete_fwd(idx) {
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "upnp", "delete")%>/' + idx, null,

View file

@ -23,6 +23,5 @@ function index()
local page
page = entry({"admin", "services", "ushare"}, cbi("ushare"), _("uShare"), 60)
page.i18n = "ushare"
page.dependent = true
end

View file

@ -1,11 +1,11 @@
module("luci.controller.vnstat", package.seeall)
function index()
entry({"admin", "status", "vnstat"}, alias("admin", "status", "vnstat", "graphs"), _("VnStat Traffic Monitor"), 90).i18n = "vnstat"
entry({"admin", "status", "vnstat"}, alias("admin", "status", "vnstat", "graphs"), _("VnStat Traffic Monitor"), 90)
entry({"admin", "status", "vnstat", "graphs"}, template("vnstat"), _("Graphs"), 1)
entry({"admin", "status", "vnstat", "config"}, cbi("vnstat"), _("Configuration"), 2)
entry({"mini", "network", "vnstat"}, alias("mini", "network", "vnstat", "graphs"), _("VnStat Traffic Monitor"), 90).i18n = "vnstat"
entry({"mini", "network", "vnstat"}, alias("mini", "network", "vnstat", "graphs"), _("VnStat Traffic Monitor"), 90)
entry({"mini", "network", "vnstat", "graphs"}, template("vnstat"), _("Graphs"), 1)
entry({"mini", "network", "vnstat", "config"}, cbi("vnstat"), _("Configuration"), 2)
end

View file

@ -18,18 +18,14 @@ function index()
e = entry({"admin", "voice"}, template("luci_voice/index") , _("Voice"), 90)
e.index = true
e.i18n = "voice_core"
e = entry({"mini", "voice"}, template("luci_voice/index"), _("Voice"), 90)
e.index = true
e.i18n = "voice_core"
e = entry({"mini", "voice", "phones"}, template("luci_voice/phone_index"), _("Phones"), 90)
e.index = true
e.i18n = "voice_core"
e = entry({"admin", "voice", "phones"}, template("luci_voice/phone_index"), _("Phones"), 90)
e.index = true
e.i18n = "voice_core"
end

View file

@ -18,6 +18,5 @@ function index()
e = entry({"admin", "voice", "diag"}, template("luci_voice/diag_index"), _("Diagnostics"), 90)
e.index = true
e.i18n = "voice_diag"
e.dependent = true
end

View file

@ -1,6 +1,6 @@
module("luci.controller.wol", package.seeall)
function index()
entry({"admin", "network", "wol"}, cbi("wol"), _("Wake on LAN"), 90).i18n = "wol"
entry({"mini", "network", "wol"}, cbi("wol"), _("Wake on LAN"), 90).i18n = "wol"
entry({"admin", "network", "wol"}, cbi("wol"), _("Wake on LAN"), 90)
entry({"mini", "network", "wol"}, cbi("wol"), _("Wake on LAN"), 90)
end

View file

@ -74,8 +74,6 @@ function load(cbimap, ...)
assert(func, err)
luci.i18n.loadc("base")
local env = {
translate=i18n.translate,
translatef=i18n.translatef,

View file

@ -15,7 +15,6 @@ local fs = require "luci.fs"
local util = require "luci.util"
local uci = require "luci.model.uci".cursor()
local profiles = "/etc/config/profile_"
luci.i18n.loadc("freifunk")
m = Map("freifunk", translate ("Community"))
c = m:section(NamedSection, "community", "public", nil, translate("These are the basic settings for your local wireless community. These settings define the default values for the wizard and DO NOT affect the actual configuration of the router."))

View file

@ -11,8 +11,6 @@ You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
]]--
luci.i18n.loadc("freifunk")
m = Map("freifunk", translate("Contact"), translate("Please fill in your contact details below."))
c = m:section(NamedSection, "contact", "public", "")

View file

@ -13,7 +13,6 @@ You may obtain a copy of the License at
local uci = require "luci.model.uci".cursor()
local ipkg = require "luci.model.ipkg"
local community = uci:get("freifunk", "community", "name")
luci.i18n.loadc("freifunk")
if community == nil then
luci.http.redirect(luci.dispatcher.build_url("admin", "freifunk", "profile_error"))

View file

@ -13,7 +13,6 @@ You may obtain a copy of the License at
local fs = require "nixio.fs"
local uci = require "luci.model.uci".cursor()
local community = uci:get("freifunk", "community", "name")
luci.i18n.loadc("freifunk")
if community == nil then
luci.http.redirect(luci.dispatcher.build_url("admin", "freifunk", "profile_error"))

View file

@ -1,6 +1,5 @@
local fs = require "nixio.fs"
local file = "/www/luci-static/index_user.html"
luci.i18n.loadc("freifunk")
m = Map("freifunk", translate("Edit index page"), translate("You can display additional content on the public index page by inserting valid XHTML in the form below.<br />Headlines should be enclosed between &lt;h2&gt; and &lt;/h2&gt;."))

View file

@ -17,7 +17,6 @@ else
mail = contact.mail
end
luci.i18n.loadc("freifunk")
%>
<h2><%:Freifunk Overview%></h2>

View file

@ -30,7 +30,6 @@ for i,r in ipairs(request) do
end
end
require("luci.i18n").loadc("base")
require("luci.http").prepare_content("text/html")
-%>