[Bug 5766] New: Add system preference for excluding articles from jQuery table sorter
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5766 Summary: Add system preference for excluding articles from jQuery table sorter Change sponsored?: --- Product: Koha Version: master Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: I18N/L10N AssignedTo: frederic@tamil.fr ReportedBy: oleonard@myacpl.org QAContact: koha-bugs@lists.koha-community.org Estimated Hours: 0.0 The jQuery table sorter can be configured with a custom parser for excluding articles from sorting. Many pages in Koha already include this, but for English only: $.tablesorter.addParser({ id: 'articles', is: function(s) {return false; }, format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); }, type: 'text' }); A system preference should be created to contain the pipe-delimited articles (or other text) for exclusion so that speakers of other languages can include their own. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5766 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Owen, could we do something similar with databales? -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5766 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|frederic@tamil.fr |oleonard@myacpl.org Summary|Add system preference for |Add configuration for |excluding articles from |excluding articles from |jQuery table sorter |jQuery table sorter -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5766 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5766 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 19380 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19380&action=edit Bug 5766 - Add configuration for excluding articles from DataTables sorting Client-side table sorting should exclude articles like "a," "an," and "the" when sorting by title. This patch adds a custom sorting plugin for use by DataTables and a configuration line to the DataTables string configuration file which can be translated for any language. As an example, this patch modifies the patron checkout history template to use the new sort on the title column. To test, apply the patch and clear your browser cache to ensure the revised JavaScript file is loaded. Sort the table by title. Titles should be sorted regardless of the presences of "a," "an", or "the" at the beginning of the title. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5766 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5766 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19380|0 |1 is obsolete| | --- Comment #3 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 19438 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19438&action=edit Bug 5766 - Add configuration for excluding articles from DataTables sorting Client-side table sorting should exclude articles like "a," "an," and "the" when sorting by title. This patch adds a custom sorting plugin for use by DataTables and a configuration line to the DataTables string configuration file which can be translated for any language. As an example, this patch modifies the patron checkout history template to use the new sort on the title column. To test, apply the patch and clear your browser cache to ensure the revised JavaScript file is loaded. Sort the table by title. Titles should be sorted regardless of the presences of "a," "an", or "the" at the beginning of the title. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5766 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5766 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19438|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 19463 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19463&action=edit [PASSED QA] Bug 5766 - Add configuration for excluding articles from DataTables sorting Client-side table sorting should exclude articles like "a," "an," and "the" when sorting by title. This patch adds a custom sorting plugin for use by DataTables and a configuration line to the DataTables string configuration file which can be translated for any language. As an example, this patch modifies the patron checkout history template to use the new sort on the title column. To test, apply the patch and clear your browser cache to ensure the revised JavaScript file is loaded. Sort the table by title. Titles should be sorted regardless of the presences of "a," "an", or "the" at the beginning of the title. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes all tests and is a good improvement. I have added German articles to the list for testing purposes and it worked nicely. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5766 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- After giving this some more thought it would be nice if this could be in the configuration. Being able to translate the string and influence sorting this way is a good start, but maybe not flexible enough. For libraries with records in multiple languages they will want to have a longer list they can adjust and not only a translation for one language. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5766 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #6 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Owen! However, I agree with Katrin that the translation subsystem isn't necessarily the best place to configure this, for a couple reasons. First, the language of the catalog interface does not necessarily reflect all of the languages that may be present in the bib data, and I can see a translator not getting the point of translating a list of articles in Pootle. I would lean towards either a system preference or even a separate table that contains a list of articles (which would be useful in other contexts, e.g., a bib editor plugin that sets the non-filing indicator automatically). However, since such configuration hooks can readily be put in later, I've decided to push the patch as is. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5766 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |7019 -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5766 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |tomascohen@gmail.com --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This patch has been pushed to 3.12.x, will be in 3.12.4. Thanks Owen! -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5766 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |10716 -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org