Page MenuHomePhabricator

Implement (dumb) formatter for quantities with units based on URIs
Closed, ResolvedPublic1 Estimated Story Points

Description

The formatter should:

  • if the URI is the special "no unit" URI, show no unit.
  • if the URI refers to a local item, show the item's label (in the target language, with fallback applied)
    • showing a "unit symbol" based on a statement is left for later (T77983)
  • otherwise, just show the unit URI

TBD: 3rd party clients must have an efficient way to query and use unit labels.

Related Objects

Event Timeline

Tobi_WMDE_SW raised the priority of this task from to Medium.
Tobi_WMDE_SW updated the task description. (Show Details)
Tobi_WMDE_SW added a project: Wikidata.
aude renamed this task from Implement (dump) formatter for quantities with units based on URIs to Implement (dumb) formatter for quantities with units based on URIs.Mar 11 2015, 1:42 PM
aude set Security to None.
daniel updated the task description. (Show Details)

Not quite there yet. This still needs Id86dba7df and Ia6c66f7a001 to go in. The latter is waiting for packagist to finally pick up the 0.5 release of data-values/number.

Change 218917 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Clean up architecture of unit formatting

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

Change 216713 merged by jenkins-bot:
Show entity labels for quantity units

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

Resolved, since the functionality is now implemented.

@thiemo: for restricting the formatting to items, or restricting unit uris using a validator, please file a separate ticket, so we can keep these issues separate.