diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationListUiTest.php b/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationListUiTest.php index 023687cf347c199fc4f06226077258064fb273ac..03ba59b0550cc507eecfaee9237c83c20df3d260 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationListUiTest.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationListUiTest.php @@ -80,6 +80,12 @@ public function setUp() { // Create and log in user. $this->adminUser = $this->drupalCreateUser($permissions); $this->drupalLogin($this->adminUser); + + // Enable import of translations. By default this is disabled for automated + // tests. + \Drupal::config('locale.settings') + ->set('translation.import_enabled', TRUE) + ->save(); } /** diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php b/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php index dfda10942facee38d60c1d55a8a61fe96b4b441a..83f4a14e0a9256931288307bcccb9d85b775db46 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php @@ -566,6 +566,12 @@ public function testViewsTranslationUI() { * Test translation storage in locale storage. */ public function testLocaleDBStorage() { + // Enable import of translations. By default this is disabled for automated + // tests. + \Drupal::config('locale.settings') + ->set('translation.import_enabled', TRUE) + ->save(); + $this->drupalLogin($this->admin_user); $langcode = 'xx'; diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleConfigTranslationTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleConfigTranslationTest.php index 20c023f80a7339cb057e325feffb2c14ee905512..0970b9c96ae7d65240026811a6361b1aa067ad87 100644 --- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleConfigTranslationTest.php +++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleConfigTranslationTest.php @@ -35,6 +35,12 @@ public function setUp() { parent::setUp(); // Add a default locale storage for all these tests. $this->storage = $this->container->get('locale.storage'); + + // Enable import of translations. By default this is disabled for automated + // tests. + \Drupal::config('locale.settings') + ->set('translation.import_enabled', TRUE) + ->save(); } /** diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleImportFunctionalTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleImportFunctionalTest.php index 5d746f30a92eee6d7c8f6c4a2ac8e92979dfbbd0..d822f1002bf877f439bc16faed6bef8c69282cda 100644 --- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleImportFunctionalTest.php +++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleImportFunctionalTest.php @@ -43,6 +43,12 @@ function setUp() { $this->admin_user = $this->drupalCreateUser(array('administer languages', 'translate interface', 'access administration pages')); $this->drupalLogin($this->admin_user); + + // Enable import of translations. By default this is disabled for automated + // tests. + \Drupal::config('locale.settings') + ->set('translation.import_enabled', TRUE) + ->save(); } /** diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateBase.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateBase.php index 1d88e2bc4e6422c8beaccd523f6ccd182d2673d3..64e933319812d8d5a7147685dd65b3f36adf67ac 100644 --- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateBase.php +++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateBase.php @@ -51,6 +51,12 @@ function setUp() { $this->timestamp_medium = REQUEST_TIME - 200; $this->timestamp_new = REQUEST_TIME - 100; $this->timestamp_now = REQUEST_TIME; + + // Enable import of translations. By default this is disabled for automated + // tests. + \Drupal::config('locale.settings') + ->set('translation.import_enabled', TRUE) + ->save(); } /** diff --git a/core/profiles/testing/config/locale.settings.yml b/core/profiles/testing/config/locale.settings.yml new file mode 100644 index 0000000000000000000000000000000000000000..f1842a02076c51986659ef33be07c63eb3fc8928 --- /dev/null +++ b/core/profiles/testing/config/locale.settings.yml @@ -0,0 +1,12 @@ +cache_strings: true +javascript: + directory: languages +translation: + use_source: remote_and_local + default_filename: '%project-%version.%language.po' + default_server_pattern: 'http://ftp.drupal.org/files/translations/%core/%project/%project-%version.%language.po' + overwrite_customized: false + overwrite_not_customized: true + update_interval_days: 0 + path: '' + import_enabled: false