applications, modules: remove i18n handling from controller modules as it moved to...
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 12 Aug 2011 13:16:27 +0000 (13:16 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 12 Aug 2011 13:16:27 +0000 (13:16 +0000)
48 files changed:
applications/luci-ahcp/luasrc/controller/ahcp.lua
applications/luci-coovachilli/luasrc/controller/coovachilli.lua
applications/luci-ddns/luasrc/controller/ddns.lua
applications/luci-diag-core/luasrc/controller/luci_diag.lua
applications/luci-diag-devinfo/luasrc/controller/luci_diag/luci_diag_devinfo.lua
applications/luci-ffwizard/luasrc/controller/ffwizard.lua
applications/luci-firewall/luasrc/controller/luci_fw/luci_fw.lua
applications/luci-freifunk-policyrouting/luasrc/controller/freifunk/policy-routing.lua
applications/luci-hd-idle/luasrc/controller/hd_idle.lua
applications/luci-lqtapifoss/luasrc/controller/lqtapifoss.lua
applications/luci-meshwizard/luasrc/controller/meshwizard.lua
applications/luci-mmc-over-gpio/luasrc/controller/mmc_over_gpio.lua
applications/luci-multiwan/luasrc/controller/multiwan.lua
applications/luci-ntpc/luasrc/controller/ntpc.lua
applications/luci-olsr-services/luasrc/controller/services.lua
applications/luci-olsr-viz/luasrc/controller/olsr-viz.lua
applications/luci-olsr/luasrc/controller/olsr.lua
applications/luci-openvpn/luasrc/controller/openvpn.lua
applications/luci-p2pblock/luasrc/controller/ff_p2pblock.lua
applications/luci-p910nd/luasrc/controller/p910nd.lua
applications/luci-polipo/luasrc/controller/polipo.lua
applications/luci-qos/luasrc/controller/qos.lua
applications/luci-radvd/luasrc/controller/radvd.lua
applications/luci-samba/luasrc/controller/samba.lua
applications/luci-splash/luasrc/controller/splash/splash.lua
applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua
applications/luci-tinyproxy/luasrc/controller/tinyproxy.lua
applications/luci-upnp/luasrc/controller/upnp.lua
applications/luci-ushare/luasrc/controller/ushare.lua
applications/luci-vnstat/luasrc/controller/vnstat.lua
applications/luci-voice-core/luasrc/controller/luci_voice.lua
applications/luci-voice-diag/luasrc/controller/luci_voice/luci_voice_diag.lua
applications/luci-wol/luasrc/controller/wol.lua
modules/admin-full/luasrc/controller/admin/index.lua
modules/admin-full/luasrc/controller/admin/network.lua
modules/admin-full/luasrc/controller/admin/services.lua
modules/admin-full/luasrc/controller/admin/status.lua
modules/admin-full/luasrc/controller/admin/system.lua
modules/admin-full/luasrc/controller/admin/uci.lua
modules/admin-mini/luasrc/controller/mini/index.lua
modules/admin-mini/luasrc/controller/mini/network.lua
modules/admin-mini/luasrc/controller/mini/system.lua
modules/freifunk/luasrc/controller/freifunk/freifunk.lua
modules/freifunk/luasrc/controller/freifunk/remote_update.lua
modules/niu/luasrc/controller/niu/dashboard.lua
modules/niu/luasrc/controller/niu/network.lua
modules/niu/luasrc/controller/niu/traffic.lua
modules/niu/luasrc/controller/niu/wireless.lua

index ea739031171bea1b470cbdf31812e27f9d6a4c54..5667bb532f9376b195a870079a505b866670e33c 100644 (file)
@@ -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
 
index 52e09f6f579482ce80d4d283e944057cb15e41c5..73a2c518a77fb904fd791ca026705af6745edbfe 100644 (file)
@@ -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
index 8e1bc665abb3a92fd30c52c70df400ceb99fb81e..e2f786b3249baaa3c2aec7f0dd283b7b87dacad4 100644 (file)
@@ -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
index 23b8d00098139c69290c6eba86b79d9f869f992f..c12399431e9029f3e9667c971bb9a2de89e6b7ae 100644 (file)
@@ -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
index e40a3e82cc7e48fa99ab1f54d65bf4ae5774a1c5..e8a2f5043dc97027be1b6bc86714eb7079102171 100644 (file)
@@ -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
 
index 53ceb3a545d48f7a4650e02ba725f069ac1cefd9..5ba33a12aadd8ae95a83c85913a424638d13eb72 100644 (file)
@@ -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
 
index 5dd84bc90d78722c0335aabdb9e620f0324434ba..b3d440d1c077a09515fe6c47b53b6e46a941ee10 100644 (file)
@@ -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
index 32c9c0ba4eb66248b7b9b87b370b377ddb81da7a..e8aca9ce57538d4cca785904dadb932263bdcdaf 100644 (file)
@@ -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
-
-
index 9d5e5b3b30b4c542c52157579ed003c685d84953..e28983f39006cc2712e0f57528394f8f5255e483 100644 (file)
@@ -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
index 08941874a21cbbf2c20b6a5bfd847d2863baf019..323f8a7c414ab0f5dc243b5f1cc33eff9550e266 100644 (file)
@@ -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
index 4e930cc50d66cacf1c99e741fa3a322385bf5de9..942987db50673638833c18c5afdb833e6097311c 100644 (file)
@@ -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
 
index 9ee2a9dec6f82364757691e6a7305ceee5091417..5abceab7aacff7bee78c92238a8ccbc19f5ccda9 100644 (file)
@@ -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
index 561747b0f611ac973a68d408a964c2ae87c44504..2a45c5f7bcbd3ea457bee26e8cd8f07faf66675f 100644 (file)
@@ -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
index b6af6f9502ba8ebc9d35d0a1d7544a260731984a..782e216143f2748be1fc98f584c54f65ce8e490f 100644 (file)
@@ -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
index cc1a2f62e8e1d8f7385474e45e571f73dd0703d6..a4636bfd5740843169c52ce3a469c5a5a5748773 100644 (file)
@@ -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
 
index 4981f8d05f2ee64944bf6f5ee80fbf478e694291..672486c53b225cecf95dfa0549f574046bc507d3 100644 (file)
@@ -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
index c7c7f014105e9427a45038ac28fe6611b528381e..6d6dc1ace2c9a7c4ffaa4b0647adaa9335fb358e 100644 (file)
@@ -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"
index ddfa990916a8bf6abac403b78c47ee3b9b4cb194..691ce178d549d485e7c0cebd45a3ba5d79e24faa 100644 (file)
@@ -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
index 651172cd18d16b3679806a2e4558858ef9093d62..50c9e7a1af408b719fe77da238cc861502e34e81 100644 (file)
@@ -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
index c2fe3fa51b5f0776b4ce2a943bae2f097e859024..bc38c2bb9a45835eb67e886171ff948d6534a098 100644 (file)
@@ -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
index 1ee67e2381c28a2f61d6f097adba6276d83d48f9..d07eaebd450766d151aefe4d9a71f814dec8b6e7 100644 (file)
@@ -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
 
index af9b11499ad5c9b4f75ab4d2d45267f06ba07b15..c9eb9e5d115f575348f3944615d2d737d9b555e6 100644 (file)
@@ -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
index 6ed117683755ca39559b65179e449fe108916205..09e764659e71025aa9f416e3f415872715683195 100644 (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).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
index a6d0918b744bd4151f4c417be662c72184a4167c..7d531330a7c712974dab89699ca3f009528918a2 100644 (file)
@@ -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
index 27eff657968f85a7fb7b8c7d69d5f69c28db09f9..71a61bdbf7f3a53d2f52c2f42123b51546ff9c4e 100644 (file)
@@ -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()
index ed6363f9fba4831b8a36d386905e1696134061cd..5efadbd37b0f0e51a9d8de46ee22ee394ee5c4f4 100644 (file)
@@ -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})
index 8625bc1cec53597d174698ac76fe5babef1fc47a..1dcb20ce343357c9ad1e1238f43d422ff6e36b53 100644 (file)
@@ -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
index fe9d3d8f5b1b3e5bba79fdc2cb08b94e960fa4ff..c40493dab6c3e06b2b220b1e0e6178040c098b22 100644 (file)
@@ -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
 
