EbtSettingsDefaultWidget::formElement with t() without StringTranslationTrait

Created on 27 January 2023, almost 2 years ago
Updated 2 February 2023, almost 2 years ago

Problem/Motivation

Inside of Drupal\ebt_core\Plugin\Field\FieldWidget\EbtSettingsDefaultWidget there is a method formElement and we're not using the StringTranslationTrait on

$element['ebt_settings']['design_options']['other_settings']['background_media'] = [
      '#type' => 'media_library',
      '#allowed_bundles' => ['image', 'remote_video'],
      '#title' => t('Background Image/Video'),
      '#default_value' => $items[$delta]->ebt_settings['design_options']['other_settings']['background_media'] ?? NULL,
      '#description' => t('Upload your image, video or Youtube video.'),
    ];

Proposed resolution

We need to use the object, $this->t() on these cases

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.4

Component

Code

Created by

🇧🇷Brazil renatog Campinas

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024