Page MenuHomePhabricator

Support language fallbacks in wbformatvalue
Closed, ResolvedPublic

Description

Currently, only one language can be passed via lang option. The API should either use the fallback chain also used for generating static html, or support getting a language fallback chain passed in.

Event Timeline

adrianheine raised the priority of this task from to High.
adrianheine updated the task description. (Show Details)
adrianheine added a subscriber: daniel.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 31 2015, 1:15 PM

Change 203189 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Fix language fallback in value formatters

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

daniel updated the task description. (Show Details)Apr 10 2015, 10:04 AM

The patch above enabled language fallback without any extra options being present. Fallback is always applied based on the target language, in the same way it is applied when generating HTML. This was already the case for ValueFormatters used via SnakFormatters; the above patch enables the same default behavior for stand-alone ValueFormatters, as used by the wbformatvalue API module.

Specifying a fallback chain explicitly via the options parameter of the API module would be nice to have, but isn't needed right now. The UI doesn't even have sufficient information to build such a fallback chain, I think.

Change 203189 merged by jenkins-bot:
Fix language fallback in value formatters

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

daniel closed this task as Resolved.Apr 17 2015, 2:40 PM
daniel moved this task from Review to Done on the Wikidata-Sprint-2015-04-07 board.
Ricordisamoa edited subscribers, added: Ricordisamoa; removed: gerritbot.