diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module index 21b315a..f334336 100644 --- a/core/modules/content_translation/content_translation.module +++ b/core/modules/content_translation/content_translation.module @@ -5,13 +5,11 @@ * Allows entities to be translated into different languages. */ -use Drupal\content_translation\Plugin\Derivative\ContentTranslationLocalTasks; use Drupal\Core\Entity\ContentEntityInterface; use Drupal\Core\Entity\EntityFormControllerInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Language\Language; use Drupal\Core\Session\AccountInterface; -use Drupal\Core\TypedData\TranslatableInterface; use Drupal\node\NodeInterface; /** @@ -198,7 +196,6 @@ function content_translation_menu() { // Provide the translation UI only for enabled types. if (content_translation_enabled($entity_type)) { $path = _content_translation_link_to_router_path($entity_type, $info->getLinkTemplate('canonical')); - $entity_position = count(explode('/', $path)) - 1; $keys = array_flip(array('load_arguments')); $translation = $info->get('translation'); $menu_info = array_intersect_key($translation['content_translation'], $keys) + array('file' => 'content_translation.pages.inc'); @@ -213,8 +210,6 @@ function content_translation_menu() { // Add translation callback. // @todo Add the access callback instead of replacing it as soon as the // routing system supports multiple callbacks. - $language_position = $entity_position + 3; - $args = array($entity_position, $language_position, $language_position + 1); $items["$path/translations/add/%language/%language"] = array( 'title' => 'Add', 'route_name' => "content_translation.translation_add_$entity_type", @@ -222,7 +217,6 @@ function content_translation_menu() { ); // Edit translation callback. - $args = array($entity_position, $language_position); $items["$path/translations/edit/%language"] = array( 'title' => 'Edit', 'route_name' => "content_translation.translation_edit_$entity_type", diff --git a/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationController.php b/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationController.php index e99c9b0..cd1e497 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationController.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationController.php @@ -285,7 +285,6 @@ public function entityFormAlter(array &$form, array &$form_state, EntityInterfac * @see \Drupal\content_translation\ContentTranslationController::entityFormAlter() */ public function entityFormSharedElements($element, $form_state, $form) { - static $ignored_types; // @todo Find a more reliable way to determine if a form element concerns a // multilingual value. @@ -330,7 +329,6 @@ public function entityFormSharedElements($element, $form_state, $form) { * A form element array. */ protected function addTranslatabilityClue(&$element) { - static $suffix, $fapi_title_elements; // Elements which can have a #title attribute according to FAPI Reference. if (!isset($suffix)) { diff --git a/core/modules/content_translation/lib/Drupal/content_translation/FieldTranslationSynchronizer.php b/core/modules/content_translation/lib/Drupal/content_translation/FieldTranslationSynchronizer.php index 4efde31..3dd27d6 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/FieldTranslationSynchronizer.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/FieldTranslationSynchronizer.php @@ -8,7 +8,6 @@ namespace Drupal\content_translation; use Drupal\Core\Entity\ContentEntityInterface; -use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityManagerInterface; /** diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Form/ContentTranslationDeleteForm.php b/core/modules/content_translation/lib/Drupal/content_translation/Form/ContentTranslationDeleteForm.php index 5d33cdf..33d8d5e 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/Form/ContentTranslationDeleteForm.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/Form/ContentTranslationDeleteForm.php @@ -40,7 +40,6 @@ public function getFormId() { */ public function buildForm(array $form, array &$form_state, $_entity_type = NULL, $language = NULL) { $this->entity = $this->getRequest()->attributes->get($_entity_type); - $uri = $this->entity->uri('drupal:content-translation-overview'); $this->language = language_load($language); return parent::buildForm($form, $form_state); } diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Plugin/Derivative/ContentTranslationContextualLinks.php b/core/modules/content_translation/lib/Drupal/content_translation/Plugin/Derivative/ContentTranslationContextualLinks.php index 45575d0..891b70c 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/Plugin/Derivative/ContentTranslationContextualLinks.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/Plugin/Derivative/ContentTranslationContextualLinks.php @@ -9,7 +9,6 @@ use Drupal\Component\Plugin\Derivative\DerivativeBase; use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface; -use Drupal\Core\Routing\RouteProviderInterface; use Drupal\content_translation\ContentTranslationManagerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationSyncImageTest.php b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationSyncImageTest.php index baf99d8..78a3efc 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationSyncImageTest.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationSyncImageTest.php @@ -8,7 +8,6 @@ namespace Drupal\content_translation\Tests; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Language\Language; /** * Tests the Content Translation image field synchronization capability. diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationSyncUnitTest.php b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationSyncUnitTest.php index a1e0805..509287e 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationSyncUnitTest.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationSyncUnitTest.php @@ -7,7 +7,6 @@ namespace Drupal\content_translation\Tests; -use Drupal\Core\Language\Language; use Drupal\simpletest\DrupalUnitTestBase; use Drupal\content_translation\FieldTranslationSynchronizer; diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationUITest.php b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationUITest.php index 8a1b198..5c918ea 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationUITest.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationUITest.php @@ -8,7 +8,6 @@ namespace Drupal\content_translation\Tests; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\ContentEntityBase; use Drupal\Core\Language\Language; /** diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Tests/Views/TranslationLinkTest.php b/core/modules/content_translation/lib/Drupal/content_translation/Tests/Views/TranslationLinkTest.php index fe45379..e5f131b 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/Tests/Views/TranslationLinkTest.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/Tests/Views/TranslationLinkTest.php @@ -7,7 +7,6 @@ namespace Drupal\content_translation\Tests\Views; -use Drupal\views\Tests\ViewTestBase; use Drupal\content_translation\Tests\ContentTranslationTestBase; use Drupal\views\Tests\ViewTestData;