Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes
This commit is contained in:
parent
b11a755ba8
commit
c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions
|
@ -1,8 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Controller\LocaleController.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Controller;
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\EventSubscriber\LocaleTranslationCacheTag.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\EventSubscriber;
|
||||
|
||||
use Drupal\Core\Cache\CacheTagsInvalidatorInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Form\ExportForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Form;
|
||||
|
||||
use Drupal\Component\Gettext\PoStreamWriter;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Form\ImportForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Form;
|
||||
|
||||
use Drupal\Core\Form\FormBase;
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Form\LocaleSettingsForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Form;
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Form\TranslateEditForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Form;
|
||||
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Form\TranslateFilterForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Form;
|
||||
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Form\TranslateFormBase.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Form;
|
||||
|
||||
use Drupal\Core\Form\FormBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Form\TranslationStatusForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Form;
|
||||
|
||||
use Drupal\Core\Extension\ModuleHandlerInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Gettext.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
use Drupal\Component\Gettext\PoStreamReader;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Locale.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\LocaleConfigManager.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
use Drupal\Component\Utility\NestedArray;
|
||||
|
@ -100,12 +95,8 @@ class LocaleConfigManager {
|
|||
* The configuration manager.
|
||||
*
|
||||
* @var \Drupal\Core\Config\ConfigManagerInterface
|
||||
*
|
||||
* @internal
|
||||
* Will be made protected and renamed to $configManager in 8.1.0.
|
||||
* https://www.drupal.org/node/2628132
|
||||
*/
|
||||
private $_configManager;
|
||||
protected $configManager;
|
||||
|
||||
/**
|
||||
* Creates a new typed configuration manager.
|
||||
|
@ -122,44 +113,17 @@ class LocaleConfigManager {
|
|||
* The language manager.
|
||||
* @param \Drupal\locale\LocaleDefaultConfigStorage $default_config_storage
|
||||
* The locale default configuration storage.
|
||||
* @param \Drupal\Core\Config\ConfigManagerInterface $config_manager
|
||||
* The configuration manager.
|
||||
*/
|
||||
public function __construct(StorageInterface $config_storage, StringStorageInterface $locale_storage, ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typed_config, ConfigurableLanguageManagerInterface $language_manager, LocaleDefaultConfigStorage $default_config_storage) {
|
||||
public function __construct(StorageInterface $config_storage, StringStorageInterface $locale_storage, ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typed_config, ConfigurableLanguageManagerInterface $language_manager, LocaleDefaultConfigStorage $default_config_storage, ConfigManagerInterface $config_manager) {
|
||||
$this->configStorage = $config_storage;
|
||||
$this->localeStorage = $locale_storage;
|
||||
$this->configFactory = $config_factory;
|
||||
$this->typedConfigManager = $typed_config;
|
||||
$this->languageManager = $language_manager;
|
||||
$this->defaultConfigStorage = $default_config_storage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the configuration manager service.
|
||||
*
|
||||
* @param \Drupal\Core\Config\ConfigManagerInterface $config_manager
|
||||
*
|
||||
* @internal
|
||||
* Will be replaced by constructor injection in 8.1.0.
|
||||
* https://www.drupal.org/node/2628132
|
||||
*/
|
||||
public function _setConfigManager(ConfigManagerInterface $config_manager) {
|
||||
$this->_configManager = $config_manager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the configuration manager service.
|
||||
*
|
||||
* @return \Drupal\Core\Config\ConfigManagerInterface
|
||||
* The config manager
|
||||
*
|
||||
* @internal
|
||||
* Will be replaced by constructor injection in 8.1.0.
|
||||
* https://www.drupal.org/node/2628132
|
||||
*/
|
||||
private final function _getConfigManager() {
|
||||
if (!isset($this->_configManager)) {
|
||||
$this->_configManager = \Drupal::service('config.manager');
|
||||
}
|
||||
return $this->_configManager;
|
||||
$this->configManager = $config_manager;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -524,7 +488,7 @@ class LocaleConfigManager {
|
|||
// configurable_language entities are a special case since they can be
|
||||
// translated regardless of whether they are shipped if they in the standard
|
||||
// language list.
|
||||
$config_entity_type = $this->_getConfigManager()->getEntityTypeIdByName($name);
|
||||
$config_entity_type = $this->configManager->getEntityTypeIdByName($name);
|
||||
if (!$config_entity_type || $config_entity_type === 'configurable_language'
|
||||
|| !empty($this->configFactory->get($name)->get('_core.default_config_hash'))
|
||||
) {
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\LocaleConfigSubscriber.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\LocaleDefaultConfigStorage.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
use Drupal\Core\Config\ExtensionInstallStorage;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\LocaleEvent.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\LocaleEvents.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\LocaleLookup.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
use Drupal\Core\Cache\CacheBackendInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\LocaleProjectStorage.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
use Drupal\Core\KeyValueStore\KeyValueFactoryInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\LocaleProjectStorageInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\LocaleTranslation.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
use Drupal\Core\Cache\CacheBackendInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Plugin\QueueWorker\LocaleTranslation.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Plugin\QueueWorker;
|
||||
|
||||
use Drupal\Core\Extension\ModuleHandlerInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\PluralFormula.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
use Drupal\Core\Language\LanguageManagerInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\PluralFormulaInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\PoDatabaseReader.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
use Drupal\Component\Gettext\PoHeader;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\PoDatabaseWriter.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
use Drupal\Component\Gettext\PoHeader;
|
||||
|
|
|
@ -1,14 +1,7 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\SourceString.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
use Drupal\locale\LocaleString;
|
||||
|
||||
/**
|
||||
* Defines the locale source string object.
|
||||
*
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\StreamWrapper\TranslationsStream.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\StreamWrapper;
|
||||
|
||||
use Drupal\Core\Annotation\StreamWrapper;
|
||||
use Drupal\Core\StreamWrapper\LocalStream;
|
||||
use Drupal\Core\StreamWrapper\StreamWrapperInterface;
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\StringBase.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\StringDatabaseStorage.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\StringInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\StringStorageException.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\StringStorageInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleConfigManagerTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\block\Entity\Block;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleConfigSubscriberForeignTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\Core\Language\Language;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleConfigSubscriberTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\language\Entity\ConfigurableLanguage;
|
||||
|
@ -62,7 +57,6 @@ class LocaleConfigSubscriberTest extends KernelTestBase {
|
|||
$this->setUpDefaultLanguage();
|
||||
|
||||
$this->installSchema('locale', ['locales_source', 'locales_target', 'locales_location']);
|
||||
$this->installSchema('system', ['queue']);
|
||||
|
||||
$this->setupLanguages();
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleConfigTranslationImportTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\locale\Locale;
|
||||
|
|
|
@ -1,14 +1,9 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleConfigTranslationTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
use Drupal\core\language\languageInterface;
|
||||
use Drupal\Core\Language\LanguageInterface;
|
||||
|
||||
/**
|
||||
* Tests translation of configuration strings.
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleConfigurableLanguageManagerTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\Core\Language\LanguageInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleContentTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleExportTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
@ -38,8 +33,8 @@ class LocaleExportTest extends WebTestBase {
|
|||
$this->drupalLogin($this->adminUser);
|
||||
|
||||
// Copy test po files to the translations directory.
|
||||
file_unmanaged_copy(drupal_get_path('module', 'locale') . '/tests/test.de.po', 'translations://', FILE_EXISTS_REPLACE);
|
||||
file_unmanaged_copy(drupal_get_path('module', 'locale') . '/tests/test.xx.po', 'translations://', FILE_EXISTS_REPLACE);
|
||||
file_unmanaged_copy(__DIR__ . '/../../tests/test.de.po', 'translations://', FILE_EXISTS_REPLACE);
|
||||
file_unmanaged_copy(__DIR__ . '/../../tests/test.xx.po', 'translations://', FILE_EXISTS_REPLACE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleFileSystemFormTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleImportFunctionalTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
@ -46,8 +41,8 @@ class LocaleImportFunctionalTest extends WebTestBase {
|
|||
parent::setUp();
|
||||
|
||||
// Copy test po files to the translations directory.
|
||||
file_unmanaged_copy(drupal_get_path('module', 'locale') . '/tests/test.de.po', 'translations://', FILE_EXISTS_REPLACE);
|
||||
file_unmanaged_copy(drupal_get_path('module', 'locale') . '/tests/test.xx.po', 'translations://', FILE_EXISTS_REPLACE);
|
||||
file_unmanaged_copy(__DIR__ . '/../../tests/test.de.po', 'translations://', FILE_EXISTS_REPLACE);
|
||||
file_unmanaged_copy(__DIR__ . '/../../tests/test.xx.po', 'translations://', FILE_EXISTS_REPLACE);
|
||||
|
||||
$this->adminUser = $this->drupalCreateUser(array('administer languages', 'translate interface', 'access administration pages'));
|
||||
$this->adminUserAccessSiteReports = $this->drupalCreateUser(array('administer languages', 'translate interface', 'access administration pages', 'access site reports'));
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleJavascriptTranslationTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\Core\Language\LanguageInterface;
|
||||
|
@ -26,7 +21,7 @@ class LocaleJavascriptTranslationTest extends WebTestBase {
|
|||
public static $modules = array('locale', 'locale_test');
|
||||
|
||||
public function testFileParsing() {
|
||||
$filename = drupal_get_path('module', 'locale') . '/tests/locale_test.js';
|
||||
$filename = __DIR__ . '/../../tests/locale_test.js';
|
||||
|
||||
// Parse the file to look for source strings.
|
||||
_locale_parse_js_file($filename);
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleLibraryAlterTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleLocaleLookupTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\language\Entity\ConfigurableLanguage;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocalePathTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\Core\Language\LanguageInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocalePluralFormatTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\Core\StringTranslation\PluralTranslatableMarkup;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleStringIsSafeTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\simpletest\KernelTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleStringTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\language\Entity\ConfigurableLanguage;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleTranslateStringTourTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\tour\Tests\TourTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleTranslatedSchemaDefinitionTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\language\Entity\ConfigurableLanguage;
|
||||
|
@ -46,17 +41,17 @@ class LocaleTranslatedSchemaDefinitionTest extends WebTestBase {
|
|||
$stringStorage = \Drupal::service('locale.storage');
|
||||
|
||||
$source = $stringStorage->createString(array(
|
||||
'source' => 'The node ID.',
|
||||
'source' => 'Revision ID',
|
||||
))->save();
|
||||
|
||||
$stringStorage->createTranslation(array(
|
||||
'lid' => $source->lid,
|
||||
'language' => 'fr',
|
||||
'translation' => 'Translated node ID',
|
||||
'translation' => 'Translated Revision ID',
|
||||
))->save();
|
||||
|
||||
// Ensure that the field is translated when access through the API.
|
||||
$this->assertEqual('Translated node ID', \Drupal::entityManager()->getBaseFieldDefinitions('node')['nid']->getDescription());
|
||||
$this->assertEqual('Translated Revision ID', \Drupal::entityManager()->getBaseFieldDefinitions('node')['vid']->getLabel());
|
||||
|
||||
// Assert there are no updates.
|
||||
$this->assertFalse(\Drupal::service('entity.definition_update_manager')->needsUpdates());
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleTranslationProjectsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\simpletest\KernelTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleTranslationUiTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\language\Entity\ConfigurableLanguage;
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleUpdateBase.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\Core\StreamWrapper\PublicStream;
|
||||
use Drupal\file\Entity\File;
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
|
||||
|
@ -133,14 +129,14 @@ EOF;
|
|||
}
|
||||
|
||||
file_prepare_directory($path, FILE_CREATE_DIRECTORY);
|
||||
$file = entity_create('file', array(
|
||||
$file = File::create([
|
||||
'uid' => 1,
|
||||
'filename' => $filename,
|
||||
'uri' => $path . '/' . $filename,
|
||||
'filemime' => 'text/x-gettext-translation',
|
||||
'timestamp' => $timestamp,
|
||||
'status' => FILE_STATUS_PERMANENT,
|
||||
));
|
||||
]);
|
||||
file_put_contents($file->getFileUri(), $po_header . $text);
|
||||
touch(drupal_realpath($file->getFileUri()), $timestamp);
|
||||
$file->save();
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleUpdateCronTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleUpdateDevelopmentReleaseTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleUpdateInterfaceTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\Component\Render\FormattableMarkup;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\LocaleUpdateTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests;
|
||||
|
||||
use Drupal\Core\Language\LanguageInterface;
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\Tests\Migrate\MigrateLocaleConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale\Tests\Migrate;
|
||||
|
||||
use Drupal\config\Tests\SchemaCheckTestTrait;
|
||||
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
|
||||
|
||||
/**
|
||||
* Upgrade variables to locale.settings.yml.
|
||||
*
|
||||
* @group migrate_drupal_6
|
||||
*/
|
||||
class MigrateLocaleConfigsTest extends MigrateDrupal6TestBase {
|
||||
|
||||
use SchemaCheckTestTrait;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static $modules = array('locale', 'language');
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
$this->executeMigration('locale_settings');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of locale variables to locale.settings.yml.
|
||||
*/
|
||||
public function testLocaleSettings() {
|
||||
$config = $this->config('locale.settings');
|
||||
$this->assertIdentical(TRUE, $config->get('cache_strings'));
|
||||
$this->assertIdentical('languages', $config->get('javascript.directory'));
|
||||
$this->assertConfigSchema(\Drupal::service('config.typed'), 'locale.settings', $config->get());
|
||||
}
|
||||
|
||||
}
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\locale\TranslationString.
|
||||
*/
|
||||
|
||||
namespace Drupal\locale;
|
||||
|
||||
/**
|
||||
|
|
Reference in a new issue