diff --git a/core/modules/locale/src/Tests/LocaleConfigTranslationImportTest.php b/core/modules/locale/src/Tests/LocaleConfigTranslationImportTest.php
index 75966b8..6605b3b 100644
--- a/core/modules/locale/src/Tests/LocaleConfigTranslationImportTest.php
+++ b/core/modules/locale/src/Tests/LocaleConfigTranslationImportTest.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\locale\Tests;
 
+use Drupal\locale\Locale;
 use Drupal\simpletest\WebTestBase;
 use Drupal\language\Entity\ConfigurableLanguage;
 use Drupal\Core\Url;
@@ -26,19 +27,11 @@ class LocaleConfigTranslationImportTest extends WebTestBase {
   public static $modules = array('language', 'locale_test_translate');
 
   /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-
-    $admin_user = $this->drupalCreateUser(array('administer modules', 'administer site configuration', 'administer languages', 'access administration pages', 'administer permissions'));
-    $this->drupalLogin($admin_user);
-  }
-
-  /**
    * Test update changes configuration translations if enabled after language.
    */
   public function testConfigTranslationImport() {
+    $admin_user = $this->drupalCreateUser(array('administer modules', 'administer site configuration', 'administer languages', 'access administration pages', 'administer permissions'));
+    $this->drupalLogin($admin_user);
 
     // Add a language. The Afrikaans translation file of locale_test_translate
     // (test.af.po) has been prepared with a configuration translation.
@@ -77,4 +70,156 @@ public function testConfigTranslationImport() {
     $this->assertEqual($override->get('message'), 'Ons is tans besig met onderhoud op @site. Wees asseblief geduldig, ons sal binnekort weer terug wees.');
   }
 
+  /**
+   * Test update changes configuration translations if enabled after language.
+   */
+  public function testConfigTranslationModuleInstall() {
+
+    // Enable locale, block and config_translation modules.
+    $this->container->get('module_installer')->install(['block', 'config_translation']);
+    $this->resetAll();
+
+    $admin_user = $this->drupalCreateUser(array('administer modules', 'administer site configuration', 'administer languages', 'access administration pages', 'administer permissions', 'translate configuration'));
+    $this->drupalLogin($admin_user);
+
+    // Enable import of translations. By default this is disabled for automated
+    // tests.
+    $this->config('locale.settings')
+      ->set('translation.import_enabled', TRUE)
+      ->save();
+
+    // Add predefined language.
+    $this->drupalPostForm('admin/config/regional/language/add', ['predefined_langcode' => 'af'], t('Add language'));
+
+    // Add the system branding block to the page.
+    $this->drupalPlaceBlock('system_branding_block', array('region' => 'header', 'id' => 'site-branding'));
+    $this->drupalPostForm('admin/config/system/site-information', ['site_slogan' => 'Test site slogan'], 'Save configuration');
+    $this->drupalPostForm('admin/config/system/site-information/translate/af/edit', ['translation[config_names][system.site][slogan]' => 'Test site slogan in Afrikaans'], 'Save translation');
+
+    // Get the front page and ensure that the translated configuration appears.
+    $this->drupalGet('af');
+    $this->assertText('Test site slogan in Afrikaans');
+
+    $override = \Drupal::languageManager()->getLanguageConfigOverride('af', 'locale_test_translate.settings');
+    $this->assertEqual('Locale can translate Afrikaans', $override->get('translatable_default_with_translation'));
+
+    // Update test configuration.
+    $override
+      ->set('translatable_no_default', 'This translation is preserved')
+      ->set('translatable_default_with_translation', 'This translation is preserved')
+      ->set('translatable_default_with_no_translation', 'This translation is preserved')
+      ->save();
+
+    // Install any module.
+    $this->drupalPostForm('admin/modules', ['modules[Core][dblog][enable]' => 'dblog'], t('Install'));
+    $this->assertText('Module Database Logging has been enabled.');
+
+    // Get the front page and ensure that the translated configuration still
+    // appears.
+    $this->drupalGet('af');
+    $this->assertText('Test site slogan in Afrikaans');
+
+    $this->rebuildContainer();
+    $override = \Drupal::languageManager()->getLanguageConfigOverride('af', 'locale_test_translate.settings');
+    $expected = [
+      'translatable_no_default' => 'This translation is preserved',
+      'translatable_default_with_translation' => 'This translation is preserved',
+      'translatable_default_with_no_translation' => 'This translation is preserved'
+    ];
+    $this->assertEqual($expected, $override->get());
+  }
+
+  /**
+   * Test removing a string from Locale deletes configuration translations.
+   */
+  function testLocaleRemovalAndConfigOverrideDelete() {
+    // Enable the locale module.
+    $this->container->get('module_installer')->install(['locale']);
+    $this->resetAll();
+
+    $admin_user = $this->drupalCreateUser(array('administer modules', 'administer site configuration', 'administer languages', 'access administration pages', 'administer permissions', 'translate interface'));
+    $this->drupalLogin($admin_user);
+
+    // Enable import of translations. By default this is disabled for automated
+    // tests.
+    $this->config('locale.settings')
+      ->set('translation.import_enabled', TRUE)
+      ->save();
+
+    // Add predefined language.
+    $this->drupalPostForm('admin/config/regional/language/add', ['predefined_langcode' => 'af'], t('Add language'));
+
+    $override = \Drupal::languageManager()->getLanguageConfigOverride('af', 'locale_test_translate.settings');
+    $this->assertEqual(['translatable_default_with_translation' => 'Locale can translate Afrikaans'], $override->get());
+
+    // Remove the string from translation to simulate a Locale removal. Note
+    // that is no current way of doing this in the UI.
+    $locale_storage = \Drupal::service('locale.storage');
+    $string = $locale_storage->findString(array('source' => 'Locale can translate'));
+    \Drupal::service('locale.storage')->delete($string);
+    // Force a rebuild of config translations.
+    $count = Locale::config()->updateConfigTranslations(['locale_test_translate.settings'], ['af']);
+    $this->assertEqual($count, 1, 'Correct count of updated translations');
+
+    $override = \Drupal::languageManager()->getLanguageConfigOverride('af', 'locale_test_translate.settings');
+    $this->assertEqual([], $override->get());
+    $this->assertTrue($override->isNew(), 'The configuration override was deleted when the Locale string was deleted.');
+  }
+
+  /**
+   * Test removing a string from Locale changes configuration translations.
+   */
+  function testLocaleRemovalAndConfigOverridePreserve() {
+    // Enable the locale module.
+    $this->container->get('module_installer')->install(['locale']);
+    $this->resetAll();
+
+    $admin_user = $this->drupalCreateUser(array('administer modules', 'administer site configuration', 'administer languages', 'access administration pages', 'administer permissions', 'translate interface'));
+    $this->drupalLogin($admin_user);
+
+    // Enable import of translations. By default this is disabled for automated
+    // tests.
+    $this->config('locale.settings')
+      ->set('translation.import_enabled', TRUE)
+      ->save();
+
+    // Add predefined language.
+    $this->drupalPostForm('admin/config/regional/language/add', ['predefined_langcode' => 'af'], t('Add language'));
+
+    $override = \Drupal::languageManager()->getLanguageConfigOverride('af', 'locale_test_translate.settings');
+    // Update test configuration.
+    $override
+      ->set('translatable_no_default', 'This translation is preserved')
+      ->set('translatable_default_with_no_translation', 'This translation is preserved')
+      ->save();
+    $expected = [
+      'translatable_default_with_translation' => 'Locale can translate Afrikaans',
+      'translatable_no_default' => 'This translation is preserved',
+      'translatable_default_with_no_translation' => 'This translation is preserved'
+    ];
+    $this->assertEqual($expected, $override->get());
+
+    // Set the translated string to empty.
+    $search = array(
+      'string' => 'Locale can translate',
+      'langcode' => 'af',
+      'translation' => 'all',
+    );
+    $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter'));
+    $textareas = $this->xpath('//textarea');
+    $textarea = current($textareas);
+    $lid = (string) $textarea[0]['name'];
+    $edit = array(
+      $lid => '',
+    );
+    $this->drupalPostForm('admin/config/regional/translate', $edit, t('Save translations'));
+
+    $override = \Drupal::languageManager()->getLanguageConfigOverride('af', 'locale_test_translate.settings');
+    $expected = [
+      'translatable_no_default' => 'This translation is preserved',
+      'translatable_default_with_no_translation' => 'This translation is preserved'
+    ];
+    $this->assertEqual($expected, $override->get());
+  }
+
 }
