mirror of https://github.com/icsharpcode/ILSpy.git
6 changed files with 1096 additions and 1071 deletions
@ -0,0 +1,18 @@
@@ -0,0 +1,18 @@
|
||||
$ErrorActionPreference = "Stop"; |
||||
|
||||
[Reflection.Assembly]::LoadWithPartialName("System.Xml.Linq") | Out-Null |
||||
|
||||
Write-Host "Sorting .resx files..."; |
||||
|
||||
Get-ChildItem -Include *.resx -Recurse | foreach ($_) { |
||||
Write-Host $_.FullName; |
||||
|
||||
$doc = [System.Xml.Linq.XDocument]::Load($_.FullName); |
||||
$descendants = [System.Linq.Enumerable]::ToArray($doc.Descendants("data")); |
||||
|
||||
[System.Xml.Linq.Extensions]::Remove($descendants); |
||||
$ordered = [System.Linq.Enumerable]::OrderBy($descendants, [System.Func[System.Xml.Linq.XElement,string]] { param ($e) $e.Attribute("name").Value }, [System.StringComparer]::Ordinal); |
||||
$doc.Root.Add($ordered); |
||||
$doc.Save($_.FullName); |
||||
} |
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue