Commit bf9c64ee authored by Sam Becker's avatar Sam Becker Committed by Sam Becker
Browse files

Issue #2762409 by Nitesh Pawar, Sam152: converted t() in $this->t()

parent b956cca5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -72,8 +72,8 @@ class VideoEmbedField extends MediaTypeBase {
      $form['source_field'] = [
        '#type' => 'select',
        '#required' => TRUE,
        '#title' => t('Source Video Field'),
        '#description' => t('The field on the media entity that contains the video URL.'),
        '#title' => $this->t('Source Video Field'),
        '#description' => $this->t('The field on the media entity that contains the video URL.'),
        '#default_value' => empty($this->configuration['source_field']) ? VideoEmbedField::VIDEO_EMBED_FIELD_DEFAULT_NAME : $this->configuration['source_field'],
        '#options' => $options,
      ];
+6 −6
Original line number Diff line number Diff line
@@ -82,13 +82,13 @@ class Video extends FormatterBase implements ContainerFactoryPluginInterface {
  public function settingsForm(array $form, FormStateInterface $form_state) {
    $elements = parent::settingsForm($form, $form_state);
    $elements['autoplay'] = [
      '#title' => t('Autoplay'),
      '#title' => $this->t('Autoplay'),
      '#type' => 'checkbox',
      '#description' => $this->t('Autoplay the videos for users without the "never autoplay videos" permission. Roles with this permission will bypass this setting.'),
      '#default_value' => $this->getSetting('autoplay'),
    ];
    $elements['responsive'] = [
      '#title' => t('Responsive Video'),
      '#title' => $this->t('Responsive Video'),
      '#type' => 'checkbox',
      '#description' => $this->t("Make the video fill the width of it's container, adjusting to the size of the user's screen."),
      '#default_value' => $this->getSetting('responsive'),
@@ -103,7 +103,7 @@ class Video extends FormatterBase implements ContainerFactoryPluginInterface {
      ],
    ];
    $elements['width'] = [
      '#title' => t('Width'),
      '#title' => $this->t('Width'),
      '#type' => 'number',
      '#field_suffix' => 'px',
      '#default_value' => $this->getSetting('width'),
@@ -112,7 +112,7 @@ class Video extends FormatterBase implements ContainerFactoryPluginInterface {
      '#states' => $responsive_checked_state,
    ];
    $elements['height'] = [
      '#title' => t('Height'),
      '#title' => $this->t('Height'),
      '#type' => 'number',
      '#field_suffix' => 'px',
      '#default_value' => $this->getSetting('height'),
@@ -128,9 +128,9 @@ class Video extends FormatterBase implements ContainerFactoryPluginInterface {
   */
  public function settingsSummary() {
    $dimensions = $this->getSetting('responsive') ? $this->t('Responsive') : $this->t('@widthx@height', ['@width' => $this->getSetting('width'), '@height' => $this->getSetting('height')]);
    $summary[] = t('Embedded Video (@dimensions@autoplay).', [
    $summary[] = $this->t('Embedded Video (@dimensions@autoplay).', [
      '@dimensions' => $dimensions,
      '@autoplay' => $this->getSetting('autoplay') ? t(', autoplaying') : '',
      '@autoplay' => $this->getSetting('autoplay') ? $this->t(', autoplaying') : '',
    ]);
    return $summary;
  }
+2 −2
Original line number Diff line number Diff line
@@ -67,8 +67,8 @@ class VideoEmbedField extends FieldItemBase {
  public function fieldSettingsForm(array $form, FormStateInterface $form_state) {
    $form = [];
    $form['allowed_providers'] = [
      '#title' => t('Allowed Providers'),
      '#description' => t('Restrict users from entering information from the following providers. If none are selected any video provider can be used.'),
      '#title' => $this->t('Allowed Providers'),
      '#description' => $this->t('Restrict users from entering information from the following providers. If none are selected any video provider can be used.'),
      '#type' => 'checkboxes',
      '#default_value' => $this->getSetting('allowed_providers'),
      '#options' => $this->providerManager->getProvidersOptionList(),