Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [alex] reported by reviewdog 🐶
Be careful with failures, it’s profane in some cases failures retext-profanities

- 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
Expand Down
6 changes: 4 additions & 2 deletions psake.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
$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
Expand Down Expand Up @@ -77,7 +78,8 @@
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
Expand Down Expand Up @@ -135,7 +137,7 @@
$md = ConvertFrom-Markdown $ChangeLogPath
$content = Get-Content $ChangeLogPath
# Get level 2 headers
$headers = $md.Tokens | Where-Object { $_.GetType() -eq [Markdig.Syntax.HeadingBlock] -and $_.Level -eq 2 }

Check warning on line 140 in psake.ps1

View workflow job for this annotation

GitHub Actions / Run Linters

Unknown word (Markdig) Suggestions: (mardi, markdn, markit, Markit, marking)
# Grab the first header line
$firstHeaderLine = $headers[0].Line

Expand Down
3 changes: 3 additions & 0 deletions resources/LocalizationParser.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading