From 29cca4010923776f94794916950ce842c8a0dffc Mon Sep 17 00:00:00 2001 From: Chris Ritzo Date: Wed, 7 Aug 2013 15:34:09 -0400 Subject: [PATCH 1/3] Added internationalization tags for luci-commotion. modified: files/usr/share/commotion/patches/wifi.lua.patch modified: htdocs/luci-static/commotion_index.html modified: htdocs/luci-static/resources/OSMLatLon.htm modified: luasrc/controller/commotion/meshprofile.lua modified: luasrc/model/cbi/commotion/meshconfig.lua modified: luasrc/view/commotion/meshprofile.htm --- .../share/commotion/patches/wifi.lua.patch | 2 +- htdocs/luci-static/commotion_index.html | 8 +++---- htdocs/luci-static/resources/OSMLatLon.htm | 9 ++++---- luasrc/controller/commotion/meshprofile.lua | 2 +- luasrc/model/cbi/commotion/meshconfig.lua | 22 +++++++++---------- luasrc/view/commotion/meshprofile.htm | 6 ++--- 6 files changed, 23 insertions(+), 26 deletions(-) diff --git a/files/usr/share/commotion/patches/wifi.lua.patch b/files/usr/share/commotion/patches/wifi.lua.patch index 0230baa..54b5f3d 100644 --- a/files/usr/share/commotion/patches/wifi.lua.patch +++ b/files/usr/share/commotion/patches/wifi.lua.patch @@ -14,7 +14,7 @@ @@ -717,8 +717,6 @@ end - encr:value("none", "No Encryption") + encr:value("none", translate("No Encryption")) -encr:value("wep-open", translate("WEP Open System"), {mode="ap"}, {mode="sta"}, {mode="ap-wds"}, {mode="sta-wds"}, {mode="adhoc"}, {mode="ahdemo"}, {mode="wds"}) -encr:value("wep-shared", translate("WEP Shared Key"), {mode="ap"}, {mode="sta"}, {mode="ap-wds"}, {mode="sta-wds"}, {mode="adhoc"}, {mode="ahdemo"}, {mode="wds"}) diff --git a/htdocs/luci-static/commotion_index.html b/htdocs/luci-static/commotion_index.html index 318d878..7f369ba 100644 --- a/htdocs/luci-static/commotion_index.html +++ b/htdocs/luci-static/commotion_index.html @@ -1,7 +1,7 @@ -

Welcome to Commotion!

+

<%:Welcome to Commotion!%>

-

You are connected to a mesh network powered by the Commotion Wireless Project. The Commotion project seeks to create an open-source, device-as-infrastructure communication platform that allows communities and activists to collaborate and communicate. If you're an admin of this node in the network, you can use this interface to modify its settings. For more information about the project, please visit the site below:

+

<%:You are connected to a mesh network powered by the Commotion Wireless Project. The Commotion project seeks to create an open-source, device-as-infrastructure communication platform that allows communities and activists to collaborate and communicate. If you're an admin of this node in the network, you can use this interface to modify its settings. For more information about the project, please visit the site below:%>

-

Commotion Wireless

+

<%:Commotion Wireless%>

