From f0f10a877986f8a19b23ed505ab809eb5498ef3a Mon Sep 17 00:00:00 2001 From: Kyle M Hall 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 | 34 ++++++++++---------- koha-tmpl/intranet-tmpl/prog/en/js/holds.js | 18 +++++----- .../prog/en/modules/circ/circulation.tt | 1 + .../prog/en/modules/members/moremember.tt | 1 + 5 files changed, 58 insertions(+), 26 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 @@ + diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js index 033c5b3..0aa998f 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 "" + _("Today's checkouts") + ""; + return "" + TODAYS_CHECKOUTS + ""; } else { - return "" + _("Previous checkouts") + ""; + return "" + PREVIOUS_CHECKOUTS + ""; } } }, @@ -164,7 +164,7 @@ $(document).ready(function() { title += ""; 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 += "" - + "" + _("On hold") + "" + + "" + ON_HOLD + "" + ""; span_style = "display: none"; span_class = "renewals-allowed"; } else if ( oObj.can_renew_error == "too_many" ) { content += "" - + _("Not renewable") + + NOT_RENEWABLE + ""; span_style = "display: none"; @@ -243,9 +243,9 @@ $(document).ready(function() { if ( oObj.renewals_remaining ) { content += "(" + oObj.renewals_remaining - + " " + _("of") + " " + + " " + OF + " " + oObj.renewals_allowed + " " - + _("renewals remaining") + ")" + + RENEWALS_REMAINING + ")" } @@ -256,7 +256,7 @@ $(document).ready(function() { "bSortable": false, "mDataProp": function ( oObj ) { if ( oObj.can_renew_error == "on_reserve" ) { - return "" + _("On hold") + ""; + return "" + ON_HOLD + ""; } else { return ""; } @@ -353,7 +353,7 @@ $(document).ready(function() { title += ""; 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 6d4f273..e53d9d6 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 += ""; 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 += "

" + _("Hold is") + " " + _("suspended") + " "; + data += "

" + HOLD_IS + " " + SUSPENDED + " "; if ( oObj.suspend_until ) { - data += " " + _("until") + " " + oObj.suspend_until_formatted; + data += " " + UNTIL + " " + oObj.suspend_until_formatted; } data += "

"; } @@ -68,15 +68,15 @@ $(document).ready(function() { if ( oObj.barcode ) { data += ""; if ( oObj.found == "W" ) { - data += _("Item is") + " " + _("waiting") + " "; + data += ITEM_IS + " " + WAITING + " "; if ( ! oObj.waiting_here ) { - data += " " + _("at") + " " + oObj.waiting_at; + data += " " + AT + " " + oObj.waiting_at; } } else if ( oObj.transferred ) { - data += _("Item is") + " " + _("in transit") + " " + _("from") + oObj.from_branch; + data += ITEM_IS + " " + IN_TRANSIT + " " + 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 += ""; data += " " - + "" - + "" + + "" + + "" + "" + "" + "" 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 75ed909..3f01612 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 @@ [% INCLUDE 'datatables-strings.inc' %] +[% INCLUDE 'strings.inc' %] 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 ebfd5dc..3539db2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -12,6 +12,7 @@ [% INCLUDE 'datatables-strings.inc' %] +[% INCLUDE 'strings.inc' %] -- 1.7.2.5