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
Confirmed on our 20.05
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.
Created attachment 112028 [details] [review] 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.
Created attachment 112387 [details] [review] 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>
Created attachment 112431 [details] [review] 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>
Pushed to master for 20.11, thanks to everybody involved!
does not apply cleanly to 20.05.x, no backport please rebase if needed