Create client functionality for getting human readable wikitext from Wikibase statements
Closed, ResolvedPublic


The current access methods for getting statement values for display in wikitext (Lua: mw.wikibase.entity:formatPropertyValues, wikitext: {{#property:…}}) are being heavily used and the output formats are being exploited in various places. For example many consumers assume that external ids are returned as plain strings, not as linked wikitext.

In order to not break with existing consumers, we decided to implement new functions that will output the format which is best for human consumption.

Related Objects

hoo created this task.Aug 14 2016, 5:17 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 14 2016, 5:17 PM

{{#statement:...}} as suggested seems like it'll cause a lot of confusion. I think we need a name that is closer to the one we already have and makes the difference clearer like property-formatted or something. I think we even had a good name in Esino Lario.

hoo added a comment.Aug 15 2016, 10:13 AM

@Lydia_Pintscher I couldn't find anything regarding that in our arguments doc and also can't remember what name we came up with back then.

I chose to go with statement here, as it's a short name (easy to remember, hard to misremember, which might happen with a name that is property-something). Also it's the right term for what it does, while property is not (you can argue that it stands for renderstatementbyproperty or so, but I think that's not what people have in mind).

@Lucie Do you remember it?
@daniel Do you have a good idea for a name?

Lucie added a comment.Aug 17 2016, 4:20 PM

I have sadly no notes either. I vaguely remember something including "property" but honestly would prefer "statement" since it's more descriptive about the functionality and I think that weights for me more than making clear with the name how it is connected to {{#property:…}}

hoo added a comment.Aug 17 2016, 6:06 PM

@Lydia_Pintscher Are you fine with the proposed Lua function name (mw.wikibase.entity:formatStatementValues)?

hoo added a comment.Aug 24 2016, 7:14 PM

Updated the names for the new functionality listed in the sub-tickets according to a discussion we just had.

Lucie awarded a token.Sep 1 2016, 12:59 PM
thiemowmde triaged this task as Normal priority.Sep 1 2016, 2:58 PM
thiemowmde added a subscriber: thiemowmde.
Jonas raised the priority of this task from Normal to High.
thiemowmde added a comment.EditedOct 12 2016, 2:44 PM

Name discussion moved to T142941#2728378.

Change 315682 had a related patch set uploaded (by Hoo man):
Introduce DataAccessSnakFormatterFactory::newRichWikitextSnakFormatter

Change 315682 merged by jenkins-bot:
Introduce DataAccessSnakFormatterFactory::newRichWikitextSnakFormatter

Change 317840 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Enable Wikibase #statements parser function on all test wikis

Change 318071 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Enable Wikibase #statements parser function on beta

Change 318071 merged by jenkins-bot:
Enable Wikibase #statements parser function on beta

TomT0m added a subscriber: TomT0m.Oct 31 2016, 2:09 PM
thiemowmde closed this task as Resolved.Dec 6 2016, 1:31 PM
thiemowmde claimed this task.

Change 317840 merged by jenkins-bot:
Enable Wikibase #statements parser function on all test wikis