Bugzilla – Attachment 155205 Details for
Bug 34031
Move various translatable strings out of opac-bottom.inc
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34031: Move various translatable strings out of opac-bottom.inc
Bug-34031-Move-various-translatable-strings-out-of.patch (text/plain), 7.27 KB, created by
David Nind
on 2023-09-04 22:10:15 UTC
(
hide
)
Description:
Bug 34031: Move various translatable strings out of opac-bottom.inc
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-09-04 22:10:15 UTC
Size:
7.27 KB
patch
obsolete
>From 7b5ff04dac71d0be808faf9c75edf0195cf7a810 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 16 Jun 2023 11:36:10 +0000 >Subject: [PATCH] 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> >--- > .../bootstrap/en/includes/opac-bottom.inc | 25 +------------------ > .../bootstrap/en/modules/opac-privacy.tt | 6 ++--- > .../bootstrap/en/modules/opac-suggestions.tt | 2 +- > 3 files changed, 5 insertions(+), 28 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >index fd492139af..855d564595 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >@@ -136,33 +136,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."); >@@ -210,7 +187,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> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt >index 1d3c155f08..f338b51ea2 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt >@@ -175,7 +175,7 @@ > <td colspan=7>Immediately delete my checkout history. This action cannot be undone.</td> > <td colspan=1> > <fieldset class="action"> >- <input type="submit" value="Delete checkout history" form="opac-privacy-delete-checkouts" class="btn btn-danger btn-block" onclick="return confirmDelete(MSG_CONFIRM_AGAIN);" /> >+ <input type="submit" value="Delete checkout history" form="opac-privacy-delete-checkouts" class="btn btn-danger btn-block" onclick='return confirmDelete(_("Warning: Cannot be undone. Please confirm once again"));' /> > </fieldset> > </td> > </tr> >@@ -183,7 +183,7 @@ > <td colspan=7>Immediately delete my hold history. This action cannot be undone.</td> > <td colspan=1> > <fieldset class="action"> >- <input type="submit" value="Delete hold history" form="opac-privacy-delete-holds" class="btn btn-danger btn-block" onclick="return confirmDelete(MSG_CONFIRM_AGAIN);" /> >+ <input type="submit" value="Delete hold history" form="opac-privacy-delete-holds" class="btn btn-danger btn-block" onclick='return confirmDelete(_("Warning: Cannot be undone. Please confirm once again"));' /> > </fieldset> > </td> > </tr> >@@ -191,7 +191,7 @@ > <td colspan=7>Immediately delete my checkout history & my hold history. This action cannot be undone.</td> > <td colspan=1> > <fieldset class="action"> >- <input type="submit" value="Delete checkout and hold history" form="opac-privacy-delete-all" class="btn btn-danger btn-block" onclick="return confirmDelete(MSG_CONFIRM_AGAIN);" /> >+ <input type="submit" value="Delete checkout and hold history" form="opac-privacy-delete-all" class="btn btn-danger btn-block" onclick='return confirmDelete(_("Warning: Cannot be undone. Please confirm once again"));' /> > </fieldset> > </td> > </tr> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >index c2d21651a6..2e3719cb68 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >@@ -603,7 +603,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 ){ >-- >2.30.2
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 34031
:
152402
|
155205
|
155896
|
156708