Refactor feature label handling to utilize language catalogs (#890)

This commit is contained in:
Jeffrey
2026-11-08 17:55:46 +01:00
committed by GitHub
parent cf691cda94
commit e6184a2597
29 changed files with 173 additions and 677 deletions
+1 -11
View File
@@ -37,17 +37,7 @@ BeforeAll {
}
}
Describe 'Get-UndoFeatureLabel' {
BeforeEach {
$script:UndoFeatureLabelLookup = @{ DisableTelemetry = 'Enable telemetry' }
$script:FeatureLabelLookup = @{ DisableTelemetry = 'Disable telemetry'; DisableWidgets = 'Disable widgets' }
}
It 'prefers undo labels and falls back to feature labels' {
Get-UndoFeatureLabel -FeatureId 'DisableTelemetry' | Should -Be 'Enable telemetry'
Get-UndoFeatureLabel -FeatureId 'DisableWidgets' | Should -Be 'Disable widgets'
}
Describe 'Main window helpers' {
It 'reads selected app IDs from string or array settings and removes blanks' {
$stringSettings = [PSCustomObject]@{ Settings = @([PSCustomObject]@{ Name = 'Apps'; Value = ' One.App, ,Two.App ' }) }
$arraySettings = [PSCustomObject]@{ Settings = @([PSCustomObject]@{ Name = 'Apps'; Value = @(' One.App ', '', 'Two.App') }) }