Commit 7dd6cbe0 authored by kiseleva.t's avatar kiseleva.t Committed by Neslee Canil Pinto
Browse files

Issue #3171578 by mmaldonado, kiseleva.t: Placeholder text not translatable

parent e2b515b7
......@@ -113,7 +113,7 @@ abstract class FilterWidgetBase extends BetterExposedFiltersWidgetBase implement
'#type' => 'textfield',
'#title' => $this->t('Placeholder text'),
'#description' => $this->t('Text to be shown in the text field until it is edited. Leave blank for no placeholder to be set.'),
'#default_value' => $this->configuration['advanced']['placeholder_text'],
'#default_value' => $this->t($this->configuration['advanced']['placeholder_text']),
];
}
......@@ -182,7 +182,7 @@ abstract class FilterWidgetBase extends BetterExposedFiltersWidgetBase implement
// Check for placeholder text.
if (!empty($this->configuration['advanced']['placeholder_text'])) {
// @todo: Add token replacement for placeholder text.
$form[$field_id]['#placeholder'] = $this->configuration['advanced']['placeholder_text'];
$form[$field_id]['#placeholder'] = $this->t($this->configuration['advanced']['placeholder_text']);
}
// Handle filter value rewrites.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment