Page MenuHomePhabricator

Parse quantity units from input
AcceptedPublic

Authored by matej_suchanek on Jul 18 2017, 10:28 AM.

Details

Reviewers
Magnus
Patch without arc
git checkout -b D723 && curl -L https://phabricator.wikimedia.org/D723?download=true | git apply
Summary

1U11573 should add "1 metre"

Diff Detail

Repository
R2010 tool-quickstatements
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

This problem isn’t introduced with this change, but shouldn’t the default unit be http://www.wikidata.org/entity/Q199 instead of 1? See T167565: Wikidata allows invalid URIs to be entered as units.

Lua and JSON serializations both output "1", so the same input is logical to me. Pywikibot and HarvestTemplates do the same. Do you have a link to a guidance which says "always provide URIs"?

Oh, I guess 1 is converted to that URI when exporting to RDF. Nevermind then.

Magnus accepted this revision.Jul 27 2017, 10:20 AM

Applied by manual edit

This revision is now accepted and ready to land.Jul 27 2017, 10:20 AM