-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MP page does not sort correctly in Ukrainian #148
Comments
@lisoffsky I think I've fixed this, can you please check? |
I'm afraid not fully working. That's my guess. |
Yes, you're right! cceba4b Reopening this issue to investigate if we can sort in Ukrainian. |
We know that sorting in transliterated Ukrainian doesn't sort correctly in the Ukrainian alphabet. I next looked around for ways to get Ruby to sort correctly in Ukrainian. The TwitterCLDR library can do that but it doesn't do So that made me look at doing this sorting in the DB again because I know databases should be able to sort this correctly. The reason why we're doing sorting in Ruby is because we've got a pretty complex sort hierarchy and all the attributes we sort on aren't accessible in the DB in a simple way (i.e. rebellions & attendance for the Person). I think the most sensible thing to do is to sort in the DB for the queries we can and leave the ones we can't as-is. This will mean that there's not great secondary sorting on rebellions and attendance in Ukrainian because it will use the dumb name sorting for those two only. It also means we lose our 4th level tertiary sorting |
This allows us to correctly sort by name (#148) or electorate (#147) but it still means that secondary sorting on rebellions or attendance doesn't work. This seems like the best trade off we have for the moment. See discussion/comments at: #148 (comment)
@lisoffsky I've made this change so sorting by name and oblast should be working, can you please check again? I've also opened #159 to track the remaining smaller issue that we're not planning to resolve for this part of the project. |
Yes, it now sorts very well! Thank you, Henare! |
Maybe use need gem 'chars' for sort_by |
@beastie87 beware, your example is in Russian language |
Sorry Ukrainian is also Cyrillic |
@lisoffsky woohoo!
@beastie87 that's really interesting. I wonder if we could expand chars to support Ukrainian? |
Edit by @henare: This is incorporates #147. Sorting on name or constituency on the MP page doesn't sort in the correct order for the Ukrainian language.
So we need help not only with sorting by oblast (#143) but also by name
When I try to sort by name on MPs page https://rada4you.org/people, what is default sorting, I see that sorting starts not by Ukrainian alphabet. Now page starts from letter "Є", but it should start from "А".
Can I somehow help with alphabet and oblasts, if needed?
The text was updated successfully, but these errors were encountered: