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)

Event Timeline

matmarex created this task.Jul 28 2017, 5:25 PM
Restricted Application added a project: Multimedia. · View Herald TranscriptJul 28 2017, 5:25 PM
Restricted Application added subscribers: Base, Aklapper. · View Herald Transcript
Tohaomg added a subscriber: Tohaomg.Aug 1 2017, 8:09 PM
dr0ptp4kt moved this task from Untriaged to Needs Design on the Multimedia board.Aug 7 2017, 4:30 PM
dr0ptp4kt triaged this task as Normal priority.
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 closed this task as Resolved.Aug 13 2017, 7:08 PM
matmarex removed a project: Patch-For-Review.
matmarex claimed this task.