Skip to content

Commit

Permalink
Merge branch 'hotfix/fix_item_headline' into 'release/2.3.0'
Browse files Browse the repository at this point in the history
Fix item headline

See merge request metamodels/core!295
  • Loading branch information
zonky2 committed Jul 8, 2024
2 parents 60c2a1b + 06a7d94 commit fe52585
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<source>Check this if you want to make this the base for the current variant group</source>
</trans-unit>
<trans-unit id="editRecord" resname="editRecord">
<source>Edit item %item%</source>
<source>Edit item %id%</source>
</trans-unit>
<trans-unit id="newRecord" resname="newRecord">
<source>Create a new item</source>
Expand Down

0 comments on commit fe52585

Please sign in to comment.