Bug 34035: Move translatable strings out of opac-bottom.inc: Tags
authorOwen Leonard <oleonard@myacpl.org>
Fri, 16 Jun 2023 13:39:40 +0000 (13:39 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 9 Oct 2023 14:41:17 +0000 (11:41 -0300)
commite2269c2b88fb3ac947128d95af67b5ff84cdb847
tree7f4299fc2b5cc14d84bf7c6d2f9526c1eb5c81e3
parent7b976cd7fe1b1f417dcd9ed86efbdbf406ed5626
Bug 34035: Move translatable strings out of opac-bottom.inc: Tags

This patch removes the definition of JS variables in opac-bottom.inc
related to the tags feature. These strings can be wrapped in the __()
function inside tags.js and they'll get picked up for translation.

Some other tags-related JS variable definitions are removed from
templates in favor of embedding them directly in the <script> block.

To test you must have TagsEnabled set to "Allow." Apply the patch and
log in to the OPAC.

- Perform a catalog search and select some items in the result list.
  - Add the items to the cart and open the cart.
    - Check a box next to one of the titles in the cart.
    - Click the "Tag" link
    - Submit the "New tag" form without entering a tag. You should see
      "No tag was specified."
    - Perform the same test on the search results page both using the
      checkboxes and by clicking the "Add tag" link on an individual
      result.
  - Perform the same test on the bibliographic detail page.
  - When adding tags from the cart, result list, or detail page, confirm
    that the "Tags added: X" message is always displayed.
  - Test adding a tag to a title which is already attached to that
    title.
  - Test adding HTML markup, e.g. "<script>"
  - Test adding HTML markup and plain text, e.g. "<script>Foo"

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/en/modules/opac-basket.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
koha-tmpl/opac-tmpl/bootstrap/js/tags.js