When a custom widget is created (e.g. an element tree widget named my-widget), its name field acts as a translation key. While the translation is correctly applied in some places (e.g. the tab/border title in the widget manager, which goes through useWidgetTitle → t(config.translationKey)), it is not applied in the perspective editor's widget configuration card.
The component WidgetConfigurationCardItem renders the widget name directly from the WidgetConfig object without passing it through the translation function:
<span>{widget.name}</span>
This means users see the raw translation key (e.g. my-widget) instead of the translated label (e.g. My Widget) when viewing or editing widgets inside the perspective editor.
Expected behavior
The widget name should be translated using t(widget.name) so that the translated label is consistently shown across all UI locations, including the perspective editor card item.
Actual behavior
The raw widget name (translation key) is displayed in the perspective editor card item instead of the translated label.
Affected file
assets/js/src/core/modules/perspective-editor/components/perspective-form/components/widget-configurator/components/widget-configuration-card-item/widget-configuration-card-item.tsx
Proposed fix
Add the useTranslation hook and replace the raw widget.name reference:
const { t } = useTranslation()
// ...
<span>{t(widget.name)}</span>
Reference: PEES-1151
When a custom widget is created (e.g. an element tree widget named
my-widget), itsnamefield acts as a translation key. While the translation is correctly applied in some places (e.g. the tab/border title in the widget manager, which goes throughuseWidgetTitle→t(config.translationKey)), it is not applied in the perspective editor's widget configuration card.The component
WidgetConfigurationCardItemrenders the widget name directly from theWidgetConfigobject without passing it through the translation function:This means users see the raw translation key (e.g.
my-widget) instead of the translated label (e.g.My Widget) when viewing or editing widgets inside the perspective editor.Expected behavior
The widget name should be translated using
t(widget.name)so that the translated label is consistently shown across all UI locations, including the perspective editor card item.Actual behavior
The raw widget name (translation key) is displayed in the perspective editor card item instead of the translated label.
Affected file
assets/js/src/core/modules/perspective-editor/components/perspective-form/components/widget-configurator/components/widget-configuration-card-item/widget-configuration-card-item.tsxProposed fix
Add the
useTranslationhook and replace the rawwidget.namereference:Reference: PEES-1151