mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-10 18:43:54 -06:00
This fixes some more issues not properly covered by #17526: * Fixed `_locComment_text` comments being effectively ignored. * Fixed line splitting of comments (CRLF vs LF). * Fixed BOM suppression. * Fixed support for having multiple `{Locked=...}` comments.
18 lines
691 B
PowerShell
18 lines
691 B
PowerShell
Get-ChildItem -Recurse -Directory -Filter qps-ploc*
|
|
| Get-ChildItem -Include *.resw,*.xml
|
|
| ForEach-Object {
|
|
$source = Join-Path $_.Directory "../en-US/$($_.Name)"
|
|
$target = $_
|
|
|
|
$ploc = ./tools/ConvertTo-PseudoLocalization.ps1 -Path $source
|
|
|
|
$writerSettings = [System.Xml.XmlWriterSettings]::new()
|
|
$writerSettings.NewLineChars = "`r`n"
|
|
$writerSettings.Indent = $true
|
|
$writerSettings.Encoding = [System.Text.UTF8Encoding]::new($false) # suppress the BOM
|
|
$writer = [System.Xml.XmlWriter]::Create($target, $writerSettings)
|
|
$ploc.Save($writer)
|
|
$writer.Flush()
|
|
$writer.Close()
|
|
}
|