[Bug 33983] New: Move translatable strings out of OPAC's datatables.inc into JavaScript
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33983 Bug ID: 33983 Summary: Move translatable strings out of OPAC's datatables.inc into JavaScript 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 Strings defined for translation in datatables.inc in the OPAC can should be wrapped in the new translation function inside datatables.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=33983 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=33983 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 152277 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152277&action=edit Bug 33983: Move translatable strings out of OPAC's datatables.inc into JavaScript This patch removes the definition of translatable strings out of the OPAC datatables.inc file and into datatables.js using the new JS i81n function. To test apply the patch and test DataTable-driven tables in the OPAC. Affected pages: - Cart - Bibliographic detail page - Place hold (with OPAC item level holds enabled in circulation rules) - Show more options -> - A specific item - Bibliographic detail page for a serial record -> - More details -> - Full history - Most popular - Self checkout - Logged in user -> - Charges - Curbside pickups - Messaging - Checkout history - Suggestions - Holds history - Tags - Recalls history - Search history - ILL requests DataTables functionality should be unaffected. Check that the strings defined for translation are still working. For instance the "Clear filter" label on user summary checkouts, or the "No matching records found" text displayed when you search a table for a string that doesn't exist. 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, in this case misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from koha-tmpl/intranet-tmpl/prog/js/members.js for translation, e.g.: msgid "Clear filter" - Edit the corresponding "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 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=33983 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I would add the PROCESS i18n in doc-head-close -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33983 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Jonathan Druart from comment #2)
I would add the PROCESS i18n in doc-head-close
In my experience this doesn't work. I love to know why not and whether there's an alternative to updating individual templates. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33983 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |34026 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34026 [Bug 34026] Move translatable cover-handling strings out of opac-bottom.inc -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33983 --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Actually I don't understand why you are adding the PROCESS to the different templates. __ is defined in js/i18n.js Here you don't remove/move lines that are using the I18N TT plugin. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33983 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #152277|0 |1 is obsolete| | --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 152419 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152419&action=edit Bug 33983: Move translatable strings out of OPAC's datatables.inc into JavaScript This patch removes the definition of translatable strings out of the OPAC datatables.inc file and into datatables.js using the new JS i81n function. To test apply the patch and test some DataTable-driven tables in the OPAC. A list of possible examples: - Cart - Bibliographic detail page - Place hold (with OPAC item level holds enabled in circulation rules) - Show more options -> - A specific item - Bibliographic detail page for a serial record -> - More details -> - Full history - Most popular - Self checkout - Logged in user -> - Charges - Curbside pickups - Messaging - Checkout history - Suggestions - Holds history - Tags - Recalls history - Search history - ILL requests DataTables functionality should be unaffected. Check that the strings defined for translation are still working. For instance the "Clear filter" label on user summary checkouts, or the "No matching records found" text displayed when you search a table for a string that doesn't exist. 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, in this case misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from koha-tmpl/intranet-tmpl/prog/js/members.js for translation, e.g.: msgid "Clear filter" - Edit the corresponding "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 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=33983 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=33983 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #152419|0 |1 is obsolete| | --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 156702 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156702&action=edit Bug 33983: Move translatable strings out of OPAC's datatables.inc into JavaScript This patch removes the definition of translatable strings out of the OPAC datatables.inc file and into datatables.js using the new JS i81n function. To test apply the patch and test some DataTable-driven tables in the OPAC. A list of possible examples: - Cart - Bibliographic detail page - Place hold (with OPAC item level holds enabled in circulation rules) - Show more options -> - A specific item - Bibliographic detail page for a serial record -> - More details -> - Full history - Most popular - Self checkout - Logged in user -> - Charges - Curbside pickups - Messaging - Checkout history - Suggestions - Holds history - Tags - Recalls history - Search history - ILL requests DataTables functionality should be unaffected. Check that the strings defined for translation are still working. For instance the "Clear filter" label on user summary checkouts, or the "No matching records found" text displayed when you search a table for a string that doesn't exist. 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, in this case misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from koha-tmpl/intranet-tmpl/prog/js/members.js for translation, e.g.: msgid "Clear filter" - Edit the corresponding "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 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=33983 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #7 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. I tested all the suggested areas, except for ILL requests. 2. Two things I noted that are not related to this bug (new bugs required if they don't exist already): 2.1 OPAC detail page - holdings table: sorting for the 'Current library' column doesn't work, for example using record 126 (Intermediate Perl) 2.2 Self checkout page: table heading row colour - for the checkout tab it has a background colour, for the other tabs (such as accounting) the backgroudn colour is white -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33983 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=33983 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to David Nind from comment #7)
Testing notes (using KTD):
1. I tested all the suggested areas, except for ILL requests.
2. Two things I noted that are not related to this bug (new bugs required if they don't exist already): 2.1 OPAC detail page - holdings table: sorting for the 'Current library' column doesn't work, for example using record 126 (Intermediate Perl) 2.2 Self checkout page: table heading row colour - for the checkout tab it has a background colour, for the other tabs (such as accounting) the backgroudn colour is white
I haven't seen bugs for these yet. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33983 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I wonder why we haven't made these configurable (unrelated to patch): - var config_exclude_articles_from_sort = window.CONFIG_EXCLUDE_ARTICLES_FROM_SORT || "a an the"; + var config_exclude_articles_from_sort = __("a an the"); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33983 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=33983 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #156702|0 |1 is obsolete| | --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 156705 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156705&action=edit Bug 33983: Move translatable strings out of OPAC's datatables.inc into JavaScript This patch removes the definition of translatable strings out of the OPAC datatables.inc file and into datatables.js using the new JS i81n function. To test apply the patch and test some DataTable-driven tables in the OPAC. A list of possible examples: - Cart - Bibliographic detail page - Place hold (with OPAC item level holds enabled in circulation rules) - Show more options -> - A specific item - Bibliographic detail page for a serial record -> - More details -> - Full history - Most popular - Self checkout - Logged in user -> - Charges - Curbside pickups - Messaging - Checkout history - Suggestions - Holds history - Tags - Recalls history - Search history - ILL requests DataTables functionality should be unaffected. Check that the strings defined for translation are still working. For instance the "Clear filter" label on user summary checkouts, or the "No matching records found" text displayed when you search a table for a string that doesn't exist. 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, in this case misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from koha-tmpl/intranet-tmpl/prog/js/members.js for translation, e.g.: msgid "Clear filter" - Edit the corresponding "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 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=33983 --- Comment #11 from David Nind <david@davidnind.com> --- (In reply to Katrin Fischer from comment #8)
I haven't seen bugs for these yet.
I've now created two bugs for these: - Bug 35006 - OPAC holdings table - sort for current library column doesn't work - Bug 35007 - Self checkout system (SCO) - table heading row background colour in tabs is inconsistent -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33983 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.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=33983 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33983 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #13 from Fridolin Somers <fridolin.somers@biblibre.com> --- Enhancement not pushed to 23.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33983 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org