Page MenuHomePhabricator

make actual and source language explicit in serialization (wbgetentities) for language fallback
Closed, ResolvedPublic

Description

when requesting wbgetentities with the languagefallback param, in xml format:

https://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q42&languages=ii&languagefallback=

vs. in json format:

https://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q42&languages=ii&format=json&languagefallback=

xml has 'for-language' like:

<label language="zh-cn" value="道格拉斯·亚当斯" for-language="ii" />

json format seems to be missing it.


Version: unspecified
Severity: normal
Whiteboard: u=dev c=backend p=0
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=72183

Details

Reference
bz72038

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:52 AM
bzimport set Reference to bz72038.
bzimport added a subscriber: Unknown Object (MLST).

In JSON, this is represented by the label's key being different from the value of the language field. I agree that it would be nicer to have this modelled explicitly as a separate for-language field. Note that in cases where translitteration applied, there may be a third language involved (the "original" or "database" language).

Perhaps also make sure the naming in xml and json is the same.

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Jonas set Security to None.