Merge pull request #2947 from EnesSacid-Buker/search-string-filter-name

Search string translate filter name
This commit is contained in:
Cüneyt Şentürk 2023-03-22 15:21:24 +03:00 committed by GitHub
commit 8084e96503
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,7 +114,7 @@ class SearchString extends Component
protected function getFilterName($column, $options) protected function getFilterName($column, $options)
{ {
$column = last(explode('.', $column)); $column = last(explode('.', $column));
if (strpos($column, '_id') !== false) { if (strpos($column, '_id') !== false) {
$column = str_replace('_id', '', $column); $column = str_replace('_id', '', $column);
} else if (strpos($column, '_code') !== false) { } else if (strpos($column, '_code') !== false) {
@ -122,7 +122,7 @@ class SearchString extends Component
} }
if (! empty($options['translation']) && ! isset($options['boolean'])) { if (! empty($options['translation']) && ! isset($options['boolean'])) {
return $options['translation']; return $this->findTranslation($options['translation']);
} }
if (!empty($options['key'])) { if (!empty($options['key'])) {