You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 28, 2020. It is now read-only.
At the moment there are various places (see git grep 'split()\[-1\]') where we pick the last white-space separated part of the name to sort on. This doesn't work even in the UK, where some people have double-barrelled surnames that aren't hyphenated - in other countries, where sorting conventions vary, it's even less likely to be right.
Popolo has a sort_name field which we should use instead. To use this we would need to:
Add a data migration that adds a SimplePopoloField for sort_name, and for each person populates sort_name with name.split()[-1] as a default.
This is still not enough for sorting to work properly in other languages; the various built-in sort functions operate on bytes (i.e. Unicode code units), the order of which may or may not correspond to alphabetical order - see #937.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
At the moment there are various places (see
git grep 'split()\[-1\]'
) where we pick the last white-space separated part of the name to sort on. This doesn't work even in the UK, where some people have double-barrelled surnames that aren't hyphenated - in other countries, where sorting conventions vary, it's even less likely to be right.Popolo has a
sort_name
field which we should use instead. To use this we would need to:sort_name
, and for each person populatessort_name
with name.split()[-1] as a default.split()[-1]
is used as a sort key to usesort_name
insteadThe text was updated successfully, but these errors were encountered: