Page MenuHomePhabricator

Ensure content languages are sorted by language code
Open, Needs TriagePublic

Description

[This task is out of scope for the "Improved Language Fallback (MUL)" initiative (see "Out of Scope" section in the epic T312097).]

Steps to reproduce:

What happens?
mul can be found at the very end of the list.

What should have happened instead?
mul should be found at the position defined by sorting by language code.

Notes:

Notes about the status quo:
The list is currently a union of MediaWikiContentLanguages and additional StaticContentLanguages

The list of term language codes is:

  • all codes supported by MediaWiki core

MediaWiki ensures this list is sorted
only in production, this also includes agq, bag etc., via wmgExtraLanguageNames
*a hard-coded extra set of language codes: agq, bag, etc.
**this list is sorted in the source code
*mul, if enabled

So on production Wikidata, the second and third list item make no difference; on a default Wikibase, the third list item has no effect, but agq/bag/etc. will be after the regular language codes; on Test Wikidata, the second list item makes no difference (redundant), but the third list item adds an unsorted language code at the end.

Open questions:

  • What Sorting do we want?
    • Sarai wanted to sort the list alphabetically by the language name, originally.
    • The dev team asks is sorting by language code would be good enough? It would have the advantage that it is only one order for all UI languages.
    • Manuel sees some upsides for keeping the status quo: MUL is also sorted last in the termbox, so maybe this position is intuitive in the list as well.

Acceptance criteria:

  • The languages are sorted alphabetically / by language code / as is (TBD).

Event Timeline

Manuel renamed this task from Make sorting of languages in lists more consistent. to Make sorting of languages in language code lists more consistent. .Mar 21 2023, 1:50 PM
Manuel renamed this task from Make sorting of languages in language code lists more consistent. to Ensure content languages are sorted by language code.Mar 22 2023, 10:16 AM
Manuel updated the task description. (Show Details)

Change 901555 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@master] WIP: Ensure content languages are sorted by language code

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

Change 901555 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@master] WIP: Ensure content languages are sorted by language code

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

WIP patch that I put together during a meeting where we discussed this issue (since the code was already starting to form inside my head and I wanted to get it out); needs more work though.

Manuel updated the task description. (Show Details)