From ecab3d8bfb2d81f5f89979b346968f2c17026fe8 Mon Sep 17 00:00:00 2001 From: Josh King Date: Wed, 28 Aug 2013 15:23:40 -0400 Subject: [PATCH 1/2] Cherry-picked internationalization branch into 0.2 --- usr/lib/lua/luci/controller/QS/QS.lua | 8 ++++++-- usr/lib/lua/luci/view/QS/module/accessPoint.htm | 8 ++++---- usr/lib/lua/luci/view/QS/module/adminPassword.htm | 6 +++--- usr/lib/lua/luci/view/QS/module/name.htm | 14 +++++++------- usr/lib/lua/luci/view/QS/module/upload.htm | 4 ++-- usr/lib/lua/luci/view/QS/module/welcome.htm | 4 ++-- usr/lib/lua/luci/view/QS/reset.htm | 4 ++-- 7 files changed, 26 insertions(+), 22 deletions(-) diff --git a/usr/lib/lua/luci/controller/QS/QS.lua b/usr/lib/lua/luci/controller/QS/QS.lua index a1aaacd..f5d93f4 100644 --- a/usr/lib/lua/luci/controller/QS/QS.lua +++ b/usr/lib/lua/luci/controller/QS/QS.lua @@ -6,11 +6,15 @@ require "luci.controller.QS.modules" function index() local uci = luci.model.uci.cursor() + luci.i18n.loadc("admin-core") + local i18n = luci.i18n.translate + if uci:get('quickstart', 'options', 'complete') ~= 'true' then - entry({"QuickStart"}, call("main"), "Quick Start").dependent=false + entry({"QuickStart"}, call("main"), "Quick Start", i18n("commotionquickstart")).dependent=false entry({"QuickStart", "CertificateHelp"}, template("QS/module/cert")) end - entry({"admin", "commotion", "quickstart"}, call("resetQS"), "Restart Quickstart", 50) + entry({"admin", "commotion", "quickstart"}, call("resetQS"), "Restart Quickstart", i18n("commotionquickstart"), 50) + end function resetQS() diff --git a/usr/lib/lua/luci/view/QS/module/accessPoint.htm b/usr/lib/lua/luci/view/QS/module/accessPoint.htm index a052465..45b8e9c 100644 --- a/usr/lib/lua/luci/view/QS/module/accessPoint.htm +++ b/usr/lib/lua/luci/view/QS/module/accessPoint.htm @@ -7,11 +7,11 @@
-

Access Point Name

-

What would you like to name your node's access point?

-

This is the name that users will see when they search for wireless access.

+

<%:Access Point Name%>

+

<%:What would you like to name your node's access point?%>

+

<%:This is the name that users will see when they search for wireless access.%>

<%=nameErr%>

-

Choose a name that is 5-12 characters. You can use numbers, letters & special characters. The name must be unique in the network. You can change the node name later by logging into the node administration page.

+

<%:Choose a name that is 5-12 characters. You can use numbers, letters & special characters. The name must be unique in the network. You can change the node name later by logging into the node administration page.%>

diff --git a/usr/lib/lua/luci/view/QS/module/adminPassword.htm b/usr/lib/lua/luci/view/QS/module/adminPassword.htm index 74f62e0..34715fe 100644 --- a/usr/lib/lua/luci/view/QS/module/adminPassword.htm +++ b/usr/lib/lua/luci/view/QS/module/adminPassword.htm @@ -10,11 +10,11 @@
- -

This password is used to access the administration menus on this device.

+ +

<%:This password is used to access the administration menus on this device.%>

<%=pwErr%>

-

Retype your password here

+

<%:Retype your password here%>

diff --git a/usr/lib/lua/luci/view/QS/module/name.htm b/usr/lib/lua/luci/view/QS/module/name.htm index d71ede2..95a87ed 100644 --- a/usr/lib/lua/luci/view/QS/module/name.htm +++ b/usr/lib/lua/luci/view/QS/module/name.htm @@ -40,17 +40,17 @@

<%=nameErr%>

- -

