Open mhl opened 8 years ago
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.
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
instead