Skip to content

Commit be4bb55

Browse files
DiSniderAndreas Gullberg Larsen
authored and
Andreas Gullberg Larsen
committed
Fix missing prefixes for localized abbreviations (#297)
1 parent 120182d commit be4bb55

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

UnitsNet/Scripts/GenerateUnits.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ function Add-PrefixUnits {
211211
Localization=$unit.Localization | % {
212212
$abbrev = $prefixAbbreviation + $_.Abbreviations[0]
213213
if ($_.AbbreviationsWithPrefixes) {
214-
$abbrev = $_.AbbreviationsWithPrefixes[$prefixIndex++]
214+
$abbrev = $_.AbbreviationsWithPrefixes[$prefixIndex]
215215
}
216216

217217
New-Object PsObject -Property @{
@@ -222,6 +222,7 @@ function Add-PrefixUnits {
222222

223223
# Append prefix unit
224224
$prefixUnits += $prefixUnit
225+
$prefixIndex++;
225226
} # foreach prefixes
226227
} # foreach units
227228

0 commit comments

Comments
 (0)