summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--applications/luci-ahcp/luasrc/controller/ahcp.lua5
-rw-r--r--applications/luci-coovachilli/luasrc/controller/coovachilli.lua14
-rw-r--r--applications/luci-ddns/luasrc/controller/ddns.lua12
-rw-r--r--applications/luci-diag-core/luasrc/controller/luci_diag.lua23
-rw-r--r--applications/luci-diag-devinfo/luasrc/controller/luci_diag/luci_diag_devinfo.lua26
-rw-r--r--applications/luci-ffwizard/luasrc/controller/ffwizard.lua9
-rw-r--r--applications/luci-firewall/luasrc/controller/luci_fw/luci_fw.lua7
-rw-r--r--applications/luci-freifunk-policyrouting/luasrc/controller/freifunk/policy-routing.lua9
-rw-r--r--applications/luci-hd-idle/luasrc/controller/hd_idle.lua18
-rw-r--r--applications/luci-lqtapifoss/luasrc/controller/lqtapifoss.lua11
-rw-r--r--applications/luci-meshwizard/luasrc/controller/meshwizard.lua4
-rw-r--r--applications/luci-mmc-over-gpio/luasrc/controller/mmc_over_gpio.lua18
-rw-r--r--applications/luci-multiwan/luasrc/controller/multiwan.lua18
-rw-r--r--applications/luci-ntpc/luasrc/controller/ntpc.lua14
-rw-r--r--applications/luci-olsr-services/luasrc/controller/services.lua3
-rw-r--r--applications/luci-olsr-viz/luasrc/controller/olsr-viz.lua2
-rw-r--r--applications/luci-olsr/luasrc/controller/olsr.lua25
-rw-r--r--applications/luci-openvpn/luasrc/controller/openvpn.lua6
-rw-r--r--applications/luci-p2pblock/luasrc/controller/ff_p2pblock.lua3
-rw-r--r--applications/luci-p910nd/luasrc/controller/p910nd.lua18
-rw-r--r--applications/luci-polipo/luasrc/controller/polipo.lua10
-rw-r--r--applications/luci-qos/luasrc/controller/qos.lua10
-rw-r--r--applications/luci-radvd/luasrc/controller/radvd.lua2
-rw-r--r--applications/luci-samba/luasrc/controller/samba.lua11
-rw-r--r--applications/luci-splash/luasrc/controller/splash/splash.lua14
-rw-r--r--applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua104
-rw-r--r--applications/luci-tinyproxy/luasrc/controller/tinyproxy.lua9
-rw-r--r--applications/luci-upnp/luasrc/controller/upnp.lua5
-rw-r--r--applications/luci-ushare/luasrc/controller/ushare.lua18
-rw-r--r--applications/luci-vnstat/luasrc/controller/vnstat.lua15
-rw-r--r--applications/luci-voice-core/luasrc/controller/luci_voice.lua12
-rw-r--r--applications/luci-voice-diag/luasrc/controller/luci_voice/luci_voice_diag.lua12
-rw-r--r--applications/luci-wol/luasrc/controller/wol.lua7
-rw-r--r--modules/admin-full/luasrc/controller/admin/index.lua8
-rw-r--r--modules/admin-full/luasrc/controller/admin/network.lua18
-rw-r--r--modules/admin-full/luasrc/controller/admin/services.lua12
-rw-r--r--modules/admin-full/luasrc/controller/admin/status.lua26
-rw-r--r--modules/admin-full/luasrc/controller/admin/system.lua23
-rw-r--r--modules/admin-full/luasrc/controller/admin/uci.lua11
-rw-r--r--modules/admin-mini/luasrc/controller/mini/index.lua13
-rw-r--r--modules/admin-mini/luasrc/controller/mini/network.lua11
-rw-r--r--modules/admin-mini/luasrc/controller/mini/system.lua15
-rw-r--r--modules/freifunk/luasrc/controller/freifunk/freifunk.lua75
-rw-r--r--modules/freifunk/luasrc/controller/freifunk/remote_update.lua4
-rw-r--r--modules/niu/luasrc/controller/niu/dashboard.lua1
-rw-r--r--modules/niu/luasrc/controller/niu/network.lua1
-rw-r--r--modules/niu/luasrc/controller/niu/traffic.lua2
-rw-r--r--modules/niu/luasrc/controller/niu/wireless.lua10
48 files changed, 322 insertions, 382 deletions
diff --git a/applications/luci-ahcp/luasrc/controller/ahcp.lua b/applications/luci-ahcp/luasrc/controller/ahcp.lua
index ea73903117..5667bb532f 100644
--- a/applications/luci-ahcp/luasrc/controller/ahcp.lua
+++ b/applications/luci-ahcp/luasrc/controller/ahcp.lua
@@ -19,10 +19,7 @@ function index()
return
end
- require("luci.i18n")
- luci.i18n.loadc("ahcp")
-
- entry({"admin", "network", "ahcpd"}, cbi("ahcp"), luci.i18n.translate("AHCP Server"), 90).i18n = "ahcp"
+ entry({"admin", "network", "ahcpd"}, cbi("ahcp"), _("AHCP Server"), 90).i18n = "ahcp"
entry({"admin", "network", "ahcpd", "status"}, call("ahcp_status"))
end
diff --git a/applications/luci-coovachilli/luasrc/controller/coovachilli.lua b/applications/luci-coovachilli/luasrc/controller/coovachilli.lua
index 52e09f6f57..73a2c518a7 100644
--- a/applications/luci-coovachilli/luasrc/controller/coovachilli.lua
+++ b/applications/luci-coovachilli/luasrc/controller/coovachilli.lua
@@ -11,19 +11,17 @@ You may obtain a copy of the License at
$Id$
]]--
+
module("luci.controller.coovachilli", package.seeall)
function index()
+ local cc
- require("luci.i18n")
- local i18n = luci.i18n.translate
-
- local cc = entry( { "admin", "services", "coovachilli" }, cbi("coovachilli"), i18n("CoovaChilli"), 90)
+ cc = entry( { "admin", "services", "coovachilli" }, cbi("coovachilli"), _("CoovaChilli"), 90)
cc.i18n = "coovachilli"
cc.subindex = true
-
- entry( { "admin", "services", "coovachilli", "network" }, cbi("coovachilli_network"), i18n("Network Configuration"), 10)
- entry( { "admin", "services", "coovachilli", "radius" }, cbi("coovachilli_radius"), i18n("RADIUS configuration"), 20)
- entry( { "admin", "services", "coovachilli", "auth" }, cbi("coovachilli_auth"), i18n("UAM and MAC Authentication"), 30)
+ entry( { "admin", "services", "coovachilli", "network" }, cbi("coovachilli_network"), _("Network Configuration"), 10)
+ entry( { "admin", "services", "coovachilli", "radius" }, cbi("coovachilli_radius"), _("RADIUS configuration"), 20)
+ entry( { "admin", "services", "coovachilli", "auth" }, cbi("coovachilli_auth"), _("UAM and MAC Authentication"), 30)
end
diff --git a/applications/luci-ddns/luasrc/controller/ddns.lua b/applications/luci-ddns/luasrc/controller/ddns.lua
index 8e1bc665ab..e2f786b324 100644
--- a/applications/luci-ddns/luasrc/controller/ddns.lua
+++ b/applications/luci-ddns/luasrc/controller/ddns.lua
@@ -12,21 +12,21 @@ You may obtain a copy of the License at
$Id$
]]--
+
module("luci.controller.ddns", package.seeall)
function index()
- require("luci.i18n")
- luci.i18n.loadc("ddns")
if not nixio.fs.access("/etc/config/ddns") then
return
end
- local page = entry({"admin", "services", "ddns"}, cbi("ddns/ddns"), luci.i18n.translate("Dynamic DNS"), 60)
+ local page
+
+ page = entry({"admin", "services", "ddns"}, cbi("ddns/ddns"), _("Dynamic DNS"), 60)
page.i18n = "ddns"
page.dependent = true
-
-
- local page = entry({"mini", "network", "ddns"}, cbi("ddns/ddns", {autoapply=true}), luci.i18n.translate("Dynamic DNS"), 60)
+
+ page = entry({"mini", "network", "ddns"}, cbi("ddns/ddns", {autoapply=true}), _("Dynamic DNS"), 60)
page.i18n = "ddns"
page.dependent = true
end
diff --git a/applications/luci-diag-core/luasrc/controller/luci_diag.lua b/applications/luci-diag-core/luasrc/controller/luci_diag.lua
index 23b8d00098..c12399431e 100644
--- a/applications/luci-diag-core/luasrc/controller/luci_diag.lua
+++ b/applications/luci-diag-core/luasrc/controller/luci_diag.lua
@@ -16,16 +16,15 @@ require("luci.i18n")
module("luci.controller.luci_diag", package.seeall)
function index()
- require("luci.i18n")
- luci.i18n.loadc("diag_core")
-
- local e = entry({"admin", "network", "diag_config"}, template("diag/network_config_index") , luci.i18n.translate("Configure Diagnostics"), 120)
- e.index = true
- e.i18n = "diag_core"
- e.dependent = true
-
- e = entry({"mini", "diag"}, template("diag/index"), luci.i18n.translate("l_d_diag"), 120)
- e.index = true
- e.i18n = "diag_core"
- e.dependent = true
+ local e
+
+ 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
diff --git a/applications/luci-diag-devinfo/luasrc/controller/luci_diag/luci_diag_devinfo.lua b/applications/luci-diag-devinfo/luasrc/controller/luci_diag/luci_diag_devinfo.lua
index e40a3e82cc..e8a2f5043d 100644
--- a/applications/luci-diag-devinfo/luasrc/controller/luci_diag/luci_diag_devinfo.lua
+++ b/applications/luci-diag-devinfo/luasrc/controller/luci_diag/luci_diag_devinfo.lua
@@ -11,58 +11,56 @@ You may obtain a copy of the License at
]]--
-
module("luci.controller.luci_diag.luci_diag_devinfo", package.seeall)
function index()
- require("luci.i18n")
- luci.i18n.loadc("diag_devinfo")
+ local e
- local e = entry({"admin", "voice", "diag", "phones"}, arcombine(cbi("luci_diag/smap_devinfo"), cbi("luci_diag/smap_devinfo_config")), luci.i18n.translate("Phones"), 10)
+ 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"), luci.i18n.translate("Configure"), 10)
+ 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"), luci.i18n.translate("SIP Devices on Network"), 120)
+ 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"), luci.i18n.translate("Network Device Scan"), 100)
+ 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"), luci.i18n.translate("SIP Device Scan"))
+ 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"), luci.i18n.translate("Devices on Network"), 90)
+ 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"), luci.i18n.translate("MAC Device Info Overrides"), 190)
+ 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"), luci.i18n.translate("Phone Scan"), 100)
+ 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"), luci.i18n.translate("Config Phone Scan"), 90)
+ 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"), luci.i18n.translate("Network Device Scan"), 10)
+ 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"), luci.i18n.translate("Device Scan Config"))
+ e = entry({"mini", "network", "netdiscover_devinfo_config"}, cbi("luci_diag/netdiscover_devinfo_config_mini"), _("Device Scan Config"))
e.i18n = "diag_devinfo"
e.dependent = true
diff --git a/applications/luci-ffwizard/luasrc/controller/ffwizard.lua b/applications/luci-ffwizard/luasrc/controller/ffwizard.lua
index 53ceb3a545..5ba33a12aa 100644
--- a/applications/luci-ffwizard/luasrc/controller/ffwizard.lua
+++ b/applications/luci-ffwizard/luasrc/controller/ffwizard.lua
@@ -18,13 +18,10 @@ $Id$
module "luci.controller.ffwizard"
function index()
- require("luci.i18n").loadc("ffwizard")
- local i18n = luci.i18n.translate
-
- entry({"admin", "freifunk", "ffwizard"}, form("freifunk/ffwizard"), i18n("Wizard"), 40)
- assign({"mini", "freifunk", "ffwizard"}, {"admin", "freifunk", "ffwizard"}, i18n("Wizard"), 40)
+ entry({"admin", "freifunk", "ffwizard"}, form("freifunk/ffwizard"), _("Wizard"), 40).i18n = "ffwizard"
+ assign({"mini", "freifunk", "ffwizard"}, {"admin", "freifunk", "ffwizard"}, _("Wizard"), 40)
- entry({"admin", "freifunk", "ffwizard_error"}, template("freifunk/ffwizard_error"))
+ entry({"admin", "freifunk", "ffwizard_error"}, template("freifunk/ffwizard_error")).i18n = "ffwizard"
assign({"mini", "freifunk", "ffwizard_error"}, {"admin", "freifunk", "ffwizard_error"})
end
diff --git a/applications/luci-firewall/luasrc/controller/luci_fw/luci_fw.lua b/applications/luci-firewall/luasrc/controller/luci_fw/luci_fw.lua
index 5dd84bc90d..b3d440d1c0 100644
--- a/applications/luci-firewall/luasrc/controller/luci_fw/luci_fw.lua
+++ b/applications/luci-firewall/luasrc/controller/luci_fw/luci_fw.lua
@@ -1,13 +1,10 @@
module("luci.controller.luci_fw.luci_fw", package.seeall)
function index()
- require("luci.i18n").loadc("luci-fw")
- local i18n = luci.i18n.translate
-
- entry({"admin", "network", "firewall"}, alias("admin", "network", "firewall", "zones"), i18n("Firewall"), 60).i18n = "firewall"
+ entry({"admin", "network", "firewall"}, alias("admin", "network", "firewall", "zones"), _("Firewall"), 60).i18n = "firewall"
entry({"admin", "network", "firewall", "zones"}, arcombine(cbi("luci_fw/zones"), cbi("luci_fw/zone")), nil, 10).leaf = true
entry({"admin", "network", "firewall", "rule"}, arcombine(cbi("luci_fw/zones"), cbi("luci_fw/trule")), nil, 20).leaf = true
entry({"admin", "network", "firewall", "redirect"}, arcombine(cbi("luci_fw/zones"), cbi("luci_fw/rrule")), nil, 30).leaf = true
- entry({"mini", "network", "portfw"}, cbi("luci_fw/miniportfw", {autoapply=true}), i18n("Port forwarding"), 70).i18n = "firewall"
+ entry({"mini", "network", "portfw"}, cbi("luci_fw/miniportfw", {autoapply=true}), _("Port forwarding"), 70).i18n = "firewall"
end
diff --git a/applications/luci-freifunk-policyrouting/luasrc/controller/freifunk/policy-routing.lua b/applications/luci-freifunk-policyrouting/luasrc/controller/freifunk/policy-routing.lua
index 32c9c0ba4e..e8aca9ce57 100644
--- a/applications/luci-freifunk-policyrouting/luasrc/controller/freifunk/policy-routing.lua
+++ b/applications/luci-freifunk-policyrouting/luasrc/controller/freifunk/policy-routing.lua
@@ -10,14 +10,9 @@ You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
]]--
-
module "luci.controller.freifunk.policy-routing"
function index()
- require("luci.i18n").loadc("freifunk-policyrouting")
- local i18n = luci.i18n.translate
-
- entry({"admin", "freifunk", "policyrouting"}, cbi("freifunk/policyrouting"), i18n("Policy Routing"), 60)
+ entry({"admin", "freifunk", "policyrouting"}, cbi("freifunk/policyrouting"),
+ _("Policy Routing"), 60).i18n = "freifunk-policyrouting"
end
-
-
diff --git a/applications/luci-hd-idle/luasrc/controller/hd_idle.lua b/applications/luci-hd-idle/luasrc/controller/hd_idle.lua
index 9d5e5b3b30..e28983f390 100644
--- a/applications/luci-hd-idle/luasrc/controller/hd_idle.lua
+++ b/applications/luci-hd-idle/luasrc/controller/hd_idle.lua
@@ -16,13 +16,13 @@ $Id$
module("luci.controller.hd_idle", package.seeall)
function index()
- require("luci.i18n")
- luci.i18n.loadc("hd_idle")
- if not nixio.fs.access("/etc/config/hd-idle") then
- return
- end
-
- local page = entry({"admin", "services", "hd_idle"}, cbi("hd_idle"), luci.i18n.translate("hd-idle"), 60)
- page.i18n = "hd_idle"
- page.dependent = true
+ if not nixio.fs.access("/etc/config/hd-idle") then
+ return
+ end
+
+ local page
+
+ page = entry({"admin", "services", "hd_idle"}, cbi("hd_idle"), _("hd-idle"), 60)
+ page.i18n = "hd_idle"
+ page.dependent = true
end
diff --git a/applications/luci-lqtapifoss/luasrc/controller/lqtapifoss.lua b/applications/luci-lqtapifoss/luasrc/controller/lqtapifoss.lua
index 08941874a2..323f8a7c41 100644
--- a/applications/luci-lqtapifoss/luasrc/controller/lqtapifoss.lua
+++ b/applications/luci-lqtapifoss/luasrc/controller/lqtapifoss.lua
@@ -10,6 +10,7 @@ You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
]]--
+
module("luci.controller.lqtapifoss", package.seeall)
function index()
@@ -17,11 +18,13 @@ function index()
return
end
- local e = entry({"admin", "telephony"}, template("luci_lqvoip/index") , luci.i18n.translate("VoIP"), 90)
+ local e
+
+ e = entry({"admin", "telephony"}, template("luci_lqvoip/index") , _("VoIP"), 90)
e.index = true
e.i18n = "telephony"
- --local e = entry({"admin", "telephony", "config"}, cbi("luci_lqvoip/config") , luci.i18n.translate("Config"), 10)
- local e = entry({"admin", "telephony", "account"}, cbi("luci_lqvoip/account") , luci.i18n.translate("Account"), 20)
- local e = entry({"admin", "telephony", "contact"}, cbi("luci_lqvoip/contact") , luci.i18n.translate("Contacts"), 30)
+ --entry({"admin", "telephony", "config"}, cbi("luci_lqvoip/config") , _("Config"), 10)
+ entry({"admin", "telephony", "account"}, cbi("luci_lqvoip/account") , _("Account"), 20)
+ entry({"admin", "telephony", "contact"}, cbi("luci_lqvoip/contact") , _("Contacts"), 30)
end
diff --git a/applications/luci-meshwizard/luasrc/controller/meshwizard.lua b/applications/luci-meshwizard/luasrc/controller/meshwizard.lua
index 4e930cc50d..942987db50 100644
--- a/applications/luci-meshwizard/luasrc/controller/meshwizard.lua
+++ b/applications/luci-meshwizard/luasrc/controller/meshwizard.lua
@@ -14,8 +14,6 @@ http://www.apache.org/licenses/LICENSE-2.0
module "luci.controller.meshwizard"
function index()
- require("luci.i18n").loadc("meshwizard")
- local i18n = luci.i18n.translate
- entry({"admin", "freifunk", "meshwizard"}, cbi("freifunk/meshwizard"), i18n("Mesh Wizard"), 40)
+ entry({"admin", "freifunk", "meshwizard"}, cbi("freifunk/meshwizard"), _("Mesh Wizard"), 40)
end
diff --git a/applications/luci-mmc-over-gpio/luasrc/controller/mmc_over_gpio.lua b/applications/luci-mmc-over-gpio/luasrc/controller/mmc_over_gpio.lua
index 9ee2a9dec6..5abceab7aa 100644
--- a/applications/luci-mmc-over-gpio/luasrc/controller/mmc_over_gpio.lua
+++ b/applications/luci-mmc-over-gpio/luasrc/controller/mmc_over_gpio.lua
@@ -16,13 +16,13 @@ $Id$
module("luci.controller.mmc_over_gpio", package.seeall)
function index()
- require("luci.i18n")
- luci.i18n.loadc("mmc_over_gpio")
- if not nixio.fs.access("/etc/config/mmc_over_gpio") then
- return
- end
-
- local page = entry({"admin", "system", "mmc_over_gpio"}, cbi("mmc_over_gpio"), luci.i18n.translate("MMC/SD driver configuration"), 60)
- page.i18n = "mmc_over_gpio"
- page.dependent = true
+ if not nixio.fs.access("/etc/config/mmc_over_gpio") then
+ return
+ end
+
+ 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
diff --git a/applications/luci-multiwan/luasrc/controller/multiwan.lua b/applications/luci-multiwan/luasrc/controller/multiwan.lua
index 561747b0f6..2a45c5f7bc 100644
--- a/applications/luci-multiwan/luasrc/controller/multiwan.lua
+++ b/applications/luci-multiwan/luasrc/controller/multiwan.lua
@@ -1,18 +1,18 @@
module("luci.controller.multiwan", package.seeall)
function index()
- local fs = luci.fs or nixio.fs
- if not fs.access("/etc/config/multiwan") then
+ local fs = luci.fs or nixio.fs
+ if not fs.access("/etc/config/multiwan") then
return
end
-
- local page = entry({"admin", "network", "multiwan"}, cbi("multiwan/multiwan"), "Multi-WAN")
- page.i18n = "multiwan"
- page.dependent = true
- local page = entry({"mini", "network", "multiwan"}, cbi("multiwan/multiwanmini", {autoapply=true}), "Multi-WAN")
- page.i18n = "multiwan"
- page.dependent = true
+ local page
+ page = entry({"admin", "network", "multiwan"}, cbi("multiwan/multiwan"), _("Multi-WAN"))
+ page.i18n = "multiwan"
+ page.dependent = true
+ page = entry({"mini", "network", "multiwan"}, cbi("multiwan/multiwanmini", {autoapply=true}), _("Multi-WAN"))
+ page.i18n = "multiwan"
+ page.dependent = true
end
diff --git a/applications/luci-ntpc/luasrc/controller/ntpc.lua b/applications/luci-ntpc/luasrc/controller/ntpc.lua
index b6af6f9502..782e216143 100644
--- a/applications/luci-ntpc/luasrc/controller/ntpc.lua
+++ b/applications/luci-ntpc/luasrc/controller/ntpc.lua
@@ -12,21 +12,21 @@ You may obtain a copy of the License at
$Id$
]]--
+
module("luci.controller.ntpc", package.seeall)
function index()
- require("luci.i18n")
- luci.i18n.loadc("ntpc")
if not nixio.fs.access("/etc/config/ntpclient") then
return
end
- local page = entry({"admin", "system", "ntpc"}, cbi("ntpc/ntpc"), luci.i18n.translate("Time Synchronisation"), 50)
+ local page
+
+ page = entry({"admin", "system", "ntpc"}, cbi("ntpc/ntpc"), _("Time Synchronisation"), 50)
page.i18n = "ntpc"
page.dependent = true
-
-
- local page = entry({"mini", "system", "ntpc"}, cbi("ntpc/ntpcmini", {autoapply=true}), luci.i18n.translate("Time Synchronisation"), 50)
+
+ page = entry({"mini", "system", "ntpc"}, cbi("ntpc/ntpcmini", {autoapply=true}), _("Time Synchronisation"), 50)
page.i18n = "ntpc"
page.dependent = true
-end \ No newline at end of file
+end
diff --git a/applications/luci-olsr-services/luasrc/controller/services.lua b/applications/luci-olsr-services/luasrc/controller/services.lua
index cc1a2f62e8..a4636bfd57 100644
--- a/applications/luci-olsr-services/luasrc/controller/services.lua
+++ b/applications/luci-olsr-services/luasrc/controller/services.lua
@@ -2,7 +2,6 @@ module "luci.controller.services"
function index()
local uci = require "luci.model.uci".cursor()
- local i18n = luci.i18n.translate
uci:foreach("olsrd", "LoadPlugin", function(s)
if s.library == "olsrd_nameservice.so.0.3" then
@@ -11,7 +10,7 @@ function index()
end)
if has_serv then
- entry({"freifunk", "services"}, template("freifunk-services/services"), i18n("Services"), 60)
+ entry({"freifunk", "services"}, template("freifunk-services/services"), _("Services"), 60)
end
end
diff --git a/applications/luci-olsr-viz/luasrc/controller/olsr-viz.lua b/applications/luci-olsr-viz/luasrc/controller/olsr-viz.lua
index 4981f8d05f..672486c53b 100644
--- a/applications/luci-olsr-viz/luasrc/controller/olsr-viz.lua
+++ b/applications/luci-olsr-viz/luasrc/controller/olsr-viz.lua
@@ -1,5 +1,5 @@
module "luci.controller.olsr-viz"
function index()
- entry({"admin", "status", "olsr", "olsr-viz"}, template("olsr-viz/olsr-viz"), "OLSR-Viz", 90)
+ entry({"admin", "status", "olsr", "olsr-viz"}, template("olsr-viz/olsr-viz"), _("OLSR-Viz"), 90)
end
diff --git a/applications/luci-olsr/luasrc/controller/olsr.lua b/applications/luci-olsr/luasrc/controller/olsr.lua
index c7c7f01410..6d6dc1ace2 100644
--- a/applications/luci-olsr/luasrc/controller/olsr.lua
+++ b/applications/luci-olsr/luasrc/controller/olsr.lua
@@ -5,49 +5,46 @@ function index()
return
end
- require("luci.i18n").loadc("olsr")
- local i18n = luci.i18n.translate
-
local page = node("admin", "status", "olsr")
page.target = template("status-olsr/overview")
- page.title = i18n("OLSR")
+ page.title = _("OLSR")
page.i18n = "olsr"
page.subindex = true
local page = node("admin", "status", "olsr", "neighbors")
page.target = call("action_neigh")
- page.title = i18n("Neighbours")
+ page.title = _("Neighbours")
page.subindex = true
page.order = 5
local page = node("admin", "status", "olsr", "routes")
page.target = call("action_routes")
- page.title = i18n("Routes")
+ page.title = _("Routes")
page.order = 10
local page = node("admin", "status", "olsr", "topology")
page.target = call("action_topology")
- page.title = i18n("Topology")
+ page.title = _("Topology")
page.order = 20
local page = node("admin", "status", "olsr", "hna")
page.target = call("action_hna")
- page.title = i18n("HNA")
+ page.title = _("HNA")
page.order = 30
local page = node("admin", "status", "olsr", "mid")
page.target = call("action_mid")
- page.title = i18n("MID")
+ page.title = _("MID")
page.order = 50
local page = node("admin", "status", "olsr", "smartgw")
page.target = call("action_smartgw")
- page.title = i18n("SmartGW")
+ page.title = _("SmartGW")
page.order = 60
local page = node("admin", "status", "olsr", "interfaces")
page.target = call("action_interfaces")
- page.title = i18n("Interfaces")
+ page.title = _("Interfaces")
page.order = 70
local ol = entry(
@@ -64,17 +61,17 @@ function index()
entry(
{"admin", "services", "olsrd", "hna"},
- cbi("olsr/olsrdhna"), i18n("HNA Announcements")
+ cbi("olsr/olsrdhna"), _("HNA Announcements")
)
oplg = entry(
{"admin", "services", "olsrd", "plugins"},
- cbi("olsr/olsrdplugins"), i18n("Plugins")
+ cbi("olsr/olsrdplugins"), _("Plugins")
)
odsp = entry(
{"admin", "services", "olsrd", "display"},
- cbi("olsr/olsrddisplay"), i18n("Display")
+ cbi("olsr/olsrddisplay"), _("Display")
)
oplg.i18n = "olsr"
diff --git a/applications/luci-openvpn/luasrc/controller/openvpn.lua b/applications/luci-openvpn/luasrc/controller/openvpn.lua
index ddfa990916..691ce178d5 100644
--- a/applications/luci-openvpn/luasrc/controller/openvpn.lua
+++ b/applications/luci-openvpn/luasrc/controller/openvpn.lua
@@ -12,13 +12,11 @@ You may obtain a copy of the License at
$Id$
]]--
+
module("luci.controller.openvpn", package.seeall)
function index()
- require("luci.i18n")
- luci.i18n.loadc("openvpn")
-
- entry( {"admin", "services", "openvpn"}, cbi("openvpn"), luci.i18n.translate("OpenVPN") ).i18n = "openvpn"
+ entry( {"admin", "services", "openvpn"}, cbi("openvpn"), _("OpenVPN") ).i18n = "openvpn"
entry( {"admin", "services", "openvpn", "basic"}, cbi("openvpn-basic"), nil ).leaf = true
entry( {"admin", "services", "openvpn", "advanced"}, cbi("openvpn-advanced"), nil ).leaf = true
end
diff --git a/applications/luci-p2pblock/luasrc/controller/ff_p2pblock.lua b/applications/luci-p2pblock/luasrc/controller/ff_p2pblock.lua
index 651172cd18..50c9e7a1af 100644
--- a/applications/luci-p2pblock/luasrc/controller/ff_p2pblock.lua
+++ b/applications/luci-p2pblock/luasrc/controller/ff_p2pblock.lua
@@ -15,7 +15,6 @@ $Id$
module("luci.controller.ff_p2pblock", package.seeall)
function index()
- require("luci.i18n").loadc("p2pblock")
entry({"admin", "network", "firewall", "p2pblock"}, cbi("luci_fw/p2pblock"),
- luci.i18n.translate("P2P-Block"), 40)
+ _("P2P-Block"), 40).i18n = "p2pblock"
end
diff --git a/applications/luci-p910nd/luasrc/controller/p910nd.lua b/applications/luci-p910nd/luasrc/controller/p910nd.lua
index c2fe3fa51b..bc38c2bb9a 100644
--- a/applications/luci-p910nd/luasrc/controller/p910nd.lua
+++ b/applications/luci-p910nd/luasrc/controller/p910nd.lua
@@ -16,13 +16,13 @@ $Id$
module("luci.controller.p910nd", package.seeall)
function index()
- require("luci.i18n")
- luci.i18n.loadc("p910nd")
- if not nixio.fs.access("/etc/config/p910nd") then
- return
- end
-
- local page = entry({"admin", "services", "p910nd"}, cbi("p910nd"), luci.i18n.translate("p910nd - Printer server"), 60)
- page.i18n = "p910nd"
- page.dependent = true
+ if not nixio.fs.access("/etc/config/p910nd") then
+ return
+ end
+
+ local page
+
+ page = entry({"admin", "services", "p910nd"}, cbi("p910nd"), _("p910nd - Printer server"), 60)
+ page.i18n = "p910nd"
+ page.dependent = true
end
diff --git a/applications/luci-polipo/luasrc/controller/polipo.lua b/applications/luci-polipo/luasrc/controller/polipo.lua
index 1ee67e2381..d07eaebd45 100644
--- a/applications/luci-polipo/luasrc/controller/polipo.lua
+++ b/applications/luci-polipo/luasrc/controller/polipo.lua
@@ -11,6 +11,7 @@ You may obtain a copy of the License at
$Id$
]]--
+
module("luci.controller.polipo", package.seeall)
function index()
@@ -18,11 +19,8 @@ function index()
return
end
- require("luci.i18n").loadc("polipo")
- local i18n = luci.i18n.translate
-
- entry({"admin", "services", "polipo"}, alias("admin", "services", "polipo", "config"), "Polipo").i18n = "polipo"
- entry({"admin", "services", "polipo", "status"}, template("polipo_status"), i18n("Status"))
- entry({"admin", "services", "polipo", "config"}, cbi("polipo"), i18n("Configuration"))
+ entry({"admin", "services", "polipo"}, alias("admin", "services", "polipo", "config"), _("Polipo")).i18n = "polipo"
+ entry({"admin", "services", "polipo", "status"}, template("polipo_status"), _("Status"))
+ entry({"admin", "services", "polipo", "config"}, cbi("polipo"), _("Configuration"))
end
diff --git a/applications/luci-qos/luasrc/controller/qos.lua b/applications/luci-qos/luasrc/controller/qos.lua
index af9b11499a..c9eb9e5d11 100644
--- a/applications/luci-qos/luasrc/controller/qos.lua
+++ b/applications/luci-qos/luasrc/controller/qos.lua
@@ -11,6 +11,7 @@ You may obtain a copy of the License at
$Id$
]]--
+
module("luci.controller.qos", package.seeall)
function index()
@@ -18,12 +19,13 @@ function index()
return
end
- local page = entry({"admin", "network", "qos"}, cbi("qos/qos"), "QoS")
+ local page
+
+ page = entry({"admin", "network", "qos"}, cbi("qos/qos"), _("QoS"))
page.i18n = "qos"
page.dependent = true
-
-
- local page = entry({"mini", "network", "qos"}, cbi("qos/qosmini", {autoapply=true}), "QoS")
+
+ page = entry({"mini", "network", "qos"}, cbi("qos/qosmini", {autoapply=true}), _("QoS"))
page.i18n = "qos"
page.dependent = true
end
diff --git a/applications/luci-radvd/luasrc/controller/radvd.lua b/applications/luci-radvd/luasrc/controller/radvd.lua
index 6ed1176837..09e764659e 100644
--- a/applications/luci-radvd/luasrc/controller/radvd.lua
+++ b/applications/luci-radvd/luasrc/controller/radvd.lua
@@ -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).i18n = "radvd"
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
diff --git a/applications/luci-samba/luasrc/controller/samba.lua b/applications/luci-samba/luasrc/controller/samba.lua
index a6d0918b74..7d531330a7 100644
--- a/applications/luci-samba/luasrc/controller/samba.lua
+++ b/applications/luci-samba/luasrc/controller/samba.lua
@@ -12,16 +12,17 @@ You may obtain a copy of the License at
$Id$
]]--
+
module("luci.controller.samba", package.seeall)
function index()
if not nixio.fs.access("/etc/config/samba") then
return
end
- require("luci.i18n")
- luci.i18n.loadc("samba")
-
- local page = entry({"admin", "services", "samba"}, cbi("samba"), luci.i18n.translate("Network Shares"))
+
+ local page
+
+ page = entry({"admin", "services", "samba"}, cbi("samba"), _("Network Shares"))
page.i18n = "samba"
page.dependent = true
-end \ No newline at end of file
+end
diff --git a/applications/luci-splash/luasrc/controller/splash/splash.lua b/applications/luci-splash/luasrc/controller/splash/splash.lua
index 27eff65796..71a61bdbf7 100644
--- a/applications/luci-splash/luasrc/controller/splash/splash.lua
+++ b/applications/luci-splash/luasrc/controller/splash/splash.lua
@@ -1,17 +1,19 @@
module("luci.controller.splash.splash", package.seeall)
function index()
- require("luci.i18n")
- luci.i18n.loadc("freifunk")
+ entry({"admin", "services", "splash"}, cbi("splash/splash"), _("Client-Splash"), 90).i18n = "freifunk"
+ entry({"admin", "services", "splash", "splashtext" }, form("splash/splashtext"), _("Splashtext"), 10)
- entry({"admin", "services", "splash"}, cbi("splash/splash"), luci.i18n.translate("Client-Splash"), 90)
- entry({"admin", "services", "splash", "splashtext" }, form("splash/splashtext"), luci.i18n.translate("Splashtext"), 10)
+ local e
+
+ e = node("splash")
+ e.target = call("action_dispatch")
+ e.i18n = "freifunk"
- node("splash").target = call("action_dispatch")
node("splash", "activate").target = call("action_activate")
node("splash", "splash").target = template("splash_splash/splash")
- entry({"admin", "status", "splash"}, call("action_status_admin"), "Client-Splash")
+ entry({"admin", "status", "splash"}, call("action_status_admin"), _("Client-Splash")).i18n = "freifunk"
end
function action_dispatch()
diff --git a/applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua b/applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua
index ed6363f9fb..5efadbd37b 100644
--- a/applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua
+++ b/applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua
@@ -19,13 +19,8 @@ function index()
require("nixio.fs")
require("luci.util")
- require("luci.i18n")
require("luci.statistics.datatree")
- -- load language files
- luci.i18n.loadc("rrdtool")
- luci.i18n.loadc("statistics")
-
-- get rrd data tree
local tree = luci.statistics.datatree.Instance()
@@ -37,32 +32,30 @@ function index()
end
end
- local translate = luci.i18n.translate
-
local labels = {
- s_output = translate("Output plugins"),
- s_system = translate("System plugins"),
- s_network = translate("Network plugins"),
-
- rrdtool = translate("RRDTool"),
- network = translate("Network"),
- unixsock = translate("UnixSock"),
- csv = translate("CSV Output"),
- exec = translate("Exec"),
- email = translate("Email"),
- cpu = translate("Processor"),
- df = translate("Disk Space Usage"),
- disk = translate("Disk Usage"),
- irq = translate("Interrupts"),
- processes = translate("Processes"),
- load = translate("System Load"),
- interface = translate("Interfaces"),
- netlink = translate("Netlink"),
- iptables = translate("Firewall"),
- tcpconns = translate("TCP Connections"),
- ping = translate("Ping"),
- dns = translate("DNS"),
- wireless = translate("Wireless")
+ s_output = _("Output plugins"),
+ s_system = _("System plugins"),
+ s_network = _("Network plugins"),
+
+ rrdtool = _("RRDTool"),
+ network = _("Network"),
+ unixsock = _("UnixSock"),
+ csv = _("CSV Output"),
+ exec = _("Exec"),
+ email = _("Email"),
+ cpu = _("Processor"),
+ df = _("Disk Space Usage"),
+ disk = _("Disk Usage"),
+ irq = _("Interrupts"),
+ processes = _("Processes"),
+ load = _("System Load"),
+ interface = _("Interfaces"),
+ netlink = _("Netlink"),
+ iptables = _("Firewall"),
+ tcpconns = _("TCP Connections"),
+ ping = _("Ping"),
+ dns = _("DNS"),
+ wireless = _("Wireless")
}
-- our collectd menu
@@ -73,21 +66,24 @@ function index()
}
-- create toplevel menu nodes
- local st = entry({"admin", "statistics"}, call("statistics_index"), translate("Statistics"), 80)
+ local st = entry({"admin", "statistics"}, call("statistics_index"), _("Statistics"), 80)
st.i18n = "statistics"
st.index = true
- entry({"admin", "statistics", "collectd"}, cbi("luci_statistics/collectd"), translate("Collectd"), 10).subindex = true
+ entry({"admin", "statistics", "collectd"}, cbi("luci_statistics/collectd"), _("Collectd"), 10).subindex = true
-- populate collectd plugin menu
local index = 1
for section, plugins in luci.util.kspairs( collectd_menu ) do
- entry(
+ local e = entry(
{ "admin", "statistics", "collectd", section },
call( "statistics_" .. section .. "plugins" ),
labels["s_"..section], index * 10
- ).index = true
+ )
+
+ e.index = true
+ e.i18n = "rrdtool"
for j, plugin in luci.util.vspairs( plugins ) do
_entry(
@@ -101,7 +97,7 @@ function index()
end
-- output views
- local page = entry( { "admin", "statistics", "graph" }, call("statistics_index"), translate("Graphs"), 80)
+ local page = entry( { "admin", "statistics", "graph" }, call("statistics_index"), _("Graphs"), 80)
page.i18n = "statistics"
page.setuser = "nobody"
page.setgroup = "nogroup"
@@ -140,10 +136,10 @@ end
function statistics_outputplugins()
local translate = luci.i18n.translate
local plugins = {
- rrdtool = translate("RRDTool"),
- network = translate("Network"),
- unixsock = translate("UnixSock"),
- csv = translate("CSV Output")
+ rrdtool = _("RRDTool"),
+ network = _("Network"),
+ unixsock = _("UnixSock"),
+ csv = _("CSV Output")
}
luci.template.render("admin_statistics/outputplugins", {plugins=plugins})
@@ -152,14 +148,14 @@ end
function statistics_systemplugins()
local translate = luci.i18n.translate
local plugins = {
- exec = translate("Exec"),
- email = translate("Email"),
- cpu = translate("Processor"),
- df = translate("Disk Space Usage"),
- disk = translate("Disk Usage"),
- irq = translate("Interrupts"),
- processes = translate("Processes"),
- load = translate("System Load"),
+ exec = _("Exec"),
+ email = _("Email"),
+ cpu = _("Processor"),
+ df = _("Disk Space Usage"),
+ disk = _("Disk Usage"),
+ irq = _("Interrupts"),
+ processes = _("Processes"),
+ load = _("System Load"),
}
luci.template.render("admin_statistics/systemplugins", {plugins=plugins})
@@ -168,13 +164,13 @@ end
function statistics_networkplugins()
local translate = luci.i18n.translate
local plugins = {
- interface = translate("Interfaces"),
- netlink = translate("Netlink"),
- iptables = translate("Firewall"),
- tcpconns = translate("TCP Connections"),
- ping = translate("Ping"),
- dns = translate("DNS"),
- wireless = translate("Wireless")
+ interface = _("Interfaces"),
+ netlink = _("Netlink"),
+ iptables = _("Firewall"),
+ tcpconns = _("TCP Connections"),
+ ping = _("Ping"),
+ dns = _("DNS"),
+ wireless = _("Wireless")
}
luci.template.render("admin_statistics/networkplugins", {plugins=plugins})
diff --git a/applications/luci-tinyproxy/luasrc/controller/tinyproxy.lua b/applications/luci-tinyproxy/luasrc/controller/tinyproxy.lua
index 8625bc1cec..1dcb20ce34 100644
--- a/applications/luci-tinyproxy/luasrc/controller/tinyproxy.lua
+++ b/applications/luci-tinyproxy/luasrc/controller/tinyproxy.lua
@@ -20,10 +20,7 @@ function index()
return
end
- require("luci.i18n").loadc("tinyproxy")
- local i18n = luci.i18n.translate
-
- entry({"admin", "services", "tinyproxy"}, alias("admin", "services", "tinyproxy", "config"), "Tinyproxy").i18n = "tinyproxy"
- entry({"admin", "services", "tinyproxy", "status"}, template("tinyproxy_status"), i18n("Status"))
- entry({"admin", "services", "tinyproxy", "config"}, cbi("tinyproxy"), i18n("Configuration"))
+ entry({"admin", "services", "tinyproxy"}, alias("admin", "services", "tinyproxy", "config"), _("Tinyproxy")).i18n = "tinyproxy"
+ entry({"admin", "services", "tinyproxy", "status"}, template("tinyproxy_status"), _("Status"))
+ entry({"admin", "services", "tinyproxy", "config"}, cbi("tinyproxy"), _("Configuration"))
end
diff --git a/applications/luci-upnp/luasrc/controller/upnp.lua b/applications/luci-upnp/luasrc/controller/upnp.lua
index fe9d3d8f5b..c40493dab6 100644
--- a/applications/luci-upnp/luasrc/controller/upnp.lua
+++ b/applications/luci-upnp/luasrc/controller/upnp.lua
@@ -12,6 +12,7 @@ You may obtain a copy of the License at
$Id$
]]--
+
module("luci.controller.upnp", package.seeall)
function index()
@@ -21,11 +22,11 @@ function index()
local page
- page = entry({"admin", "services", "upnp"}, cbi("upnp/upnp"), "UPNP")
+ 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 = entry({"mini", "network", "upnp"}, cbi("upnp/upnpmini", {autoapply=true}), _("UPNP"))
page.i18n = "upnp"
page.dependent = true
diff --git a/applications/luci-ushare/luasrc/controller/ushare.lua b/applications/luci-ushare/luasrc/controller/ushare.lua
index a17c9a41e3..7bbd2ddde1 100644
--- a/applications/luci-ushare/luasrc/controller/ushare.lua
+++ b/applications/luci-ushare/luasrc/controller/ushare.lua
@@ -16,13 +16,13 @@ $Id$
module("luci.controller.ushare", package.seeall)
function index()
- require("luci.i18n")
- luci.i18n.loadc("ushare")
- if not nixio.fs.access("/etc/config/ushare") then
- return
- end
-
- local page = entry({"admin", "services", "ushare"}, cbi("ushare"), luci.i18n.translate("uShare"), 60)
- page.i18n = "uvc_streamer"
- page.dependent = true
+ if not nixio.fs.access("/etc/config/ushare") then
+ return
+ end
+
+ local page
+
+ page = entry({"admin", "services", "ushare"}, cbi("ushare"), _("uShare"), 60)
+ page.i18n = "ushare"
+ page.dependent = true
end
diff --git a/applications/luci-vnstat/luasrc/controller/vnstat.lua b/applications/luci-vnstat/luasrc/controller/vnstat.lua
index 605f799dcb..4c10e2ad30 100644
--- a/applications/luci-vnstat/luasrc/controller/vnstat.lua
+++ b/applications/luci-vnstat/luasrc/controller/vnstat.lua
@@ -1,14 +1,11 @@
module("luci.controller.vnstat", package.seeall)
function index()
- require("luci.i18n").loadc("vnstat")
- local i18n = luci.i18n.translate
+ entry({"admin", "status", "vnstat"}, alias("admin", "status", "vnstat", "graphs"), _("VnStat Traffic Monitor"), 90).i18n = "vnstat"
+ entry({"admin", "status", "vnstat", "graphs"}, template("vnstat"), _("Graphs"), 1)
+ entry({"admin", "status", "vnstat", "config"}, cbi("vnstat"), _("Configuration"), 2)
- entry({"admin", "status", "vnstat"}, alias("admin", "status", "vnstat", "graphs"), i18n("VnStat Traffic Monitor"), 90).i18n = "vnstat"
- entry({"admin", "status", "vnstat", "graphs"}, template("vnstat"), i18n("Graphs"), 1)
- entry({"admin", "status", "vnstat", "config"}, cbi("vnstat"), i18n("Configuration"), 2)
-
- entry({"mini", "network", "vnstat"}, alias("mini", "network", "vnstat", "graphs"), i18n("VnStat Traffic Monitor"), 90).i18n = "vnstat"
- entry({"mini", "network", "vnstat", "graphs"}, template("vnstat"), i18n("Graphs"), 1)
- entry({"mini", "network", "vnstat", "config"}, cbi("vnstat"), i18n("Configuration"), 2)
+ entry({"mini", "network", "vnstat"}, alias("mini", "network", "vnstat", "graphs"), _("VnStat Traffic Monitor"), 90).i18n = "vnstat"
+ entry({"mini", "network", "vnstat", "graphs"}, template("vnstat"), _("Graphs"), 1)
+ entry({"mini", "network", "vnstat", "config"}, cbi("vnstat"), _("Configuration"), 2)
end
diff --git a/applications/luci-voice-core/luasrc/controller/luci_voice.lua b/applications/luci-voice-core/luasrc/controller/luci_voice.lua
index 70617af6dc..dc1482e358 100644
--- a/applications/luci-voice-core/luasrc/controller/luci_voice.lua
+++ b/applications/luci-voice-core/luasrc/controller/luci_voice.lua
@@ -11,26 +11,24 @@ You may obtain a copy of the License at
]]--
-
module("luci.controller.luci_voice", package.seeall)
function index()
- require("luci.i18n")
- luci.i18n.loadc("voice_core")
+ local e
- local e = entry({"admin", "voice"}, template("luci_voice/index") , luci.i18n.translate("Voice"), 90)
+ 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"), luci.i18n.translate("Voice"), 90)
+ 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"), luci.i18n.translate("Phones"), 90)
+ 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"), luci.i18n.translate("l_v_adminphones"), 90)
+ e = entry({"admin", "voice", "phones"}, template("luci_voice/phone_index"), _("Phones"), 90)
e.index = true
e.i18n = "voice_core"
diff --git a/applications/luci-voice-diag/luasrc/controller/luci_voice/luci_voice_diag.lua b/applications/luci-voice-diag/luasrc/controller/luci_voice/luci_voice_diag.lua
index e0dccb051c..8fba53b732 100644
--- a/applications/luci-voice-diag/luasrc/controller/luci_voice/luci_voice_diag.lua
+++ b/applications/luci-voice-diag/luasrc/controller/luci_voice/luci_voice_diag.lua
@@ -11,15 +11,13 @@ You may obtain a copy of the License at
]]--
-
module("luci.controller.luci_voice.luci_voice_diag", package.seeall)
function index()
- require("luci.i18n")
- luci.i18n.loadc("voice_diag")
+ local e
- local e = entry({"admin", "voice", "diag"}, template("luci_voice/diag_index") , luci.i18n.translate("l_v_d_admindiag"), 90)
- e.index = true
- e.i18n = "voice_diag"
- e.dependent = true
+ e = entry({"admin", "voice", "diag"}, template("luci_voice/diag_index"), _("Diagnostics"), 90)
+ e.index = true
+ e.i18n = "voice_diag"
+ e.dependent = true
end
diff --git a/applications/luci-wol/luasrc/controller/wol.lua b/applications/luci-wol/luasrc/controller/wol.lua
index 429ab2ac3f..bb98b6d89a 100644
--- a/applications/luci-wol/luasrc/controller/wol.lua
+++ b/applications/luci-wol/luasrc/controller/wol.lua
@@ -1,9 +1,6 @@
module("luci.controller.wol", package.seeall)
function index()
- require("luci.i18n").loadc("wol")
- local i18n = luci.i18n.translate
-
- entry({"admin", "network", "wol"}, cbi("wol"), i18n("Wake on LAN"), 90).i18n = "wol"
- entry({"mini", "network", "wol"}, cbi("wol"), i18n("Wake on LAN"), 90).i18n = "wol"
+ entry({"admin", "network", "wol"}, cbi("wol"), _("Wake on LAN"), 90).i18n = "wol"
+ entry({"mini", "network", "wol"}, cbi("wol"), _("Wake on LAN"), 90).i18n = "wol"
end
diff --git a/modules/admin-full/luasrc/controller/admin/index.lua b/modules/admin-full/luasrc/controller/admin/index.lua
index b7bf36996e..14d7b7a61c 100644
--- a/modules/admin-full/luasrc/controller/admin/index.lua
+++ b/modules/admin-full/luasrc/controller/admin/index.lua
@@ -11,12 +11,10 @@ You may obtain a copy of the License at
$Id$
]]--
+
module("luci.controller.admin.index", package.seeall)
function index()
- luci.i18n.loadc("base")
- local i18n = luci.i18n.translate
-
local root = node()
if not root.target then
root.target = alias("admin")
@@ -25,14 +23,14 @@ function index()
local page = node("admin")
page.target = alias("admin", "status")
- page.title = i18n("Administration")
+ page.title = _("Administration")
page.order = 10
page.sysauth = "root"
page.sysauth_authenticator = "htmlauth"
page.ucidata = true
page.index = true
- entry({"admin", "logout"}, call("action_logout"), i18n("Logout"), 90)
+ entry({"admin", "logout"}, call("action_logout"), _("Logout"), 90)
end
function action_logout()
diff --git a/modules/admin-full/luasrc/controller/admin/network.lua b/modules/admin-full/luasrc/controller/admin/network.lua
index 76d432094d..85456483a3 100644
--- a/modules/admin-full/luasrc/controller/admin/network.lua
+++ b/modules/admin-full/luasrc/controller/admin/network.lua
@@ -16,10 +16,8 @@ $Id$
module("luci.controller.admin.network", package.seeall)
function index()
- require("luci.i18n")
local uci = require("luci.model.uci").cursor()
local net = require "luci.model.network".init(uci)
- local i18n = luci.i18n.translate
local has_wifi = nixio.fs.stat("/etc/config/wireless")
local has_switch = false
@@ -34,19 +32,19 @@ function index()
page = node("admin", "network")
page.target = alias("admin", "network", "network")
- page.title = i18n("Network")
+ page.title = _("Network")
page.order = 50
page.index = true
if has_switch then
page = node("admin", "network", "vlan")
page.target = cbi("admin_network/vlan")
- page.title = i18n("Switch")
+ page.title = _("Switch")
page.order = 20
end
if has_wifi and has_wifi.size > 0 then
- page = entry({"admin", "network", "wireless"}, arcombine(template("admin_network/wifi_overview"), cbi("admin_network/wifi")), i18n("Wifi"), 15)
+ page = entry({"admin", "network", "wireless"}, arcombine(template("admin_network/wifi_overview"), cbi("admin_network/wifi")), _("Wifi"), 15)
page.leaf = true
page.subindex = true
@@ -75,7 +73,7 @@ function index()
end
end
- page = entry({"admin", "network", "network"}, arcombine(cbi("admin_network/network"), cbi("admin_network/ifaces")), i18n("Interfaces"), 10)
+ page = entry({"admin", "network", "network"}, arcombine(cbi("admin_network/network"), cbi("admin_network/ifaces")), _("Interfaces"), 10)
page.leaf = true
page.subindex = true
@@ -108,7 +106,7 @@ function index()
if nixio.fs.access("/etc/config/dhcp") then
page = node("admin", "network", "dhcp")
page.target = cbi("admin_network/dhcp")
- page.title = i18n("DHCP and DNS")
+ page.title = _("DHCP and DNS")
page.order = 30
page = entry({"admin", "network", "dhcplease_status"}, call("lease_status"), nil)
@@ -116,18 +114,18 @@ function index()
page = node("admin", "network", "hosts")
page.target = cbi("admin_network/hosts")
- page.title = i18n("Hostnames")
+ page.title = _("Hostnames")
page.order = 40
end
page = node("admin", "network", "routes")
page.target = cbi("admin_network/routes")
- page.title = i18n("Static Routes")
+ page.title = _("Static Routes")
page.order = 50
page = node("admin", "network", "diagnostics")
page.target = template("admin_network/diagnostics")
- page.title = i18n("Diagnostics")
+ page.title = _("Diagnostics")
page.order = 60
page = entry({"admin", "network", "diag_ping"}, call("diag_ping"), nil)
diff --git a/modules/admin-full/luasrc/controller/admin/services.lua b/modules/admin-full/luasrc/controller/admin/services.lua
index 14ced9f694..1e161d7649 100644
--- a/modules/admin-full/luasrc/controller/admin/services.lua
+++ b/modules/admin-full/luasrc/controller/admin/services.lua
@@ -11,20 +11,20 @@ You may obtain a copy of the License at
$Id$
]]--
+
module("luci.controller.admin.services", package.seeall)
function index()
- luci.i18n.loadc("base")
- local i18n = luci.i18n.translate
+ local page
- local page = node("admin", "services", "crontab")
+ page = node("admin", "services", "crontab")
page.target = form("admin_services/crontab")
- page.title = i18n("Scheduled Tasks")
+ page.title = _("Scheduled Tasks")
page.order = 50
- local page = node("admin", "services")
+ page = node("admin", "services")
page.target = template("admin_services/index")
- page.title = i18n("Services")
+ page.title = _("Services")
page.order = 40
page.index = true
end
diff --git a/modules/admin-full/luasrc/controller/admin/status.lua b/modules/admin-full/luasrc/controller/admin/status.lua
index ef6089f623..f9bfd908d6 100644
--- a/modules/admin-full/luasrc/controller/admin/status.lua
+++ b/modules/admin-full/luasrc/controller/admin/status.lua
@@ -12,29 +12,27 @@ You may obtain a copy of the License at
$Id$
]]--
+
module("luci.controller.admin.status", package.seeall)
function index()
- luci.i18n.loadc("base")
- local i18n = luci.i18n.translate
-
- entry({"admin", "status"}, alias("admin", "status", "overview"), i18n("Status"), 20).index = true
- entry({"admin", "status", "overview"}, template("admin_status/index"), i18n("Overview"), 1)
- entry({"admin", "status", "iptables"}, call("action_iptables"), i18n("Firewall"), 2).leaf = true
- entry({"admin", "status", "routes"}, template("admin_status/routes"), i18n("Routes"), 3)
- entry({"admin", "status", "syslog"}, call("action_syslog"), i18n("System Log"), 4)
- entry({"admin", "status", "dmesg"}, call("action_dmesg"), i18n("Kernel Log"), 5)
-
- entry({"admin", "status", "load"}, template("admin_status/load"), i18n("Realtime Load"), 6).leaf = true
+ entry({"admin", "status"}, alias("admin", "status", "overview"), _("Status"), 20).index = true
+ entry({"admin", "status", "overview"}, template("admin_status/index"), _("Overview"), 1)
+ entry({"admin", "status", "iptables"}, call("action_iptables"), _("Firewall"), 2).leaf = true
+ entry({"admin", "status", "routes"}, template("admin_status/routes"), _("Routes"), 3)
+ entry({"admin", "status", "syslog"}, call("action_syslog"), _("System Log"), 4)
+ entry({"admin", "status", "dmesg"}, call("action_dmesg"), _("Kernel Log"), 5)
+
+ entry({"admin", "status", "load"}, template("admin_status/load"), _("Realtime Load"), 6).leaf = true
entry({"admin", "status", "load_status"}, call("action_load")).leaf = true
- entry({"admin", "status", "bandwidth"}, template("admin_status/bandwidth"), i18n("Realtime Traffic"), 7).leaf = true
+ entry({"admin", "status", "bandwidth"}, template("admin_status/bandwidth"), _("Realtime Traffic"), 7).leaf = true
entry({"admin", "status", "bandwidth_status"}, call("action_bandwidth")).leaf = true
- entry({"admin", "status", "connections"}, template("admin_status/connections"), i18n("Realtime Connections"), 8).leaf = true
+ entry({"admin", "status", "connections"}, template("admin_status/connections"), _("Realtime Connections"), 8).leaf = true
entry({"admin", "status", "connections_status"}, call("action_connections")).leaf = true
- entry({"admin", "status", "processes"}, cbi("admin_status/processes"), i18n("Processes"), 20)
+ entry({"admin", "status", "processes"}, cbi("admin_status/processes"), _("Processes"), 20)
end
function action_syslog()
diff --git a/modules/admin-full/luasrc/controller/admin/system.lua b/modules/admin-full/luasrc/controller/admin/system.lua
index dd78f1e8c6..abfe1f5f16 100644
--- a/modules/admin-full/luasrc/controller/admin/system.lua
+++ b/modules/admin-full/luasrc/controller/admin/system.lua
@@ -16,29 +16,26 @@ $Id$
module("luci.controller.admin.system", package.seeall)
function index()
- luci.i18n.loadc("base")
- local i18n = luci.i18n.translate
-
- entry({"admin", "system"}, alias("admin", "system", "system"), i18n("System"), 30).index = true
- entry({"admin", "system", "system"}, cbi("admin_system/system"), i18n("System"), 1)
- entry({"admin", "system", "admin"}, cbi("admin_system/admin"), i18n("Administration"), 2)
- entry({"admin", "system", "packages"}, call("action_packages"), i18n("Software"), 10)
+ entry({"admin", "system"}, alias("admin", "system", "system"), _("System"), 30).index = true
+ entry({"admin", "system", "system"}, cbi("admin_system/system"), _("System"), 1)
+ entry({"admin", "system", "admin"}, cbi("admin_system/admin"), _("Administration"), 2)
+ entry({"admin", "system", "packages"}, call("action_packages"), _("Software"), 10)
entry({"admin", "system", "packages", "ipkg"}, form("admin_system/ipkg"))
- entry({"admin", "system", "startup"}, form("admin_system/startup"), i18n("Startup"), 45)
+ entry({"admin", "system", "startup"}, form("admin_system/startup"), _("Startup"), 45)
if nixio.fs.access("/etc/config/fstab") then
- entry({"admin", "system", "fstab"}, cbi("admin_system/fstab"), i18n("Mount Points"), 50)
+ entry({"admin", "system", "fstab"}, cbi("admin_system/fstab"), _("Mount Points"), 50)
entry({"admin", "system", "fstab", "mount"}, cbi("admin_system/fstab/mount"), nil).leaf = true
entry({"admin", "system", "fstab", "swap"}, cbi("admin_system/fstab/swap"), nil).leaf = true
end
if nixio.fs.access("/sys/class/leds") then
- entry({"admin", "system", "leds"}, cbi("admin_system/leds"), i18n("<abbr title=\"Light Emitting Diode\">LED</abbr> Configuration"), 60)
+ entry({"admin", "system", "leds"}, cbi("admin_system/leds"), _("<abbr title=\"Light Emitting Diode\">LED</abbr> Configuration"), 60)
end
- entry({"admin", "system", "backup"}, call("action_backup"), i18n("Backup / Restore"), 70)
- entry({"admin", "system", "upgrade"}, call("action_upgrade"), i18n("Flash Firmware"), 80)
- entry({"admin", "system", "reboot"}, call("action_reboot"), i18n("Reboot"), 90)
+ entry({"admin", "system", "backup"}, call("action_backup"), _("Backup / Restore"), 70)
+ entry({"admin", "system", "upgrade"}, call("action_upgrade"), _("Flash Firmware"), 80)
+ entry({"admin", "system", "reboot"}, call("action_reboot"), _("Reboot"), 90)
end
function action_packages()
diff --git a/modules/admin-full/luasrc/controller/admin/uci.lua b/modules/admin-full/luasrc/controller/admin/uci.lua
index 5edcc973ee..34e40ee624 100644
--- a/modules/admin-full/luasrc/controller/admin/uci.lua
+++ b/modules/admin-full/luasrc/controller/admin/uci.lua
@@ -16,15 +16,14 @@ $Id$
module("luci.controller.admin.uci", package.seeall)
function index()
- local i18n = luci.i18n.translate
local redir = luci.http.formvalue("redir", true) or
luci.dispatcher.build_url(unpack(luci.dispatcher.context.request))
- entry({"admin", "uci"}, nil, i18n("Configuration"))
- entry({"admin", "uci", "changes"}, call("action_changes"), i18n("Changes"), 40).query = {redir=redir}
- entry({"admin", "uci", "revert"}, call("action_revert"), i18n("Revert"), 30).query = {redir=redir}
- entry({"admin", "uci", "apply"}, call("action_apply"), i18n("Apply"), 20).query = {redir=redir}
- entry({"admin", "uci", "saveapply"}, call("action_apply"), i18n("Save &#38; Apply"), 10).query = {redir=redir}
+ entry({"admin", "uci"}, nil, _("Configuration"))
+ entry({"admin", "uci", "changes"}, call("action_changes"), _("Changes"), 40).query = {redir=redir}
+ entry({"admin", "uci", "revert"}, call("action_revert"), _("Revert"), 30).query = {redir=redir}
+ entry({"admin", "uci", "apply"}, call("action_apply"), _("Apply"), 20).query = {redir=redir}
+ entry({"admin", "uci", "saveapply"}, call("action_apply"), _("Save &#38; Apply"), 10).query = {redir=redir}
end
function action_changes()
diff --git a/modules/admin-mini/luasrc/controller/mini/index.lua b/modules/admin-mini/luasrc/controller/mini/index.lua
index 81c0846bfa..9d6a38ed43 100644
--- a/modules/admin-mini/luasrc/controller/mini/index.lua
+++ b/modules/admin-mini/luasrc/controller/mini/index.lua
@@ -16,9 +16,6 @@ $Id$
module("luci.controller.mini.index", package.seeall)
function index()
- luci.i18n.loadc("base")
- local i18n = luci.i18n.translate
-
local root = node()
if not root.lock then
root.target = alias("mini")
@@ -27,15 +24,15 @@ function index()
entry({"about"}, template("about"))
- local page = entry({"mini"}, alias("mini", "index"), i18n("Essentials"), 10)
+ local page = entry({"mini"}, alias("mini", "index"), _("Essentials"), 10)
page.sysauth = "root"
page.sysauth_authenticator = "htmlauth"
page.index = true
- entry({"mini", "index"}, alias("mini", "index", "index"), i18n("Overview"), 10).index = true
- entry({"mini", "index", "index"}, form("mini/index"), i18n("General"), 1).ignoreindex = true
- entry({"mini", "index", "luci"}, cbi("mini/luci", {autoapply=true}), i18n("Settings"), 10)
- entry({"mini", "index", "logout"}, call("action_logout"), i18n("Logout"))
+ entry({"mini", "index"}, alias("mini", "index", "index"), _("Overview"), 10).index = true
+ entry({"mini", "index", "index"}, form("mini/index"), _("General"), 1).ignoreindex = true
+ entry({"mini", "index", "luci"}, cbi("mini/luci", {autoapply=true}), _("Settings"), 10)
+ entry({"mini", "index", "logout"}, call("action_logout"), _("Logout"))
end
function action_logout()
diff --git a/modules/admin-mini/luasrc/controller/mini/network.lua b/modules/admin-mini/luasrc/controller/mini/network.lua
index 22162adc56..8b9356dd6e 100644
--- a/modules/admin-mini/luasrc/controller/mini/network.lua
+++ b/modules/admin-mini/luasrc/controller/mini/network.lua
@@ -16,11 +16,8 @@ $Id$
module("luci.controller.mini.network", package.seeall)
function index()
- luci.i18n.loadc("base")
- local i18n = luci.i18n.translate
-
- entry({"mini", "network"}, alias("mini", "network", "index"), i18n("Network"), 20).index = true
- entry({"mini", "network", "index"}, cbi("mini/network", {autoapply=true}), i18n("General"), 1)
- entry({"mini", "network", "wifi"}, cbi("mini/wifi", {autoapply=true}), i18n("Wifi"), 10)
- entry({"mini", "network", "dhcp"}, cbi("mini/dhcp", {autoapply=true}), "DHCP", 20)
+ entry({"mini", "network"}, alias("mini", "network", "index"), _("Network"), 20).index = true
+ entry({"mini", "network", "index"}, cbi("mini/network", {autoapply=true}), _("General"), 1)
+ entry({"mini", "network", "wifi"}, cbi("mini/wifi", {autoapply=true}), _("Wifi"), 10)
+ entry({"mini", "network", "dhcp"}, cbi("mini/dhcp", {autoapply=true}), _("DHCP"), 20)
end
diff --git a/modules/admin-mini/luasrc/controller/mini/system.lua b/modules/admin-mini/luasrc/controller/mini/system.lua
index 2559ac16cc..519c15bc63 100644
--- a/modules/admin-mini/luasrc/controller/mini/system.lua
+++ b/modules/admin-mini/luasrc/controller/mini/system.lua
@@ -16,15 +16,12 @@ $Id$
module("luci.controller.mini.system", package.seeall)
function index()
- luci.i18n.loadc("base")
- local i18n = luci.i18n.translate
-
- entry({"mini", "system"}, alias("mini", "system", "index"), i18n("System"), 40).index = true
- entry({"mini", "system", "index"}, cbi("mini/system", {autoapply=true}), i18n("General"), 1)
- entry({"mini", "system", "passwd"}, form("mini/passwd"), i18n("Admin Password"), 10)
- entry({"mini", "system", "backup"}, call("action_backup"), i18n("Backup / Restore"), 80)
- entry({"mini", "system", "upgrade"}, call("action_upgrade"), i18n("Flash Firmware"), 90)
- entry({"mini", "system", "reboot"}, call("action_reboot"), i18n("Reboot"), 100)
+ entry({"mini", "system"}, alias("mini", "system", "index"), _("System"), 40).index = true
+ entry({"mini", "system", "index"}, cbi("mini/system", {autoapply=true}), _("General"), 1)
+ entry({"mini", "system", "passwd"}, form("mini/passwd"), _("Admin Password"), 10)
+ entry({"mini", "system", "backup"}, call("action_backup"), _("Backup / Restore"), 80)
+ entry({"mini", "system", "upgrade"}, call("action_upgrade"), _("Flash Firmware"), 90)
+ entry({"mini", "system", "reboot"}, call("action_reboot"), _("Reboot"), 100)
end
function action_backup()
diff --git a/modules/freifunk/luasrc/controller/freifunk/freifunk.lua b/modules/freifunk/luasrc/controller/freifunk/freifunk.lua
index a536fea0a4..445f8b410c 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 165c2a82c4..cc8dd142de 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()
diff --git a/modules/niu/luasrc/controller/niu/dashboard.lua b/modules/niu/luasrc/controller/niu/dashboard.lua
index bd4875cb9e..757024df0c 100644
--- a/modules/niu/luasrc/controller/niu/dashboard.lua
+++ b/modules/niu/luasrc/controller/niu/dashboard.lua
@@ -16,7 +16,6 @@ local req = require
module "luci.controller.niu.dashboard"
function index()
- local translate = require "luci.i18n".translate
local uci = require "luci.model.uci"
local root = node()
diff --git a/modules/niu/luasrc/controller/niu/network.lua b/modules/niu/luasrc/controller/niu/network.lua
index de3d7d49ed..78a45a6057 100644
--- a/modules/niu/luasrc/controller/niu/network.lua
+++ b/modules/niu/luasrc/controller/niu/network.lua
@@ -12,7 +12,6 @@ You may obtain a copy of the License at
$Id$
]]--
-local require = require
module "luci.controller.niu.network"
function index()
diff --git a/modules/niu/luasrc/controller/niu/traffic.lua b/modules/niu/luasrc/controller/niu/traffic.lua
index 76584eabf3..ffc8d9ade0 100644
--- a/modules/niu/luasrc/controller/niu/traffic.lua
+++ b/modules/niu/luasrc/controller/niu/traffic.lua
@@ -42,4 +42,4 @@ end
function cnntrck()
require "luci.template".render("niu/traffic/conntrack")
-end \ No newline at end of file
+end
diff --git a/modules/niu/luasrc/controller/niu/wireless.lua b/modules/niu/luasrc/controller/niu/wireless.lua
index ee402bc490..92ebffdfc7 100644
--- a/modules/niu/luasrc/controller/niu/wireless.lua
+++ b/modules/niu/luasrc/controller/niu/wireless.lua
@@ -12,7 +12,6 @@ You may obtain a copy of the License at
$Id$
]]--
-local require = require
module "luci.controller.niu.wireless"
function index()
@@ -20,23 +19,22 @@ function index()
return
end
-
local toniu = {on_success_to={"niu"}}
- local e = entry({"niu", "wireless"}, alias("niu"), i18n.translate("Wireless"), 20)
+ local e = entry({"niu", "wireless"}, alias("niu"), _("Wireless"), 20)
--e.niu_dbtemplate = "niu/wireless"
e.niu_dbtasks = true
e.niu_dbicon = "icons32/network-wireless.png"
entry({"niu", "wireless", "ap"},
- cbi("niu/wireless/ap", toniu), i18n.translate("Configure Private Access Point"), 1)
+ cbi("niu/wireless/ap", toniu), _("Configure Private Access Point"), 1)
local bridge = false
uci.inst:foreach("wireless", "wifi-device", function(s)
if not bridge and (s.type == "mac80211" or s.type == "atheros") then
entry({"niu", "wireless", "bridge"},
- cbi("niu/wireless/bridge", toniu), i18n.translate("Join a local WDS network"), 2)
+ cbi("niu/wireless/bridge", toniu), _("Join a local WDS network"), 2)
bridge = true
end
end)
-end \ No newline at end of file
+end