Bugzilla – Attachment 14862 Details for
Bug 9493
confirmations for user holds in opac are not translatable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Bug-9493-confirmations-for-user-holds-in-opac-are-no.patch (text/plain), 3.64 KB, created by
Fridolin Somers
on 2013-01-25 15:08:22 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2013-01-25 15:08:22 UTC
Size:
3.64 KB
patch
obsolete
>From 8b727a4d3eed9eff003234333294f3524d8016da Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Fri, 25 Jan 2013 16:03:05 +0100 >Subject: [PATCH] Bug 9493: confirmations for user holds in opac are not > translatable > >In opac-user.tt, javascript for user holds confirmations (cancel, suspend, resume) are not translatable. >This is because text is in onclick attribute, withtout javascript method for translatable strings : _(). > >This patch moves those strings as variables into script tag and sets them translatable. > >Test plan : >- set a hold for a user >- Go to OPAC user page "my summary" >- click on "Cancel" >=> you get a confirmation message >- click on "Suspend all holds" >=> you get a confirmation message >- click on "Resume all suspended holds" >=> you get a confirmation message >Test this is 'en' and another language. >--- > koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >index c28d84f..f9b7ba5 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >@@ -8,7 +8,10 @@ > <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> > <script type="text/JavaScript"> > //<![CDATA[ >-var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?"); >+var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?"); >+var MSG_CONFIRM_SUSPEND_HOLDS = _("Are you sure you want to suspend all holds?"); >+var MSG_CONFIRM_RESUME_HOLDS = _("Are you sure you want to resume all suspended holds?"); >+ > $.tablesorter.addParser({ > id: 'articles', > is: function(s) {return false; }, >@@ -410,7 +413,7 @@ $.tablesorter.addParser({ > <form action="/cgi-bin/koha/opac-modrequest.pl" method="post"> > <input type="hidden" name="biblionumber" value="[% RESERVE.biblionumber %]" /> > <input type="hidden" name="reservenumber" value="[% RESERVE.reservenumber %]" /> >- <input type="submit" name="submit" class="icon delete cancel" value="Cancel" onclick="return confirmDelete('Are you sure you want to cancel this hold?');" /></form> >+ <input type="submit" name="submit" class="icon delete cancel" value="Cancel" onclick="return confirmDelete(MSG_CONFIRM_DELETE_HOLD);" /></form> > [% ELSE %] > [% END %] > </td> >@@ -424,7 +427,7 @@ $.tablesorter.addParser({ > [% IF SuspendHoldsOpac %] > <div> > <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post"> >- <input type="submit" name="submit" class="icon delete cancel" value="Suspend all holds" onclick="return confirmDelete('Are you sure you want to suspend all holds?');" /> >+ <input type="submit" name="submit" class="icon delete cancel" value="Suspend all holds" onclick="return confirmDelete(MSG_CONFIRM_SUSPEND_HOLDS);" /> > <input type="hidden" name="suspend" value="1" /> > > [% IF AutoResumeSuspendedHolds %] >@@ -436,7 +439,7 @@ $.tablesorter.addParser({ > </div> > <div> > <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post"> >- <input type="submit" name="submit" class="icon delete cancel" value="Resume all suspended holds" onclick="return confirmDelete('Are you sure you want to resume all suspended holds?');" /> >+ <input type="submit" name="submit" class="icon delete cancel" value="Resume all suspended holds" onclick="return confirmDelete(MSG_CONFIRM_RESUME_HOLDS);" /> > <input type="hidden" name="suspend" value="0" /> > </form> > </div> >-- >1.7.9.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9493
:
14862
|
14890
|
15142