diff --git a/core/modules/picture/lib/Drupal/picture/Form/PictureMappingDeleteForm.php b/core/modules/picture/lib/Drupal/picture/Form/PictureMappingDeleteForm.php
index 26983be..b5ad552 100644
--- a/core/modules/picture/lib/Drupal/picture/Form/PictureMappingDeleteForm.php
+++ b/core/modules/picture/lib/Drupal/picture/Form/PictureMappingDeleteForm.php
@@ -15,7 +15,7 @@ class PictureMappingDeleteForm extends EntityConfirmFormBase {
* {@inheritdoc}
*/
public function getQuestion() {
- return t('Are you sure you want to delete the picture_mapping %title?', array('%title' => $this->entity->label()));
+ return $this->t('Are you sure you want to delete the picture_mapping %title?', array('%title' => $this->entity->label()));
}
/**
@@ -31,7 +31,7 @@ public function getCancelRoute() {
* {@inheritdoc}
*/
public function getConfirmText() {
- return t('Delete');
+ return $this->t('Delete');
}
/**
@@ -39,7 +39,7 @@ public function getConfirmText() {
*/
public function submit(array $form, array &$form_state) {
$this->entity->delete();
- drupal_set_message(t('Picture mapping %label has been deleted.', array('%label' => $this->entity->label())));
+ drupal_set_message($this->t('Picture mapping %label has been deleted.', array('%label' => $this->entity->label())));
watchdog('picture', 'Picture mapping %label has been deleted.', array('%label' => $this->entity->label()), WATCHDOG_NOTICE);
$form_state['redirect'] = 'admin/config/media/picturemapping';
}
diff --git a/core/modules/picture/lib/Drupal/picture/PictureMappingFormController.php b/core/modules/picture/lib/Drupal/picture/PictureMappingFormController.php
index 3c3ce34..c7442b6 100644
--- a/core/modules/picture/lib/Drupal/picture/PictureMappingFormController.php
+++ b/core/modules/picture/lib/Drupal/picture/PictureMappingFormController.php
@@ -29,20 +29,20 @@ class PictureMappingFormController extends EntityFormController {
*/
public function form(array $form, array &$form_state) {
if ($this->operation == 'duplicate') {
- drupal_set_title(t('Duplicate picture mapping @label', array('@label' => $this->entity->label())), PASS_THROUGH);
+ drupal_set_title($this->t('Duplicate picture mapping @label', array('@label' => $this->entity->label())), PASS_THROUGH);
$this->entity = $this->entity->createDuplicate();
}
if ($this->operation == 'edit') {
- drupal_set_title(t('Edit picture mapping @label', array('@label' => $this->entity->label())), PASS_THROUGH);
+ drupal_set_title($this->t('Edit picture mapping @label', array('@label' => $this->entity->label())), PASS_THROUGH);
}
$picture_mapping = $this->entity;
$form['label'] = array(
'#type' => 'textfield',
- '#title' => t('Label'),
+ '#title' => $this->t('Label'),
'#maxlength' => 255,
'#default_value' => $picture_mapping->label(),
- '#description' => t("Example: 'Hero image' or 'Author image'."),
+ '#description' => $this->t("Example: 'Hero image' or 'Author image'."),
'#required' => TRUE,
);
$form['id'] = array(
@@ -56,14 +56,14 @@ public function form(array $form, array &$form_state) {
);
if ((bool) $picture_mapping->id() && $this->operation != 'duplicate') {
- $description = t('Select a breakpoint group from the enabled themes.') . ' ' . t("Warning: if you change the breakpoint group you lose all your selected mappings.");
+ $description = $this->t('Select a breakpoint group from the enabled themes.') . ' ' . $this->t("Warning: if you change the breakpoint group you lose all your selected mappings.");
}
else {
- $description = t('Select a breakpoint group from the enabled themes.');
+ $description = $this->t('Select a breakpoint group from the enabled themes.');
}
$form['breakpointGroup'] = array(
'#type' => 'select',
- '#title' => t('Breakpoint group'),
+ '#title' => $this->t('Breakpoint group'),
'#default_value' => !empty($picture_mapping->breakpointGroup) ? $picture_mapping->breakpointGroup->id() : '',
'#options' => breakpoint_group_select_options(),
'#required' => TRUE,
@@ -79,7 +79,7 @@ public function form(array $form, array &$form_state) {
'#title' => check_plain($label),
'#options' => $image_styles,
'#default_value' => $image_style,
- '#description' => t('Select an image style for this breakpoint.'),
+ '#description' => $this->t('Select an image style for this breakpoint.'),
);
}
}
@@ -96,7 +96,7 @@ protected function actions(array $form, array &$form_state) {
// Only includes a Save action for the entity, no direct Delete button.
return array(
'submit' => array(
- '#value' => t('Save'),
+ '#value' => $this->t('Save'),
'#validate' => array(
array($this, 'validate'),
),
@@ -125,7 +125,7 @@ public function validate(array $form, array &$form_state) {
}
// Make sure at least one mapping is defined.
elseif (!$picture_mapping->isNew() && !$picture_mapping->hasMappings()) {
- form_set_error('mappings', t('Please select at least one mapping.'));
+ form_set_error('mappings', $this->t('Please select at least one mapping.'));
}
}
}
@@ -138,7 +138,7 @@ public function save(array $form, array &$form_state) {
$picture_mapping->save();
watchdog('picture', 'Picture mapping @label saved.', array('@label' => $picture_mapping->label()), WATCHDOG_NOTICE);
- drupal_set_message(t('Picture mapping %label saved.', array('%label' => $picture_mapping->label())));
+ drupal_set_message($this->t('Picture mapping %label saved.', array('%label' => $picture_mapping->label())));
// Redirect to edit form after creating a new mapping or after selecting
// another breakpoint group.