[Koha-bugs] [Bug 25351] Move cart-related strings out of opac-bottom.inc and into basket.js

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jul 29 23:27:50 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25351

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #107170|0                           |1
        is obsolete|                            |

--- Comment #4 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Created attachment 107537
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107537&action=edit
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 at theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list