Bugzilla – Attachment 25994 Details for
Bug 11703
Convert checkouts table to ajax datatable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11703 [QA Followup 6] - Move strings to an include file for translation purposes
Bug-11703-QA-Followup-6---Move-strings-to-an-inclu.patch (text/plain), 13.16 KB, created by
Kyle M Hall (khall)
on 2014-03-10 12:26:35 UTC
(
hide
)
Description:
Bug 11703 [QA Followup 6] - Move strings to an include file for translation purposes
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-03-10 12:26:35 UTC
Size:
13.16 KB
patch
obsolete
>From f71f60f88d4ea8bc140c3623692de68a3da9f5cb Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 14 Feb 2014 13:30:30 -0500 >Subject: [PATCH] Bug 11703 [QA Followup 6] - Move strings to an include file for translation purposes > >--- > .../intranet-tmpl/prog/en/includes/strings.inc | 30 +++++++++++++++ > koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js | 40 ++++++++++---------- > koha-tmpl/intranet-tmpl/prog/en/js/holds.js | 18 ++++---- > .../prog/en/modules/circ/circulation.tt | 1 + > .../prog/en/modules/members/moremember.tt | 6 ++- > 5 files changed, 64 insertions(+), 31 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc >new file mode 100644 >index 0000000..e22810a >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc >@@ -0,0 +1,30 @@ >+<script type="text/javascript"> >+//<![CDATA[ >+ var CIRCULATION_RETURNED = _("Returned"); >+ var CIRCULATION_NOT_RETURNED = _("Unable to return"); >+ var CIRCULATION_RENEWED_DUE = _("Renewed, due:"); >+ var CIRCULATION_RENEW_FAILED = _("Renew failed:") >+ var NOT_CHECKED_OUT = _("not checked out"); >+ var TOO_MANY_RENEWALS = _("too many renewals"); >+ var ON_RESERVE = _("on reserve"); >+ var REASON_UNKNOWN = _("reason unkown"); >+ var TODAYS_CHECKOUTS = _("Today's checkouts"); >+ var PREVIOUS_CHECKOUTS = _("Previous checkouts"); >+ var BY = _("by"); >+ var ON_HOLD = _("On hold"); >+ var NOT_RENEWABLE = _("Not renewable"); >+ var OF = _("of"); >+ var RENEWALS_REMAINING = _("renewals remaining"); >+ var HOLD_IS = _("Hold is"); >+ var SUSPENDED = _("suspended"); >+ var UNTIL = _("until"); >+ var ITEM_IS = _("Item is"); >+ var WAITING = _("waiting"); >+ var AT = _("at"); >+ var IN_TRANSIT = _("in transit"); >+ var FROM = _("from"); >+ var NOT_TRANSFERRED_YET = _("Item hasn't been transferred yet from"); >+ var NO = _("No"); >+ var YES = _("Yes"); >+//]]> >+</script> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >index a1a0b76..0e06818 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >@@ -60,9 +60,9 @@ $(document).ready(function() { > > content = ""; > if ( data.returned ) { >- content = _("Returned"); >+ content = CIRCULATION_RETURNED; > } else { >- content = _("Unable to return"); >+ content = CIRCULATION_NOT_RETURNED; > } > > $(id).replaceWith( content ); >@@ -89,19 +89,19 @@ $(document).ready(function() { > > var content = ""; > if ( data.renew_okay ) { >- content = _("Renewed, due: ") + data.date_due; >+ content = CIRCULATION_RENEWED_DUE + " " + data.date_due; > } else { >- content = _("Renew failed: "); >+ content = CIRCULATION_RENEW_FAILED + " "; > if ( data.error == "no_checkout" ) { >- content += _("not checked out"); >+ content += NOT_CHECKED_OUT; > } else if ( data.error == "too_many" ) { >- content += _("too many renewals"); >+ content += TOO_MANY_RENEWALS; > } else if ( data.error == "on_reserve" ) { >- content += _("on reserve"); >+ content += ON_RESERVE; > } else if ( data.error ) { > content += data.error; > } else { >- content += _("reason unknown"); >+ content += REASON_UNKNOWN; > } > } > >@@ -133,9 +133,9 @@ $(document).ready(function() { > { > "mDataProp": function( oObj ) { > if ( $.datepicker.formatDate('yy-mm-dd', new Date(oObj.issuedate) ) == ymd ) { >- return "<strong>" + _("Today's checkouts") + "</strong>"; >+ return "<strong>" + TODAYS_CHECKOUTS + "</strong>"; > } else { >- return "<strong>" + _("Previous checkouts") + "</strong>"; >+ return "<strong>" + PREVIOUS_CHECKOUTS + "</strong>"; > } > } > }, >@@ -164,7 +164,7 @@ $(document).ready(function() { > title += "</a>"; > > if ( oObj.author ) { >- title += " " + _("by") + " " + oObj.author; >+ title += " " + BY + " " + oObj.author; > } > > if ( oObj.itemnotes ) { >@@ -215,14 +215,14 @@ $(document).ready(function() { > // Do nothing > } else if ( oObj.can_renew_error == "on_reserve" ) { > content += "<span class='renewals-disabled'>" >- + "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + _("On hold") + "</a>" >+ + "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + ON_HOLD + "</a>" > + "</span>"; > > span_style = "display: none"; > span_class = "renewals-allowed"; > } else if ( oObj.can_renew_error == "too_many" ) { > content += "<span class='renewals-disabled'>" >- + _("Not renewable") >+ + NOT_RENEWABLE > + "</span>"; > > span_style = "display: none"; >@@ -241,11 +241,11 @@ $(document).ready(function() { > + "</span>"; > > if ( oObj.renewals_remaining ) { >- content += "<span class='renewals'>(" >- + oObj.renewals_remaining >- + " " + _("of") + " " >- + oObj.renewals_allowed + " " >- + _("renewals remaining") + ")</span>" >+ content += "<span class='renewals'>(" >+ + oObj.renewals_remaining >+ + " " + OF + " " >+ + oObj.renewals_allowed + " " >+ + RENEWALS_REMAINING + ")</span>"; > } > > >@@ -256,7 +256,7 @@ $(document).ready(function() { > "bSortable": false, > "mDataProp": function ( oObj ) { > if ( oObj.can_renew_error == "on_reserve" ) { >- return "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + _("On hold") + "</a>"; >+ return "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + ON_HOLD + "</a>"; > } else { > return "<input type='checkbox' class='checkin' id='checkin_" + oObj.itemnumber + "' name='checkin' value='" + oObj.itemnumber +"'></input>"; > } >@@ -353,7 +353,7 @@ $(document).ready(function() { > title += "</a>"; > > if ( oObj.author ) { >- title += " " + _("by") + " " + oObj.author; >+ title += " " + BY + " " + oObj.author; > } > > if ( oObj.itemnotes ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/holds.js b/koha-tmpl/intranet-tmpl/prog/en/js/holds.js >index d1d5a11..26f7efc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/holds.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/holds.js >@@ -23,7 +23,7 @@ $(document).ready(function() { > title += "</a>"; > > if ( oObj.author ) { >- title += " " + _("by") + " " + oObj.author; >+ title += " " + BY + " " + oObj.author; > } > > if ( oObj.itemnotes ) { >@@ -58,9 +58,9 @@ $(document).ready(function() { > var data = ""; > > if ( oObj.suspend == 1 ) { >- data += "<p>" + _("Hold is") + " <strong> " + _("suspended") + " </strong>"; >+ data += "<p>" + HOLD_IS + " <strong> " + SUSPENDED + " </strong>"; > if ( oObj.suspend_until ) { >- data += " " + _("until") + " " + oObj.suspend_until_formatted; >+ data += " " + UNTIL + " " + oObj.suspend_until_formatted; > } > data += "</p>"; > } >@@ -68,15 +68,15 @@ $(document).ready(function() { > if ( oObj.barcode ) { > data += "<em>"; > if ( oObj.found == "W" ) { >- data += _("Item is") + " <strong> " + _("waiting") + " </strong>"; >+ data += ITEM_IS + " <strong> " + WAITING + " </strong>"; > > if ( ! oObj.waiting_here ) { >- data += " " + _("at") + " " + oObj.waiting_at; >+ data += " " + AT + " " + oObj.waiting_at; > } > } else if ( oObj.transferred ) { >- data += _("Item is") + " <strong> " + _("in transit") + " </strong> " + _("from") + oObj.from_branch; >+ data += ITEM_IS + " <strong> " + IN_TRANSIT + " </strong> " + FROM + oObj.from_branch; > } else if ( oObj.not_transferred ) { >- data += _("Item hasn't been transferred yet from") + " " + oObj.not_transferred_by; >+ data += NOT_TRANSFERRED_YET + " " + oObj.not_transferred_by; > } data += "</em>"; > > data += " <a href='/cgi-bin/koha/catalogue/detail.pl?biblionumber=" >@@ -99,8 +99,8 @@ $(document).ready(function() { > { > "mDataProp": function( oObj ) { > return "<select name='rank-request'>" >- + "<option value='n'>" + _("No") + "</option>" >- + "<option value='del'>" + _("Yes") + "</option>" >+ + "<option value='n'>" + NO + "</option>" >+ + "<option value='del'>" + YES + "</option>" > + "</select>" > + "<input type='hidden' name='biblionumber' value='" + oObj.biblionumber + "'>" > + "<input type='hidden' name='borrowernumber' value='" + borrowernumber + "'>" >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index fa7ce74..7c9b1f7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -16,6 +16,7 @@ > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> > <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script> > [% INCLUDE 'datatables-strings.inc' %] >+[% INCLUDE 'strings.inc' %] > <!-- <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script> --> > <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> > <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index 7cb3545..f70e403 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -9,8 +9,10 @@ > </title> > [% INCLUDE 'doc-head-close.inc' %] > [% INCLUDE 'calendar.inc' %] >-<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> >-[% INCLUDE 'datatables.inc' %] >+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/en/css/datatables.css" /> >+<script type="text/javascript" src="[% interface %]/[% theme %]/en/lib/jquery/plugins/jquery.dataTables.min.js"></script> >+[% INCLUDE 'datatables-strings.inc' %] >+[% INCLUDE 'strings.inc' %] > <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> > <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery-ui-timepicker-addon.js"></script> > [% INCLUDE 'timepicker.inc' %] >-- >1.7.2.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 11703
:
25105
|
25110
|
25111
|
25213
|
25217
|
25218
|
25220
|
25221
|
25261
|
25262
|
25263
|
25264
|
25271
|
25272
|
25289
|
25290
|
25292
|
25390
|
25391
|
25986
|
25987
|
25988
|
25989
|
25990
|
25991
|
25992
|
25993
|
25994
|
25995
|
25996
|
25997
|
25998
|
25999
|
26081
|
26085
|
26115
|
26131
|
26158
|
26160
|
26241
|
26986
|
26990
|
26991
|
27102
|
27241
|
27338
|
27339
|
27340
|
27341
|
27342
|
27349
|
27350
|
27353
|
27354
|
27356
|
27548
|
27610
|
27717
|
27718
|
27745
|
27746
|
27750
|
27751
|
28025
|
28026
|
28027
|
28028
|
28029
|
29195
|
29196
|
29197
|
29198
|
29199
|
29279
|
29280
|
29281
|
29282
|
29283
|
29284
|
29419
|
29420
|
29432
|
29433
|
29434
|
29438
|
29439
|
29440
|
29444
|
29445
|
29446
|
29447
|
29448
|
29449
|
29450
|
29451
|
29452
|
29453
|
29454
|
29472
|
29473
|
29474
|
29475
|
29476
|
29477
|
29478
|
29479
|
29480
|
29493
|
30228