]> git.koha-community.org Git - koha.git/commit
Bug 25351: Move cart-related strings out of opac-bottom.inc and into basket.js
authorOwen Leonard <oleonard@myacpl.org>
Thu, 18 Jun 2020 13:10:35 +0000 (13:10 +0000)
committerAleisha Amohia <aleishaamohia@hotmail.com>
Fri, 7 Aug 2020 02:06:48 +0000 (14:06 +1200)
commit5f209c6cb1ea4a35f7febb037c1a35f944484fc4
treed7737a68f60c7ffc070466e52721847a6cb53ae7
parent5dc432394112da175ed10e0454e75fd4d5ee1341
Bug 25351: Move cart-related strings out of opac-bottom.inc and into basket.js

This patch adds the necessary JavaScript includes to the OPAC to
enable translation of strings in JavaScript. It also updates the
translation of cart-related strings by removing the strings from
opac-bottom.inc and putting them in basket.js where they are used.

To test, apply the patch and test that the correct strings are
translatable. In this example I'm testing fr-FR:

 - Update a translation:

   > 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/basket.js for
   translation, e.g.:

   #: koha-tmpl/opac-tmpl/bootstrap/js/basket.js:89
   msgid "Your cart is currently empty"
   msgstr ""

 - Edit the "msgstr" string however you want (it's just for testing)
 - Install the updated translation:

   > perl translate install fr-FR

In the OPAC, switch to the language you're testing. Confirm that your
translated string appears. In the above example, by clicking the "Cart"
icon in the header when there are no items in the cart.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7c8276bf0e64a2dc90af4aab0d6e78893edc12b1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 46710cfc0018d7107a68a1e6da847262bfb2470c)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc
koha-tmpl/opac-tmpl/bootstrap/js/basket.js