From 38707e21e13b7940e9d98b8e16ac4cc17a885c54 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch>
Date: Sun, 27 Jul 2014 14:02:02 +0200
Subject: [PATCH] [Follow-up] Wording of link text and translatability inside
 JavaScript

This patch changes 'Select all frameworks' to 'Select all sample data' and exposes it to translation through function _().

To test:
Apply first patch.
See "Select all frameworks" on Webinstaller > Step3
Apply second patch
Text changes to "Select all sample data"
Check translation
Check for JavaScript errors

http://bugs.koha-community.org/show_bug.cgi?id=12658
---
 .../intranet-tmpl/prog/en/includes/installer-doc-head-close.inc  |    6 ++++++
 koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt       |    3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc
index 122a06c..bf95879 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc
@@ -68,5 +68,11 @@ td input { font-size: 1.5em; }
 }
 
 </style>
+
+<script type="text/javascript">
+    //<![CDATA[
+        function _(s) { return s } // dummy function for gettext
+    //]]>
+</script>
 </head>
 <body>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt
index 8eee0a3..3ae276f 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt
@@ -89,7 +89,8 @@
 [% IF ( selectframeworks ) %]
     <h2 align="center">Selecting Default Settings</h2>
     <script type="text/javascript">
-        document.write('<p><a href="#" onclick="return selectAllFrameworks();">Select all frameworks</a></p>');
+        var linklabel = _("Select all sample data");
+        document.write('<p><a href="#" onclick="return selectAllFrameworks();">'+linklabel+'</a></p>');
     </script>
     <form name="frameworkselection" method="post" action="install.pl">
     <input type="hidden" name="step" value="3" />
-- 
1.7.10.4