diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationDeleteForm.php b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationDeleteForm.php index a23023c..cacebdf 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationDeleteForm.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationDeleteForm.php @@ -87,7 +87,7 @@ public static function create(ContainerInterface $container) { * {@inheritdoc} */ public function getQuestion() { - return $this->t('Are you sure you want to delete the @language translation of %label?', array('%label' => $this->mapper->getTitle(), '@language' => $this->language->name)); + return $this->t('Are you sure you want to delete the @language translation of %label?', array('%label' => $this->mapper->getTitle(), '@language' => $this->language->getName())); } /** @@ -146,7 +146,7 @@ public function submitForm(array &$form, array &$form_state) { $cache_backend->deleteAll(); } - drupal_set_message($this->t('@language translation of %label was deleted', array('%label' => $this->mapper->getTitle(), '@language' => $this->language->name))); + drupal_set_message($this->t('@language translation of %label was deleted', array('%label' => $this->mapper->getTitle(), '@language' => $this->language->getName()))); $form_state['redirect_route'] = array( 'route_name' => $this->mapper->getOverviewRoute(), diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Access/ContentTranslationManageAccessCheck.php b/core/modules/content_translation/lib/Drupal/content_translation/Access/ContentTranslationManageAccessCheck.php index a07457d..9faa3b0 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/Access/ContentTranslationManageAccessCheck.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/Access/ContentTranslationManageAccessCheck.php @@ -84,7 +84,7 @@ public function access(Route $route, Request $request, AccountInterface $account return isset($languages[$language->getId()]) && $language->getId() != $entity->getUntranslated()->language()->getId() && isset($translations[$language->getId()]) - && $controller->getTranslationAccess($entity, $operation) + && $controller->getTranslationAccess($entity, $operation) ? static::ALLOW : static::DENY; } } 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 23d7920..13e0e3f 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 @@ -55,7 +55,7 @@ public function getConfirmText() { * {@inheritdoc} */ public function getQuestion() { - return $this->t('Are you sure you want to delete the @language translation of %label?', array('@language' => $this->language->name, '%label' => $this->entity->label())); + return $this->t('Are you sure you want to delete the @language translation of %label?', array('@language' => $this->language->getName(), '%label' => $this->entity->label())); } /**