Issue #3045125 by vadim.hirbu: Possible wrong token assignment on display modes
parent
c0f3934ce3
commit
67fd16dc27
|
@ -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']),
|
||||
];
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue