Skip to content

Conversation

GianniDPC
Copy link
Contributor

Add Ounce per gallon to Mass Concentration

Copy link
Owner

@angularsen angularsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good start!

Just a few more steps are required to complete this:
https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit

Specifically, you need to run generate-code.bat, implement the generated test case to fix the compile error and push these changes.

"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "opg (U.S)" ]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with these, but from google it seems this unit abbreviation is more widely used: oz/gal

If so, maybe instead of opg we could do oz/gal (U.S.) and oz/gal (imp.).

This is also consistent with gal (U.S.) and fluid ounce oz (U.S.) in Volume:

"Abbreviations": [ "gal (U.S.)" ]

"Abbreviations": [ "oz (U.S.)" ]

https://www.convert-me.com/en/convert/density/ozpgal.html?u=ozpgal&v=1
https://www.translatorscafe.com/unit-converter/en-US/density/17-33/gram/liter-ounce/gallon%20(US)/

@angularsen
Copy link
Owner

@GianniDPC Great, almost there. What remains is to implement the test case in https://github.com/GianniDPC/UnitsNet/blob/master/UnitsNet.Tests/CustomCode/MassConcentrationTests.cs, which now gives a compile error due to 2 missing properties.

Not your fault, but a lot of other files got changed in the PR. I cleaned this up now, so only the relevant files show up. It was due to a recent change in the codegen and your branch was behind on this change.

@GianniDPC
Copy link
Contributor Author

Hope everything is OK now @angularsen :)

@angularsen angularsen changed the title Add Ounce per gallon Add ounce per gallon to MassConcentration Jul 16, 2021
@angularsen angularsen changed the title Add ounce per gallon to MassConcentration MassConcentration: Add ounce per gallon units Jul 16, 2021
@angularsen angularsen merged commit f2079bf into angularsen:master Jul 16, 2021
@angularsen
Copy link
Owner

@GianniDPC nuget on the way out
Release UnitsNet/4.98.0 · angularsen/UnitsNet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants