modules/freifunk: i18n
This commit is contained in:
parent
2006a2a827
commit
77475804e0
5 changed files with 23 additions and 26 deletions
|
@ -8,21 +8,19 @@ you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
]]
|
||||||
$Id: freifunk.lua 3291 2008-09-14 21:59:14Z Cyrus $
|
|
||||||
]]--
|
|
||||||
|
|
||||||
local fs = require "luci.fs"
|
local fs = require "luci.fs"
|
||||||
local util = require "luci.util"
|
local util = require "luci.util"
|
||||||
local uci = require "luci.model.uci".cursor()
|
local uci = require "luci.model.uci".cursor()
|
||||||
local profiles = "/etc/config/profile_"
|
local profiles = "/etc/config/profile_"
|
||||||
|
|
||||||
m = Map("freifunk", "Freifunk")
|
m = Map("freifunk", translate ("Community"))
|
||||||
c = m:section(NamedSection, "community", "public", "Gemeinschaft", [[Dies sind die Grundeinstellungen
|
c = m:section(NamedSection, "community", "public", nil, translate([[These are the basic
|
||||||
für die lokale Freifunkgemeinschaft. Diese Werte wirken sich NICHT auf die Konfiguration
|
settings for your local wireless community. These settings define the default values for the wizard
|
||||||
des Routers aus, sondern definieren nur die Vorgaben für den Freifunkassistenten.]])
|
and DO NOT affect the actual configuration of the router.]]))
|
||||||
|
|
||||||
community = c:option(ListValue, "name", "Gemeinschaft")
|
community = c:option(ListValue, "name", translate ("Community"))
|
||||||
community.rmempty = false
|
community.rmempty = false
|
||||||
|
|
||||||
local list = { }
|
local list = { }
|
||||||
|
@ -35,7 +33,7 @@ for k,v in ipairs(list) do
|
||||||
end
|
end
|
||||||
|
|
||||||
n = Map("system", translate("Basic system settings"))
|
n = Map("system", translate("Basic system settings"))
|
||||||
b = n:section(TypedSection, "system", "Basic system settings")
|
b = n:section(TypedSection, "system")
|
||||||
b.anonymous = true
|
b.anonymous = true
|
||||||
|
|
||||||
hn = b:option(Value, "hostname", "hostname")
|
hn = b:option(Value, "hostname", "hostname")
|
||||||
|
|
|
@ -15,16 +15,16 @@ local community = "profile_" .. uci:get("freifunk", "community", "name")
|
||||||
--local community = "profile_augsburg"
|
--local community = "profile_augsburg"
|
||||||
|
|
||||||
|
|
||||||
m = Map(community, translate("Community settings"), translate("These are the settings of your local community"))
|
m = Map(community, translate("Community settings"), translate("These are the settings of your local community."))
|
||||||
|
|
||||||
c = m:section(NamedSection, "profile", "community", "foobar")
|
c = m:section(NamedSection, "profile", "community")
|
||||||
|
|
||||||
name = c:option(Value, "name", "Name")
|
name = c:option(Value, "name", "Name")
|
||||||
name.rmempty = false
|
name.rmempty = false
|
||||||
|
|
||||||
homepage = c:option(Value, "homepage", "Webseite")
|
homepage = c:option(Value, "homepage", translate("Homepage"))
|
||||||
|
|
||||||
cc = c:option(Value, "country", "Countrycode")
|
cc = c:option(Value, "country", translate("Country code"))
|
||||||
function cc.cfgvalue(self, section)
|
function cc.cfgvalue(self, section)
|
||||||
return uci:get(community, "wifi_device", "country")
|
return uci:get(community, "wifi_device", "country")
|
||||||
end
|
end
|
||||||
|
@ -35,21 +35,21 @@ function cc.write(self, sec, value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ssid = c:option(Value, "ssid", "ESSID")
|
ssid = c:option(Value, "ssid", translate("ESSID"))
|
||||||
ssid.rmempty = false
|
ssid.rmempty = false
|
||||||
|
|
||||||
prefix = c:option(Value, "mesh_network", "Netzprefix")
|
prefix = c:option(Value, "mesh_network", translate("Mesh prefix"))
|
||||||
prefix.rmempty = false
|
prefix.rmempty = false
|
||||||
|
|
||||||
splash_net = c:option(Value, "splash_network", "Netzwerk für Client-DHCP-Adressen")
|
splash_net = c:option(Value, "splash_network", translate("Network for client DHCP addresses"))
|
||||||
splash_net.rmempty = false
|
splash_net.rmempty = false
|
||||||
|
|
||||||
splash_prefix = c:option(Value, "splash_prefix", "Netzgröße für Clientnetze")
|
splash_prefix = c:option(Value, "splash_prefix", translate("Client network size"))
|
||||||
splash_prefix.rmempty = false
|
splash_prefix.rmempty = false
|
||||||
|
|
||||||
lat = c:option(Value, "latitude", "Latitude")
|
lat = c:option(Value, "latitude", translate("Latitude"))
|
||||||
lat.rmempty = false
|
lat.rmempty = false
|
||||||
|
|
||||||
lon = c:option(Value, "longitude", "longitude")
|
lon = c:option(Value, "longitude", translate("Longitude"))
|
||||||
lon.rmempty = false
|
lon.rmempty = false
|
||||||
return m
|
return m
|
||||||
|
|
|
@ -14,7 +14,8 @@ local fs = require "nixio.fs"
|
||||||
local uci = require "luci.model.uci".cursor()
|
local uci = require "luci.model.uci".cursor()
|
||||||
local community = "/etc/config/profile_" .. uci:get("freifunk", "community", "name")
|
local community = "/etc/config/profile_" .. uci:get("freifunk", "community", "name")
|
||||||
|
|
||||||
f = SimpleForm("community", translate("Community profile"), translate("This is the complete content of the selected community profile."))
|
f = SimpleForm("community", translate("Community profile"),
|
||||||
|
translate("You can manually edit the selected community profile here."))
|
||||||
|
|
||||||
t = f:field(TextValue, "cop")
|
t = f:field(TextValue, "cop")
|
||||||
t.rmempty = true
|
t.rmempty = true
|
||||||
|
|
|
@ -6,7 +6,7 @@ m = Map("freifunk", translate("Edit index page"), translate("You can display add
|
||||||
s = m:section(NamedSection, "community", "public", "")
|
s = m:section(NamedSection, "community", "public", "")
|
||||||
s.anonymous = true
|
s.anonymous = true
|
||||||
|
|
||||||
di = s:option(Flag, "DefaultText", translate("Disable default content"), translate("If checked then the default content element is not shown."))
|
di = s:option(Flag, "DefaultText", translate("Disable default content"), translate("If selected then the default content element is not shown."))
|
||||||
di.enabled = "disabled"
|
di.enabled = "disabled"
|
||||||
di.disabled = "enabled"
|
di.disabled = "enabled"
|
||||||
di.rmempty = false
|
di.rmempty = false
|
||||||
|
|
|
@ -17,16 +17,14 @@ local basicsurl = luci.dispatcher.build_url(luci.dispatcher.context.path[1], "fr
|
||||||
|
|
||||||
<% if not (hostname and latitude and longitude and location) then%>
|
<% if not (hostname and latitude and longitude and location) then%>
|
||||||
<div class="error">
|
<div class="error">
|
||||||
<%:Basic settings are missing. Please go to this page and fill all required fields: %>
|
<%:Basic settings are incomplete. Please go to <a href='<%=basicsurl%>'><%:Basic settings%></a> and fill out all required fields.%></p>
|
||||||
<a href='<%=basicsurl%>'><%:Basic settings%></a>
|
|
||||||
</div>
|
</div>
|
||||||
<%end%>
|
<%end%>
|
||||||
<p />
|
<p />
|
||||||
|
|
||||||
<% if not (contact.nickname and contact.name and contact.mail) then%>
|
<% if not (contact.nickname and contact.name and contact.mail) then%>
|
||||||
<div class="error">
|
<div class="error">
|
||||||
<%:Contact information missing. Please go to this page and fill all required fields: %>
|
<%:Contact information is incomplete. Please go to <a href='<%=contacturl%>'><%:Contact%></a> and fill out all required fields.%></p>
|
||||||
<a href='<%=contacturl%>'><%:Contact%></a><p />
|
|
||||||
</div>
|
</div>
|
||||||
<%end%>
|
<%end%>
|
||||||
|
|
||||||
|
@ -34,7 +32,7 @@ local basicsurl = luci.dispatcher.build_url(luci.dispatcher.context.path[1], "fr
|
||||||
local device = section[".name"]
|
local device = section[".name"]
|
||||||
local url = luci.dispatcher.build_url(luci.dispatcher.context.path[1], "network", "wireless")
|
local url = luci.dispatcher.build_url(luci.dispatcher.context.path[1], "network", "wireless")
|
||||||
if section.diversity ~= "0" and section.disabled ~= "1" then
|
if section.diversity ~= "0" and section.disabled ~= "1" then
|
||||||
print('<div class="error">Diversity is enabled for device <b>' .. device .. '</b>. Go to <a href="' .. url .. '">wireless settings</a> to change that.</div><p />')
|
print('<div class="error">Diversity is enabled for device <b>' .. device .. '</b>. Go to <a href="' .. url .. '">wireless settings</a> to disable it.</div><p />')
|
||||||
end
|
end
|
||||||
end) %>
|
end) %>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue