Page MenuHomePhabricator

Pull common languages from the user's Babel box
Closed, ResolvedPublic

Description

A nice idea: to pull ULS common languages from the Babel box.

This is already done in Wikidata for typing labels and descriptions, and should be done in ULS, too.

See also T26193: Highlight interwiki for the language of homewiki of a user which has a global account, https://www.mediawiki.org/wiki/Universal_Language_Selector/Design/Interlanguage_links/Talk_archive_March_2014%E2%80%93April_2016#Default_language_selection

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Restricted Application added subscribers: Zppix, Aklapper. · View Herald Transcript
Amire80 triaged this task as Medium priority.May 16 2016, 11:01 AM
Amire80 moved this task from Backlog to Prioritised languages on the ULS-CompactLinks board.

Note that #babel does not provide languages on most wikis, due to wmgBabelMainCategory defaulting to false.

Babel should be used as a kind of "the user has asked for these languages so they should be included unconditionally". In addition to those languages there could be other languages that use a completely different ranking mechanism.

Note that some users have only a page at meta, so check that user page and not only the user page at the local wiki. (Perhaps done throgh an api call, like T141084: Babel definitions for an user should be made available through the api)

Note that some users have more Babel-entries than the number of listed languages in the CLL gadget.

Change 309827 had a related patch set uploaded (by Amire80):
Show languages from the Babel box on the user page

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

I committed a very simple patch, which is similar to the implementation in Wikibase repo, but even simpler. I am not sure that it takes care of the edge cases mentioned by @jeblad and @Tgr. If anybody has a handy environment that is closer to A Real Wikimedia Project, I'll appreciate if you could test there. Thanks.

Nice! Can we haz a rollout? :D

I can try to create a test environment later this week, if necessary, but it seems pretty stright forward to me.

Code for caching of Babel-languages should be moved from the Wikibase extension and to the Babel extension. This is not really a part of this change, but will have implications on how this is done.

T148005: BabelUserLanguageLookup is in Wikibase, should be in Babel

Change 309827 abandoned by Nikerabbit:
Show languages from the Babel box on the user page

Reason:
Idle for three months.

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

Is there any progress on this?

Should it be suggested as a task for the next hackathon?

Change 309827 restored by Amire80:
Show languages from the Babel box on the user page

Reason:
Trying to revive this and address the issues.

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

Change 309827 merged by jenkins-bot:
[mediawiki/extensions/UniversalLanguageSelector@master] Show languages from the Babel box on the user page

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

Jdforrester-WMF subscribed.

Mass-moving all items tagged for MediaWiki 1.30.0-wmf.3, as that was never released; instead, we're using -wmf.4.

This is deployed. It works in English, Polish, Finnish, and Catalan Wikipedias, but not in Hebrew, possibly because wmgBabelMainCategory is not set, as @Tgr suggested. I'll create a separate issue for that.

Resolved in the code, but not fully resolved in production. Many wikis still don't actually have Babel fully enabled. This will be resolved later today with https://gerrit.wikimedia.org/r/#/c/358007/ .

Amire80 added a subscriber: Niharika.

Fully deployed. Thanks to @Tgr and @Niharika for the help with configuration deployment!