[PTRun][Unit]Support for plural units and improve alternative spellings (#19961)

* Upgrade UnitsNet package to a version that supports plural

* Add support for plurals

Fix metre conversion
Add and update unit tests
This commit is contained in:
Floris Westerman
2022-08-24 11:50:34 +02:00
committed by GitHub
parent 13db8575e0
commit f44bf99dfd
8 changed files with 54 additions and 43 deletions

View File

@@ -14,13 +14,13 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter
public string UnitName { get; }
public QuantityType QuantityType { get; }
public QuantityInfo QuantityInfo { get; }
public UnitConversionResult(double convertedValue, string unitName, QuantityType quantityType)
public UnitConversionResult(double convertedValue, string unitName, QuantityInfo quantityInfo)
{
ConvertedValue = convertedValue;
UnitName = unitName;
QuantityType = quantityType;
QuantityInfo = quantityInfo;
}
public string ToString(System.IFormatProvider provider = null)