Page MenuHomePhabricator

Language list name sorting on mobile should not show names that start with latin characters with diacritics at the end
Open, Needs TriagePublic

Description

Some languages are wrongly sorted in the language selector in the mobile version of the site. Examples:

  • Language names with diacritics: čeština is after Z, should be after C
  • Two-word language names: bahasa Indonesia is sorted after B, should be after I
  • Prefixed languages names: isiZulu is sorted after I, should be after Z

This should be easily fixed by introducing a language sort key and then sorting by the key if it exists instead of by the name. For these examples, the keys would be cestina; Indonesia, bahasa; Zulu, isi.

Event Timeline

Not sure data/config is in the MobileFrontend codebase (but the language-searcher class is), someone correct me.

Screenshot from 2020-03-27 09-58-28.png (901×444 px, 38 KB)

Aklapper renamed this task from Mobile language sort by name is wrong to Language list name sorting on mobile should not show names that start with latin characters with diacritics at the end.Mar 27 2020, 9:03 AM

I think we can sort these as needed. I suspect the lowercasing is tripping it up. Thoughts @alexhollender ?

@Pginer-WMF @Amire80 would one of you be able to advise here?

Also cc: @ovasileva this might make sense to address during DIP.

Another example is Icelandic, which often appears after Z because it begins with the letter Í.

I agree—there should be a sort key. (We should have it in ULS, too.)

And no, I don't think it's related to lowercasing.

I agree with Amir. At least in the languages that I'm familiar with, the diacritics in latin-based alphabets are understood as modifications of the character and are expected to be listed next to them. That's what I'd would expect for I and Í, and even in cases such as "ñ" or "ç" where those can be considered almost independent characters in some languages, they appear after their analogous "n" and "c".