Refactor translation handling across scripts

This commit is contained in:
Jeffrey
2026-10-21 19:45:58 +02:00
parent 97f3f805ef
commit 785f134153
12 changed files with 120 additions and 851 deletions
+13
View File
@@ -63,6 +63,19 @@ Describe 'Get-RebootFeatureLabels' {
$result | Should -Contain 'Apply feature'
}
It 'resolves undo labels when feature metadata contains no display text' {
$script:Features = @{
ApplyFeature = [PSCustomObject]@{ RequiresReboot = $true }
UndoFeature = [PSCustomObject]@{ RequiresReboot = $true }
}
$result = @(Get-RebootFeatureLabels)
$result | Should -HaveCount 2
$result | Should -Contain 'Undo apply feature'
$result | Should -Contain 'Undo feature'
}
It 'falls back to the regular label when an undo selection has no undo label' {
$script:Params = @{}
$script:UndoParams = @{ ApplyFeature = $true }