From fd29cef4f952be9aadb55a1e73ea0b203da051bf Mon Sep 17 00:00:00 2001 From: Owen Leonard <oleonard@myacpl.org> Date: Thu, 27 Dec 2012 10:14:26 -0500 Subject: [PATCH] Bug 9323 [Counter-proposal] Untranslatable string in serials search 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. --- .../prog/en/modules/serials/serials-search.tt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt index cc25c68..0c937bf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt @@ -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> @@ -237,7 +239,7 @@ </td> <td> [% UNLESS subscription.cannotedit %] - <a href="/cgi-bin/koha/serials/serials-search.pl?subscriptionid=[% subscription.subscriptionid %]&op=reopen&routing=[% subscription.routing %]&searched=1&title_filter=[% title_filter %]&ISSN_filter=[% ISSN_filter %]&EAN_filter=[% EAN_filter %]&published_filter=[% publisher_filter %]&bookseller_filter=[% bookseller_filter %]&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 %]&op=reopen&routing=[% subscription.routing %]&searched=1&title_filter=[% title_filter %]&ISSN_filter=[% ISSN_filter %]&EAN_filter=[% EAN_filter %]&published_filter=[% publisher_filter %]&bookseller_filter=[% bookseller_filter %]&branch_filter=[% branch_filter %]" id="reopensub">Reopen</a> [% ELSE %] Cannot edit [% END %] -- 1.7.9.5