Bug 34026: Move translatable cover-handling strings out of opac-bottom.inc
authorOwen Leonard <oleonard@myacpl.org>
Thu, 15 Jun 2023 18:56:25 +0000 (18:56 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 9 Oct 2023 14:41:14 +0000 (11:41 -0300)
commit85a4779f9a308b5cd8dcde123230d001907a2c10
tree9728f048069f2914a4df7d5e2456b7584aaaed09
parent49e52c3105de71c68ef6e569553ac3bfa133217a
Bug 34026: Move translatable cover-handling strings out of opac-bottom.inc

This patch removes several instances from opac-bottom.inc where we
define strings for translation and use in separate JavaScript files. The
JavaScript files are updated to use the __() function to mark strings
for translation.

Note: Definition of the variable NO_COCE_JACKET is removed because it is
unused.

To test, apply the patch and clear your browser cache if necessary.

- In the staff interface, enable OPAC cover image services:
  - OPACAmazonCoverImages
  - BakerTaylorEnabled
  - GoogleJackets
  - OpenLibraryCovers

- In the OPAC, perform a search and confirm that there are no JS errors
  on the search results page related to cover images.
- Check the bibliographic detail page as well.

To confirm that the strings are being picked up for translation, run the
update process for another language, e.g.

perl misc/translator/translate update fr-FR

Then check the newly-built po file: fr-FR-messages-js.po. It should
list the updated files:

 koha-tmpl/opac-tmpl/bootstrap/js/amazonimages.js:8
 koha-tmpl/opac-tmpl/bootstrap/js/amazonimages.js:10
 koha-tmpl/opac-tmpl/bootstrap/js/bakertaylorimages.js:7
 koha-tmpl/opac-tmpl/bootstrap/js/google-jackets.js:77
 koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js:63

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>
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc
koha-tmpl/opac-tmpl/bootstrap/js/amazonimages.js
koha-tmpl/opac-tmpl/bootstrap/js/bakertaylorimages.js
koha-tmpl/opac-tmpl/bootstrap/js/google-jackets.js
koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js