Commit aeac3deb authored by webchick's avatar webchick
Browse files

Issue #2031175 by Sutharsan, penyaskito, vijaycs85, Berdir: Translation...

Issue #2031175 by Sutharsan, penyaskito, vijaycs85, Berdir: Translation imports take a lot of time in tests even when not needed.
parent a05ecf2a
...@@ -80,6 +80,12 @@ public function setUp() { ...@@ -80,6 +80,12 @@ public function setUp() {
// Create and log in user. // Create and log in user.
$this->adminUser = $this->drupalCreateUser($permissions); $this->adminUser = $this->drupalCreateUser($permissions);
$this->drupalLogin($this->adminUser); $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();
} }
/** /**
......
...@@ -566,6 +566,12 @@ public function testViewsTranslationUI() { ...@@ -566,6 +566,12 @@ public function testViewsTranslationUI() {
* Test translation storage in locale storage. * Test translation storage in locale storage.
*/ */
public function testLocaleDBStorage() { 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); $this->drupalLogin($this->admin_user);
$langcode = 'xx'; $langcode = 'xx';
......
...@@ -35,6 +35,12 @@ public function setUp() { ...@@ -35,6 +35,12 @@ public function setUp() {
parent::setUp(); parent::setUp();
// Add a default locale storage for all these tests. // Add a default locale storage for all these tests.
$this->storage = $this->container->get('locale.storage'); $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();
} }
/** /**
......
...@@ -43,6 +43,12 @@ function setUp() { ...@@ -43,6 +43,12 @@ function setUp() {
$this->admin_user = $this->drupalCreateUser(array('administer languages', 'translate interface', 'access administration pages')); $this->admin_user = $this->drupalCreateUser(array('administer languages', 'translate interface', 'access administration pages'));
$this->drupalLogin($this->admin_user); $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();
} }
/** /**
......
...@@ -51,6 +51,12 @@ function setUp() { ...@@ -51,6 +51,12 @@ function setUp() {
$this->timestamp_medium = REQUEST_TIME - 200; $this->timestamp_medium = REQUEST_TIME - 200;
$this->timestamp_new = REQUEST_TIME - 100; $this->timestamp_new = REQUEST_TIME - 100;
$this->timestamp_now = REQUEST_TIME; $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();
} }
/** /**
......
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment