Page MenuHomePhabricator

Language fallback should be optional
Closed, DeclinedPublic

Description

Now that language fallback is applied to mw.wikibase.label() as well (rEWBA9efbaaf23d23d202aa78df86b4d496f6d78f0bd7), we were able to reduce missing labels in cswiki to from 4,000 to 400. That would be nice if it didn't cause data to be shown in a different language from the content language. This could result in complete banning Wikidata data from some client wikis.

I suggest to have true/false check as the second parameter, meaning whether to choose other languages in the fallback chain.

A workaround for this is loading each entity which could cause performance issues.

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 19 2016, 7:55 AM
JAnD added a subscriber: JAnD.Jun 20 2016, 7:16 AM

Ok so I would really like to avoid having to make this optional but if it needs to happen then it needs to happen.

If we make it optional we have at least two ways:

  • per project (either a project has language fallbacks or not)
  • per function call (you specify if you want fallbacks for every Lua call)

The latter seems like a really bad idea to me because it introduces a huge amount of complexity. I _really_ want to avoid that.

jeblad added a subscriber: jeblad.Jun 21 2016, 10:17 AM

I can't see any one-size-fits-all solution here. It must be possible to get to the label in the native language somehow.

Add a language code to mw.wikibase.label, and if it is missing use the fallback.

JAnD added a subscriber: JAnD.Jun 21 2016, 6:29 PM
TomT0m added a subscriber: TomT0m.Aug 16 2016, 2:26 PM
hoo closed this task as Declined.Aug 17 2016, 2:25 PM

I think we should rather go for T143094 which allows consumers to take more control of what they're showing, as this flag might be confusing, especially on multilingual wikis (where the first language differs by user language).