diff --git a/core/lib/Drupal/Core/Config/Testing/ConfigSchemaChecker.php b/core/lib/Drupal/Core/Config/Testing/ConfigSchemaChecker.php index cf5f113..db80944 100644 --- a/core/lib/Drupal/Core/Config/Testing/ConfigSchemaChecker.php +++ b/core/lib/Drupal/Core/Config/Testing/ConfigSchemaChecker.php @@ -66,9 +66,7 @@ public function onConfigSave(ConfigCrudEvent $event) { $name = $saved_config->getName(); $data = $saved_config->get(); $checksum = crc32(serialize($data)); - // Content translation settings cannot be provided schema yet, see - // https://www.drupal.org/node/2363155 - if ($name != 'content_translation.settings' && !isset($this->checked[$name . ':' . $checksum])) { + if (!isset($this->checked[$name . ':' . $checksum])) { $this->checked[$name . ':' . $checksum] = TRUE; $errors = $this->checkConfigSchema($this->typedManager, $name, $data); if ($errors === FALSE) { diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module index df1e077..59b4f7a 100644 --- a/core/modules/content_translation/content_translation.module +++ b/core/modules/content_translation/content_translation.module @@ -12,6 +12,7 @@ use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Language\LanguageInterface; use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\language\Entity\ContentLanguageSettings; use Drupal\node\NodeInterface; /** @@ -269,8 +270,8 @@ function content_translation_get_config_key($entity_type, $bundle, $setting) { * The stored value for the given setting. */ function content_translation_get_config($entity_type, $bundle, $setting) { - $key = content_translation_get_config_key($entity_type, $bundle, $setting); - return \Drupal::config('content_translation.settings')->get($key); + $config = ContentLanguageSettings::loadByEntityTypeBundle($entity_type, $bundle); + return $config->getThirdPartySetting('content_translation', $setting); } /** @@ -286,8 +287,8 @@ function content_translation_get_config($entity_type, $bundle, $setting) { * The value to be stored for the given setting. */ function content_translation_set_config($entity_type, $bundle, $setting, $value) { - $key = content_translation_get_config_key($entity_type, $bundle, $setting); - return \Drupal::config('content_translation.settings')->set($key, $value)->save(); + $config = ContentLanguageSettings::loadByEntityTypeBundle($entity_type, $bundle); + $config->setThirdPartySetting('content_translation', $setting, $value)->save(); } /**