From 67fd16dc279041b96da8477cf91ebf784c0f516c Mon Sep 17 00:00:00 2001 From: Lee Rowlands Date: Tue, 16 Apr 2019 07:24:20 +1000 Subject: [PATCH] Issue #3045125 by vadim.hirbu: Possible wrong token assignment on display modes --- 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 35a8b1cf6b2..f5eabc70b27 100644 --- a/core/modules/field_ui/src/EntityDisplayModeListBuilder.php +++ b/core/modules/field_ui/src/EntityDisplayModeListBuilder.php @@ -117,7 +117,7 @@ class EntityDisplayModeListBuilder extends ConfigEntityListBuilder { '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 6460e619fb1..a71b71361e3 100644 --- a/core/modules/field_ui/src/Form/EntityDisplayModeAddForm.php +++ b/core/modules/field_ui/src/Form/EntityDisplayModeAddForm.php @@ -28,7 +28,7 @@ class EntityDisplayModeAddForm extends EntityDisplayModeFormBase { // 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; }