Page MenuHomePhabricator

Language names in the dropdown menus are sorted in the wrong order (in most languages)
Closed, ResolvedPublic

Description

Language names in the dropdown menus are sorted in the wrong order in most languages. The code that generates the list (UploadWizard.config.php) simply uses natcasesort(), which only works correctly for ASCII text.

This means that e.g. in Polish (pl), languages whose names being with non-ASCII characters (e.g. "łotewski"/Latvian or "śląski"/Silesian) are displayed at the top of the list (instead of after "l" / after "s"), and in languages using non-Latin alphabets, e.g. Ukrainian (uk), the order is entirely wrong.

We should probably be using PHP's Collator class. See e.g. the code in IcuCollation in core (this is used to order category entries).

(Originally reported at https://commons.wikimedia.org/wiki/Commons:Help_desk#Translations_of_languages_names_in_Upload_Wizard)

image.png (968×1 px, 128 KB)

Event Timeline

Restricted Application added subscribers: Base, Aklapper. · View Herald Transcript
dr0ptp4kt triaged this task as Medium priority.Aug 7 2017, 4:30 PM
dr0ptp4kt moved this task from Untriaged to Needs Design on the Multimedia board.
dr0ptp4kt added subscribers: Nirzar, dr0ptp4kt.

@Nirzar what treatment would you suggest?

Change 371737 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/UploadWizard@master] Sort names in the language dropdown according to user's language

https://gerrit.wikimedia.org/r/371737

Change 371737 merged by jenkins-bot:
[mediawiki/extensions/UploadWizard@master] Sort names in the language dropdown according to user's language

https://gerrit.wikimedia.org/r/371737

matmarex claimed this task.
matmarex removed a project: Patch-For-Review.