diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php index 77d0874..f81b9e5 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php @@ -41,7 +41,7 @@ public function form(array $form, array &$form_state, EntityInterface $term) { '#format' => $term->format, '#weight' => 0, ); - $language_configuration = module_invoke('language', 'get_default_configuration', 'vocabulary', $vocabulary->machine_name); + $language_configuration = module_invoke('language', 'get_default_configuration', 'taxonomy_term', $vocabulary->machine_name); $form['langcode'] = array( '#type' => 'language_select', '#title' => t('Language'), diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyLanguageTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyLanguageTest.php index 31bbf62..65f756f 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyLanguageTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyLanguageTest.php @@ -95,7 +95,7 @@ function testVocabularyDefaultLanguageForTerms() { $this->assertResponse(200, 'The vocabulary has been created.'); // Check that the language settings were saved. - $language_settings = language_get_default_configuration('vocabulary', $edit['machine_name']); + $language_settings = language_get_default_configuration('taxonomy_term', $edit['machine_name']); $this->assertEqual($language_settings['langcode'], 'bb'); $this->assertEqual($language_settings['language_hidden'], FALSE); @@ -111,7 +111,7 @@ function testVocabularyDefaultLanguageForTerms() { $this->drupalPost('admin/structure/taxonomy/' . $machine_name . '/edit', $edit, t('Save')); // And check again the settings and also the interface. - $language_settings = language_get_default_configuration('vocabulary', $machine_name); + $language_settings = language_get_default_configuration('taxonomy_term', $machine_name); $this->assertEqual($language_settings['langcode'], 'aa'); $this->assertEqual($language_settings['language_hidden'], TRUE); @@ -133,7 +133,7 @@ function testVocabularyDefaultLanguageForTerms() { $old_settings = config('language.settings')->get(language_get_default_configuration_settings_key('vocabulary', $machine_name)); $this->assertNull($old_settings, 'The old vocabulary settings were deleted.'); // Check that we have the new settings. - $new_settings = language_get_default_configuration('vocabulary', $new_machine_name); + $new_settings = language_get_default_configuration('taxonomy_term', $new_machine_name); $this->assertEqual($new_settings['langcode'], 'authors_default'); $this->assertEqual($new_settings['language_hidden'], TRUE); } diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php index 450cd55..b791d8b 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php @@ -63,10 +63,10 @@ public function form(array $form, array &$form_state, EntityInterface $vocabular $form['default_terms_language']['default_language'] = array( '#type' => 'language_configuration', '#entity_information' => array( - 'entity_type' => 'vocabulary', + 'entity_type' => 'taxonomy_term', 'bundle' => $vocabulary->machine_name, ), - '#default_value' => language_get_default_configuration('vocabulary', $vocabulary->machine_name), + '#default_value' => language_get_default_configuration('taxonomy_term', $vocabulary->machine_name), ); } // Set the hierarchy to "multiple parents" by default. This simplifies the @@ -132,7 +132,7 @@ public function languageConfigurationSubmit(array &$form, array &$form_state) { // Delete the old language settings for the vocabulary, if the machine name // is changed. if ($vocabulary && isset($vocabulary->machine_name) && $vocabulary->machine_name != $form_state['values']['machine_name']) { - language_clear_default_configuration('vocabulary', $vocabulary->machine_name); + language_clear_default_configuration('taxonomy_term', $vocabulary->machine_name); } // Since the machine name is not known yet, and it can be changed anytime, // we have to also update the bundle property for the default language diff --git a/core/modules/taxonomy/taxonomy.admin.inc b/core/modules/taxonomy/taxonomy.admin.inc index 273b35c..24c2039 100644 --- a/core/modules/taxonomy/taxonomy.admin.inc +++ b/core/modules/taxonomy/taxonomy.admin.inc @@ -534,7 +534,7 @@ function theme_taxonomy_overview_terms($variables) { function taxonomy_term_add($vocabulary) { $term = entity_create('taxonomy_term', array('vid' => $vocabulary->vid, 'vocabulary_machine_name' => $vocabulary->machine_name)); if (module_exists('language')) { - $term->langcode = language_get_default_langcode('vocabulary', $vocabulary->machine_name); + $term->langcode = language_get_default_langcode('taxonomy_term', $vocabulary->machine_name); } return entity_get_form($term); }