Add localization framework for the GUI (en-US baseline) (#764)

Credit to @jmolinap2 for their work in #643, which was used as inspiration.
This commit is contained in:
Sashank
2026-09-10 17:48:43 +02:00
committed by GitHub
parent 6012b02ea2
commit 32024662f3
62 changed files with 2947 additions and 742 deletions
+13
View File
@@ -42,4 +42,17 @@ Describe 'Import-JsonFile' {
$result | Should -BeNullOrEmpty
Should -Invoke Write-Error -Times 0 -Exactly
}
It 'reads non-ASCII characters correctly from a UTF-8 file with no BOM, regardless of the system default encoding' {
# Unicode escapes here, not literal accented characters: this test file has no BOM, so
# PowerShell 5.1 would decode literal non-ASCII source characters using the system default
# codepage too, defeating the point of the assertion on a non-UTF-8-default machine.
$expectedName = "Espa$([char]0x00F1)ol"
$expectedNote = "caf$([char]0x00E9), na$([char]0x00EF)ve, $([char]0x00FC)ber"
$result = Import-JsonFile -filePath (Join-Path $script:FixturePath 'Config.Utf8NoBom.json')
$result.Name | Should -Be $expectedName
$result.Note | Should -Be $expectedNote
}
}