diff --git a/core/modules/field_ui/src/EntityDisplayModeListBuilder.php b/core/modules/field_ui/src/EntityDisplayModeListBuilder.php index f17a07669dc..906a8e04842 100644 --- a/core/modules/field_ui/src/EntityDisplayModeListBuilder.php +++ b/core/modules/field_ui/src/EntityDisplayModeListBuilder.php @@ -60,7 +60,7 @@ class EntityDisplayModeListBuilder extends ConfigEntityListBuilder { * {@inheritdoc} */ public function buildHeader() { - $header['label'] = t('Name'); + $header['label'] = $this->t('Name'); return $header + parent::buildHeader(); } @@ -120,7 +120,7 @@ class EntityDisplayModeListBuilder extends ConfigEntityListBuilder { 'data' => array( '#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' => t('Add new %label @entity-type', array('%label' => $this->entityTypes[$entity_type]->getLabel(), '@entity-type' => $this->entityType->getLowercaseLabel())), + '#title' => $this->t('Add new %label @entity-type', array('%label' => $this->entityTypes[$entity_type]->getLabel(), '@entity-type' => $this->entityType->getLowercaseLabel())), ), 'colspan' => count($table['#header']), ); diff --git a/core/modules/field_ui/src/FieldStorageConfigListBuilder.php b/core/modules/field_ui/src/FieldStorageConfigListBuilder.php index d0fe42f7195..6e7444204ec 100644 --- a/core/modules/field_ui/src/FieldStorageConfigListBuilder.php +++ b/core/modules/field_ui/src/FieldStorageConfigListBuilder.php @@ -85,12 +85,12 @@ class FieldStorageConfigListBuilder extends ConfigEntityListBuilder { * {@inheritdoc} */ public function buildHeader() { - $header['id'] = t('Field name'); + $header['id'] = $this->t('Field name'); $header['type'] = array( - 'data' => t('Field type'), + 'data' => $this->t('Field type'), 'class' => array(RESPONSIVE_PRIORITY_MEDIUM), ); - $header['usage'] = t('Used in'); + $header['usage'] = $this->t('Used in'); return $header; } @@ -100,14 +100,14 @@ class FieldStorageConfigListBuilder extends ConfigEntityListBuilder { public function buildRow(EntityInterface $field_storage) { if ($field_storage->isLocked()) { $row['class'] = array('menu-disabled'); - $row['data']['id'] = t('@field_name (Locked)', array('@field_name' => $field_storage->getName())); + $row['data']['id'] = $this->t('@field_name (Locked)', array('@field_name' => $field_storage->getName())); } else { $row['data']['id'] = $field_storage->getName(); } $field_type = $this->fieldTypes[$field_storage->getType()]; - $row['data']['type'] = t('@type (module: @module)', array('@type' => $field_type['label'], '@module' => $field_type['provider'])); + $row['data']['type'] = $this->t('@type (module: @module)', array('@type' => $field_type['label'], '@module' => $field_type['provider'])); $usage = array(); foreach ($field_storage->getBundles() as $bundle) { diff --git a/core/modules/field_ui/src/Form/EntityDisplayModeDeleteForm.php b/core/modules/field_ui/src/Form/EntityDisplayModeDeleteForm.php index f24416362fa..0d0447bfb44 100644 --- a/core/modules/field_ui/src/Form/EntityDisplayModeDeleteForm.php +++ b/core/modules/field_ui/src/Form/EntityDisplayModeDeleteForm.php @@ -19,7 +19,7 @@ class EntityDisplayModeDeleteForm extends EntityDeleteForm { */ public function getDescription() { $entity_type = $this->entity->getEntityType(); - return t('Deleting a @entity-type will cause any output still requesting to use that @entity-type to use the default display settings.', array('@entity-type' => $entity_type->getLowercaseLabel())); + return $this->t('Deleting a @entity-type will cause any output still requesting to use that @entity-type to use the default display settings.', array('@entity-type' => $entity_type->getLowercaseLabel())); } } diff --git a/core/modules/field_ui/src/Form/EntityDisplayModeFormBase.php b/core/modules/field_ui/src/Form/EntityDisplayModeFormBase.php index 0bdce49df5a..7d79bd7d15e 100644 --- a/core/modules/field_ui/src/Form/EntityDisplayModeFormBase.php +++ b/core/modules/field_ui/src/Form/EntityDisplayModeFormBase.php @@ -76,14 +76,14 @@ abstract class EntityDisplayModeFormBase extends EntityForm { public function form(array $form, FormStateInterface $form_state) { $form['label'] = array( '#type' => 'textfield', - '#title' => t('Name'), + '#title' => $this->t('Name'), '#maxlength' => 100, '#default_value' => $this->entity->label(), ); $form['id'] = array( '#type' => 'machine_name', - '#description' => t('A unique machine-readable name. Can only contain lowercase letters, numbers, and underscores.'), + '#description' => $this->t('A unique machine-readable name. Can only contain lowercase letters, numbers, and underscores.'), '#disabled' => !$this->entity->isNew(), '#default_value' => $this->entity->id(), '#field_prefix' => $this->entity->isNew() ? $this->entity->getTargetType() . '.' : '', @@ -122,7 +122,7 @@ abstract class EntityDisplayModeFormBase extends EntityForm { * {@inheritdoc} */ public function save(array $form, FormStateInterface $form_state) { - drupal_set_message(t('Saved the %label @entity-type.', array('%label' => $this->entity->label(), '@entity-type' => $this->entityType->getLowercaseLabel()))); + drupal_set_message($this->t('Saved the %label @entity-type.', array('%label' => $this->entity->label(), '@entity-type' => $this->entityType->getLowercaseLabel()))); $this->entity->save(); \Drupal::entityManager()->clearCachedFieldDefinitions(); $form_state->setRedirectUrl($this->entity->urlInfo('collection'));