Bug 34031: Move various translatable strings out of opac-bottom.inc
This patch moves some JS variable definitions out of opac-bottom.inc. These variables where defined so that they could be picked up for translation, but they can now be moved to the corresponding <script> blocks. Many other of these variables are not used at all and have been removed. To test you should have EnableOpacSearchHistory, OPACPrivacy, and opacreadinghistory enabled. Apply the patch and log into the OPAC as a user with suggestions, search history, and checkout history. - Click your user menu at the top of the page and click the "Clear" link for search history. You should see a confirmation, "Are you sure you want to delete your search history?" Confirming should trigger your search history deletion. - From your user summary page, click "Privacy." Under "Immediate deletion," clicking any of the delete buttons should trigger a confirmation, "Warning: Cannot be undone. Please confirm once again" - From your user summary page, click "Purchase suggestions." - Without checking any checkbox, click the "Delete selected" button at the bottom. You should see an alert, "No suggestion was selected." Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
f2db5f846d
commit
b25cd57592
3 changed files with 4 additions and 26 deletions
|
@ -147,33 +147,10 @@
|
|||
[% END %]
|
||||
|
||||
<script>
|
||||
|
||||
var MSG_CONFIRM_AGAIN = _("Warning: Cannot be undone. Please confirm once again")
|
||||
var MSG_DELETE_SEARCH_HISTORY = _("Are you sure you want to delete your search history?");
|
||||
var MSG_NO_SUGGESTION_SELECTED = _("No suggestion was selected");
|
||||
var MSG_SEARCHING = _("Searching %s...");
|
||||
var MSG_ERROR_SEARCHING_COLLECTION = _("Error searching %s collection");
|
||||
var MSG_NO_RESULTS_FOUND_IN_COLLECTION = _("No results found in the library's %s collection");
|
||||
var MSG_RESULTS_FOUND_IN_COLLECTION = _("Found %s results in the library's %s collection");
|
||||
var MSG_BY = _("by");
|
||||
var MSG_TYPE = _("Type");
|
||||
var MSG_NEXT = _("Next");
|
||||
var MSG_PREVIOUS = _("Previous");
|
||||
var MSG_CHECKOUTS = _("Checkouts");
|
||||
var MSG_NO_CHECKOUTS = _("No checkouts");
|
||||
var MSG_CHECK_OUT = _("Check out");
|
||||
var MSG_CHECK_OUT_CONFIRM = _("Are you sure you want to check out this item?");
|
||||
var MSG_CHECKED_OUT_UNTIL = _("Checked out until %s");
|
||||
var MSG_CHECK_IN = _("Check in");
|
||||
var MSG_CHECK_IN_CONFIRM = _("Are you sure you want to return this item?");
|
||||
var MSG_NO_CHECKOUTS = _("No checkouts");
|
||||
var MSG_DOWNLOAD = _("Download");
|
||||
var MSG_HOLDS = _("Holds");
|
||||
var MSG_NO_HOLDS = _("No holds");
|
||||
var MSG_PLACE_HOLD = _("Place hold");
|
||||
var MSG_CANCEL_HOLD = _("Cancel");
|
||||
var MSG_CANCEL_HOLD_CONFIRM = _("Are you sure you want to cancel this hold?");
|
||||
var MSG_ON_HOLD = _("On hold");
|
||||
|
||||
[% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) %]
|
||||
var MSG_TAGS_DISABLED = _("Sorry, tags are not enabled on this system.");
|
||||
|
@ -221,7 +198,7 @@
|
|||
delSingleRecord( biblionumber );
|
||||
});
|
||||
$(".clearsh").on("click", function(){
|
||||
return confirmDelete(MSG_DELETE_SEARCH_HISTORY);
|
||||
return confirmDelete( _("Are you sure you want to delete your search history?") );
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
@ -614,7 +614,7 @@
|
|||
var no_label;
|
||||
var message = "";
|
||||
if ( selected_titles.size() < 1 ) {
|
||||
alert(MSG_NO_SUGGESTION_SELECTED);
|
||||
alert( _("No suggestion was selected") );
|
||||
return false;
|
||||
} else {
|
||||
if( selected_titles.size() > 1 ){
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* global __ confirmDelete */
|
||||
$(document).ready(function(){
|
||||
$('.privacy-confirm-delete').on('click',function(){
|
||||
return confirmDelete(MSG_CONFIRM_AGAIN);
|
||||
return confirmDelete( __("Warning: Cannot be undone. Please confirm once again") );
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue