diff --git a/core/modules/config_translation/src/ConfigNamesMapper.php b/core/modules/config_translation/src/ConfigNamesMapper.php index b573ac8ca8..c00c60a229 100644 --- a/core/modules/config_translation/src/ConfigNamesMapper.php +++ b/core/modules/config_translation/src/ConfigNamesMapper.php @@ -381,7 +381,7 @@ public function getWeight() { * {@inheritdoc} */ public function populateFromRouteMatch(RouteMatchInterface $route_match) { - $this->setLangcode($route_match->getParameter('langcode')); + $this->langcode = $route_match->getParameter('langcode'); // Dispatches the ConfigTranslationEvents::POPULATE_MAPPER event. $event = new ConfigMapperPopulateEvent($this, $route_match); diff --git a/core/modules/config_translation/src/Event/ConfigTranslationEvents.php b/core/modules/config_translation/src/Event/ConfigTranslationEvents.php index 652c9e1a69..da392fa5c7 100644 --- a/core/modules/config_translation/src/Event/ConfigTranslationEvents.php +++ b/core/modules/config_translation/src/Event/ConfigTranslationEvents.php @@ -10,6 +10,9 @@ /** * The name of the event dispatched when a configuration mapper is populated. * + * Allows modules to add related config for translation on a specific + * translation form. + * * @see \Drupal\config_translation\ConfigMapperInterface::populateFromRouteMatch() */ const POPULATE_MAPPER = 'config_translation.populate_mapper'; diff --git a/core/modules/config_translation/tests/modules/config_translation_test/src/EventSubscriber/ConfigTranslationTestSubscriber.php b/core/modules/config_translation/tests/modules/config_translation_test/src/EventSubscriber/ConfigTranslationTestSubscriber.php index 3140244e58..aa76073257 100644 --- a/core/modules/config_translation/tests/modules/config_translation_test/src/EventSubscriber/ConfigTranslationTestSubscriber.php +++ b/core/modules/config_translation/tests/modules/config_translation_test/src/EventSubscriber/ConfigTranslationTestSubscriber.php @@ -1,10 +1,5 @@