Page MenuHomePhabricator

Babel: Language code sma and smj shows up as English in Babel boxes
Closed, ResolvedPublic

Description

On my user page at Meta the language code for South Sami language (sma) and Lule Sami language (smj) shows up as English.

This happens for all code variants, {{#babel: sma | sma-0 | sma-1 | sma-2 | sma-3 }} and {{#babel: smj | smj-0 | smj-1 | smj-2 | smj-3 }}.

In the signature section of items at Wikidata, like Møre og Romsdal (that is with the previous Babel boxes), it will show the correct “Southern Sami” and “Lule Sami”.

Note that Southern Sami and Lule Sami languages does not have a Wikipedia project, while Northern Same language has a project.

Event Timeline

jeblad renamed this task from Babel: Language code smj shows up as English to Babel: Language code sma and smj shows up as English.Jun 16 2020, 1:05 AM
jeblad updated the task description. (Show Details)
jeblad renamed this task from Babel: Language code sma and smj shows up as English to Babel: Language code sma and smj shows up as English in Babel boxes.Jun 16 2020, 1:12 AM
jeblad updated the task description. (Show Details)
jeblad updated the task description. (Show Details)

Isn't this literally because there's no translations for sma and smj in Babel?

So there's no way for MW to give them in those translations, as they don't exist

https://translatewiki.net/wiki/MediaWiki:Babel-1/sma etc

Isn't this literally because there's no translations for sma and smj in Babel?

So there's no way for MW to give them in those translations, as they don't exist

https://translatewiki.net/wiki/MediaWiki:Babel-1/sma etc

Well, the messages in Translatewiki don't actually contain the language name, it is replaced with a placeholder $3. In Translatewiki itself, the messages – even if untranslated – don't show "English", but rather the autonym or the English name. See e.g. https://translatewiki.net/wiki/Portal:Smj and https://translatewiki.net/wiki/Portal:Sma . So the question becomes: Why do the language names – show up correctly on Translatewiki and not on Meta?

When I first saw this bug I assumed it was because smj is not in Names.php, but sma is in Names.php, so it's weird that that one also shows "English". Then I thought maybe it was related to the CLDR extension, but TWN and Wikimedia wikis both run the same version of that extension, so that can't (or shouldn't) be it.

Adding @Nikerabbit who probably knows why this is (or knows how to figure it out…). And to be clear, this affects almost all language codes that don't have Wikimedia wikis, not just smj and sma.

It seems to be that it's falling back to https://meta.wikimedia.org/wiki/MediaWiki:Babel-0-n isntead of https://meta.wikimedia.org/wiki/MediaWiki:Babel-0. I think that if these messages are removed locally, fallback order may be restored.

jhsoby-WMNO assigned this task to Mardetanha.
jhsoby-WMNO added a subscriber: Mardetanha.

It seems to be that it's falling back to https://meta.wikimedia.org/wiki/MediaWiki:Babel-0-n isntead of https://meta.wikimedia.org/wiki/MediaWiki:Babel-0. I think that if these messages are removed locally, fallback order may be restored.

This was done by @Mardetanha , and things seem to be working as they should now. Thank you!

jeblad reopened this task as Open.EditedJun 16 2020, 12:11 PM

Sorry, but this is not resolved. Now smj, smj-0, smj-1, smj-2, and smj-3 shows up with language name in English.

Well, yes, because the autonym is not in CLDR nor Names.php. The fact that it's not in CLDR is an upstream issue, while the fact that it's not in Names.php (yet) is because the language hasn't reached the translation threshold to be added there.

Neither of these things have anything to do with MediaWiki-extensions-Babel. The original bug you reported, the language names being shown as "English" (and only on Meta & global user pages from Meta, as it turns out), has been solved.

Missing translations are not a bug (the only other way to fix this other than the task I linked).

This issue is left half-done, but who cares.

You can also add names to LocalNamesSmj.php in the cldr extension, but I have not verified if it gets loaded.