[Bug 26619] New: Shopping basket - The "Print" button is only translated when you are in "More details" mode
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26619 Bug ID: 26619 Summary: Shopping basket - The "Print" button is only translated when you are in "More details" mode Change sponsored?: --- Product: Koha Version: master Hardware: All OS: Linux Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: alexis.ripetti@inLibro.com QA Contact: testopia@bugs.koha-community.org When you are in the shopping basket, in OPAC, the button "Print" is only translated when you are in "More details" mode. To replicate: 1) Change the language, pick French for example 2) In OPAC, do a research 3) Click on "Add to cart" ("Ajouter au panier") under one of the results 4) Click on "Cart" ("Panier") at the top of the page 5) See that the "Print" button is not translated in French 6) Click on "More details" ("Plus de détails") 7) See that the "Print" button is now translated in French -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26619 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Shopping basket - The |Cart - The "Print" button |"Print" button is only |is only translated when you |translated when you are in |are in "More details" mode |"More details" mode | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26619 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Confirmed on our 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26619 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |oleonard@myacpl.org Severity|enhancement |minor --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I had a quick look, the print button for the more details view is in the template, the other seems to come from the datatables: koha-tmpl/intranet-tmpl/lib/datatables/datatables.min.js:0!==d.pathname.indexOf("/")&&(b+="/");return d.protocol+"//"+b+d.pathname+d.search};k.ext.buttons.print={className:"buttons-print",text:function(b){return b.i18n("buttons.print","Print")},action:function(b,a,d,g){b=a.buttons.exportData(c.extend({decodeEntities:!1},g.exportOptions));d=a.buttons.exportInfo(g);var k=a.columns(g.exportOptions.columns).flatten().map(function(b){return a.settings()[0].aoColumns[a.column(b).index()].sClass}).toArray(),m=function(b,a){for(var d="<tr>",c=0,e=b.length;c<e;c++)d+=... Adding Owen in hope he has an idea. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26619 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26619 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26619 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 112028 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112028&action=edit Bug 26619: Cart - The "Print" button is only translated when you are in "More details" mode This patch adds the "Print" string to datatables.js so that it can be picked up for translation. To test, apply the patch and add some items to the cart in the OPAC. - Open the cart. You should see a button labeled "Print." - The print button should work correctly. TESTING TRANSLATABILITY - Update a translation, e.g. fr-FR:
cd misc/translator perl translate update fr-FR
- Open the corresponding .po file for JavaScript strings, misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from koha-tmpl/opac-tmpl/bootstrap/js/datatables.js for translation: msgid "Print" msgstr "" - Edit the "msgstr" string however you want (it's just for testing). - Install the updated translation:
perl translate install fr-FR
- Switch to your newly translated language in the OPAC and repeat the test plan above. The translated strings should appear. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26619 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26619 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #112028|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 112387 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112387&action=edit Bug 26619: Cart - The "Print" button is only translated when you are in "More details" mode This patch adds the "Print" string to datatables.js so that it can be picked up for translation. To test, apply the patch and add some items to the cart in the OPAC. - Open the cart. You should see a button labeled "Print." - The print button should work correctly. TESTING TRANSLATABILITY - Update a translation, e.g. fr-FR:
cd misc/translator perl translate update fr-FR
- Open the corresponding .po file for JavaScript strings, misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from koha-tmpl/opac-tmpl/bootstrap/js/datatables.js for translation: msgid "Print" msgstr "" - Edit the "msgstr" string however you want (it's just for testing). - Install the updated translation:
perl translate install fr-FR
- Switch to your newly translated language in the OPAC and repeat the test plan above. The translated strings should appear. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26619 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26619 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=26619 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #112387|0 |1 is obsolete| | --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 112431 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112431&action=edit Bug 26619: Cart - The "Print" button is only translated when you are in "More details" mode This patch adds the "Print" string to datatables.js so that it can be picked up for translation. To test, apply the patch and add some items to the cart in the OPAC. - Open the cart. You should see a button labeled "Print." - The print button should work correctly. TESTING TRANSLATABILITY - Update a translation, e.g. fr-FR:
cd misc/translator perl translate update fr-FR
- Open the corresponding .po file for JavaScript strings, misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from koha-tmpl/opac-tmpl/bootstrap/js/datatables.js for translation: msgid "Print" msgstr "" - Edit the "msgstr" string however you want (it's just for testing). - Install the updated translation:
perl translate install fr-FR
- Switch to your newly translated language in the OPAC and repeat the test plan above. The translated strings should appear. Signed-off-by: David Nind <david@davidnind.com> 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=26619 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=26619 --- Comment #6 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=26619 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #7 from Lucas Gass <lucas@bywatersolutions.com> --- does not apply cleanly to 20.05.x, no backport please rebase if needed -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org