diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2008-06-02 00:48:25 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2008-06-02 00:48:25 +0000 |
commit | 4058aacd0635e1b585993e065974edb17329f014 (patch) | |
tree | 8f2cfba3bf37b0a1142e3e81c5faf397be78c507 /applications/luci-statistics/luasrc | |
parent | 3e94adc682b0d72503023300bddf9d6eaf6ca380 (diff) |
* luci/statistics: template and controller translation
Diffstat (limited to 'applications/luci-statistics/luasrc')
6 files changed, 74 insertions, 65 deletions
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 f19d2cdb7f..7fdedfbece 100644 --- a/applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua +++ b/applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua @@ -11,7 +11,7 @@ function index() require("luci.statistics.datatree") -- load language file - luci.i18n.load("statistics.en") + luci.i18n.load("statistics.en") -- XXX: temporary / replace with loadc() -- get rrd data tree local tree = luci.statistics.datatree.Instance() @@ -35,32 +35,32 @@ function index() end - entry({"admin", "statistics"}, call("statistics_index"), "Statistiken", 80) - entry({"admin", "statistics", "collectd"}, cbi("luci_statistics/collectd"), "Collectd", 10) - - entry({"admin", "statistics", "output"}, call("statistics_outputplugins"), "Ausgabeplugins", 20) - _entry({"admin", "statistics", "output", "rrdtool"}, cbi("luci_statistics/rrdtool"), "RRDTool", 10) - _entry({"admin", "statistics", "output", "network"}, cbi("luci_statistics/network"), "Netzwerk", 20) - _entry({"admin", "statistics", "output", "unixsock"}, cbi("luci_statistics/unixsock"), "Unix Socket", 30) - _entry({"admin", "statistics", "output", "csv"}, cbi("luci_statistics/csv"), "CSV", 40) - - entry({"admin", "statistics", "system"}, call("statistics_systemplugins"), "Systemplugins", 30) - _entry({"admin", "statistics", "system", "exec"}, cbi("luci_statistics/exec"), "Exec", 10) - _entry({"admin", "statistics", "system", "email"}, cbi("luci_statistics/email"), "E-Mail", 20) - _entry({"admin", "statistics", "system", "cpu"}, cbi("luci_statistics/cpu"), "Prozessor", 30) - _entry({"admin", "statistics", "system", "df"}, cbi("luci_statistics/df"), "Speicherplatz", 40) - _entry({"admin", "statistics", "system", "disk"}, cbi("luci_statistics/disk"), "Datenträger", 50) - _entry({"admin", "statistics", "system", "irq"}, cbi("luci_statistics/irq"), "Interrupts", 60) - _entry({"admin", "statistics", "system", "processes"}, cbi("luci_statistics/processes"), "Prozesse", 70) - - entry({"admin", "statistics", "network"}, call("statistics_networkplugins"), "Netzwerkplugins", 40) - _entry({"admin", "statistics", "network", "interface"}, cbi("luci_statistics/interface"), "Schnittstellen", 10) - _entry({"admin", "statistics", "network", "netlink"}, cbi("luci_statistics/netlink"), "Netlink", 20) - _entry({"admin", "statistics", "network", "iptables"}, cbi("luci_statistics/iptables"), "Firewall", 30) - _entry({"admin", "statistics", "network", "tcpconns"}, cbi("luci_statistics/tcpconns"), "Verbindungen", 40) - _entry({"admin", "statistics", "network", "ping"}, cbi("luci_statistics/ping"), "Ping", 50) - _entry({"admin", "statistics", "network", "dns"}, cbi("luci_statistics/dns"), "DNS", 60) - _entry({"admin", "statistics", "network", "wireless"}, cbi("luci_statistics/wireless"), "Drahtlos", 70) + entry({"admin", "statistics"}, call("statistics_index"), _i18n("statistics"), 80).i18n = "statistics" + entry({"admin", "statistics", "collectd"}, cbi("luci_statistics/collectd"), _i18n("collectd"), 10) + + entry({"admin", "statistics", "output"}, call("statistics_outputplugins"), _i18n("outputplugins"), 20) + _entry({"admin", "statistics", "output", "rrdtool"}, cbi("luci_statistics/rrdtool"), _i18n("rrdtool"), 10) + _entry({"admin", "statistics", "output", "network"}, cbi("luci_statistics/network"), _i18n("network"), 20) + _entry({"admin", "statistics", "output", "unixsock"}, cbi("luci_statistics/unixsock"), _i18n("unixsock"), 30) + _entry({"admin", "statistics", "output", "csv"}, cbi("luci_statistics/csv"), _i18n("csv"), 40) + + entry({"admin", "statistics", "system"}, call("statistics_systemplugins"), _i18n("systemplugins"), 30) + _entry({"admin", "statistics", "system", "exec"}, cbi("luci_statistics/exec"), _i18n("exec"), 10) + _entry({"admin", "statistics", "system", "email"}, cbi("luci_statistics/email"), _i18n("email"), 20) + _entry({"admin", "statistics", "system", "cpu"}, cbi("luci_statistics/cpu"), _i18n("cpu"), 30) + _entry({"admin", "statistics", "system", "df"}, cbi("luci_statistics/df"), _i18n("df"), 40) + _entry({"admin", "statistics", "system", "disk"}, cbi("luci_statistics/disk"), _i18n("disk"), 50) + _entry({"admin", "statistics", "system", "irq"}, cbi("luci_statistics/irq"), _i18n("irq"), 60) + _entry({"admin", "statistics", "system", "processes"}, cbi("luci_statistics/processes"), _i18n("processes"), 70) + + entry({"admin", "statistics", "network"}, call("statistics_networkplugins"), _i18n("networkplugins"),40) + _entry({"admin", "statistics", "network", "interface"}, cbi("luci_statistics/interface"), _i18n("interface"), 10) + _entry({"admin", "statistics", "network", "netlink"}, cbi("luci_statistics/netlink"), _i18n("netlink"), 20) + _entry({"admin", "statistics", "network", "iptables"}, cbi("luci_statistics/iptables"), _i18n("iptables"), 30) + _entry({"admin", "statistics", "network", "tcpconns"}, cbi("luci_statistics/tcpconns"), _i18n("tcpconns"), 40) + _entry({"admin", "statistics", "network", "ping"}, cbi("luci_statistics/ping"), _i18n("ping"), 50) + _entry({"admin", "statistics", "network", "dns"}, cbi("luci_statistics/dns"), _i18n("dns"), 60) + _entry({"admin", "statistics", "network", "wireless"}, cbi("luci_statistics/wireless"), _i18n("wireless"), 70) -- public views @@ -93,37 +93,31 @@ function statistics_index() end function statistics_outputplugins() - plugins = { - rrdtool="RRDTool", - network="Netzwerk", - unixsock="Unix Socket", - csv="CSV" - } + local plugins = { } + + for i, p in ipairs({ "rrdtool", "network", "unixsock", "csv" }) do + plugins[p] = luci.i18n.translate( "stat_" .. p, p ) + end luci.template.render("admin_statistics/outputplugins", {plugins=plugins}) end function statistics_systemplugins() - plugins = { - exec="Exec", - email="E-Mail", - disk="Datenträger", - irq="Interrupts", - processes="Prozesse" - } + local plugins = { } + + for i, p in ipairs({ "exec", "email", "df", "disk", "irq", "processes", "cpu" }) do + plugins[p] = luci.i18n.translate( "stat_" .. p, p ) + end luci.template.render("admin_statistics/systemplugins", {plugins=plugins}) end function statistics_networkplugins() - plugins = { - interface="Schnittstellen", - netlink="Netlink", - iptables="Firewall", - tcpconns="Verbindungen", - ping="Ping", - dns="DNS" - } + local plugins = { } + + for i, p in ipairs({ "interface", "netlink", "iptables", "tcpconns", "ping", "dns", "wireless" }) do + plugins[p] = luci.i18n.translate( "stat_" .. p, p ) + end luci.template.render("admin_statistics/networkplugins", {plugins=plugins}) end diff --git a/applications/luci-statistics/luasrc/i18n/statistics.en b/applications/luci-statistics/luasrc/i18n/statistics.en index bd3b6bf1fc..84f1c0e230 100644 --- a/applications/luci-statistics/luasrc/i18n/statistics.en +++ b/applications/luci-statistics/luasrc/i18n/statistics.en @@ -15,9 +15,20 @@ $Id$ -- +-- general translations +-- + +stat_statistics = "Statistics" +stat_systemplugins = "System plugins" +stat_networkplugins = "Network plugins" +stat_outputplugins = "Output plugins" + + +-- -- collectd plugin translations -- +stat_collectd = "Collectd" stat_cpu = "Processor" stat_ping = "Ping" stat_iptables = "Firewall" @@ -28,11 +39,17 @@ stat_tcpconns = "TCP Connections" stat_interface = "Interfaces" stat_df = "Disk Space Usage" stat_irq = "Interrupts" +stat_disk = "Disk Usage" +stat_exec = "Exec" +stat_rrdtool = "RRDTool" +stat_network = "Network" +stat_csv = "CSV Output" -- -- diagram translations -- + stat_dg_title_wireless__signal_noise = "%H: Wireless - Signal Noise Ratio" stat_dg_label_wireless__signal_noise = "dBm" stat_ds_signal_noise = "Noise Level" @@ -121,6 +138,7 @@ stat_ds_irq = "IRQ %di" -- -- CBI translations -- + lucistatistics = "Statistics" -- general config diff --git a/applications/luci-statistics/luasrc/view/admin_statistics/index.htm b/applications/luci-statistics/luasrc/view/admin_statistics/index.htm index 2c1befa505..a6d7045c38 100644 --- a/applications/luci-statistics/luasrc/view/admin_statistics/index.htm +++ b/applications/luci-statistics/luasrc/view/admin_statistics/index.htm @@ -1,8 +1,8 @@ <%+header%> -<h1><%:stat Statistiken%></h1> +<h1><%:stat Statistics%></h1> -<p><%:stat_desc Die Statistiken bauen auf <a href="http://collectd.org/index.shtml">Collectd</a> auf und nutzen -<a href="http://oss.oetiker.ch/rrdtool/">RRD Tool</a> um Graphen aus den erfassten Daten zu rendern.%></p> +<p><%:stat_desc The statistics package is based on<a href="http://collectd.org/index.shtml">Collectd</a> +and uses <a href="http://oss.oetiker.ch/rrdtool/">RRD Tool</a> to render diagram images from collected data.%></p> <%+footer%> diff --git a/applications/luci-statistics/luasrc/view/admin_statistics/networkplugins.htm b/applications/luci-statistics/luasrc/view/admin_statistics/networkplugins.htm index d3aa87eb17..e88ca7f58a 100644 --- a/applications/luci-statistics/luasrc/view/admin_statistics/networkplugins.htm +++ b/applications/luci-statistics/luasrc/view/admin_statistics/networkplugins.htm @@ -1,11 +1,11 @@ <%+header%> -<h1><%:stat_networkplugins Netzwerkplugins%></h1> +<h1><%:stat_networkplugins Network plugins%></h1> -<p><%:stat_networkplugins_desc Netzwerkplugins sammeln Werte über offene TCP-Verbindung, allgemeines Verkehrsaufkommen -auf verschiedenen Schnittstellen, DNS-Verkehr u.v.m.%></p> +<p><%:stat_networkplugins_desc Network plugins are used to collect information +about open tcp connections, interface traffic, iptables rules etc.%></p> -<p><%:stat_networkplugins_installed Installierte Netzwerkplugins:%> +<p><%:stat_networkplugins_installed Installed network plugins:%> <ul> <% for plugin, desc in pairs(plugins) do %> <% if luci.fs.isfile("/usr/lib/collectd/" .. plugin .. ".so") then %> diff --git a/applications/luci-statistics/luasrc/view/admin_statistics/outputplugins.htm b/applications/luci-statistics/luasrc/view/admin_statistics/outputplugins.htm index 5a8a76045a..c7945f16e4 100644 --- a/applications/luci-statistics/luasrc/view/admin_statistics/outputplugins.htm +++ b/applications/luci-statistics/luasrc/view/admin_statistics/outputplugins.htm @@ -1,12 +1,12 @@ <%+header%> -<h1><%:stat_outputplugins Ausgabeplugins%></h1> +<h1><%:stat_outputplugins Output plugins%></h1> -<p><%:stat_outputplugins_desc Ausgabeplugins stellen verschiedene Möglichkeiten zur Speicherung -der Daten bereit. Es können auch mehrere Plugins gleichzeitig aktiviert werden um beispielsweise -die gesammelten Werte in RRD-Datenbanken zu sichern und zusätzlich über das Netzwerk zu versenden.%></p> +<p><%:stat_outputplugins_desc Output plugins provide different possibilities to store collected data. +It is possible to enable multiple plugin at one, for example to store collected data in rrd databases +and to transmit the data over the network to other collectd instances.%></p> -<p><%:stat_outputplugins_installed Installierte Ausgabeplugins:%> +<p><%:stat_outputplugins_installed Installed output plugins:%> <ul> <% for plugin, desc in pairs(plugins) do %> <% if luci.fs.isfile("/usr/lib/collectd/" .. plugin .. ".so") then %> diff --git a/applications/luci-statistics/luasrc/view/admin_statistics/systemplugins.htm b/applications/luci-statistics/luasrc/view/admin_statistics/systemplugins.htm index 2a32bf5ca9..8c1f714e68 100644 --- a/applications/luci-statistics/luasrc/view/admin_statistics/systemplugins.htm +++ b/applications/luci-statistics/luasrc/view/admin_statistics/systemplugins.htm @@ -1,11 +1,8 @@ <%+header%> -<h1><%:stat_systemplugins Systemplugins%></h1> +<h1><%:stat_systemplugins System plugins%></h1> -<p><%:stat_systemplugins_desc Systemplugins sammeln Werte über den aktuellen Systemzustand und den Ressourcenverbrauch -auf dem Gerät.%></p> - -<p><%:stat_systemplugins_installed Installierte Systemplugins:%> +<p><%:stat_systemplugins_desc System plugins collecting values about system state and ressource usage on the device.:%> <ul> <% for plugin, desc in pairs(plugins) do %> <% if luci.fs.isfile("/usr/lib/collectd/" .. plugin .. ".so") then %> |