diff --git a/core/modules/locale/src/LocaleConfigSubscriber.php b/core/modules/locale/src/LocaleConfigSubscriber.php index 568ae86..e89a115 100644 --- a/core/modules/locale/src/LocaleConfigSubscriber.php +++ b/core/modules/locale/src/LocaleConfigSubscriber.php @@ -78,6 +78,7 @@ public static function getSubscribedEvents() { * Updates the translation strings when shipped configuration is saved. * * @param \Drupal\language\Config\LanguageConfigOverrideCrudEvent $event + * The language configuration event. */ public function onSave(LanguageConfigOverrideCrudEvent $event) { // Do not mark strings as customized when community translations are being @@ -89,13 +90,14 @@ public function onSave(LanguageConfigOverrideCrudEvent $event) { $callable = [$this, 'saveCustomizedTranslation']; } - $this->onUpdate($event, $callable); + $this->updateTranslationStrings($event, $callable); } /** * Updates the translation strings when shipped configuration is deleted. * * @param \Drupal\language\Config\LanguageConfigOverrideCrudEvent $event + * The language configuration event. */ public function onDelete(LanguageConfigOverrideCrudEvent $event) { if ($this->localeConfigManager->isUpdatingConfigTranslations()) { @@ -109,15 +111,18 @@ public function onDelete(LanguageConfigOverrideCrudEvent $event) { $callable = [$this, 'saveCustomizedTranslation']; } - $this->onUpdate($event, $callable); + $this->updateTranslationStrings($event, $callable); } /** * Updates the translation strings of shipped configuration. * * @param \Drupal\language\Config\LanguageConfigOverrideCrudEvent $event + * The language configuration event. + * @param $callable + * A callable to apply to each translatable string of the configuration. */ - protected function onUpdate(LanguageConfigOverrideCrudEvent $event, $callable) { + protected function updateTranslationStrings(LanguageConfigOverrideCrudEvent $event, $callable) { $translation_config = $event->getLanguageConfigOverride(); $name = $translation_config->getName();