Page MenuHomePhabricator

Create label fallback mechanism
Closed, ResolvedPublic

Description

Since many objects do not have labels in specific language (such as English), displaying arbitrary results with labels may be hard to achieve. We need to create a mechanism that would allow us to select label for display, if the label in preferred language is not available. Maybe a configurable one akin to HTTP language selection model - with priorities, etc.

Event Timeline

Smalyshev raised the priority of this task from to Medium.
Smalyshev updated the task description. (Show Details)
Smalyshev subscribed.

It is not possible to have one fall back order that makes sense for every requested language. Wikidata and translatewiki.net use one per language. (So if two languages are requested you would possibly have two different fall backs.)

JanZerebecki lowered the priority of this task from Medium to Low.Feb 4 2015, 5:24 PM
JanZerebecki set Security to None.

The way this was implemented let you ask for a special language fallbacking label and configure whatever language fallback strategy you liked. The default order was pretty arbitrary too - it was just some languages I knew people on the team spoke. And ultimately it'd just fall back to the Q id.

It sounds like what you'd want is for the service to handle a fallback from 'en_gb' -> 'en' something. We just created a fallback from nothing to a list. It was convenient for digging around in the data if nothing else.

Depends on if we want to have full public answers from a system that has no PHP code. I personally would try to avoid doing more in the query service, the implementation in Wikibase is involved enough. So if latency allows provide full language support with fall backs with transliteration for lables, description and aliases from Wikibase instead. As we don't have descriptions and aliases imported this probably means no the question in the first sentence. That would mean this task can be closed as resolved, right?

Manybubbles raised the priority of this task from Low to High.

What we built was really for users digging around inside Gremlin anyway. And its done. So I closed this.