Natural sorting for the Ngrams element
Fixes #331 (closed) (as far as the backend goes, I think the issue with the frontend remains, see below).
This MR changes the sorting inside searchTableNgrams
from the lexicographical sorting to an (approximation) of natural sorting using the DUCET unicode collator, i.e. a list that spells out how to sort unicode symbols (and this list is a unicode standard, so to speak).
This allows the backend to return terms which contains unicode letters (like accents) sorted correctly.
I have added tests in the backend to ensure things work as intended, but I think this is still not working in the frontend, see this GIF:
As you can see, there are two issues (cc @fmaniere ):
- It seems like every time I click on the column to change the order of sorting, two requests are fired to the backend (some duplicated Javascript event listener maybe?);
- While the backend return the data in the correct order, it seems like this is not respected by the frontend.