mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-11-26 07:26:18 +01:00
Refactor feature label handling to utilize language catalogs (#890)
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
Iterates over every non-control parameter in $script:Params and emits a
|
||||
human-readable line for each change that will be applied. For the
|
||||
'RemoveApps' parameter the list of targeted app names is displayed
|
||||
inline. Feature labels are resolved from Features.json when available;
|
||||
inline. Feature labels are resolved from the language catalogs when available;
|
||||
otherwise the raw parameter name is used as a fallback.
|
||||
|
||||
After printing the summary the function pauses until the user presses
|
||||
@@ -16,7 +16,7 @@ function Write-PendingChanges {
|
||||
Write-Output "Win11Debloat will make the following changes:"
|
||||
|
||||
if ($script:Params['CreateRestorePoint']) {
|
||||
Write-Output "- $($script:Features['CreateRestorePoint'].Label)"
|
||||
Write-Output "- $(Get-Translation -Key 'CreateRestorePoint' -Field 'Label' -Section 'Features')"
|
||||
}
|
||||
foreach ($parameterName in $script:Params.Keys) {
|
||||
if ($script:ControlParams -contains $parameterName) {
|
||||
@@ -45,7 +45,7 @@ function Write-PendingChanges {
|
||||
continue
|
||||
}
|
||||
default {
|
||||
$message = $script:Features[$parameterName].Label
|
||||
$message = Get-Translation -Key $parameterName -Field 'Label' -Section 'Features'
|
||||
Write-Output "- $message"
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user