Skip to content
Snippets Groups Projects

Feature/istwcms 7155 ibiki catalog search translation

Merged Igor Biki requested to merge feature/ISTWCMS-7155-ibiki-catalog_search_translation into 1.0.x
1 file
+ 12
12
Compare changes
  • Side-by-side
  • Inline
@@ -114,15 +114,15 @@ class CatalogSearchForm extends FormBase {
* An associative array containing the structure of the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
* @param int $tid
* @param int|null $tid
* The term id.
* @param string $description
* @param string|null $description
* The description for the input element.
* @param bool $use_placeholder
* A flag to use a placeholder.
* @param string $placeholder
* @param string|null $placeholder
* The placeholder string.
* @param string $uuid
* @param string|null $uuid
* The unique identifier.
*
* @return array
@@ -131,11 +131,11 @@ class CatalogSearchForm extends FormBase {
public function buildForm(
array $form,
FormStateInterface $form_state,
int $tid = NULL,
string $description = NULL,
?int $tid = NULL,
?string $description = NULL,
bool $use_placeholder = TRUE,
string $placeholder = NULL,
string $uuid = NULL,
?string $placeholder = NULL,
?string $uuid = NULL,
): array {
// Add the unique id.
@@ -149,7 +149,7 @@ class CatalogSearchForm extends FormBase {
if ($route == 'view.uw_view_catalogs.catalogs_page') {
// Set the placeholder for all catalogs.
$placeholder = 'Search within all catalogs';
$placeholder = $this->t('Search within all catalogs');
}
// If this is a catalog term page, then set placeholder to
@@ -163,7 +163,7 @@ class CatalogSearchForm extends FormBase {
if ($use_placeholder && !$placeholder) {
// Set the placeholder for specific catalog.
$placeholder = 'Search within ' . $term->label();
$placeholder = $this->t('Search within @with', ['@with' => $term->label()]);
}
}
@@ -181,7 +181,7 @@ class CatalogSearchForm extends FormBase {
$term = $this->entityTypeManager->getStorage('taxonomy_term')->load($tid);
// Set the placeholder.
$placeholder = 'Search within ' . $term->label();
$placeholder = $this->t('Search within @with', ['@with' => $term->label()]);
}
}
@@ -219,7 +219,7 @@ class CatalogSearchForm extends FormBase {
$term = $this->entityTypeManager->getStorage('taxonomy_term')->load($tid);
// Set the placeholder.
$placeholder = 'Search within ' . $term->label();
$placeholder = $this->t('Search within @with', ['@with' => $term->label()]);
}
}
else {
Loading