Page MenuHomePhabricator

Nedersaksies doesn't appear in Compact Language List panel
Closed, ResolvedPublic

Description

To reproduce:

Observed: Nedersaksies (nds-nl) doesn't appear.

Expected: It must appear under Europe and also when searching for "neder".

One thing I noticed is that the lang attribute of the language link for this language is "nds-NL" rather than "nds-nl" as I'd expect. Maybe browsers or HTMLtidy, or something else at some stage normalizes language code prefixes that are country names to upper case, but this is just a guess. If I go to getInterlanguageList() and change this.getAttribute( 'lang' ) to this.getAttribute( 'lang' ).toLowerCase(), it fixes this issue, but there may be a better solution.

High priority, because all bugs about missing languages are triaged as such.

First reported at https://www.mediawiki.org/wiki/Topic:T7cyivsztzge738k .

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald Transcript
Amire80 triaged this task as High priority.Jul 8 2016, 8:31 PM
Amire80 moved this task from Backlog to Missing languages on the ULS-CompactLinks board.

@Nikerabbit, Do you know from where this uppercase country code comes in nds-NL? It is nds-nl in Names.php. In ULS(jquery uls data) it is nds-nl.

All language codes in HTML are supposed to be pretty-formatted with wfBCP47 or Language::getHtmlCode. Hence mapping it back to lower case is what we should do internally in ULS (and then pretty it again when it ends up in HTML).

Change 301114 had a related patch set uploaded (by Nikerabbit):
CompactLinks: lowercase language codes for internal use

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

The proposed fix is sufficient to fix this issue. Separate issue is the lack of wfBCP47 in jquery.uls.

Change 301114 merged by jenkins-bot:
CompactLinks: lowercase language codes for internal use

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

Confirmed on he and ca Wikipedias.

Verified in production.