diff --git a/core/modules/locale/lib/Drupal/locale/Form/ImportForm.php b/core/modules/locale/lib/Drupal/locale/Form/ImportForm.php index acfbb03..4fd5657 100644 --- a/core/modules/locale/lib/Drupal/locale/Form/ImportForm.php +++ b/core/modules/locale/lib/Drupal/locale/Form/ImportForm.php @@ -152,7 +152,7 @@ public function submitForm(array &$form, array &$form_state) { $language = language_load($form_state['values']['langcode']); if (empty($language)) { $language = new Language(array( - 'langcode' => $form_state['values']['langcode'] + 'id' => $form_state['values']['langcode'] )); $language = language_save($language); drupal_set_message($this->t('The language %language has been created and can now be used.', array('%language' => $language->name))); diff --git a/core/modules/locale/lib/Drupal/locale/Form/LocaleForm.php b/core/modules/locale/lib/Drupal/locale/Form/LocaleForm.php index c06a4aa..01bf987 100644 --- a/core/modules/locale/lib/Drupal/locale/Form/LocaleForm.php +++ b/core/modules/locale/lib/Drupal/locale/Form/LocaleForm.php @@ -12,16 +12,6 @@ class LocaleForm { /** - * Wraps locale_translate_import_form(). - * - * @todo Remove locale_translate_import_form(). - */ - public function import() { - module_load_include('bulk.inc', 'locale'); - return drupal_get_form('locale_translate_import_form'); - } - - /** * Wraps locale_translate_export_form(). * * @todo Remove locale_translate_export_form(). diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleImportFunctionalTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleImportFunctionalTest.php index 8cd217b..2bf8af9 100644 --- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleImportFunctionalTest.php +++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleImportFunctionalTest.php @@ -55,7 +55,7 @@ function testStandalonePoFile() { )); $config = \Drupal::config('locale.settings'); // The import should automatically create the corresponding language. - $this->assertRaw(t('The language %language has been created.', array('%language' => 'French')), 'The language has been automatically created.'); + $this->assertRaw(t('The language %language has been created and can now be used.', array('%language' => 'French')), 'The language has been automatically created.'); // The import should have created 8 strings. $this->assertRaw(t('One translation file imported. %number translations were added, %update translations were updated and %delete translations were removed.', array('%number' => 8, '%update' => 0, '%delete' => 0)), 'The translation file was successfully imported.');