Add localization framework for the GUI (en-US baseline) (#764)

Credit to @jmolinap2 for their work in #643, which was used as inspiration.
This commit is contained in:
Sashank
2026-09-10 17:48:43 +02:00
committed by GitHub
parent 6012b02ea2
commit 32024662f3
62 changed files with 2947 additions and 742 deletions
@@ -81,8 +81,9 @@ function Test-RestoreDialogFeatureCanAutoRevert {
Resolves a human-readable label for a feature shown in the restore dialog.
.DESCRIPTION
Returns the feature's Label from Features.json when found, falling back
to the raw FeatureId string. For null/empty FeatureIds returns 'Unknown feature'.
Returns the feature's translated Label when found, falling back to the
raw FeatureId string. For null/empty FeatureIds returns the translated
"unknown feature" placeholder.
.PARAMETER FeatureId
The feature identifier to resolve a label for.
@@ -97,12 +98,12 @@ function Get-RestoreDialogFeatureDisplayLabel {
)
if ([string]::IsNullOrWhiteSpace($FeatureId)) {
return 'Unknown feature'
return Get-Translation -Key 'RestoreUnknownFeature'
}
$featureDefinition = Get-RestoreDialogFeatureDefinition -FeatureId $FeatureId -Features $Features
if ($featureDefinition) {
return [string]$featureDefinition.Label
return Get-Translation -Key $FeatureId -Field 'Label' -Section 'Features'
}
return $FeatureId