Summary: | Cart - The "Print" button is only translated when you are in "More details" mode | ||
---|---|---|---|
Product: | Koha | Reporter: | Alexis Ripetti <alexis.ripetti> |
Component: | OPAC | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Katrin Fischer <katrin.fischer> |
Severity: | minor | ||
Priority: | P5 - low | CC: | lucas, oleonard |
Version: | Main | ||
Hardware: | All | ||
OS: | Linux | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
20.11.00
|
|
Circulation function: | |||
Attachments: |
Bug 26619: Cart - The "Print" button is only translated when you are in "More details" mode
Bug 26619: Cart - The "Print" button is only translated when you are in "More details" mode Bug 26619: Cart - The "Print" button is only translated when you are in "More details" mode |
Description
Alexis Ripetti
2020-10-06 13:30:11 UTC
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 |