[Bug 25351] New: Move cart-related strings out of opac-bottom.inc and into basket.js
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25351 Bug ID: 25351 Summary: Move cart-related strings out of opac-bottom.inc and into basket.js Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org CC: testopia@bugs.koha-community.org Depends on: 21156 Cart-related strings which were put in opac-bottom.inc for translation purposes can now be wrapped in the new translation function and put in basket.js Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21156 [Bug 21156] Internationalization: plural forms, context, and more for JS files -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25351 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25351 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 106012 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106012&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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25351 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Needs Signoff |Signed Off --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Tested with es-ES and works like a charm. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25351 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106012|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25351 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 107170 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107170&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@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25351 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25351 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #107170|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@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@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25351 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25351 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25351 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.11.00 |20.11.00, 20.05.03 released in| | CC| |lucas@bywatersolutions.com Status|Pushed to master |Pushed to stable --- Comment #6 from Lucas Gass <lucas@bywatersolutions.com> --- This enhancement improves translatability so I am choosing to backport this to 20.05.x for 20.05.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25351 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|20.11.00, 20.05.03 |20.11.00, 20.05.03, released in| |19.11.09 CC| |aleisha@catalyst.net.nz --- Comment #7 from Aleisha Amohia <aleisha@catalyst.net.nz> --- backported to 19.11.x for 19.11.09 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25351 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net --- Comment #8 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (19.05.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25351 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |26719 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26719 [Bug 26719] Replace MSG_NO_RECORD_SELECTED with translatable string -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25351 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr Component|Templates |I18N/L10N Assignee|oleonard@myacpl.org |koha-bugs@lists.koha-commun | |ity.org -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org