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
+3 -5
View File
@@ -323,7 +323,7 @@ function Get-Translation {
<#
.SYNOPSIS
Looks up a translated label for one value of a UiGroup, falling back to en-US, then to the raw label.
Looks up a translated label for one value of a UiGroup, falling back to en-US, then to the feature ID.
.DESCRIPTION
UiGroups[GroupId].Values in the language files is a FeatureId -> Label map, one level deeper
@@ -336,13 +336,11 @@ function Get-GroupValueTranslation {
[string]$GroupId,
[Parameter(Mandatory)]
[string]$FeatureId,
[Parameter(Mandatory)]
[string]$FallbackLabel,
[object]$Lang = $script:Lang
)
if (-not $Lang) {
return $FallbackLabel
return $FeatureId
}
foreach ($candidateLang in (Get-LanguageFallbackChain -Lang $Lang)) {
@@ -357,7 +355,7 @@ function Get-GroupValueTranslation {
}
}
return $FallbackLabel
return $FeatureId
}
<#