index a17c9a41e3776c91c94335af67d8f44af2322d9d..7bbd2ddde18d2eceb0668560ba72ea385cc9a712 100644 (file)
@@ -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
index 605f799dcb64cacbb072034d5e3a46b9a9a245c1..4c10e2ad30fe67c93a5ffc0da8c0b2c5c7783a8f 100644 (file)
@@ -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
index 70617af6dc238ede66cccc496fe7aa1ef3e47126..dc1482e358909cca632c2a368eef4a3da44e87ef 100644 (file)
@@ -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"
 
index e0dccb051c12e686578548b84cf830b71183c488..8fba53b732d9c74801bdbed6124d0f599d2401f0 100644 (file)
@@ -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
index 429ab2ac3f1aa40792305895dd595d1659b10735..bb98b6d89ab4ac22e015c96158b236db94a4827b 100644 (file)
@@ -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
index b7bf36996e7af822d2da0374cefb5951e7adb53b..14d7b7a61ccfc4d0e2018eb26a1b2126b3247aea 100644 (file)
@@ -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()
index 76d432094d067360751c628044c7c45608e8b1f0..85456483a3f9bf7b8df427e6e8e5fb467a3fa34a 100644 (file)
@@ -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)
index 14ced9f694c7424db11380e8d4ac07a77931393e..1e161d7649af10775f27160d4aa0dc61cb92d88f 100644 (file)
@@ -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
index ef6089f62323fd63e5763af637fe374345671296..f9bfd908d68174be159d209e8432e6b00f15ba96 100644 (file)
@@ -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()
index dd78f1e8c6ae94d4ea129d1354425e01566e65a6..abfe1f5f164c907ea4b2372742c22e4c3d54b9c7 100644 (file)
@@ -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()
index 5edcc973ee14472e6d845c2b1fd3dc956770172e..34e40ee624bd8e54f30c5c995c2da37993ddaaf8 100644 (file)
@@ -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()
index 81c0846bfab39c039ebfe72489f34189a4a8a550..9d6a38ed4373cbc3711f145d42907c9f3e8b621f 100644 (file)
@@ -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()
index 22162adc564b135234dd0a8b9820dc70e4cb6eda..8b9356dd6e28d91858ea7da2308f542db3627d9d 100644 (file)
@@ -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
index 2559ac16cc6d710867dda567701d5d5764aa74ca..519c15bc63e6c7db922ca2e862134b85d659ff9e 100644 (file)
@@ -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()
index a536fea0a4ef6c15f2606bc16622e7bce67687fb..445f8b410c59ea7c3a75af3ed1a1479c5e1c4025 100644 (file)
@@ -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
index 165c2a82c4f5783ccafe394337835c24c62b31fa..cc8dd142de6cfc2a71560e3f2e25d8fd51fde674 100644 (file)
@@ -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()
index bd4875cb9e30caf291ad9f039deb81ba36d6b49c..757024df0c499219560829fde778cad462629b27 100644 (file)
@@ -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()
index de3d7d49ed1df19bfbdf70cf91b3255079ef1c4c..78a45a605743d9bbc122dc11a7e2aa0209facd98 100644 (file)
@@ -12,7 +12,6 @@ You may obtain a copy of the License at
 $Id$
 ]]--
 
-local require = require
 module "luci.controller.niu.network"
 
 function index()
index 76584eabf3e59ac7331a73d55f9756db2bb470a4..ffc8d9ade00b56cf94a5b5017eb7e815f128de96 100644 (file)
@@ -42,4 +42,4 @@ end
 
 function cnntrck()
        require "luci.template".render("niu/traffic/conntrack")
-end
\ No newline at end of file
+end
index ee402bc49083ec5888116c4ced4a837b50d58a65..92ebffdfc7c45abeaf2e61866efa86e904b8a915 100644 (file)
@@ -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