diff --git a/core/modules/locale/tests/modules/locale_test_translate/config/install/locale_test_translate.settings.yml b/core/modules/locale/tests/modules/locale_test_translate/config/install/locale_test_translate.settings.yml
new file mode 100644
index 0000000..544dad7
--- /dev/null
+++ b/core/modules/locale/tests/modules/locale_test_translate/config/install/locale_test_translate.settings.yml
@@ -0,0 +1,3 @@
+translatable_no_default: ''
+translatable_default_with_translation: 'Locale can translate'
+translatable_default_with_no_translation: 'Locale can not translate'
diff --git a/core/modules/locale/tests/modules/locale_test_translate/config/schema/locale_test_translate.schema.yml b/core/modules/locale/tests/modules/locale_test_translate/config/schema/locale_test_translate.schema.yml
new file mode 100644
index 0000000..93e57c6
--- /dev/null
+++ b/core/modules/locale/tests/modules/locale_test_translate/config/schema/locale_test_translate.schema.yml
@@ -0,0 +1,10 @@
+locale_test_translate.settings:
+  type: config_object
+  label: 'Test for locale translations'
+  mapping:
+    translatable_no_default:
+      type: label
+    translatable_default_with_translation:
+      type: label
+    translatable_default_with_no_translation:
+      type: label
diff --git a/core/modules/locale/tests/test.af.po b/core/modules/locale/tests/test.af.po
index 2391464..812eca9 100644
--- a/core/modules/locale/tests/test.af.po
+++ b/core/modules/locale/tests/test.af.po
@@ -8,3 +8,6 @@ msgstr ""
 
 msgid "@site is currently under maintenance. We should be back shortly. Thank you for your patience."
 msgstr "Ons is tans besig met onderhoud op @site. Wees asseblief geduldig, ons sal binnekort weer terug wees."
+
+msgid "Locale can translate"
+msgstr "Locale can translate Afrikaans"
