summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
authorManuel Munz <freifunk@somakoma.de>2011-10-18 09:23:27 +0000
committerManuel Munz <freifunk@somakoma.de>2011-10-18 09:23:27 +0000
commit241c9bcbef193940ded379d5db508eb07cc88d01 (patch)
tree644ac72a891395aa9d8bffd9bc46597a07d921f9 /applications
parent212d2f3700eb0f3cc225b8bd512c70ca21c9540d (diff)
applications/luci-splash: Finish translation work and move translation strings to own file
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-splash/Makefile2
-rw-r--r--applications/luci-splash/luasrc/controller/splash/splash.lua1
-rw-r--r--applications/luci-splash/luasrc/model/cbi/splash/splash.lua63
-rw-r--r--applications/luci-splash/luasrc/model/cbi/splash/splashtext.lua2
-rw-r--r--applications/luci-splash/luasrc/view/admin_status/splash.htm1
5 files changed, 38 insertions, 31 deletions
diff --git a/applications/luci-splash/Makefile b/applications/luci-splash/Makefile
index a4f7c76ef..6e625c0e5 100644
--- a/applications/luci-splash/Makefile
+++ b/applications/luci-splash/Makefile
@@ -1,4 +1,4 @@
-PO =
+PO = splash
include ../../build/config.mk
include ../../build/module.mk
diff --git a/applications/luci-splash/luasrc/controller/splash/splash.lua b/applications/luci-splash/luasrc/controller/splash/splash.lua
index 71a61bdbf..a41256a09 100644
--- a/applications/luci-splash/luasrc/controller/splash/splash.lua
+++ b/applications/luci-splash/luasrc/controller/splash/splash.lua
@@ -1,4 +1,5 @@
module("luci.controller.splash.splash", package.seeall)
+luci.i18n.loadc("splash")
function index()
entry({"admin", "services", "splash"}, cbi("splash/splash"), _("Client-Splash"), 90).i18n = "freifunk"
diff --git a/applications/luci-splash/luasrc/model/cbi/splash/splash.lua b/applications/luci-splash/luasrc/model/cbi/splash/splash.lua
index 145b16d5b..0e3e6ed2b 100644
--- a/applications/luci-splash/luasrc/model/cbi/splash/splash.lua
+++ b/applications/luci-splash/luasrc/model/cbi/splash/splash.lua
@@ -1,24 +1,31 @@
--- ToDo: Translate, Add descriptions and help texts
+--[[
+LuCI - Lua Configuration Interface
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+]]--
+
require("luci.model.uci")
+luci.i18n.loadc("splash")
-m = Map("luci_splash", "Client-Splash", [[Client-Splash ist das Freifunk Hotspot-Authentifizierungs-System.]])
+m = Map("luci_splash", translate("Client-Splash"), translate("Client-Splash is a hotspot authentification system for wireless mesh networks."))
-s = m:section(NamedSection, "general", "core", "Allgemein")
+s = m:section(NamedSection, "general", "core", translate("General"))
s.addremove = false
-s:option(Value, "leasetime", "Freigabezeit", "h")
+s:option(Value, "leasetime", translate("Clearance time"), translate("Clients that have accepted the splash are allowed to use the network for that many hours."))
-s:option(Value, "limit_up", "Upload-Limitierung", "Kilobyte/s - limitiert die Upload-Geschwindigkeit von Clients")
-s:option(Value, "limit_down", "Download-Limitierung", "Kilobyte/s - limitiert die Download-Geschwindigkeit von Clients")
+s:option(Value, "limit_up", translate("Upload limit"), translate("Clients upload speed is limited to this value (kbyte/s)"))
+s:option(Value, "limit_down", translate("Download limit"), translate("Clients download speed is limited to this value (kbyte/s)"))
s:option(DummyValue, "_tmp", "",
- "Bandbreitenlimitierung für Clients wird aktiviert wenn sowohl Up- als auch " ..
- "Download-Geschwindigkeit angegeben werden. Auf 0 setzen um die Limitierung zu deaktivieren. " ..
- "Clients in der Whitelist werden nicht limitiert.")
+ translate("Bandwidth limit for clients is only activated when both up- and download limit are set. " ..
+ "Use a value of 0 here to completely disable this limitation. Whitelisted clients are not limited."))
-s = m:section(TypedSection, "iface", "Schnittstellen",
- "Bestimmt die Schnittstellen auf denen Splashing aktiviert werden soll. " ..
- "Diese Einstellungen müssen normalerweise nicht angepasst werden.")
+s = m:section(TypedSection, "iface", translate("Interfaces"), translate("Interfaces that are used for Splash."))
s.template = "cbi/tblsection"
s.addremove = true
@@ -26,16 +33,16 @@ s.anonymous = true
local uci = luci.model.uci.cursor()
-zone = s:option(ListValue, "zone", "Firewallzone",
- "Splash-Regeln in der angegebenen Zone eingliedern")
+zone = s:option(ListValue, "zone", translate("Firewall zone"),
+ translate("Splash rules are integrated in this firewall zone"))
uci:foreach("firewall", "zone",
function (section)
zone:value(section.name)
end)
-iface = s:option(ListValue, "network", "Netzwerk",
- "Client-Verkehr auf der angegebenen Schnittstelle abfangen")
+iface = s:option(ListValue, "network", translate("Network"),
+ translate("Intercept client traffic on this Interface"))
uci:foreach("network", "interface",
function (section)
@@ -50,34 +57,30 @@ uci:foreach("network", "alias",
end)
-s = m:section(TypedSection, "whitelist", "Whitelist",
- "MAC-Adressen in dieser Liste werden automatisch freigegeben und unterliegen " ..
- "keiner Bandbreitenlimitierung.")
+s = m:section(TypedSection, "whitelist", translate("Whitelist"),
+ translate("MAC addresses of whitelisted clients. These do not need to accept the splash and and are not bandwidth limited."))
s.template = "cbi/tblsection"
s.addremove = true
s.anonymous = true
-s:option(Value, "mac", "MAC-Adresse")
+s:option(Value, "mac", translate ("MAC Address"))
-s = m:section(TypedSection, "blacklist", "Blacklist",
- "MAC-Adressen in dieser Liste werden automatisch gesperrt. Verkehr von diesen " ..
- "Adressen wird komplett verworfen und es wird kein Verbindungsaufbau via WLAN " ..
- "zugelassen.")
+s = m:section(TypedSection, "blacklist", translate("Blacklist"),
+ translate("MAC addresses in this list are blocked."))
s.template = "cbi/tblsection"
s.addremove = true
s.anonymous = true
-s:option(Value, "mac", "MAC-Adresse")
+s:option(Value, "mac", translate ("MAC Address"))
-s = m:section(TypedSection, "subnet", "Freigegebene Subnetze",
- "Hier eingetragene Subnetze oder Host-Adressen sind vom Splash-Vorgang ausgenommen.")
+s = m:section(TypedSection, "subnet", translate("Allowed hosts/subnets"),
+ translate("Hosts and Networks that are listed here are excluded from splashing, i.e. they are always allowed."))
s.template = "cbi/tblsection"
s.addremove = true
s.anonymous = true
-s:option(Value, "ipaddr", "IP-Adresse")
-s:option(Value, "netmask", "Netzmaske", "optional bei Host-Adressen").rmempty = true
-
+s:option(Value, "ipaddr", translate("IP Address"))
+s:option(Value, "netmask", translate("Netmask"), translate("optional when using host addresses")).rmempty = true
return m
diff --git a/applications/luci-splash/luasrc/model/cbi/splash/splashtext.lua b/applications/luci-splash/luasrc/model/cbi/splash/splashtext.lua
index 5f75e8015..453942152 100644
--- a/applications/luci-splash/luasrc/model/cbi/splash/splashtext.lua
+++ b/applications/luci-splash/luasrc/model/cbi/splash/splashtext.lua
@@ -13,6 +13,8 @@ You may obtain a copy of the License at
]]--
local fs = require "nixio.fs"
+luci.i18n.loadc("splash")
+
local splashtextfile = "/usr/lib/luci-splash/splashtext.html"
f = SimpleForm("splashtext", translate("Edit Splash text"), translate("You can change the text that is displayed to clients here.<br /> It is possible to use the following markers: ###COMMUNITY###, ###COMMUNITY_URL###, ###LEASETIME### and ###ACCEPT###.<br />Click here to <a href='/luci/splash/'>test the splash page</a> after you saved it."))
diff --git a/applications/luci-splash/luasrc/view/admin_status/splash.htm b/applications/luci-splash/luasrc/view/admin_status/splash.htm
index 70e6c06cf..1b55e7b27 100644
--- a/applications/luci-splash/luasrc/view/admin_status/splash.htm
+++ b/applications/luci-splash/luasrc/view/admin_status/splash.htm
@@ -19,6 +19,7 @@ local ipt = require "luci.sys.iptparser".IptParser()
local uci = require "luci.model.uci".cursor_state()
local wat = require "luci.tools.webadmin"
local fs = require "nixio.fs"
+luci.i18n.loadc("splash")
local clients = { }
local leasetime = tonumber(uci:get("luci_splash", "general", "leasetime") or 1) * 60 * 60