From a46238e341359ee03d9a178583b5db217d397e25 Mon Sep 17 00:00:00 2001
From: Lee Rowlands <lee.rowlands@previousnext.com.au>
Date: Tue, 16 Apr 2019 07:24:20 +1000
Subject: [PATCH] Issue #3045125 by vadim.hirbu: Possible wrong token
 assignment on display modes

(cherry picked from commit 67fd16dc279041b96da8477cf91ebf784c0f516c)
---
 core/modules/field_ui/src/EntityDisplayModeListBuilder.php  | 2 +-
 core/modules/field_ui/src/Form/EntityDisplayModeAddForm.php | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/modules/field_ui/src/EntityDisplayModeListBuilder.php b/core/modules/field_ui/src/EntityDisplayModeListBuilder.php
index 35a8b1cf6b22..f5eabc70b27c 100644
--- a/core/modules/field_ui/src/EntityDisplayModeListBuilder.php
+++ b/core/modules/field_ui/src/EntityDisplayModeListBuilder.php
@@ -117,7 +117,7 @@ public function render() {
         'data' => [
           '#type' => 'link',
           '#url' => Url::fromRoute($short_type == 'view' ? 'entity.entity_view_mode.add_form' : 'entity.entity_form_mode.add_form', ['entity_type_id' => $entity_type]),
-          '#title' => $this->t('Add new %label @entity-type', ['%label' => $this->entityTypes[$entity_type]->getLabel(), '@entity-type' => $this->entityType->getLowercaseLabel()]),
+          '#title' => $this->t('Add new @entity-type %label', ['@entity-type' => $this->entityTypes[$entity_type]->getLabel(), '%label' => $this->entityType->getLowercaseLabel()]),
         ],
         'colspan' => count($table['#header']),
       ];
diff --git a/core/modules/field_ui/src/Form/EntityDisplayModeAddForm.php b/core/modules/field_ui/src/Form/EntityDisplayModeAddForm.php
index 6460e619fb16..a71b71361e3e 100644
--- a/core/modules/field_ui/src/Form/EntityDisplayModeAddForm.php
+++ b/core/modules/field_ui/src/Form/EntityDisplayModeAddForm.php
@@ -28,7 +28,7 @@ public function buildForm(array $form, FormStateInterface $form_state, $entity_t
     // Change replace_pattern to avoid undesired dots.
     $form['id']['#machine_name']['replace_pattern'] = '[^a-z0-9_]+';
     $definition = $this->entityTypeManager->getDefinition($this->targetEntityTypeId);
-    $form['#title'] = $this->t('Add new %label @entity-type', ['%label' => $definition->getLabel(), '@entity-type' => $this->entityType->getLowercaseLabel()]);
+    $form['#title'] = $this->t('Add new @entity-type %label', ['@entity-type' => $definition->getLabel(), '%label' => $this->entityType->getLowercaseLabel()]);
     return $form;
   }
 
-- 
GitLab