On Friday, January 20, 2017 at 9:17:29 AM UTC-8, Florian Berger wrote: > > Hi, > > On 19.01.2017 23:30, RjOllos wrote: > > The component list is sorted alphabetically. You can see this in the > code, > > and on trac.edgewall.org/demo-1.0 > > Well, look at the screenshot. > > http://0x6c2.de/images/2017-trac-components.png > > Let me guess: > > - Capital ASCII letters in alphabetical order first > > - followed by lowercase letters in alphabetical order > > - followed by non-ASCII characters. > > That would explain it. > > As a naive user, my eyes would expect to find "n" between "M" and "P", > i.e. non-case sensitive ordering. > > And as a German, I would expect to find "Ö" right after "O" and before > "P", and "Ü" right after "U" and before "V", which is the common > alphabetical ordering for German umlauts. > > > As this seems to be a matter of taste and I18N - and not necessarily a > bug - is there a way to fix the search order for my requirements, > without hacking into the trac internals? > > Or would I need to write a plugin? > > Thanks, > > Florian >
There are two distinct features in your request: case insensitive sorting and unicode sorting. There's an open issue for unicode sorting (1). Unfortunately it looks to be nontrivial to fix. The sorting is done in the SQL query, so the current behavior depends on what the database has implemented. I doubt we will implement case-insensitive sorting, but I hope the unicode sorting gets implemented at some point. In the meantime it appears your only choice would be to write a plugin that implements IRequestFilter (2). There might be a way to configure your database or modify the tables to change the sorting to nocase (2) and unicode, but I have never tried it. Be aware that modifying the tables could make it more difficult to upgrade your Trac instance in the future. - Ryan (1) https://trac.edgewall.org/ticket/4636 (2) https://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.web.api.IRequestFilter (3) http://stackoverflow.com/a/1203468/121694 -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/d/optout.
