Use en-Us locale when using ToUpper() (#6177)

This commit is contained in:
Mehmet Murat Akburak
2020-08-26 17:54:28 +03:00
committed by GitHub
parent 3bd6c363de
commit c3652786ff

View File

@@ -109,13 +109,14 @@ Foreach-Object {
# Each line of the resgen text file is of the form ResourceName=ResourceValue with no spaces. # Each line of the resgen text file is of the form ResourceName=ResourceValue with no spaces.
$content = $line -split "=", 2 $content = $line -split "=", 2
$culture = [System.Globalization.CultureInfo]::GetCultureInfo('en-US')
# Each resource is named as IDS_ResxResourceName, in uppercase # Each resource is named as IDS_ResxResourceName, in uppercase
$lineInRCFormat = "IDS_" + $content[0].ToUpper() + " L`"" + $content[1] + "`"" $lineInRCFormat = "IDS_" + $content[0].ToUpper($culture) + " L`"" + $content[1] + "`""
$newLinesForRCFile = $newLinesForRCFile + "`r`n " + $lineInRCFormat $newLinesForRCFile = $newLinesForRCFile + "`r`n " + $lineInRCFormat
# Resource header file needs to be updated only for one language # Resource header file needs to be updated only for one language
if (!$headerFileUpdated) { if (!$headerFileUpdated) {
$lineInHeaderFormat = "#define IDS_" + $content[0].ToUpper() + " " + $count.ToString() $lineInHeaderFormat = "#define IDS_" + $content[0].ToUpper($culture) + " " + $count.ToString()
$newLinesForHeaderFile = $newLinesForHeaderFile + "`r`n" + $lineInHeaderFormat $newLinesForHeaderFile = $newLinesForHeaderFile + "`r`n" + $lineInHeaderFormat
$count++ $count++
} }