[Koha-patches] [PATCH] Bug 9323 [Counter-proposal] Untranslatable string in serials search
Owen Leonard
oleonard at myacpl.org
Thu Dec 27 16:48:10 CET 2012
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
---
.../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 558f988..d80f91c 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
@@ -27,7 +27,9 @@
csrlt.fnAddFilters("filter", 750);
$('#serialstabs').tabs();
-
+ $("#reopensub").click(function(){
+ return confirm(_("Are you sure you want to reopen this subscription?"));
+ });
});
//]]>
</script>
@@ -233,7 +235,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
More information about the Koha-patches
mailing list