-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix qps-ploc generation for store translations #17526
Conversation
Get-ChildItem -Recurse -Filter *.resw | ||
| Where-Object { $_.Directory.Name.StartsWith("qps-ploc") } | ||
Get-ChildItem -Recurse -Directory -Filter qps-ploc* | ||
| Get-ChildItem -Include *.resw,*.xml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suppress whitespace changes: https://github.com/microsoft/terminal/pull/17526/files?w=1
$newValue += $padding.Substring(0, $paddingLength) | ||
$value += $padding.Substring(0, $paddingLength) | ||
return $value | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both functions are identical to the code that was previously in the loop below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for doing this!
$entry.value = $newValue | ||
} | ||
} elseif ($path.EndsWith(".xml")) { | ||
foreach ($entry in $content.DocumentElement.SelectNodes('//*[@_locID]/text()')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technically Locked
exists in this format too; do we not have any?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, we actually do.
57: <!-- _locComment_text="{MaxLength=1500} {Locked=__VERSION_NUMBER__} App Release Note" -->Version __VERSION_NUMBER
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah f... Let me try to fix that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we have locked strings
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.
Generate-PseudoLocalizations.ps1
to find the .xml files.(As opposed to .resw for the other translations.)
and stripping comments/attributes as needed.
PreserveWhitespace
during XML loading.Validation Steps Performed
Ran it locally and compared the results. ✅