From e3b0dd048e88d9a6a5280f5b7711c9572d3dd387 Mon Sep 17 00:00:00 2001 From: Henare Degan Date: Tue, 8 Dec 2015 11:39:10 +1100 Subject: [PATCH] Revert "Correct people sort order in Ukrainian. Fixes #148" This reverts commit cceba4b71d9b2f5a3613e3a164b5ce3bc4065191. Simply transliterating the strings doesn't correctly sort it in the localised language - it just sorts it from an English perspective. --- app/controllers/members_controller.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb index abfd01cc1..3d263ef74 100644 --- a/app/controllers/members_controller.rb +++ b/app/controllers/members_controller.rb @@ -18,15 +18,15 @@ def index @members = case @sort when "constituency" - members.sort_by { |m| [I18n.transliterate(m.constituency), I18n.transliterate(m.last_name), I18n.transliterate(m.first_name), I18n.transliterate(m.party), -m.entered_house.to_time.to_i] } + members.sort_by { |m| [m.constituency, m.last_name, m.first_name, m.party, -m.entered_house.to_time.to_i] } when "party" - members.sort_by { |m| [I18n.transliterate(m.party), I18n.transliterate(m.last_name), I18n.transliterate(m.first_name), I18n.transliterate(m.constituency), -m.entered_house.to_time.to_i] } + members.sort_by { |m| [m.party, m.last_name, m.first_name, m.constituency, -m.entered_house.to_time.to_i] } when "rebellions" - members.sort_by { |m| [-(m.person.rebellions_fraction || -1), I18n.transliterate(m.last_name), I18n.transliterate(m.first_name), I18n.transliterate(m.constituency), I18n.transliterate(m.party), -m.entered_house.to_time.to_i] } + members.sort_by { |m| [-(m.person.rebellions_fraction || -1), m.last_name, m.first_name, m.constituency, m.party, -m.entered_house.to_time.to_i] } when "attendance" - members.sort_by { |m| [-(m.person.attendance_fraction || -1), I18n.transliterate(m.last_name), I18n.transliterate(m.first_name), I18n.transliterate(m.constituency), I18n.transliterate(m.party), -m.entered_house.to_time.to_i] } + members.sort_by { |m| [-(m.person.attendance_fraction || -1), m.last_name, m.first_name, m.constituency, m.party, -m.entered_house.to_time.to_i] } else - members.sort_by { |m| [I18n.transliterate(m.last_name), I18n.transliterate(m.first_name), I18n.transliterate(m.constituency), I18n.transliterate(m.party), -m.entered_house.to_time.to_i] } + members.sort_by { |m| [m.last_name, m.first_name, m.constituency, m.party, -m.entered_house.to_time.to_i] } end end