[Bug 9017] New: Quote of the day: Table footer not translated
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9017 Priority: P5 - low Change sponsored?: --- Bug ID: 9017 CC: gmcharlt@gmail.com Assignee: koha-bugs@lists.koha-community.org Summary: Quote of the day: Table footer not translated Severity: normal Classification: Unclassified OS: All Reporter: veron@veron.ch Hardware: All Status: NEW Version: master Component: Staff Client Product: Koha Created attachment 13277 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13277&action=edit QOD table footer not translated The strings for the table footer of the QOD feature are translated in /datatables-strings.inc, but they do not show up in staff client due to missing code in quotes.tt -> $(document).ready(function(), part "oLanguage" See: http://datatables.net/usage/i18n Additionally, quotes.tt has a stray </script> tag after [% INCLUDE 'datatables-strings.inc' %] Patch follows. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9017 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |veron@veron.ch |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9017 --- Comment #1 from Marc Véron <veron@veron.ch> --- Created attachment 13280 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13280&action=edit Bug 9017 - Quote of the day: Table footer not translated The strings for the table footer of the QOD feature are translated in /datatables-strings.inc, but they did not show up in staff client due to missing code in quotes.tt -> $(document).ready(function(), part "oLanguage" Code added as appropriate. See: http://datatables.net/usage/i18n Additionally, quotes.tt had a stray </script> tag after [% INCLUDE 'datatables-strings.inc' %] -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9017 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #2 from Marc Véron <veron@veron.ch> --- Would be great to have it in 3.10 because translation is broken. (No string change involved.) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9017 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- I don't think this is the correct approach. If you look at members/readingrec.tt you can see that the table footer *is* translated. The difference is that the initialization of the table sorter on that page includes a directive to extend according to some defaults: $("#table_readingrec").dataTable($.extend(true, {}, dataTablesDefaults, { "sPaginationType": "four_button", })); dataTablesDefaults loads the configuration in datatables.js which loads the variables defined in datatables-strings.inc. And datatables-strings.inc exists expressly to be picked up for translation, so duplicating its contents shouldn't be necessary. That said, simply adding $.extend() to the datatables configuration in quotes.tt doesn't work for me and I'm not sure why. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9017 --- Comment #4 from Marc Véron <veron@veron.ch> --- In this case, the architecture the code is fundamentally wrong and should be re-written? Who would have time to do it? And in the meantime we have ugly non-translated text in localized versions I wanted to get rid of. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9017 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch Assignee|veron@veron.ch |koha-bugs@lists.koha-commun | |ity.org --- Comment #5 from Marc Véron <veron@veron.ch> --- I tried for several hours but I can't make it work with the approach Owen suggested. It seems that the table definition is to complex to be merged with dataTablesDefaults. If I extend it with: oTable = $("#table_readingrec").dataTable($.extend(true, {}, dataTablesDefaults, { ... })); ...the table simply does not render. I suppose that it breaks the callback definitions. My patch would be a workaround to avoid untranslated strings and does not break anything, but maybe somebody else (the original author of this feature?) is able to put the code in a way that it does not fail QA. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9017 Chris Nighswonger <cnighswonger@foundations.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cnighswonger@foundations.ed | |u -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9017 Chris Nighswonger <cnighswonger@foundations.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #6 from Chris Nighswonger <cnighswonger@foundations.edu> --- (In reply to comment #5)
I tried for several hours but I can't make it work with the approach Owen suggested. It seems that the table definition is to complex to be merged with dataTablesDefaults.
This is true. dataTablesDefaults seemed to impose some restrictions which I was unable to workaround. And I seem to recall not being able to modify the extension to render it usable for my purposes.
My patch would be a workaround to avoid untranslated strings and does not break anything, but maybe somebody else (the original author of this feature?) is able to put the code in a way that it does not fail QA.
I think this is a good workaround. It uses the same basic approach as the extension and one which is (iirc) recommended in the DT documentation. It would be nice to explore the idea of separating the strings from dataTablesDefaults, allowing perhaps a more benign extension of DT to just include strings. Changing the status back to "Needs Signoff." I don't have multiple translations installed atm, so if someone who does could verify and sign-off, that would be good. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9017 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13280|0 |1 is obsolete| | --- Comment #7 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 13380 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13380&action=edit Bug 9017 - Quote of the day: Table footer not translated The strings for the table footer of the QOD feature are translated in /datatables-strings.inc, but they did not show up in staff client due to missing code in quotes.tt -> $(document).ready(function(), part "oLanguage" Code added as appropriate. See: http://datatables.net/usage/i18n Additionally, quotes.tt had a stray </script> tag after [% INCLUDE 'datatables-strings.inc' %] Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9017 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |chris@bigballofwax.co.nz -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9017 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |paul.poulain@biblibre.com --- Comment #8 from Paul Poulain <paul.poulain@biblibre.com> --- Qa comment: * small patch, no side effect * make strings translatables passed QA -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9017 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13380|0 |1 is obsolete| | --- Comment #9 from Paul Poulain <paul.poulain@biblibre.com> --- Created attachment 13550 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13550&action=edit Bug 9017 - Quote of the day: Table footer not translated The strings for the table footer of the QOD feature are translated in /datatables-strings.inc, but they did not show up in staff client due to missing code in quotes.tt -> $(document).ready(function(), part "oLanguage" Code added as appropriate. See: http://datatables.net/usage/i18n Additionally, quotes.tt had a stray </script> tag after [% INCLUDE 'datatables-strings.inc' %] Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9017 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|master |3.10 Assignee|koha-bugs@lists.koha-commun |veron@veron.ch |ity.org | QA Contact| |paul.poulain@biblibre.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9017 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |jcamins@cpbibliography.com --- Comment #10 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9017 --- Comment #11 from Paul Poulain <paul.poulain@biblibre.com> --- Patch pushed to branch 3.10.x -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9017 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED --- Comment #12 from Chris Cormack <chris@bigballofwax.co.nz> --- Released in 3.10.0 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org