diff --git a/CHANGELOG.md b/CHANGELOG.md index bc174ea..7c6b1ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,14 @@ to structure this file. - Smart log filtering that respects the configured log level - Debug messages are now filtered out by default, providing cleaner output +### Fixed +- LocalizationParser.ps1 now defaults to en-US culture when UICulture parameter is not provided + - Fixes Import-LocalizedData failures in environments with invariant culture + - Ensures localization files can be found in culture-specific subdirectories +- Updated Pester configuration syntax in psake.ps1 for compatibility with Pester 5.x + - Replaced deprecated [PesterConfiguration]@{} with New-PesterConfiguration + - Fixed PassThru parameter usage for modern Pester API + ## [0.1.0] Initial Release - Foundational script `LocalizationParser` looks for `psm1` that container diff --git a/psake.ps1 b/psake.ps1 index ca76262..2077739 100644 --- a/psake.ps1 +++ b/psake.ps1 @@ -7,9 +7,10 @@ Properties { $script:outDir = 'out' $script:scriptDir = $PSScriptRoot - $script:PesterConfiguration = [PesterConfiguration]@{} + $script:PesterConfiguration = New-PesterConfiguration $script:PesterConfiguration.Output.CIFormat = 'Auto' $script:PesterConfiguration.Run.Path = ".\tests\" + $script:PesterConfiguration.Run.PassThru = $true } Task Default -Depends Test @@ -77,7 +78,8 @@ Task VscodeTest -Depends InstallDependencies { Task Pester { Write-Host '🧪 Running Pester tests...' try { - $results = Invoke-Pester -Configuration $script:PesterConfiguration -PassThru + Import-Module Pester + $results = Invoke-Pester -Configuration $script:PesterConfiguration if ($results.FailedCount -gt 0) { Write-Error '❌ Pester tests failed. Please fix the issues before packaging.' exit 1 diff --git a/resources/LocalizationParser.ps1 b/resources/LocalizationParser.ps1 index 150a83f..ba0ccca 100644 --- a/resources/LocalizationParser.ps1 +++ b/resources/LocalizationParser.ps1 @@ -136,6 +136,9 @@ if (Test-Path $file) { } if ($null -ne $UICulture -and -not [String]::IsNullOrEmpty($UICulture.Name)) { $splat['UICulture'] = $UICulture.Name + } else { + # Default to en-US when no UICulture is specified + $splat['UICulture'] = 'en-US' } # Override the base directory if its set $splat['BaseDirectory'] = $parentDirectory