code: public function prepareSubPalettes(BuildDataDefinitionEvent $event)
      {
          $container = $event->getContainer();
          if ($container->getName() !== 'tl_metamodel_filtersetting') {
              return;
          }
  
          foreach ($this->filterFactory->getTypeNames() as $filterType) {
              $paletteName = $filterType . '_palettes';
  
              if (!isset($GLOBALS['TL_DCA']['tl_metamodel_filtersetting'][$paletteName])) {
                  continue;
              }
  
              $palettes    = $container->getPalettesDefinition();
              $typeLegends = $GLOBALS['TL_DCA']['tl_metamodel_filtersetting'][$paletteName];
  
              foreach ($palettes->getPalettes() as $palette) {
                  $this->createConditionsForPalette($palette, $typeLegends);
              }
          }
      }
docs: Prepares the sub palettes e. g. add option for translated attributes for different filter types.
  
  @param BuildDataDefinitionEvent $event The event.
  
  @return void
  
  @SuppressWarnings(PHPMD.Superglobals)
  @SuppressWarnings(PHPMD.CamelCaseVariableName)