FIX. Placeholder isn't completely translated

This commit is contained in:
Elvinas L 2015-01-07 16:57:57 +02:00 committed by Will Rossiter
parent 218ef0b599
commit cee7adc12c
1 changed files with 4 additions and 3 deletions

View File

@ -319,19 +319,20 @@ class GridFieldAddExistingAutocompleter
} else {
$labels = array();
if($searchFields) foreach($searchFields as $searchField) {
$label = singleton($dataClass)->fieldLabel($searchField);
$searchField = explode(':', $searchField);
$label = singleton($dataClass)->fieldLabel($searchField[0]);
if($label) $labels[] = $label;
}
if($labels) {
return _t(
'GridField.PlaceHolderWithLabels',
'Find {type} by {name}',
array('type' => singleton($dataClass)->plural_name(), 'name' => implode(', ', $labels))
array('type' => singleton($dataClass)->i18n_plural_name(), 'name' => implode(', ', $labels))
);
} else {
return _t(
'GridField.PlaceHolder', 'Find {type}',
array('type' => singleton($dataClass)->plural_name())
array('type' => singleton($dataClass)->i18n_plural_name())
);
}
}