Skip to content

Commit

Permalink
Fix admin label translation domain
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Sep 4, 2020
1 parent 5539f02 commit b5e2d24
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Mapper/BaseGroupedMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,16 @@ protected function addFieldToCurrentGroup($fieldName)
protected function getCurrentGroupName()
{
if (!$this->currentGroup) {
$this->with($this->admin->getLabel(), ['auto_created' => true]);
$adminLabel = $this->admin->getLabel();

if (null !== $adminLabel) {
$this->with($adminLabel, [
'auto_created' => true,
'translation_domain' => $this->admin->getTranslationDomain(),
]);
} else {
$this->with('default', ['auto_created' => true]);
}
}

return $this->currentGroup;
Expand Down

0 comments on commit b5e2d24

Please sign in to comment.