Add singular forms for units

This commit is contained in:
Pieter Vander Vennet 2021-09-13 02:38:20 +02:00
parent c9ba7a8d44
commit feeca1de46
9 changed files with 338 additions and 95 deletions

View file

@ -24,7 +24,12 @@ export interface ApplicableUnitJson
* If the user inputs '42', the canonical value will be added and it'll become '42m'
*/
canonicalDenomination: string,
/**
* The canonical denomination in the case that the unit is precisely '1'
*/
canonicalDenominationSingular?: string,
/**
* A list of alternative values which can occur in the OSM database - used for parsing.
*/
@ -39,6 +44,15 @@ export interface ApplicableUnitJson
*/
human?: string | any
/**
* The value for humans in the dropdown. This should not use abbreviations and should be translated, e.g.
* {
* "en": "minute",
* "nl": "minuut"x²
* }
*/
humanSingular?: string | any
/**
* If set, then the canonical value will be prefixed instead, e.g. for '€'
* Note that if all values use 'prefix', the dropdown might move to before the text field