-Thanks for using our network! +<%:Thanks for using our network!%> diff --git a/htdocs/luci-static/resources/OSMLatLon.htm b/htdocs/luci-static/resources/OSMLatLon.htm index 18be30b..c82e848 100644 --- a/htdocs/luci-static/resources/OSMLatLon.htm +++ b/htdocs/luci-static/resources/OSMLatLon.htm @@ -1,7 +1,7 @@ - OpenStreetMap + <%:OpenStreetMap%> @@ -9,11 +9,10 @@
- Map by openstreetmap.org, License CC-BY-SA -      + <%:Map by%> openstreetmap.org, <%:License CC-BY-SA%> - Latitude: - Longitude: + <%:Latitude:%> + <%:Longitude:%>
diff --git a/luasrc/controller/commotion/meshprofile.lua b/luasrc/controller/commotion/meshprofile.lua index 726577d..bdb4c4e 100644 --- a/luasrc/controller/commotion/meshprofile.lua +++ b/luasrc/controller/commotion/meshprofile.lua @@ -26,7 +26,7 @@ function index() entry({"admin", "commotion", "meshprofile_submit"}, call("ifprocess")) entry({"admin", "commotion", "meshprofile_down"}, call("down")) entry({"admin", "commotion", "meshprofile_up"}, call("up")) - entry({"admin", "commotion", "meshprofile"}, call("main"), "Mesh Profile", 20).dependent=false + entry({"admin", "commotion", "meshprofile"}, call("main"), i18n("Mesh Profile"), 20).dependent=false end function main(ERR) diff --git a/luasrc/model/cbi/commotion/meshconfig.lua b/luasrc/model/cbi/commotion/meshconfig.lua index 0265392..8673c36 100644 --- a/luasrc/model/cbi/commotion/meshconfig.lua +++ b/luasrc/model/cbi/commotion/meshconfig.lua @@ -1,4 +1,3 @@ ---[[ LuCI - Lua Configuration Interface Copyright 2011 Josh King @@ -16,21 +15,20 @@ local sys = require "luci.sys" local util = require "luci.util" -m = Map("wireless", translate("Configuration"), translate("This configuration wizard will assist you in setting up your router " .. - "for a Commotion network.")) +m = Map("wireless", translate("Configuration"), translate("This configuration wizard will assist you in setting up your router for a Commotion network.")) -sctAP = m:section(NamedSection, "quickstartAP", "wifi-iface", "Access Point") +sctAP = m:section(NamedSection, "quickstartAP", "wifi-iface", translate("Access Point")) sctAP.optional = true -sctAP:option(Value, "ssid", "Name (SSID)", "The public facing name of this interface") +sctAP:option(Value, "ssid", translate("Name (SSID)"), translate("The public facing name of this interface")) -sctSecAP = m:section(NamedSection, "quickstartSec", "wifi-iface", "Secure Access Point") +sctSecAP = m:section(NamedSection, "quickstartSec", "wifi-iface", translate("Secure Access Point")) sctSecAP.optional = true -sctSecAP:option(Value, "ssid", "Name (SSID)", "The public facing name of this interface") +sctSecAP:option(Value, "ssid", translate("Name (SSID)"), translate("The public facing name of this interface")) -sctMesh = m:section(NamedSection, "quickstartMesh", "wifi-iface", "Mesh Backhaul") +sctMesh = m:section(NamedSection, "quickstartMesh", "wifi-iface", translate("Mesh Backhaul")) sctMesh.optional = true -sctMesh:option(Value, "ssid", "Name (SSID)", "The public facing name of this interface") -sctMesh:option(Value, "bssid", "Device Designation (BSSID)", "The device read name of this interface. (Letters A-F, and numbers 0-9 only)") +sctMesh:option(Value, "ssid", translate("Name (SSID)"), translate("The public facing name of this interface")) +sctMesh:option(Value, "bssid", translate("Device Designation (BSSID)"), translate("The device read name of this interface. (Letters A-F, and numbers 0-9 only)")) e = m:section(TypedSection, "wifi-device", translate("Network-wide Settings")) e.anonymous = true @@ -59,6 +57,6 @@ m2 = Map("commotiond") node = m2:section(TypedSection, "node", translate("Settings specific to this node")) node.anonymous = true node.optional = true -node:option(Value, "dhcp_timeout", "DHCP Timeout", "How many seconds to wait on boot for a DHCP lease from the gateway") +node:option(Value, "dhcp_timeout", translate("DHCP Timeout"), translate("How many seconds to wait on boot for a DHCP lease from the gateway")) -return m, m2 \ No newline at end of file +return m, m2 diff --git a/luasrc/view/commotion/meshprofile.htm b/luasrc/view/commotion/meshprofile.htm index 5a0f0c0..d9039ef 100644 --- a/luasrc/view/commotion/meshprofile.htm +++ b/luasrc/view/commotion/meshprofile.htm @@ -16,7 +16,7 @@ uri_prefix, num_post = string.gsub(uri, "meshprofile_.*", "meshprofile") -%> -

Node Profiles

+

<%:Node Profiles%>

If your node includes configuration profiles for multiple Commotion networks, this form allows you to set your defaults. NOTE: Channel settings must be manually changed. @@ -27,7 +27,7 @@

Node Profiles

<%end%>
-

Select an interface

+

<%:Select an interface%>

-

Select a profile to apply

+

<%:Select a profile to apply%>