Fixed code standard for t()

This commit is contained in:
Kyle Huynh 2023-06-07 10:58:55 -04:00
parent d1692db53a
commit 8e43f84c7c
3 changed files with 5 additions and 5 deletions

View file

@ -273,7 +273,7 @@ class AdvancedSearchForm extends FormBase {
], ],
]; ];
$options = (self::getEdismaxSearch() && self::getSearchAllFields()) ? ["all" => $this->t("@", self::getEdismaxSearchLabel())] + $this->fieldOptions($fields) : $this->fieldOptions($fields); $options = (self::getEdismaxSearch() && self::getSearchAllFields()) ? ["all" => $this->t("@label", ["@label" => self::getEdismaxSearchLabel()])] + $this->fieldOptions($fields) : $this->fieldOptions($fields);
$term_default_values = $this->defaultTermValues($options); $term_default_values = $this->defaultTermValues($options);
[$recursive, $term_values] = $this->processInput($form_state, $term_default_values); [$recursive, $term_values] = $this->processInput($form_state, $term_default_values);
$i = 0; $i = 0;

View file

@ -82,8 +82,8 @@ class SearchForm extends FormBase {
'#type' => 'textfield', '#type' => 'textfield',
'#title' => (!empty($settings['search_textfield_label']) ? $settings['search_textfield_label'] : ''), '#title' => (!empty($settings['search_textfield_label']) ? $settings['search_textfield_label'] : ''),
'#attributes' => [ '#attributes' => [
'placeholder' => isset($settings['search_placeholder']) ? $this->t("@", $settings['search_placeholder']) : $this->t("Search collections"), 'placeholder' => isset($settings['search_placeholder']) ? $this->t("@placeholder", ["@placeholder" => $settings['search_placeholder']]) : $this->t("Search collections"),
'aria-label' => (isset($settings['search_textfield_label']) ? $this->t("@", $settings['search_textfield_label']) : $this->t('Enter Keyword')), 'aria-label' => (isset($settings['search_textfield_label']) ? $this->t("@label", ["@label" => $settings['search_textfield_label']]) : $this->t('Enter Keyword')),
], ],
'#theme_wrappers' => [], '#theme_wrappers' => [],
]; ];

View file

@ -186,7 +186,7 @@ class SearchResultsPagerBlock extends BlockBase implements ContainerFactoryPlugi
'#url' => $url, '#url' => $url,
'#title' => $items_per_page, '#title' => $items_per_page,
'#attributes' => [ '#attributes' => [
'aria-label' => $this->t("@ items per page", $items_per_page), 'aria-label' => $this->t("@item items per page", ["@item" => $items_per_page]),
'class' => $active ? 'class' => $active ?
['pager__link', 'pager__link--is-active', 'pager__itemsperpage'] : ['pager__link', 'pager__link--is-active', 'pager__itemsperpage'] :
['pager__link', 'pager__itemsperpage'], ['pager__link', 'pager__itemsperpage'],
@ -250,7 +250,7 @@ class SearchResultsPagerBlock extends BlockBase implements ContainerFactoryPlugi
'class' => $active ? 'class' => $active ?
['pager__link', 'pager__link--is-active', 'pager__display'] : ['pager__link', 'pager__link--is-active', 'pager__display'] :
['pager__link', 'pager__display'], ['pager__link', 'pager__display'],
'aria-label' => $this->t("Display as @", Markup::create($text)), 'aria-label' => $this->t("Display as @link", ["@link" => Markup::create($text)]),
], ],
'#wrapper_attributes' => [ '#wrapper_attributes' => [
'class' => $active ? ['pager__item', 'is-active'] : ['pager__item'], 'class' => $active ? ['pager__item', 'is-active'] : ['pager__item'],