When entering units, it would be very convenient if one could type the desired unit directly into the input field, instead of relying on a separate selector widget. This is useful for copy&pasting quantities that are already given with a unit ("2m", "7.2kg", etc), and for power users that want to save a few keystrokes/clicks.
There are several options for what "names" would be accepted for unit input:
- The unit's (local resp vocabulary) name (Q-ID)
- The unit's label (localized, with fallback applied). Problem: May not be unique, see T86528: [RFC] Unit Localization
- A unique, per language, unit symbol, see T77983: [Story] Use localized unit symbols
- The full URI of the unit
Another open question is the placement of units - are units to be entered after the number(s), or may the be entered before the number, too? Would that depend on the locale, or the unit? Some units are traditionally prepended, especially currency symbols.
Possible approach ( from T170146 , added July 2017) ;
When preferred units are defined on a property and the abbreviation given matches this, parse the units directly. Sample:
- enter "10 m" in a statement for height (P2048)
- https://www.wikidata.org/wiki/Property:P2048#P2273 lists Q11573 as one of the units for the property
- https://www.wikidata.org/wiki/Q11573#P558 has a couple of unit symbols, including "m"
- accordingly, "10 m" should result in 10 with unit Q11573
- add QIDs/numbers to spreadsheet
- use QuickStatements to upload