Pull merge.
[yaffs-website] / web / core / modules / taxonomy / src / VocabularyForm.php
index 63f0ccb8ab5f7100dee63c3b7348e64790d8eaae..61b3638ec24e348c126ed3d4c34e028e988a7f2a 100644 (file)
@@ -11,13 +11,15 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
  * Base form for vocabulary edit forms.
+ *
+ * @internal
  */
 class VocabularyForm extends BundleEntityFormBase {
 
   /**
    * The vocabulary storage.
    *
-   * @var \Drupal\taxonomy\VocabularyStorageInterface.
+   * @var \Drupal\taxonomy\VocabularyStorageInterface
    */
   protected $vocabularyStorage;
 
@@ -87,7 +89,7 @@ class VocabularyForm extends BundleEntityFormBase {
     if ($this->moduleHandler->moduleExists('language')) {
       $form['default_terms_language'] = [
         '#type' => 'details',
-        '#title' => $this->t('Terms language'),
+        '#title' => $this->t('Term language'),
         '#open' => TRUE,
       ];
       $form['default_terms_language']['default_language'] = [
@@ -123,13 +125,13 @@ class VocabularyForm extends BundleEntityFormBase {
     $edit_link = $this->entity->link($this->t('Edit'));
     switch ($status) {
       case SAVED_NEW:
-        drupal_set_message($this->t('Created new vocabulary %name.', ['%name' => $vocabulary->label()]));
+        $this->messenger()->addStatus($this->t('Created new vocabulary %name.', ['%name' => $vocabulary->label()]));
         $this->logger('taxonomy')->notice('Created new vocabulary %name.', ['%name' => $vocabulary->label(), 'link' => $edit_link]);
         $form_state->setRedirectUrl($vocabulary->urlInfo('overview-form'));
         break;
 
       case SAVED_UPDATED:
-        drupal_set_message($this->t('Updated vocabulary %name.', ['%name' => $vocabulary->label()]));
+        $this->messenger()->addStatus($this->t('Updated vocabulary %name.', ['%name' => $vocabulary->label()]));
         $this->logger('taxonomy')->notice('Updated vocabulary %name.', ['%name' => $vocabulary->label(), 'link' => $edit_link]);
         $form_state->setRedirectUrl($vocabulary->urlInfo('collection'));
         break;