From 06a7d942e154d5e10687964cb996f9238d6ede54 Mon Sep 17 00:00:00 2001 From: Ingolf Steinardt Date: Mon, 8 Jul 2024 22:50:52 +0200 Subject: [PATCH] Fix item headline --- .../Table/DcaSetting/EditMaskSubHeadlineListener.php | 4 ++-- .../Resources/translations/tl_metamodel_item.en.xlf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/EditMaskSubHeadlineListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/EditMaskSubHeadlineListener.php index 4dcb4aa8c..c03466f68 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/EditMaskSubHeadlineListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/EditMaskSubHeadlineListener.php @@ -99,7 +99,7 @@ public function __invoke(GetEditMaskSubHeadlineEvent $event): void $screen = $this->inputScreens->fetchInputScreens([$metaModelName => $metaModel->getActiveInputScreen()]); $screenMeta = $screen[$metaModelName]['meta'] ?? null; - if (null === $screenMeta || null === ($headline = ($screenMeta['subheadline'] ?? null))) { + if (null === $screenMeta || '' === ($headline = ($screenMeta['subheadline'] ?? ''))) { return; } @@ -114,7 +114,7 @@ public function __invoke(GetEditMaskSubHeadlineEvent $event): void // Translate language key and add headline part. $subHeadline = - $this->translator->trans('editRecord', ['%item%' => $headlineAdd], $metaModelName); + $this->translator->trans('editRecord', ['%id%' => $headlineAdd], $metaModelName); $event->setHeadline($subHeadline); } diff --git a/src/CoreBundle/Resources/translations/tl_metamodel_item.en.xlf b/src/CoreBundle/Resources/translations/tl_metamodel_item.en.xlf index 56e1fb534..25e2a41e9 100644 --- a/src/CoreBundle/Resources/translations/tl_metamodel_item.en.xlf +++ b/src/CoreBundle/Resources/translations/tl_metamodel_item.en.xlf @@ -91,7 +91,7 @@ Check this if you want to make this the base for the current variant group - Edit item %item% + Edit item %id% Create a new item