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
|
@ -7,7 +7,6 @@
|
|||
|
||||
namespace Drupal\locale\Form;
|
||||
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
use Drupal\Core\Render\Element;
|
||||
use Drupal\locale\SourceString;
|
||||
|
@ -73,7 +72,9 @@ class TranslateEditForm extends TranslateFormBase {
|
|||
'#type' => 'item',
|
||||
'#title' => $this->t('Source string (@language)', array('@language' => $this->t('Built-in English'))),
|
||||
'#title_display' => 'invisible',
|
||||
'#markup' => '<span lang="en">' . SafeMarkup::checkPlain($source_array[0]) . '</span>',
|
||||
'#plain_text' => $source_array[0],
|
||||
'#preffix' => '<span lang="en">',
|
||||
'#suffix' => '</span>',
|
||||
);
|
||||
}
|
||||
else {
|
||||
|
@ -82,13 +83,16 @@ class TranslateEditForm extends TranslateFormBase {
|
|||
$original_singular = [
|
||||
'#type' => 'item',
|
||||
'#title' => $this->t('Singular form'),
|
||||
'#markup' => '<span lang="en">' . SafeMarkup::checkPlain($source_array[0]) . '</span>',
|
||||
'#prefix' => '<span class="visually-hidden">' . $this->t('Source string (@language)', array('@language' => $this->t('Built-in English'))) . '</span>',
|
||||
'#plain_text' => $source_array[0],
|
||||
'#prefix' => '<span class="visually-hidden">' . $this->t('Source string (@language)', array('@language' => $this->t('Built-in English'))) . '</span><span lang="en">',
|
||||
'#suffix' => '</span>',
|
||||
];
|
||||
$original_plural = [
|
||||
'#type' => 'item',
|
||||
'#title' => $this->t('Plural form'),
|
||||
'#markup' => '<span lang="en">' . SafeMarkup::checkPlain($source_array[1]) . '</span>',
|
||||
'#plain_text' => $source_array[1],
|
||||
'#preffix' => '<span lang="en">',
|
||||
'#suffix' => '</span>',
|
||||
];
|
||||
$form['strings'][$string->lid]['original'] = [
|
||||
$original_singular,
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
namespace Drupal\locale\Form;
|
||||
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
use Drupal\Core\Extension\ModuleHandlerInterface;
|
||||
use Drupal\Core\Form\FormBase;
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
|
@ -82,7 +81,7 @@ class TranslationStatusForm extends FormBase {
|
|||
|
||||
// Build data options for the select table.
|
||||
foreach ($updates as $langcode => $update) {
|
||||
$title = SafeMarkup::checkPlain($languages[$langcode]->getName());
|
||||
$title = $languages[$langcode]->getName();
|
||||
$locale_translation_update_info = array('#theme' => 'locale_translation_update_info');
|
||||
foreach (array('updates', 'not_found') as $update_status) {
|
||||
if (isset($update[$update_status])) {
|
||||
|
@ -94,7 +93,7 @@ class TranslationStatusForm extends FormBase {
|
|||
'class' => array('label'),
|
||||
'data' => array(
|
||||
'#title' => $title,
|
||||
'#markup' => $title,
|
||||
'#plain_text' => $title,
|
||||
),
|
||||
),
|
||||
'status' => array(
|
||||
|
|
|
@ -117,7 +117,7 @@ class LocaleConfigTranslationTest extends WebTestBase {
|
|||
|
||||
// Formatting the date 8 / 27 / 1985 @ 13:37 EST with pattern D should
|
||||
// display "Tue".
|
||||
$formatted_date = format_date(494015820, $type = 'medium', NULL, NULL, $this->langcode);
|
||||
$formatted_date = format_date(494015820, $type = 'medium', NULL, 'America/New_York', $this->langcode);
|
||||
$this->assertEqual($formatted_date, 'Tue', 'Got the right formatted date using the date format translation pattern.');
|
||||
|
||||
// Assert strings from image module config are not available.
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
<?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;
|
||||
|
||||
/**
|
||||
* Modules to enable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
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());
|
||||
}
|
||||
|
||||
}
|
Reference in a new issue