diff --git a/core/modules/locale/src/LocaleConfigManager.php b/core/modules/locale/src/LocaleConfigManager.php index e67f3bc..facdaeb 100644 --- a/core/modules/locale/src/LocaleConfigManager.php +++ b/core/modules/locale/src/LocaleConfigManager.php @@ -603,10 +603,12 @@ public function updateConfigTranslations(array $names, array $langcodes = []) { $count++; } } - elseif (locale_is_translatable($langcode)) { + elseif (locale_is_translatable($langcode) && $name != 'system.site') { // If the language code is the active storage language, we should // update. If it is English, we should only update if English is also - // translatable. + // translatable. The system.site configuration is special because it + // is written during installation using the langcode at installation + // time. $active = NestedArray::mergeDeepArray([$active, $processed], TRUE); $this->saveTranslationActive($name, $active); $count++; diff --git a/core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageTest.php b/core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageTest.php index a608cad..dcde753 100644 --- a/core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageTest.php +++ b/core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageTest.php @@ -51,13 +51,29 @@ protected function getPo($langcode) { msgid "Language" msgstr "Language $langcode" + +#: Testing site name configuration during the installer. +msgid "Drupal" +msgstr "Drupal" ENDPO; } /** + * {@inheritdoc} + */ + protected function installParameters() { + $params = parent::installParameters(); + $params['forms']['install_configure_form']['site_name'] = 'SITE_NAME_' . $this->langcode; + return $params; + } + + /** * Tests that translations ended up at the expected places. */ public function testTranslationsLoaded() { + // Ensure the title is correct. + $this->assertEqual('SITE_NAME_' . $this->langcode, \Drupal::config('system.site')->get('name')); + // Verify German and Spanish were configured. $this->drupalGet('admin/config/regional/language'); $this->assertText('German');