Update to Drupal 8.1.1. For more information, see https://www.drupal.org/node/2718713

This commit is contained in:
Pantheon Automation 2016-05-04 14:35:41 -07:00 committed by Greg Anderson
parent c0a0d5a94c
commit 9eae24d844
669 changed files with 3873 additions and 1553 deletions

View file

@ -340,7 +340,7 @@ function locale_translate_batch_refresh(&$context) {
// Clear cache and force refresh of JavaScript translations.
_locale_refresh_translations($context['sandbox']['refresh']['languages'], $next);
// Check whether we need to refresh configuration objects.
if ($names = \Drupal\locale\Locale::config()->getStringNames($next)) {
if ($names = Locale::config()->getStringNames($next)) {
$context['sandbox']['refresh']['names_finished'] = $context['finished'];
$context['sandbox']['refresh']['names'] = $names;
}
@ -533,7 +533,7 @@ function locale_translate_delete_translation_files(array $projects = array(), ar
*/
function locale_config_batch_update_components(array $options, array $langcodes = array(), array $components = array()) {
$langcodes = $langcodes ? $langcodes : array_keys(\Drupal::languageManager()->getLanguages());
if ($langcodes && $names = \Drupal\locale\Locale::config()->getComponentNames($components)) {
if ($langcodes && $names = Locale::config()->getComponentNames($components)) {
return locale_config_batch_build($names, $langcodes, $options);
}
}

View file

@ -1042,7 +1042,7 @@ function locale_string_is_safe($string) {
// inject javascript. When \Drupal\Component\Utility\Xss::filter() removes
// part of tokens, it causes the string to not be translatable when it should
// be translatable.
// @see \Drupal\locale\Tests\LocaleStringIsSafeTest::testLocaleStringIsSafe()
// @see \Drupal\Tests\locale\Kernel\LocaleStringIsSafeTest::testLocaleStringIsSafe()
//
// We can recognize tokens since they are wrapped with brackets and are only
// composed of alphanumeric characters, colon, underscore, and dashes. We can

View file

@ -157,4 +157,3 @@ class LocaleDefaultConfigStorage {
}
}

View file

@ -60,7 +60,7 @@ class LocaleConfigTranslationImportTest extends WebTestBase {
$this->drupalPostForm('admin/reports/translations', array(), t('Update translations'));
// Check if configuration translations have been imported.
$override = \Drupal::languageManager()->getLanguageConfigOverride('af', 'system.maintenance');
$override = \Drupal::languageManager()->getLanguageConfigOverride('af', 'system.maintenance');
$this->assertEqual($override->get('message'), 'Ons is tans besig met onderhoud op @site. Wees asseblief geduldig, ons sal binnekort weer terug wees.');
}

View file

@ -134,7 +134,7 @@ class LocaleContentTest extends WebTestBase {
// User to create a node.
$web_user = $this->drupalCreateUser(array("create {$type->id()} content", "edit own {$type->id()} content"));
// Login as admin.
// Log in as admin.
$this->drupalLogin($admin_user);
// Install Arabic language.
@ -157,7 +157,7 @@ class LocaleContentTest extends WebTestBase {
$this->assertRaw(t('The content type %type has been updated.', array('%type' => $type->label())));
$this->drupalLogout();
// Login as web user to add new node.
// Log in as web user to add new node.
$this->drupalLogin($web_user);
// Create three nodes: English, Arabic and Spanish.

View file

@ -7,7 +7,7 @@ locale_test.no_translation:
test:
type: string
label: 'Test'
# See \Drupal\locale\Tests\LocaleConfigSubscriberTest
# See \Drupal\Tests\locale\Kernel\LocaleConfigSubscriberTest
translatable: true
locale_test.translation:
@ -17,5 +17,5 @@ locale_test.translation:
test:
type: string
label: 'Test'
# See \Drupal\locale\Tests\LocaleConfigSubscriberTest
# See \Drupal\Tests\locale\Kernel\LocaleConfigSubscriberTest
translatable: true

View file

@ -1,10 +1,10 @@
<?php
namespace Drupal\locale\Tests;
namespace Drupal\Tests\locale\Kernel;
use Drupal\block\Entity\Block;
use Drupal\language\Entity\ConfigurableLanguage;
use Drupal\simpletest\KernelTestBase;
use Drupal\KernelTests\KernelTestBase;
/**
* Tests that the locale config manager operates correctly.

View file

@ -1,7 +1,8 @@
<?php
namespace Drupal\locale\Tests;
namespace Drupal\Tests\locale\Kernel;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\Language\Language;
use Drupal\language\Entity\ConfigurableLanguage;
@ -15,11 +16,13 @@ class LocaleConfigSubscriberForeignTest extends LocaleConfigSubscriberTest {
/**
* {@inheritdoc}
*/
protected function defaultLanguageData() {
$data = Language::$defaultValues;
$data['id'] = 'hu';
$data['name'] = 'Hungarian';
return $data;
public function register(ContainerBuilder $container) {
parent::register($container);
$language = Language::$defaultValues;
$language['id'] = 'hu';
$language['name'] = 'Hungarian';
$container->setParameter('language.default_values', $language);
}
/**

View file

@ -1,12 +1,12 @@
<?php
namespace Drupal\locale\Tests;
namespace Drupal\Tests\locale\Kernel;
use Drupal\language\Entity\ConfigurableLanguage;
use Drupal\locale\Locale;
use Drupal\locale\StringInterface;
use Drupal\locale\TranslationString;
use Drupal\simpletest\KernelTestBase;
use Drupal\KernelTests\KernelTestBase;
/**
* Tests that shipped configuration translations are updated correctly.
@ -18,7 +18,7 @@ class LocaleConfigSubscriberTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['language', 'locale', 'system'];
public static $modules = ['language', 'locale', 'system', 'locale_test'];
/**
* The configurable language manager used in this test.
@ -60,7 +60,6 @@ class LocaleConfigSubscriberTest extends KernelTestBase {
$this->setupLanguages();
$this->enableModules(['locale_test']);
$this->installConfig(['locale_test']);
// Simulate this hook invoked which would happen if in a non-kernel test
// or normal environment.
@ -68,7 +67,7 @@ class LocaleConfigSubscriberTest extends KernelTestBase {
// @see locale_system_update()
locale_system_set_config_langcodes();
$langcodes = array_keys(\Drupal::languageManager()->getLanguages());
$names = \Drupal\locale\Locale::config()->getComponentNames();
$names = Locale::config()->getComponentNames();
Locale::config()->updateConfigTranslations($names, $langcodes);
$this->configFactory = $this->container->get('config.factory');

View file

@ -1,10 +1,10 @@
<?php
namespace Drupal\locale\Tests;
namespace Drupal\Tests\locale\Kernel;
use Drupal\Core\Language\LanguageInterface;
use Drupal\language\Entity\ConfigurableLanguage;
use Drupal\simpletest\KernelTestBase;
use Drupal\KernelTests\KernelTestBase;
/**

View file

@ -1,8 +1,8 @@
<?php
namespace Drupal\locale\Tests;
namespace Drupal\Tests\locale\Kernel;
use Drupal\simpletest\KernelTestBase;
use Drupal\KernelTests\KernelTestBase;
/**
* Tests locale translation safe string handling.

View file

@ -1,8 +1,8 @@
<?php
namespace Drupal\locale\Tests;
namespace Drupal\Tests\locale\Kernel;
use Drupal\simpletest\KernelTestBase;
use Drupal\KernelTests\KernelTestBase;
/**
* Tests locale translation project handling.
@ -14,7 +14,7 @@ class LocaleTranslationProjectsTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['locale', 'locale_test'];
public static $modules = ['locale', 'locale_test', 'system'];
/**
* The module handler used in this test.