diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-08-12 13:16:27 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-08-12 13:16:27 +0000 |
commit | 1d76d8a2158ec397322e54da0b6ad3ca4cadb621 (patch) | |
tree | 4c4044d2ca009fa88c154379e439bb2dc784b3a4 /modules/admin-full | |
parent | a8ac3b344f5dee7a79455faa0c699e561464cf4d (diff) |
applications, modules: remove i18n handling from controller modules as it moved to the themes now
Diffstat (limited to 'modules/admin-full')
6 files changed, 44 insertions, 54 deletions
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 & 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 & Apply"), 10).query = {redir=redir} end function action_changes() |