diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Access/ConfigTranslationOverviewAccess.php b/core/modules/config_translation/lib/Drupal/config_translation/Access/ConfigTranslationOverviewAccess.php index 78b10d4..868733a 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Access/ConfigTranslationOverviewAccess.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Access/ConfigTranslationOverviewAccess.php @@ -69,7 +69,7 @@ public function access(Route $route, Request $request, AccountInterface $account $account->hasPermission('translate configuration') && $mapper->hasSchema() && $mapper->hasTranslatable() && - !$this->sourceLanguage->isocked(); + !$this->sourceLanguage->isLocked(); return $access ? static::ALLOW : static::DENY; } diff --git a/core/modules/content_translation/content_translation.pages.inc b/core/modules/content_translation/content_translation.pages.inc index c153b43..3240fe9 100644 --- a/core/modules/content_translation/content_translation.pages.inc +++ b/core/modules/content_translation/content_translation.pages.inc @@ -105,7 +105,7 @@ function content_translation_overview(EntityInterface $entity) { $source_name = t('n/a'); } else { - $source_name = isset($languages[$source]) ? $languages[$source]->name : t('n/a'); + $source_name = isset($languages[$source]) ? $languages[$source]->getName() : t('n/a'); if ($controller->getTranslationAccess($entity, 'delete')) { $links['delete'] = isset($delete_links->links[$langcode]['href']) ? $delete_links->links[$langcode] : array('href' => $delete_links, 'language' => $language); $links['delete']['title'] = t('Delete'); 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 214e50d..a07457d 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 @@ -75,7 +75,8 @@ public function access(Route $route, Request $request, AccountInterface $account && isset($languages[$source->getId()]) && isset($languages[$target->getId()]) && !isset($translations[$target->getId()]) - && $controller->getTranslationAccess($entity, $operation)) ? static::ALLOW : static::DENY; + && $controller->getTranslationAccess($entity, $operation)) + ? static::ALLOW : static::DENY; case 'update': case 'delete': @@ -83,7 +84,8 @@ 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) ? static::ALLOW : static::DENY; + && $controller->getTranslationAccess($entity, $operation) + ? static::ALLOW : static::DENY; } } return static::DENY; diff --git a/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationHandler.php b/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationHandler.php index 853181d..3cd1361 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationHandler.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationHandler.php @@ -112,7 +112,7 @@ public function entityFormAlter(array &$form, array &$form_state, EntityInterfac if ($has_translations && $new_translation) { $form['source_langcode'] = array( '#type' => 'details', - '#title' => t('Source language: @language', array('@language' => $languages[$source_langcode]->name)), + '#title' => t('Source language: @language', array('@language' => $languages[$source_langcode]->getName())), '#tree' => TRUE, '#weight' => -100, '#multilingual' => TRUE, @@ -434,7 +434,7 @@ public function entityFormSourceChange($form, &$form_state) { $path = $entity->getSystemPath('drupal:content-translation-overview'); $form_state['redirect'] = $path . '/add/' . $source . '/' . $form_controller->getFormLangcode($form_state); $languages = language_list(); - drupal_set_message(t('Source language set to: %language', array('%language' => $languages[$source]->name))); + drupal_set_message(t('Source language set to: %language', array('%language' => $languages[$source]->getName()))); } /** diff --git a/core/modules/language/lib/Drupal/language/Form/NegotiationBrowserForm.php b/core/modules/language/lib/Drupal/language/Form/NegotiationBrowserForm.php index f82e54a..3dc4ad7 100644 --- a/core/modules/language/lib/Drupal/language/Form/NegotiationBrowserForm.php +++ b/core/modules/language/lib/Drupal/language/Form/NegotiationBrowserForm.php @@ -63,7 +63,7 @@ public function buildForm(array $form, array &$form_state) { $existing_languages = array(); foreach ($languages as $langcode => $language) { - $existing_languages[$langcode] = $language->name; + $existing_languages[$langcode] = $language->getName(); } // If we have no languages available, present the list of predefined languages diff --git a/core/modules/locale/lib/Drupal/locale/Form/ImportForm.php b/core/modules/locale/lib/Drupal/locale/Form/ImportForm.php index e80e6b4..e22cb52 100644 --- a/core/modules/locale/lib/Drupal/locale/Form/ImportForm.php +++ b/core/modules/locale/lib/Drupal/locale/Form/ImportForm.php @@ -81,7 +81,7 @@ public function buildForm(array $form, array &$form_state) { $existing_languages = array(); foreach ($languages as $langcode => $language) { if ($langcode != 'en' || locale_translate_english()) { - $existing_languages[$langcode] = $language->name; + $existing_languages[$langcode] = $language->getName(); } } diff --git a/core/modules/locale/lib/Drupal/locale/Form/TranslateEditForm.php b/core/modules/locale/lib/Drupal/locale/Form/TranslateEditForm.php index c846026..24066a4 100644 --- a/core/modules/locale/lib/Drupal/locale/Form/TranslateEditForm.php +++ b/core/modules/locale/lib/Drupal/locale/Form/TranslateEditForm.php @@ -33,7 +33,7 @@ public function buildForm(array $form, array &$form_state) { $this->languageManager->reset(); $languages = language_list(); - $langname = isset($langcode) ? $languages[$langcode]->name : "- None -"; + $langname = isset($langcode) ? $languages[$langcode]->getName() : "- None -"; $form['#attached']['library'][] = 'locale/drupal.locale.admin'; diff --git a/core/modules/node/lib/Drupal/node/NodeViewBuilder.php b/core/modules/node/lib/Drupal/node/NodeViewBuilder.php index 494183f..85fc50d 100644 --- a/core/modules/node/lib/Drupal/node/NodeViewBuilder.php +++ b/core/modules/node/lib/Drupal/node/NodeViewBuilder.php @@ -58,7 +58,7 @@ public function buildComponents(array &$build, array $entities, array $displays, $build[$id]['langcode'] = array( '#type' => 'item', '#title' => t('Language'), - '#markup' => $entity->language()->name, + '#markup' => $entity->language()->getName(), '#prefix' => '
', '#suffix' => '
' ); diff --git a/core/modules/node/lib/Drupal/node/Plugin/Search/NodeSearch.php b/core/modules/node/lib/Drupal/node/Plugin/Search/NodeSearch.php index 5ac1d16..bb7255e 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/Search/NodeSearch.php +++ b/core/modules/node/lib/Drupal/node/Plugin/Search/NodeSearch.php @@ -455,7 +455,7 @@ public function searchFormAlter(array &$form, array &$form_state) { $language_list = \Drupal::languageManager()->getLanguages(LanguageInterface::STATE_ALL); foreach ($language_list as $langcode => $language) { // Make locked languages appear special in the list. - $language_options[$langcode] = $language->islocked() ? t('- @name -', array('@name' => $language->getName())) : $language->getName(); + $language_options[$langcode] = $language->isLocked() ? t('- @name -', array('@name' => $language->getName())) : $language->getName(); } if (count($language_options) > 1) { $form['advanced']['lang-fieldset'] = array(