Skip to content

Commit

Permalink
💥✏️Change liter abbreviations to lowercase l (v6) (#1404)
Browse files Browse the repository at this point in the history
Fixes #1115

Change from `L` to `l` in unit abbreviations for liters, to be
consistent in library and to follow SI Unit System conventions.

Note:
- Parsing is backwards compatible, since parsing unit abbreviations has
fallback to case insensitive as long as there is no ambiguity. E.g.
`Volume.Parse("10 L")` and `Volume.Parse("10 l")` both work.
- To avoid breaking backwards compatibility, we keep `liter` instead of
`litre` when naming units.

Also updated wiki:

https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit#abbreviation-naming-conventions

### Changed units
- `Density.GramPerLiter` + prefixes
- `FuelEfficiency.LiterPer100Kilometers`
- `FuelEfficiency.KilometerPerLiter`
- `MassConcentration.GramPerMicroliter`
- `MassConcentration.GramPerMilliliter`
- `MassConcentration.GramPerDeciliter`
- `MassConcentration.GramPerLiter`
- `Molarity.MolePerLiter`
- `VolumeConcentration.LitersPerLiter`
- `VolumeConcentration.LitersPerMililiter`
- `VolumeFlow.LiterPerSecond`
- `VolumeFlow.LiterPerMinute`
- `VolumeFlow.LiterPerHour`
- `VolumeFlow.LiterPerDay`
  • Loading branch information
angularsen authored Jul 8, 2024
1 parent 3ff48c6 commit ea9d006
Show file tree
Hide file tree
Showing 18 changed files with 693 additions and 693 deletions.
2 changes: 1 addition & 1 deletion Common/UnitDefinitions/Density.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "g/L" ]
"Abbreviations": [ "g/l" ]
}
]
},
Expand Down
4 changes: 2 additions & 2 deletions Common/UnitDefinitions/FuelEfficiency.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"Localization": [{
"Culture": "en-US",
"Abbreviations": [
"L/100km"
"l/100km"
]
}]
},
Expand Down Expand Up @@ -47,7 +47,7 @@
"Localization": [{
"Culture": "en-US",
"Abbreviations": [
"km/L"
"km/l"
]
}]
}
Expand Down
8 changes: 4 additions & 4 deletions Common/UnitDefinitions/MassConcentration.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "g/μL" ]
"Abbreviations": [ "g/μl" ]
}
]
},
Expand All @@ -93,7 +93,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "g/mL" ]
"Abbreviations": [ "g/ml" ]
}
]
},
Expand All @@ -106,7 +106,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "g/dL" ]
"Abbreviations": [ "g/dl" ]
}
]
},
Expand All @@ -123,7 +123,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "g/L"]
"Abbreviations": [ "g/l"]
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion Common/UnitDefinitions/Molarity.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "mol/L", "M" ]
"Abbreviations": [ "mol/l", "M" ]
}
]
},
Expand Down
4 changes: 2 additions & 2 deletions Common/UnitDefinitions/VolumeConcentration.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "L/L" ]
"Abbreviations": [ "l/l" ]
}
]
},
Expand All @@ -38,7 +38,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "L/mL" ]
"Abbreviations": [ "l/ml" ]
}
]
},
Expand Down
8 changes: 4 additions & 4 deletions Common/UnitDefinitions/VolumeFlow.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "L/s", "LPS" ]
"Abbreviations": [ "l/s", "LPS" ]
},
{
"Culture": "ru-RU",
Expand All @@ -202,7 +202,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "L/min", "LPM" ]
"Abbreviations": [ "l/min", "LPM" ]
},
{
"Culture": "ru-RU",
Expand All @@ -219,7 +219,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "L/h", "LPH" ]
"Abbreviations": [ "l/h", "LPH" ]
},
{
"Culture": "ru-RU",
Expand All @@ -236,7 +236,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "l/day", "L/d", "LPD" ]
"Abbreviations": [ "l/day", "l/d", "LPD" ]
}
]
},
Expand Down
Loading

0 comments on commit ea9d006

Please sign in to comment.