From 577a382ab216a13c13e6764978aa36267e8fb9c2 Mon Sep 17 00:00:00 2001 From: Ingolf Steinhardt Date: Mon, 23 Sep 2024 19:17:22 +0200 Subject: [PATCH 1/2] Fix OverrideAllHandler.php --- .../ActionHandler/MultipleHandler/OverrideAllHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Contao/View/Contao2BackendView/ActionHandler/MultipleHandler/OverrideAllHandler.php b/src/Contao/View/Contao2BackendView/ActionHandler/MultipleHandler/OverrideAllHandler.php index a2d42b17..21b77017 100644 --- a/src/Contao/View/Contao2BackendView/ActionHandler/MultipleHandler/OverrideAllHandler.php +++ b/src/Contao/View/Contao2BackendView/ActionHandler/MultipleHandler/OverrideAllHandler.php @@ -329,7 +329,7 @@ private function renderFieldSets( $translator = $environment->getTranslator(); assert($translator instanceof TranslatorInterface); - if ('' !== $fieldSet['palette']) { + if ('' === $fieldSet['palette']) { $fieldSet['palette'] = \sprintf( '

 

%s

 

', $translator->translate('no_properties_available', 'dc-general') From fd35d716191b9922d9c9ae376f09ee4234f4c1e1 Mon Sep 17 00:00:00 2001 From: Ingolf Steinhardt Date: Mon, 23 Sep 2024 19:31:48 +0200 Subject: [PATCH 2/2] Fix translation of property --- .../MultipleHandler/SelectPropertyAllHandler.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Contao/View/Contao2BackendView/ActionHandler/MultipleHandler/SelectPropertyAllHandler.php b/src/Contao/View/Contao2BackendView/ActionHandler/MultipleHandler/SelectPropertyAllHandler.php index f55073eb..21dc2e47 100644 --- a/src/Contao/View/Contao2BackendView/ActionHandler/MultipleHandler/SelectPropertyAllHandler.php +++ b/src/Contao/View/Contao2BackendView/ActionHandler/MultipleHandler/SelectPropertyAllHandler.php @@ -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'