Page MenuHomePhabricator

Some languages in the ULS rewrite are missing `interwiki-xx` classes (and more)
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

The interwiki-xx class used in the language items in the ULS rewrite is missing for some languages. For instance, interwiki links to the Serbian Wikipedia used to have the class interwiki-sr, but don't have any interwiki-xx classes in the rewrite. The interlanguage-link and mw-list-item classes are also missing from all of these languages.

I noticed this because I am using this abomination in my personal vector.css, to color-code languages by language family and add flag icons in front of languages, so it looks like this:

Screenshot_20260531_153113.png (567×316 px, 26 KB)

It seems to affect the "usual suspects": Languages whose Wikipedia don't match the correct ISO code, or languages with multiple script. But still, I went through the interwiki links on https://no.wikipedia.org/wiki/Wikipedia and noted which ones aren't styled, and which lang attribute they use:

  • bbc uses bbc-latn
  • bh uses bho
  • gom uses gom-deva
  • iu uses ike-cans
  • kk uses kk-cyrl
  • ku uses ku-latn
  • lad uses lad-latn
  • map-bms still uses map-bms (but mw.language.bcp47( 'map-bms' ); returns jv-x-bms)
  • nds-nl still uses nds-nl (but mw.language.bcp47( 'nds-nl' ); returns nds-NL)
  • nrm still uses nrm (but mw.language.bcp47( 'nrm' ); returns nrf)
  • roa-tara still uses roa-tara (but mw.language.bcp47( 'roa-tara' ); returns nap-x-tara)
  • shi uses shi-latn
  • sr uses sr-cyrl
  • ug uses ug-arab

Much easier way to get this list in the browser console:
document.querySelectorAll( '.uls-rewrite__body__language-list li:not(.interlanguage-link)' );

Event Timeline

jhsoby changed the subtype of this task from "Task" to "Bug Report".Sun, May 31, 1:53 PM

Change #1295718 had a related patch set uploaded (by Jon Harald Søby; author: Jon Harald Søby):

[mediawiki/extensions/UniversalLanguageSelector@master] Convert language code in annotations before use

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

abi_ triaged this task as High priority.
abi_ moved this task from Backlog to Ready for dev on the LPL Projects (ULS rewrite) board.
abi_ moved this task from Ready for dev to In progress on the LPL Projects (ULS rewrite) board.
abi_ moved this task from Backlog to In Progress on the LPL Essential (FY2025-26 Q3&4) board.

Change #1295718 merged by jenkins-bot:

[mediawiki/extensions/UniversalLanguageSelector@master] Convert language code in annotations before use

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