diff --git a/js/plugins/drupalentity/plugin.js b/js/plugins/drupalentity/plugin.js index 5119845..27bbf56 100644 --- a/js/plugins/drupalentity/plugin.js +++ b/js/plugins/drupalentity/plugin.js @@ -37,7 +37,7 @@ var existingElement = getSelectedEmbeddedEntity(editor); var existingValues = { - 'data-editor-langcode' : drupalSettings.path.currentLanguage + 'data-editor-langcode' : editor.langCode }; if (existingElement && existingElement.$ && existingElement.$.firstChild) { var embedDOMElement = existingElement.$.firstChild; diff --git a/tests/modules/entity_embed_translation_test/entity_embed_translation_test.info.yml b/tests/modules/entity_embed_translation_test/entity_embed_translation_test.info.yml index e19365d..c4e1c05 100644 --- a/tests/modules/entity_embed_translation_test/entity_embed_translation_test.info.yml +++ b/tests/modules/entity_embed_translation_test/entity_embed_translation_test.info.yml @@ -5,6 +5,7 @@ core: 8.x package: Testing dependencies: - drupal:content_translation + - drupal:locale - drupal:file - drupal:node - drupal:text @@ -12,4 +13,4 @@ dependencies: - drupal:ckeditor - drupal:editor - embed:embed - - entity_embed:entity_embed \ No newline at end of file + - entity_embed:entity_embed diff --git a/tests/src/FunctionalJavascript/ContentTranslationTest.php b/tests/src/FunctionalJavascript/ContentTranslationTest.php index 8c54ef3..ad2bc22 100644 --- a/tests/src/FunctionalJavascript/ContentTranslationTest.php +++ b/tests/src/FunctionalJavascript/ContentTranslationTest.php @@ -3,7 +3,6 @@ namespace Drupal\Tests\content_translation\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; -use Drupal\language\Entity\ConfigurableLanguage; /** * Test integration with content_translation. @@ -74,7 +73,7 @@ class ContentTranslationTest extends WebDriverTestBase { // Check that the translate link appears on the node page. $this->drupalLogin($this->translator); - $this->drupalGet('node/' . $parent->id() .'/edit'); + $this->drupalGet('node/' . $parent->id() . '/edit'); $this->assertSession() ->waitForElementVisible('css', 'a.cke_button__test_node') @@ -114,7 +113,7 @@ class ContentTranslationTest extends WebDriverTestBase { $this->assertSession()->responseContains('mouse'); // Get translation. - $this->drupalGet('/fr/node/' . $parent->id() .'/edit'); + $this->drupalGet('/fr/node/' . $parent->id() . '/edit'); $this->assertSession() ->waitForElementVisible('css', 'a.cke_button__test_node') @@ -153,7 +152,6 @@ class ContentTranslationTest extends WebDriverTestBase { $this->assertSession()->responseContains('souris'); $this->assertSession()->responseNotContains('mouse'); - } /**