fix(widgets): hero title/subtitle/CTA now locale-aware
P0-3: hero widget text rendered hardcoded English on every locale (ru/hy included) because HeroWidgetData source props were plain strings with no per-locale variant, unlike nav labels which already support a locale map (NavigationLocalizedText). DataSourceResolverService.toHeroData() now accepts either a plain string (existing tenants unaffected) or a per-locale text map for title/subtitle/ctaLabel and each slide's fields, resolved against the active language the same way footer group titles already are (LocalizedTextContent, current lang -> en -> first available). Updated the mock bootstrap fixture's hero props to a real ru/en/hy map so the demo tenant shows translated copy instead of English on every locale. No editor UI change needed: the Widgets section's existing JSON-fallback editor already accepts arbitrary prop shapes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -398,9 +398,21 @@
|
||||
},
|
||||
"visible": true,
|
||||
"props": {
|
||||
"title": "Welcome to Marketplace Platform",
|
||||
"subtitle": "Configuration-driven multi-tenant commerce",
|
||||
"ctaLabel": "Start Shopping"
|
||||
"title": {
|
||||
"ru": "Добро пожаловать на Маркетплейс",
|
||||
"en": "Welcome to Marketplace Platform",
|
||||
"hy": "Բարի գալուստ Մարքեթփլեյս"
|
||||
},
|
||||
"subtitle": {
|
||||
"ru": "Конфигурируемая мультитенантная торговая площадка",
|
||||
"en": "Configuration-driven multi-tenant commerce",
|
||||
"hy": "Կոնֆիգուրացիայով կառավարվող բազմատենանտ առևտրի հարթակ"
|
||||
},
|
||||
"ctaLabel": {
|
||||
"ru": "Начать покупки",
|
||||
"en": "Start Shopping",
|
||||
"hy": "Սկսել գնումները"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user