This value is used by other users and devices to find your network wirelessly and over the mesh. This value can be composed of letter, number and hyphens. (Hyphens can not be used at the beggining or end of the name.)

- - Require a password for others to connect to your node. + +

<%:This value is used by other users and devices to find your network wirelessly and over the mesh. This value can be composed of letter, number and hyphens. (Hyphens can not be used at the beggining or end of the name.)%>

+ + <%: Require a password for others to connect to your node.%>
diff --git a/usr/lib/lua/luci/view/QS/module/upload.htm b/usr/lib/lua/luci/view/QS/module/upload.htm index 6c7038e..bd41561 100644 --- a/usr/lib/lua/luci/view/QS/module/upload.htm +++ b/usr/lib/lua/luci/view/QS/module/upload.htm @@ -16,10 +16,10 @@
<%=upErr%>
- +
- Upload <%=pv.modules.upload.fileInstructions%> + <%:Upload%> <%=pv.modules.upload.fileInstructions%>
diff --git a/usr/lib/lua/luci/view/QS/module/welcome.htm b/usr/lib/lua/luci/view/QS/module/welcome.htm index c28d54c..3c4ab84 100644 --- a/usr/lib/lua/luci/view/QS/module/welcome.htm +++ b/usr/lib/lua/luci/view/QS/module/welcome.htm @@ -1,5 +1,5 @@ -

Congratulations! You have a Commotion node and are ready to join a network or start a new one. This wizard will guide you through the setup. The setup process should take about 10 minutes.

+

<%:Congratulations! You have a Commotion node and are ready to join a network or start a new one. This wizard will guide you through the setup. The setup process should take about 10 minutes.%>

-

You can still change settings after setup is complete.

+

<%:You can still change settings after setup is complete.%>

diff --git a/usr/lib/lua/luci/view/QS/reset.htm b/usr/lib/lua/luci/view/QS/reset.htm index d2b8dc5..d4970f9 100644 --- a/usr/lib/lua/luci/view/QS/reset.htm +++ b/usr/lib/lua/luci/view/QS/reset.htm @@ -19,8 +19,8 @@
-Restart QuickStart +<%:Restart QuickStart%>
-

If you would like to start the QuickStart configuration process over please click the above. WARNING: The quickstart process allows modification of this device by non-administrative users when it is active. Please make sure that you only restart the quickstart when you have time to finish the entire process.

+

<%:If you would like to start the QuickStart configuration process over please click the above. WARNING: The quickstart process allows modification of this device by non-administrative users when it is active. Please make sure that you only restart the quickstart when you have time to finish the entire process.%>

<%+footer%> From 47a10c2c7498313567240fb83f80bbfcb19531ea Mon Sep 17 00:00:00 2001 From: Seamus Tuohy Date: Thu, 29 Aug 2013 12:21:31 -0400 Subject: [PATCH 2/2] removed old luci i18n standard translation text --- usr/lib/lua/luci/controller/QS/QS.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/usr/lib/lua/luci/controller/QS/QS.lua b/usr/lib/lua/luci/controller/QS/QS.lua index f5d93f4..02d625f 100644 --- a/usr/lib/lua/luci/controller/QS/QS.lua +++ b/usr/lib/lua/luci/controller/QS/QS.lua @@ -6,14 +6,12 @@ require "luci.controller.QS.modules" function index() local uci = luci.model.uci.cursor() - luci.i18n.loadc("admin-core") - local i18n = luci.i18n.translate if uci:get('quickstart', 'options', 'complete') ~= 'true' then - entry({"QuickStart"}, call("main"), "Quick Start", i18n("commotionquickstart")).dependent=false + entry({"QuickStart"}, call("main"), "Quick Start").dependent=false entry({"QuickStart", "CertificateHelp"}, template("QS/module/cert")) end - entry({"admin", "commotion", "quickstart"}, call("resetQS"), "Restart Quickstart", i18n("commotionquickstart"), 50) + entry({"admin", "commotion", "quickstart"}, call("resetQS"), "Restart Quickstart", 50) end