MeasurementFormatter unitStyle .long provides a .short string for UnitConcentrationMass

The MeasurementFormatter with .long unit style provides a .short string. See example below. This is needed for accessibility support.

let formatter = MeasurementFormatter()
formatter.unitStyle = .long
formatter.unitOptions = .providedUnit
let concentrationMass = Measurement(value: 2, unit: .gramsPerLiter)

print(formatter.string(from: concentrationMass))
// Results in "2 g/L". Expected "2 grams per liter".

Thanks for raising this issue, to help make sure this gets to the right team, could you please file a bug using the Feedback Assistant tool if you haven't already? You check out bug-filing information here https://developer.apple.com/bug-reporting/

And once you do please reply with the Feedback ID so I can help push it along

Feedback ID: 11934451

Thank you for your fast reply!

MeasurementFormatter unitStyle .long provides a .short string for UnitConcentrationMass
 
 
Q