Page MenuHomePhabricator

Special:NewItem still uses macro language code "no"
Closed, DeclinedPublic

Description

Only "nb" ("Bokmål") and "nn" ("Nynorsk") should be allowed, the code "no" ("Norwegian") is a macro code. When the language code is wrong a lot of functionality fails.

This bug is very old, and should be fixed.

Event Timeline

jeblad created this task.May 30 2017, 3:55 PM
Restricted Application added a project: Wikidata. · View Herald TranscriptMay 30 2017, 3:55 PM
Restricted Application added subscribers: jhsoby, Aklapper. · View Herald Transcript
jeblad updated the task description. (Show Details)May 30 2017, 3:57 PM
thiemowmde closed this task as Declined.May 31 2017, 12:13 PM

We are not maintaining a blacklist for label languages. Wikibase' entity labels must conform to the list of languages MediaWiki core supports. And "no" is still in this list, see for example https://en.wikipedia.org/wiki/Special:Preferences?uselang=no. If there is a pressing need to remove this specific language code (which this tickets unfortunately fails to explain) this has to be reported upstream as a MediaWiki core issue.

However, we are maintaining a blacklist for the language codes used in monolingual text values: https://phabricator.wikimedia.org/diffusion/EWBA/browse/master/repo/includes/WikibaseRepo.php;acf425b42bff78edf6300503479f11fe859ef3fb$1867. I don't know if "no" is ready to be added to this blacklist. We need to check existing usages first. We also have a process for approving monolingual language codes, described at T144272: new monolingual language code requests for Wikidata (tracking). If you want to remove a code, please follow the same steps.

@thiemowmde, I'm not very happy about this being declined. The fact that this is still happening after years is very annoying, and we need some solution. I have an alternative suggestion that doesn't require changes to the codebase – we could create an edit filter to tag edits that add labels/descriptions with the wrong language code, so that they're at least easier to find. I'm not sure if it's really a solution, but at least it will help make the problem more apparent (and make it easier to track the offending edits). Do you have any input on that?

I understand MediaWiki core does not maintain translations for certain codes that represent a family of languages. "bh" falls back to "bho", and "no" falls back to "nb": https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/DefaultSettings.php;13ffedf7278942d810514cb88da54fff97b23617$2889.

Note these are fallbacks, not aliases. Wikibase can not silently change the "no" label a user entered to "nb". All we could do is block "no". But what would be the benefit of that? Currently Wikibase users are free to add labels, descriptions, and aliases with all three codes "nb", "nn", and "no". Even if "no" is a macro language, how does it hurt to have labels with this code? Do the more specific "nb" and "nn" labels become inaccessible just because somebody added an "no" label? Do "no" labels become inaccessible the moment a more specific label exists?

As far as I understand the situation "no" should be added to Wikibase's fallback chain algorithm: "nb" → "no" → "en", as well as "nn" → "no" → "en". At the moment these chains are "nb" → "en" and "nn" → "en", and "no" also becomes "nb" → "en" (all derived from MediaWiki core).