Skip to content

Commit

Permalink
Merge branch 'master' into release/2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zonky2 committed Sep 24, 2024
2 parents e5182c9 + d328beb commit 7f17920
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ private function renderFieldSets(
$translator = $environment->getTranslator();
assert($translator instanceof TranslatorInterface);

if ('' !== $fieldSet['palette']) {
if ('' === $fieldSet['palette']) {
$fieldSet['palette'] = \sprintf(
'<p>&nbsp;</p><strong>%s</strong><p>&nbsp;</p>',
$translator->translate('no_properties_available', 'dc-general')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,18 @@ private function isPropertyAllowed(PropertyInterface $property, EnvironmentInter
$inputProvider = $environment->getInputProvider();
assert($inputProvider instanceof InputProviderInterface);

$definition = $environment->getDataDefinition();
assert($definition instanceof ContainerInterface);

$modelName = $definition->getBasicDefinition()->getDataProvider();

Message::addInfo(
$translator->translate(
'not_allowed_property_info',
'dc-general',
[
'%property%' => $property->getLabel() ?: $property->getName(),
'%property%' => $translator->translate($property->getLabel(), $modelName)
?: $property->getName(),
'%mode%' => $translator->translate(
$inputProvider->getParameter('mode') . 'Selected',
'dc-general'
Expand Down

0 comments on commit 7f17920

Please sign in to comment.