Bug 9323 [Counter-proposal] Untranslatable string in serials search origin/new/bug_9323
authorOwen Leonard <oleonard@myacpl.org>
Thu, 27 Dec 2012 15:14:26 +0000 (10:14 -0500)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Tue, 12 Feb 2013 13:44:54 +0000 (08:44 -0500)
The translator seems to have a problem with the _() function inside
HTML. Rather than move only the translatable string to the <script>
block, why not move all of the JavaScript to the <script> tag? This
keeps things a little more organized and lets us follow the guideline to
always use double quotes with _().

Same test plan as Jonathan's patch:

- translate update LANG
- Check in your po file that the string "Are you sure you want to
  reopen this subscription?" does not exist.
- Apply the patch
- translate update LANG
- Check in your po file that the string is translatable

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
String is now translatable.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt

index cc25c68..0c937bf 100644 (file)
@@ -31,7 +31,9 @@
     csrlt.fnAddFilters("filter", 750);
 
     $('#serialstabs').tabs();
-
+    $("#reopensub").click(function(){
+      return confirm(_("Are you sure you want to reopen this subscription?"));
+    });
  });
  //]]>
 </script>
                         </td>
                         <td>
                           [% UNLESS subscription.cannotedit %]
-                            <a href="/cgi-bin/koha/serials/serials-search.pl?subscriptionid=[% subscription.subscriptionid %]&amp;op=reopen&routing=[% subscription.routing %]&amp;searched=1&amp;title_filter=[% title_filter %]&amp;ISSN_filter=[% ISSN_filter %]&amp;EAN_filter=[% EAN_filter %]&amp;published_filter=[% publisher_filter %]&amp;bookseller_filter=[% bookseller_filter %]&amp;branch_filter=[% branch_filter %]" onclick="return confirm(_('Are you sure you want to reopen this subscription?'));">Reopen</a>
+                            <a href="/cgi-bin/koha/serials/serials-search.pl?subscriptionid=[% subscription.subscriptionid %]&amp;op=reopen&amp;routing=[% subscription.routing %]&amp;searched=1&amp;title_filter=[% title_filter %]&amp;ISSN_filter=[% ISSN_filter %]&amp;EAN_filter=[% EAN_filter %]&amp;published_filter=[% publisher_filter %]&amp;bookseller_filter=[% bookseller_filter %]&amp;branch_filter=[% branch_filter %]" id="reopensub">Reopen</a>
                           [% ELSE %]
                             Cannot edit
                           [% END %]