diff --git a/core/modules/config_translation/config_translation.module b/core/modules/config_translation/config_translation.module index a96b434..336a405 100644 --- a/core/modules/config_translation/config_translation.module +++ b/core/modules/config_translation/config_translation.module @@ -186,7 +186,7 @@ function config_translation_config_schema_info_alter(&$definitions) { // form elements in ConfigTranslationFormBase. Other translatable types will // appear as a one line textfield. foreach ($definitions as $type => &$definition) { - if (!isset($definition['form_element_class']) && isset($map[$type])) { + if (isset($map[$type]) && !isset($definition['form_element_class'])) { $definition['form_element_class'] = $map[$type]; } } diff --git a/core/modules/config_translation/src/FormElement/ListElement.php b/core/modules/config_translation/src/FormElement/ListElement.php index c860fd3..8bd8a52 100644 --- a/core/modules/config_translation/src/FormElement/ListElement.php +++ b/core/modules/config_translation/src/FormElement/ListElement.php @@ -88,16 +88,10 @@ public function getTranslationBuild(LanguageInterface $source_language, Language */ public function setConfig(Config $base_config, LanguageConfigOverride $config_translation, $config_values, $base_key = NULL) { foreach ($this->element as $key => $element) { - // Do not bother traversing schema elements for which no values have been - // submitted. - if (!isset($config_values[$key])) { - continue; - } - $value = $config_values[$key]; - $element_key = implode('.', array_filter(array($base_key, $key))); if ($form_element = ConfigTranslationFormBase::createFormElement($element)) { // Traverse into the next level of the configuration. + $value = isset($config_values[$key]) ? $config_values[$key] : NULL; $form_element->setConfig($base_config, $config_translation, $value, $element_key); } } diff --git a/core/modules/locale/src/LocaleConfigSubscriber.php b/core/modules/locale/src/LocaleConfigSubscriber.php index e89a115..84ad835 100644 --- a/core/modules/locale/src/LocaleConfigSubscriber.php +++ b/core/modules/locale/src/LocaleConfigSubscriber.php @@ -267,7 +267,7 @@ protected function getTranslation($source_value, $langcode, $create_fallback = T return reset($translations); } elseif ($create_fallback) { - return $translation = $this->stringStorage->createTranslation($conditions); + return $this->stringStorage->createTranslation($conditions); } } } diff --git a/core/modules/locale/src/Tests/LocaleConfigSubscriberTest.php b/core/modules/locale/src/Tests/LocaleConfigSubscriberTest.php index ea012b3..2983af9 100644 --- a/core/modules/locale/src/Tests/LocaleConfigSubscriberTest.php +++ b/core/modules/locale/src/Tests/LocaleConfigSubscriberTest.php @@ -110,7 +110,7 @@ public function testUpdateTranslation() { } /** - * Tests updating translations of shipped configuration. + * Tests updating community translations of shipped configuration. */ public function testLocaleUpdateTranslation() { $config_name = 'locale_test.translation'; @@ -135,7 +135,7 @@ public function testDeleteTranslation() { } /** - * Tests deleting translations of shipped configuration. + * Tests deleting community translations of shipped configuration. */ public function testLocaleDeleteTranslation() { $config_name = 'locale_test.translation';