X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Fmodules%2Flanguage%2Fsrc%2FForm%2FLanguageAddForm.php;fp=web%2Fcore%2Fmodules%2Flanguage%2Fsrc%2FForm%2FLanguageAddForm.php;h=c0ef22b22d8af92824c8618b643f71c35c2f234a;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=12484079ecd8cf2bff203720ea8ce319398afff2;hpb=74df008bdbb3a11eeea356744f39b802369bda3c;p=yaffs-website diff --git a/web/core/modules/language/src/Form/LanguageAddForm.php b/web/core/modules/language/src/Form/LanguageAddForm.php index 12484079e..c0ef22b22 100644 --- a/web/core/modules/language/src/Form/LanguageAddForm.php +++ b/web/core/modules/language/src/Form/LanguageAddForm.php @@ -88,12 +88,12 @@ class LanguageAddForm extends LanguageFormBase { $t_args = ['%language' => $this->entity->label(), '%langcode' => $this->entity->id()]; $this->logger('language')->notice('The %language (%langcode) language has been created.', $t_args); - drupal_set_message($this->t('The language %language has been created and can now be used.', $t_args)); + $this->messenger()->addStatus($this->t('The language %language has been created and can now be used.', $t_args)); if ($this->moduleHandler->moduleExists('block')) { // Tell the user they have the option to add a language switcher block // to their theme so they can switch between the languages. - drupal_set_message($this->t('Use one of the language switcher blocks to allow site visitors to switch between languages. You can enable these blocks on the block administration page.', [':block-admin' => $this->url('block.admin_display')])); + $this->messenger()->addStatus($this->t('Use one of the language switcher blocks to allow site visitors to switch between languages. You can enable these blocks on the block administration page.', [':block-admin' => $this->url('block.admin_display')])); } $form_state->setRedirectUrl($this->entity->urlInfo('collection')); }