Update to Drupal 8.0.0-beta15. For more information, see: https://www.drupal.org/node/2563023
This commit is contained in:
parent
2720a9ec4b
commit
f3791f1da3
1898 changed files with 54300 additions and 11481 deletions
|
@ -4,5 +4,6 @@ description: 'Provides a translation interface for configuration.'
|
|||
package: Multilingual
|
||||
version: VERSION
|
||||
core: 8.x
|
||||
configure: config_translation.mapper_list
|
||||
dependencies:
|
||||
- locale
|
||||
|
|
|
@ -32,7 +32,8 @@ class ConfigFieldMapper extends ConfigEntityMapper {
|
|||
public function getBaseRouteParameters() {
|
||||
$parameters = parent::getBaseRouteParameters();
|
||||
$base_entity_info = $this->entityManager->getDefinition($this->pluginDefinition['base_entity_type']);
|
||||
$parameters[$base_entity_info->getBundleEntityType()] = $this->entity->getTargetBundle();
|
||||
$bundle_parameter_key = $base_entity_info->getBundleEntityType() ?: 'bundle';
|
||||
$parameters[$bundle_parameter_key] = $this->entity->getTargetBundle();
|
||||
return $parameters;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
namespace Drupal\config_translation\Controller;
|
||||
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
use Drupal\Core\Entity\EntityInterface;
|
||||
use Drupal\Core\Entity\EntityStorageInterface;
|
||||
use Drupal\Core\Entity\EntityTypeInterface;
|
||||
|
@ -65,17 +64,17 @@ class ConfigTranslationBlockListBuilder extends ConfigTranslationEntityListBuild
|
|||
$plugin_definition = $entity->getPlugin()->getPluginDefinition();
|
||||
|
||||
$row['label'] = array(
|
||||
'data' => $this->getLabel($entity),
|
||||
'data' => $entity->label(),
|
||||
'class' => 'table-filter-text-source',
|
||||
);
|
||||
|
||||
$row['theme'] = array(
|
||||
'data' => SafeMarkup::checkPlain($this->themes[$theme]->info['name']),
|
||||
'data' => $this->themes[$theme]->info['name'],
|
||||
'class' => 'table-filter-text-source',
|
||||
);
|
||||
|
||||
$row['category'] = array(
|
||||
'data' => SafeMarkup::checkPlain($plugin_definition['category']),
|
||||
'data' => $plugin_definition['category'],
|
||||
'class' => 'table-filter-text-source',
|
||||
);
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ class ConfigTranslationEntityListBuilder extends ConfigEntityListBuilder impleme
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function buildRow(EntityInterface $entity) {
|
||||
$row['label']['data'] = $this->getLabel($entity);
|
||||
$row['label']['data'] = $entity->label();
|
||||
$row['label']['class'][] = 'table-filter-text-source';
|
||||
return $row + parent::buildRow($entity);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
namespace Drupal\config_translation\Controller;
|
||||
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
use Drupal\Component\Utility\Unicode;
|
||||
use Drupal\Core\Entity\EntityInterface;
|
||||
use Drupal\Core\Entity\EntityManagerInterface;
|
||||
|
@ -116,14 +115,14 @@ class ConfigTranslationFieldListBuilder extends ConfigTranslationEntityListBuild
|
|||
*/
|
||||
public function buildRow(EntityInterface $entity) {
|
||||
$row['label'] = array(
|
||||
'data' => $this->getLabel($entity),
|
||||
'data' => $entity->label(),
|
||||
'class' => 'table-filter-text-source',
|
||||
);
|
||||
|
||||
if ($this->displayBundle()) {
|
||||
$bundle = $entity->get('bundle');
|
||||
$row['bundle'] = array(
|
||||
'data' => SafeMarkup::checkPlain($this->baseEntityBundles[$bundle]['label']),
|
||||
'data' => $this->baseEntityBundles[$bundle]['label'],
|
||||
'class' => 'table-filter-text-source',
|
||||
);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
namespace Drupal\config_translation\Controller;
|
||||
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
use Drupal\config_translation\ConfigMapperInterface;
|
||||
use Drupal\Core\Controller\ControllerBase;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
@ -94,7 +93,7 @@ class ConfigTranslationMapperList extends ControllerBase {
|
|||
* A render array structure of fields for this mapper.
|
||||
*/
|
||||
public function buildRow(ConfigMapperInterface $mapper) {
|
||||
$row['label'] = SafeMarkup::checkPlain($mapper->getTypeLabel());
|
||||
$row['label'] = $mapper->getTypeLabel();
|
||||
$row['operations']['data'] = $this->buildOperations($mapper);
|
||||
return $row;
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@ class ConfigTranslationListUiTest extends WebTestBase {
|
|||
$this->config('locale.settings')
|
||||
->set('translation.import_enabled', TRUE)
|
||||
->save();
|
||||
$this->drupalPlaceBlock('local_tasks_block');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
namespace Drupal\config_translation\Tests;
|
||||
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
use Drupal\language\Entity\ConfigurableLanguage;
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
||||
|
@ -24,6 +23,7 @@ class ConfigTranslationOverviewTest extends WebTestBase {
|
|||
* @var array
|
||||
*/
|
||||
public static $modules = [
|
||||
'block',
|
||||
'config_test',
|
||||
'config_translation',
|
||||
'config_translation_test',
|
||||
|
@ -67,6 +67,7 @@ class ConfigTranslationOverviewTest extends WebTestBase {
|
|||
ConfigurableLanguage::createFromLangcode($langcode)->save();
|
||||
}
|
||||
$this->localeStorage = $this->container->get('locale.storage');
|
||||
$this->drupalPlaceBlock('local_tasks_block');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -101,7 +102,7 @@ class ConfigTranslationOverviewTest extends WebTestBase {
|
|||
$base_url = 'admin/structure/config_test/manage/' . $test_entity->id();
|
||||
$this->drupalGet('admin/config/regional/config-translation/config_test');
|
||||
$this->assertLinkByHref($base_url . '/translate');
|
||||
$this->assertText(SafeMarkup::checkPlain($test_entity->label()));
|
||||
$this->assertEscaped($test_entity->label());
|
||||
|
||||
// Make sure there is only a single 'Translate' operation for each
|
||||
// dropbutton.
|
||||
|
|
|
@ -31,6 +31,7 @@ class ConfigTranslationUiTest extends WebTestBase {
|
|||
* @var array
|
||||
*/
|
||||
public static $modules = [
|
||||
'block',
|
||||
'config_translation',
|
||||
'config_translation_test',
|
||||
'contact',
|
||||
|
@ -117,6 +118,7 @@ class ConfigTranslationUiTest extends WebTestBase {
|
|||
ConfigurableLanguage::createFromLangcode($langcode)->save();
|
||||
}
|
||||
$this->localeStorage = $this->container->get('locale.storage');
|
||||
$this->drupalPlaceBlock('local_tasks_block');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -485,7 +487,7 @@ class ConfigTranslationUiTest extends WebTestBase {
|
|||
|
||||
// Formatting the date 8 / 27 / 1985 @ 13:37 EST with pattern D should
|
||||
// display "Tue".
|
||||
$formatted_date = format_date(494015820, $id, NULL, NULL, 'fr');
|
||||
$formatted_date = format_date(494015820, $id, NULL, 'America/New_York', 'fr');
|
||||
$this->assertEqual($formatted_date, 'Tue', 'Got the right formatted date using the date format translation pattern.');
|
||||
}
|
||||
}
|
||||
|
@ -585,7 +587,7 @@ class ConfigTranslationUiTest extends WebTestBase {
|
|||
$response = $this->renderContextualLinks($ids, 'node');
|
||||
$this->assertResponse(200);
|
||||
$json = Json::decode($response);
|
||||
$this->assertTrue(strpos($json[$ids[0]], t('Translate view')), 'Translate view contextual link added.');
|
||||
$this->assertTrue(strpos($json[$ids[0]], 'Translate view'), 'Translate view contextual link added.');
|
||||
|
||||
$description = 'All content promoted to the front page.';
|
||||
$human_readable_name = 'Frontpage';
|
||||
|
@ -751,9 +753,9 @@ class ConfigTranslationUiTest extends WebTestBase {
|
|||
$this->clickLink('Add');
|
||||
|
||||
$this->assertText('Translatable field setting');
|
||||
$this->assertRaw(SafeMarkup::checkPlain($translatable_field_setting));
|
||||
$this->assertEscaped($translatable_field_setting);
|
||||
$this->assertText('Translatable storage setting');
|
||||
$this->assertRaw(SafeMarkup::checkPlain($translatable_storage_setting));
|
||||
$this->assertEscaped($translatable_storage_setting);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Reference in a new issue