Skip to content

Commit

Permalink
✏️💥Add parantheses around denominators in unit abbreviations (#1405)
Browse files Browse the repository at this point in the history
Fixes #1349

Wrapping multiplications in denominators with parantheses to make it
more clear.
Leaving numerators alone.

Example: `lb/ft·s` => `lb/(ft·s)`

Search: `(Abbreviations":.*?")([^"]*?)\/((?:[^"(]*?)·(?:[^")]*?))"`
Replace: `$1$2/($3)"`
  • Loading branch information
angularsen authored Jul 8, 2024
1 parent ea9d006 commit 68e4a42
Show file tree
Hide file tree
Showing 18 changed files with 257 additions and 257 deletions.
2 changes: 1 addition & 1 deletion Common/UnitDefinitions/DynamicViscosity.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "lb/ft·s" ]
"Abbreviations": [ "lb/(ft·s)" ]
}
]
}
Expand Down
12 changes: 6 additions & 6 deletions Common/UnitDefinitions/HeatFlux.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "BTU/s·in²" ]
"Abbreviations": [ "BTU/(s·in²)" ]
}
]
},
Expand All @@ -68,7 +68,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "BTU/s·ft²" ]
"Abbreviations": [ "BTU/(s·ft²)" ]
}
]
},
Expand All @@ -80,7 +80,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "BTU/min·ft²" ]
"Abbreviations": [ "BTU/(min·ft²)" ]
}
]
},
Expand All @@ -92,7 +92,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "BTU/h·ft²" ]
"Abbreviations": [ "BTU/(h·ft²)" ]
}
]
},
Expand All @@ -105,7 +105,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "cal/s·cm²" ]
"Abbreviations": [ "cal/(s·cm²)" ]
}
]
},
Expand All @@ -117,7 +117,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "kcal/h·m²" ]
"Abbreviations": [ "kcal/(h·m²)" ]
}
]
},
Expand Down
8 changes: 4 additions & 4 deletions Common/UnitDefinitions/HeatTransferCoefficient.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "W/m²·K" ]
"Abbreviations": [ "W/(m²·K)" ]
}
]
},
Expand All @@ -28,7 +28,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "W/m²·°C" ]
"Abbreviations": [ "W/(m²·°C)" ]
}
]
},
Expand All @@ -40,7 +40,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "Btu/h·ft²·°F", "Btu/ft²·h·°F", "Btu/hr·ft²·°F", "Btu/ft²·hr·°F" ]
"Abbreviations": [ "Btu/(h·ft²·°F)", "Btu/(ft²·h·°F)", "Btu/(hr·ft²·°F)", "Btu/(ft²·hr·°F)" ]
}
]
},
Expand All @@ -53,7 +53,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "kcal/h·m²·°C", "kcal/m²·h·°C", "kcal/hr·m²·°C", "kcal/m²·hr·°C" ]
"Abbreviations": [ "kcal/(h·m²·°C)", "kcal/(m²·h·°C)", "kcal/(hr·m²·°C)", "kcal/(m²·hr·°C)" ]
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion Common/UnitDefinitions/SpecificEntropy.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "BTU/lb·°F", "BTU/lbm·°F" ]
"Abbreviations": [ "BTU/(lb·°F)", "BTU/(lbm·°F)" ]
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions Common/UnitDefinitions/ThermalConductivity.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "W/m·K" ]
"Abbreviations": [ "W/(m·K)" ]
}
]
},
Expand All @@ -30,7 +30,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "BTU/h·ft·°F" ]
"Abbreviations": [ "BTU/(h·ft·°F)" ]
}
]
}
Expand Down
8 changes: 4 additions & 4 deletions Common/UnitDefinitions/VolumetricHeatCapacity.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "J/m³·K" ]
"Abbreviations": [ "J/(m³·K)" ]
}
]
},
Expand All @@ -32,7 +32,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "J/m³·°C" ]
"Abbreviations": [ "J/(m³·°C)" ]
}
]
},
Expand All @@ -45,7 +45,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "cal/cm³·°C" ]
"Abbreviations": [ "cal/(cm³·°C)" ]
}
]
},
Expand All @@ -57,7 +57,7 @@
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "BTU/ft³·°F" ]
"Abbreviations": [ "BTU/(ft³·°F)" ]
}
]
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 68e4a42

Please sign in to comment.