Bug 10871: Make confirmation message for deleting news translatable
authorKatrin Fischer <Katrin.Fischer.83@web.de>
Tue, 10 Sep 2013 19:10:28 +0000 (21:10 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Sat, 21 Sep 2013 17:34:34 +0000 (17:34 +0000)
To test:
- Create a news entry in tools > news
- Delete the news entry or multiple entries by selecting them
  using the checkboxes to the left and the delete button at the
  bottom of the page.

Verify confirmation message shows up correctly with patch applied.

Bonus:
- Update one of the po files and make sure the new strings shows up
  there.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt

index cc8604d..b92f63a 100644 (file)
@@ -23,6 +23,8 @@
 [% END %]
 <script language="javascript" type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce.js"></script>
 <script type="text/javascript">//<![CDATA[
+var MSG_CONFIRM_DELETE_NEWS  = _("Are you sure you want to delete the selected news?");
+
 tinyMCE.init({
     mode : "textareas",
     theme : "advanced",
@@ -130,7 +132,7 @@ Edit News Item[% ELSE %]Add News Item[% END %][% ELSE %]News[% END %]</div>
         </form>
         </div>
         [% IF ( opac_news_count ) %]
-        <form name="del_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" onsubmit="return confirm('Are you sure you want to delete the selected news?')">
+        <form name="del_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" onsubmit='return confirm(MSG_CONFIRM_DELETE_NEWS)'>
                 <table id="newst">
                    <thead> <tr>
                         <th>&nbsp;</th>