Update to drupal-org-drupal 8.0.0-rc2. For more information, see https://www.drupal.org/node/2598668
This commit is contained in:
parent
f32e58e4b1
commit
8e18df8c36
3062 changed files with 15044 additions and 172506 deletions
|
@ -5,11 +5,9 @@
|
|||
* Configuration Translation module.
|
||||
*/
|
||||
|
||||
use Drupal\config_translation\Plugin\Derivative\ConfigTranslationLocalTasks;
|
||||
use Drupal\Core\Entity\EntityInterface;
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
use Drupal\field\FieldConfigInterface;
|
||||
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||
|
||||
/**
|
||||
* Implements hook_help().
|
||||
|
|
|
@ -12,7 +12,6 @@ use Drupal\Core\Config\Entity\ConfigEntityInterface;
|
|||
use Drupal\Core\Config\TypedConfigManagerInterface;
|
||||
use Drupal\Core\Entity\EntityManagerInterface;
|
||||
use Drupal\Core\Language\LanguageManagerInterface;
|
||||
use Drupal\Core\Routing\RouteMatch;
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
use Drupal\Core\Routing\RouteProviderInterface;
|
||||
use Drupal\Core\StringTranslation\TranslationInterface;
|
||||
|
|
|
@ -9,7 +9,6 @@ namespace Drupal\config_translation;
|
|||
|
||||
use Drupal\Core\Language\LanguageInterface;
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Routing\RouteCollection;
|
||||
|
||||
/**
|
||||
|
@ -175,6 +174,9 @@ interface ConfigMapperInterface {
|
|||
/**
|
||||
* Adds the given configuration name to the list of names.
|
||||
*
|
||||
* Note that it is the responsibility of the calling code to ensure that the
|
||||
* configuration exists.
|
||||
*
|
||||
* @param string $name
|
||||
* Configuration name.
|
||||
*/
|
||||
|
|
|
@ -9,7 +9,6 @@ namespace Drupal\config_translation;
|
|||
|
||||
use Drupal\Core\Config\ConfigFactoryInterface;
|
||||
use Drupal\Core\Config\TypedConfigManagerInterface;
|
||||
use Drupal\Core\Language\Language;
|
||||
use Drupal\Core\Language\LanguageInterface;
|
||||
use Drupal\Core\Language\LanguageManagerInterface;
|
||||
use Drupal\Core\Plugin\PluginBase;
|
||||
|
|
|
@ -16,7 +16,6 @@ use Drupal\Core\Routing\RouteMatchInterface;
|
|||
use Drupal\Core\Url;
|
||||
use Drupal\language\ConfigurableLanguageManagerInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,6 @@ use Drupal\config_translation\ConfigMapperManagerInterface;
|
|||
use Drupal\Core\Config\TypedConfigManagerInterface;
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
use Drupal\Core\TypedData\TypedDataInterface;
|
||||
use Drupal\Core\TypedData\TraversableTypedDataInterface;
|
||||
use Drupal\Core\Form\BaseFormIdInterface;
|
||||
use Drupal\Core\Form\FormBase;
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
namespace Drupal\config_translation\Plugin\Derivative;
|
||||
|
||||
use Drupal\Component\Utility\Unicode;
|
||||
use Drupal\Component\Plugin\Derivative\DeriverBase;
|
||||
use Drupal\config_translation\ConfigMapperManagerInterface;
|
||||
use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\config_translation\Tests\ConfigTranslationInstallTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\config_translation\Tests;
|
||||
|
||||
use Drupal\simpletest\InstallerTestBase;
|
||||
|
||||
/**
|
||||
* Installs the config translation module on a site installed in non english.
|
||||
*
|
||||
* @group config_translation
|
||||
*/
|
||||
class ConfigTranslationInstallTest extends InstallerTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $langcode = 'eo';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $profile = 'standard';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUpLanguage() {
|
||||
// Place custom local translations in the translations directory.
|
||||
mkdir(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
|
||||
file_put_contents(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.eo.po', $this->getPo('eo'));
|
||||
|
||||
parent::setUpLanguage();
|
||||
|
||||
$this->translations['Save and continue'] = 'Save and continue eo';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the string for the test .po file.
|
||||
*
|
||||
* @param string $langcode
|
||||
* The language code.
|
||||
* @return string
|
||||
* Contents for the test .po file.
|
||||
*/
|
||||
protected function getPo($langcode) {
|
||||
return <<<ENDPO
|
||||
msgid ""
|
||||
msgstr ""
|
||||
|
||||
msgid "Save and continue"
|
||||
msgstr "Save and continue $langcode"
|
||||
|
||||
msgid "Anonymous"
|
||||
msgstr "Anonymous $langcode"
|
||||
|
||||
msgid "Language"
|
||||
msgstr "Language $langcode"
|
||||
ENDPO;
|
||||
}
|
||||
|
||||
public function testConfigTranslation() {
|
||||
$this->drupalPostForm('admin/config/regional/language/add', ['predefined_langcode' => 'en'], t('Add custom language'));
|
||||
$this->drupalPostForm('admin/config/regional/language/add', ['predefined_langcode' => 'fr'], t('Add custom language'));
|
||||
|
||||
$edit = [
|
||||
'modules[Multilingual][config_translation][enable]' => TRUE,
|
||||
];
|
||||
$this->drupalPostForm('admin/modules', $edit, t('Install'));
|
||||
|
||||
$this->drupalGet('/admin/structure/types/manage/article/fields');
|
||||
$this->assertResponse(200);
|
||||
}
|
||||
|
||||
}
|
|
@ -10,7 +10,6 @@ namespace Drupal\config_translation\Tests;
|
|||
use Drupal\Component\Serialization\Json;
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
use Drupal\Component\Utility\Unicode;
|
||||
use Drupal\Core\Config\FileStorage;
|
||||
use Drupal\Core\Language\Language;
|
||||
use Drupal\Core\Language\LanguageInterface;
|
||||
use Drupal\field\Entity\FieldConfig;
|
||||
|
|
|
@ -13,7 +13,6 @@ use Drupal\Core\Language\LanguageInterface;
|
|||
use Drupal\Core\TypedData\TypedDataInterface;
|
||||
use Drupal\Tests\UnitTestCase;
|
||||
use Drupal\Core\TypedData\DataDefinition;
|
||||
use Drupal\Core\TypedData\DataDefinitionInterface;
|
||||
|
||||
/**
|
||||
* Tests the functionality provided by configuration translation mapper manager.
|
||||
|
|
|
@ -15,7 +15,6 @@ use Drupal\Core\Routing\RouteMatch;
|
|||
use Drupal\Core\Url;
|
||||
use Drupal\Tests\UnitTestCase;
|
||||
use Symfony\Component\Routing\Route;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
* Tests the functionality provided by the configuration names mapper.
|
||||
|
@ -503,7 +502,7 @@ class ConfigNamesMapperTest extends UnitTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Provides data for for ConfigMapperTest::testHasSchema().
|
||||
* Provides data for ConfigMapperTest::testHasSchema().
|
||||
*
|
||||
* @return array
|
||||
* An array of arrays, where each inner array has an array of values that
|
||||
|
|
Reference in a new issue