Skip to content

Commit 1a9c5ea

Browse files
authored
Fix prefix abbrevs (#421)
Fixes several wrong abbreviations. Removes redundant prefix abbreviations (`k`, `M` etc is prefixed by default for kilo, mega etc.) #### Breaking changes GigabritishThermalUnit: `mmBTU` => `GBTU` MegabritishThermalUnit: `mBTU` => `MBTU` Kilopound: `KLbs` => `klb` (neither is commonly used) Megapound: `MLbs` => `Mlb` (neither is commonly used)
1 parent 45eed33 commit 1a9c5ea

File tree

8 files changed

+15
-26
lines changed

8 files changed

+15
-26
lines changed

UnitsNet/GeneratedCode/UnitSystem.Default.g.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,7 @@ private static readonly ReadOnlyCollection<UnitLocalization> DefaultLocalization
12721272
new CulturesForEnumValue((int) EnergyUnit.GigabritishThermalUnit,
12731273
new[]
12741274
{
1275-
new AbbreviationsForCulture("en-US", "mmBTU"),
1275+
new AbbreviationsForCulture("en-US", "GBTU"),
12761276
}),
12771277
new CulturesForEnumValue((int) EnergyUnit.GigawattHour,
12781278
new[]
@@ -1309,7 +1309,7 @@ private static readonly ReadOnlyCollection<UnitLocalization> DefaultLocalization
13091309
new CulturesForEnumValue((int) EnergyUnit.MegabritishThermalUnit,
13101310
new[]
13111311
{
1312-
new AbbreviationsForCulture("en-US", "mBTU"),
1312+
new AbbreviationsForCulture("en-US", "MBTU"),
13131313
}),
13141314
new CulturesForEnumValue((int) EnergyUnit.Megajoule,
13151315
new[]
@@ -2231,7 +2231,7 @@ private static readonly ReadOnlyCollection<UnitLocalization> DefaultLocalization
22312231
new CulturesForEnumValue((int) MassUnit.Kilopound,
22322232
new[]
22332233
{
2234-
new AbbreviationsForCulture("en-US", "KLbs"),
2234+
new AbbreviationsForCulture("en-US", "klb"),
22352235
new AbbreviationsForCulture("ru-RU", "kфунт"),
22362236
}),
22372237
new CulturesForEnumValue((int) MassUnit.Kilotonne,
@@ -2254,7 +2254,7 @@ private static readonly ReadOnlyCollection<UnitLocalization> DefaultLocalization
22542254
new CulturesForEnumValue((int) MassUnit.Megapound,
22552255
new[]
22562256
{
2257-
new AbbreviationsForCulture("en-US", "MLbs"),
2257+
new AbbreviationsForCulture("en-US", "Mlb"),
22582258
new AbbreviationsForCulture("ru-RU", "Mфунт"),
22592259
}),
22602260
new CulturesForEnumValue((int) MassUnit.Megatonne,

UnitsNet/UnitDefinitions/Energy.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838
"Localization": [
3939
{
4040
"Culture": "en-US",
41-
"Abbreviations": [ "BTU" ],
42-
"AbbreviationsWithPrefixes": [ "kBTU", "mBTU", "mmBTU" ]
41+
"Abbreviations": [ "BTU" ]
4342
}
4443
]
4544
},

UnitsNet/UnitDefinitions/Flow.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@
150150
"Localization": [
151151
{
152152
"Culture": "en-US",
153-
"Abbreviations": [ "LPS" ],
154-
"AbbreviationsWithPrefixes": [ "nLPM", "μLPM", "mLPM", "cLPM", "dLPM", "kLPM" ]
153+
"Abbreviations": [ "LPS" ]
155154
}
156155
]
157156
},
@@ -165,8 +164,7 @@
165164
"Localization": [
166165
{
167166
"Culture": "en-US",
168-
"Abbreviations": [ "LPM" ],
169-
"AbbreviationsWithPrefixes": [ "nLPM", "µLPM", "mLPM", "cLPM", "dLPM", "kLPM" ]
167+
"Abbreviations": [ "LPM" ]
170168
}
171169
]
172170
},

UnitsNet/UnitDefinitions/Mass.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@
8585
"Localization": [
8686
{
8787
"Culture": "en-US",
88-
"Abbreviations": [ "lb" ],
89-
"AbbreviationsWithPrefixes": [ "KLbs", "MLbs" ]
88+
"Abbreviations": [ "lb" ]
9089
},
9190
{
9291
"Culture": "ru-RU",

UnitsNet/UnitDefinitions/MassFlow.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@
5353
"Localization": [
5454
{
5555
"Culture": "en-US",
56-
"Abbreviations": [ "lb/h" ],
57-
"AbbreviationsWithPrefixes": [ "Mlb/h" ]
56+
"Abbreviations": [ "lb/h" ]
5857
}
5958
]
6059
},

UnitsNet/UnitDefinitions/Power.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@
8686
"Localization": [
8787
{
8888
"Culture": "en-US",
89-
"Abbreviations": [ "Btu/hr" ],
90-
"AbbreviationsWithPrefixes": [ "kBtu/hr" ]
89+
"Abbreviations": [ "Btu/hr" ]
9190
}
9291
]
9392
}

UnitsNet/UnitDefinitions/Pressure.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@
111111
"Localization": [
112112
{
113113
"Culture": "en-US",
114-
"Abbreviations": [ "N/m²" ],
115-
"AbbreviationsWithPrefixes": [ "kN/m²", "MN/m²" ]
114+
"Abbreviations": [ "N/m²" ]
116115
},
117116
{
118117
"Culture": "ru-RU",
@@ -130,8 +129,7 @@
130129
"Localization": [
131130
{
132131
"Culture": "en-US",
133-
"Abbreviations": [ "N/cm²" ],
134-
"AbbreviationsWithPrefixes": [ "kN/cm²" ]
132+
"Abbreviations": [ "N/cm²" ]
135133
},
136134
{
137135
"Culture": "ru-RU",
@@ -149,8 +147,7 @@
149147
"Localization": [
150148
{
151149
"Culture": "en-US",
152-
"Abbreviations": [ "N/mm²" ],
153-
"AbbreviationsWithPrefixes": [ "kN/mm²" ]
150+
"Abbreviations": [ "N/mm²" ]
154151
},
155152
{
156153
"Culture": "ru-RU",

UnitsNet/UnitDefinitions/VolumeFlow.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@
139139
"Localization": [
140140
{
141141
"Culture": "en-US",
142-
"Abbreviations": [ "LPS" ],
143-
"AbbreviationsWithPrefixes": [ "nLPM", "μLPM", "mLPM", "cLPM", "dLPM", "kLPM" ]
142+
"Abbreviations": [ "LPS" ]
144143
}
145144
]
146145
},
@@ -153,8 +152,7 @@
153152
"Localization": [
154153
{
155154
"Culture": "en-US",
156-
"Abbreviations": [ "LPM" ],
157-
"AbbreviationsWithPrefixes": [ "nLPM", "µLPM", "mLPM", "cLPM", "dLPM", "kLPM" ]
155+
"Abbreviations": [ "LPM" ]
158156
}
159157
]
160158
},

0 commit comments

Comments
 (0)