daniel added a comment.

In https://phabricator.wikimedia.org/T77982#1189316, @thiemowmde wrote:

> - The widget **must** support "custom" values, similar to what currently 
> happens with the globe coordinate precision. If there is an URI the widget 
> does not know, it displays and returns the URI as it is.


Yes

> - The widget **must** (otherwise it's pointless to have it in the first 
> place) allow searching for units by name, e.g. typing "km" should work. This 
> means it's either a "dumb" item selector or a pre-defined list.


It would be an item selector. That also searches over aliases, and "km" would 
most likely be an alias.

> - Where should this list live? Should the community be able to maintain it 
> (e.g. via a message)?

> - How are these pre-defined units localized?


I would like to avoid a pre-defined list for the baseline implementation. This 
is actually harder to implement, as far as I can tell.

> - Should we restrict the list of allowed units in the API? This may be a good 
> starting point. It's much, much easier to drop such a restriction later than 
> to install one (and clean up data).


We do not have such a restrictions for calendars or globes. I don't think we 
should introduce it here. We could, of course, but that would make the selector 
more complex.-

> - Is it possible to support localization for all (local) Wikidata URIs?


Sure, why not? Just use their label (with fallback).

> - Do localization with labels (probably easier and "the right thing to do") 
> or with the unit symbol property (P558)?


Just the labels for the baseline. "Symbols" support should be added later (P558 
would need to be migrated to multilingual text).

> - Where is the stuff required for unit conversion stored and how does the 
> widget know about it?


In the baseline, the widget doesn't know about it. In fact, for now, there is 
no conversion.

Later, we'd have an internal service for unit conversion, and an API module for 
accessing it. The widget could then tell the user whether the unit they entered 
is a well known base unit, a convertible unit, or somethign unknown (which 
means the value can not be indexed/normalized/compared/queried).


TASK DETAIL
  https://phabricator.wikimedia.org/T77982

REPLY HANDLER ACTIONS
  Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign 
<username>.

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: daniel
Cc: Snipre, thiemowmde, Tobi_WMDE_SW, adrianheine, Snaterlicious, Aklapper, 
daniel, Wikidata-bugs, aude



_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to