@@ -, +, @@ - On the "Your summary" page, open the "OverDrive Account" tab. - Log in to your OverDrive account. - The contents of the tab should display correctly, with correct labels for controls like "Log out of your OverDrive account", "Check in", "On hold", etc. - Perform a catalog search which will return results also found in your OverDrive collection. - Open the OverDrive results page. - The page should display correctly, with correct labels on controls like "Check out" and "Place hold." - Update a translation: > gulp po:update > cd misc/translator > perl translate update fr-FR - Open the corresponding .po file for the strings pulled from JavaScript e.g. misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from bootstrap/js/overdrive.js for translation, e.g.: koha-tmpl/opac-tmpl/bootstrap/js/overdrive.js:124 msgid "OverDrive account page" msgstr "" - Edit the "msgstr" string however you want (it's just for testing) - Install the updated translation: > perl translate install fr-FR --- .../bootstrap/en/includes/opac-bottom.inc | 9 ----- koha-tmpl/opac-tmpl/bootstrap/js/overdrive.js | 38 +++++++++---------- 2 files changed, 19 insertions(+), 28 deletions(-) --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -196,15 +196,6 @@ $.widget.bridge('uitooltip', $.ui.tooltip); var MSG_MULTI_ADD_TAG_FAILED = _("Unable to add one or more tags."); var MSG_NO_TAG_SPECIFIED = _("No tag was specified."); [% END %] - [% IF ( Koha.Preference('OverDriveClientKey') && Koha.Preference('OverDriveClientSecret') ) %] - var MSG_OVERDRIVE_LOGIN = _("Log in to your OverDrive account"); - var MSG_OVERDRIVE_LINK = _( "OverDrive account page" ); - var MSG_OVERDRIVE_LOGOUT = _("Log out from your OverDrive account"); - var MSG_OVERDRIVE_CHECKEDOUT_UNTIL = _( "Checked out until: " ); - var MSG_OVERDRIVE_ACCESS_ONLINE = _("Access online"); - var MSG_OVERDRIVE_DOWNLOAD_AS = _( "Download as: " ); - var MSG_OVERDRIVE_CANNOT_CHECKOUT = _("Item cannot be checked out. There are no available formats"); - [% END %] [% IF OpenLibraryCovers || OpenLibrarySearch %] var NO_OL_JACKET = _("No cover image available"); [% END %] --- a/koha-tmpl/opac-tmpl/bootstrap/js/overdrive.js +++ a/koha-tmpl/opac-tmpl/bootstrap/js/overdrive.js @@ -1,4 +1,4 @@ -/* global MSG_OVERDRIVE_LOGIN MSG_OVERDRIVE_LINK MSG_OVERDRIVE_LOGOUT MSG_OVERDRIVE_CHECKEDOUT_UNTIL MSG_DOWNLOAD MSG_OVERDRIVE_ACCESS_ONLINE MSG_OVERDRIVE_DOWNLOAD_AS MSG_CHECK_IN MSG_CHECK_OUT MSG_CHECKOUTS MSG_HOLDS MSG_ON_HOLD MSG_PLACE_HOLD MSG_CANCEL_HOLD MSG_OVERDRIVE_CANNOT_CHECKOUT MSG_CANCEL_HOLD_CONFIRM MSG_CHECK_IN_CONFIRM MSG_CHECK_OUT_CONFIRM OD_password_required */ +/* global OD_password_required __ */ if ( typeof KOHA == "undefined" || !KOHA ) { var KOHA = {}; @@ -76,7 +76,7 @@ KOHA.OverDriveCirculation = new function() { if( OD_password_required ) { $("#overdrive-login").modal('show'); } else { login(""); } }) - .text( MSG_OVERDRIVE_LOGIN ); + .text( __("Log in to your OverDrive account") ); var login_div = $('
').append(login_link); @@ -121,7 +121,7 @@ KOHA.OverDriveCirculation = new function() { } var overdrive_link = $('') - .text( MSG_OVERDRIVE_LINK ); + .text( __( "OverDrive account page" ) ); $(container).append(overdrive_link); var logout_link = $('') @@ -131,12 +131,12 @@ KOHA.OverDriveCirculation = new function() { logout(function(data) { display_account(container, data); }); - }).text( MSG_OVERDRIVE_LOGOUT ); + }).text( __("Log out of your OverDrive account") ); $(container).append(logout_link); $(container).append('
'); if (data.checkouts) { - var checkouts_div = $('
').html('

' + MSG_CHECKOUTS + '

'); + var checkouts_div = $('
').html('

' + __("Checkouts") + '

'); var checkouts_list = $('