diff --git a/core/includes/update.inc b/core/includes/update.inc index 35cfd61..b54f572 100644 --- a/core/includes/update.inc +++ b/core/includes/update.inc @@ -863,7 +863,7 @@ function update_language_list($flags = LanguageInterface::STATE_CONFIGURABLE) { } foreach ($languages as $langcode => $language) { - if (($language->locked && !($flags & LanguageInterface::STATE_LOCKED)) || (!$language->locked && !($flags & LanguageInterface::STATE_CONFIGURABLE))) { + if (($language->isLocked() && !($flags & LanguageInterface::STATE_LOCKED)) || (!$language->isLocked() && !($flags & LanguageInterface::STATE_CONFIGURABLE))) { continue; } $filtered_languages[$langcode] = $language; diff --git a/core/modules/block/lib/Drupal/block/BlockForm.php b/core/modules/block/lib/Drupal/block/BlockForm.php index 29854e7..aded250 100644 --- a/core/modules/block/lib/Drupal/block/BlockForm.php +++ b/core/modules/block/lib/Drupal/block/BlockForm.php @@ -160,7 +160,7 @@ public function form(array $form, array &$form_state) { $languages = $this->languageManager->getLanguages(LanguageInterface::STATE_ALL); $langcodes_options = array(); foreach ($languages as $language) { - // @todo $language->name is not wrapped with t(), it should be replaced + // @todo $language->getName() is not wrapped with t(), it should be replaced // by CMI translation implementation. $langcodes_options[$language->getId()] = $language->getName(); } diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationEditForm.php b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationEditForm.php index 379228e..23c5a71 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationEditForm.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationEditForm.php @@ -38,7 +38,7 @@ public function buildForm(array $form, array &$form_state, Request $request = NU */ public function submitForm(array &$form, array &$form_state) { parent::submitForm($form, $form_state); - drupal_set_message($this->t('Successfully updated @language translation.', array('@language' => $this->language->name))); + drupal_set_message($this->t('Successfully updated @language translation.', array('@language' => $this->language->getName()))); } } diff --git a/core/modules/content_translation/content_translation.admin.inc b/core/modules/content_translation/content_translation.admin.inc index d2a3e1e..9f018e9 100644 --- a/core/modules/content_translation/content_translation.admin.inc +++ b/core/modules/content_translation/content_translation.admin.inc @@ -279,7 +279,7 @@ function content_translation_form_language_content_settings_validate(array $form $values = $bundle_settings['settings']['language']; if (empty($values['language_show']) && \Drupal::languageManager()->isLanguageLocked($values['langcode'])) { foreach (\Drupal::languageManager()->getLanguages(LanguageInterface::STATE_LOCKED) as $language) { - $locked_languages[] = $language->name; + $locked_languages[] = $language->getName(); } form_set_error($name, $form_state, t('Translation is not supported if language is always one of: @locked_languages', array('@locked_languages' => implode(', ', $locked_languages)))); } diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module index cde92c7..a7be087 100644 --- a/core/modules/content_translation/content_translation.module +++ b/core/modules/content_translation/content_translation.module @@ -793,7 +793,7 @@ function content_translation_language_configuration_element_validate($element, a $values = $form_state['values'][$key]; if (!$values['language_show'] && $values['content_translation'] && \Drupal::languageManager()->isLanguageLocked($values['langcode'])) { foreach (\Drupal::languageManager()->getLanguages(LanguageInterface::STATE_LOCKED) as $language) { - $locked_languages[] = $language->name; + $locked_languages[] = $language->getName(); } // @todo Set the correct form element name as soon as the element parents // are correctly set. We should be using NestedArray::getValue() but for diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/Language.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/Language.php index 13e3d23..6345f5b 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/Language.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/Language.php @@ -22,7 +22,7 @@ class Language extends Taxonomy { public function render(ResultRow $values) { $value = $this->getValue($values); $language = language_load($value); - $value = $language ? $language->name : ''; + $value = $language ? $language->getName() : ''; return $this->renderLink($this->sanitizeValue($value), $values); }