Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Some search fixes.
James Cole3d8131576907
diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.phpindex 981be98ae4..f7bac7cf6b 100644--- a/app/Http/Controllers/SearchController.php+++ b/app/Http/Controllers/SearchController.php@@ -46,7 +46,7 @@ class SearchController extends Controller$this->middleware(static function ($request, $next) {app('view')->share('mainTitleIcon', 'fa-search');- app('view')->share('title', (string) trans('firefly.search'));+ app('view')->share('title', (string)trans('firefly.search'));return $next($request);}@@ -65,14 +65,13 @@ class SearchController extends Controller{// search params:$fullQuery = $request->get('search');- if(is_array($request->get('search'))) {+ if (is_array($request->get('search'))) {$fullQuery = '';}- $fullQuery = (string) $fullQuery;- $page = 0 === (int) $request->get('page') ? 1 : (int) $request->get('page');- $ruleId = (int) $request->get('rule');- $rule = null;- $ruleChanged = false;+ $fullQuery = (string)$fullQuery;+ $page = 0 === (int)$request->get('page') ? 1 : (int)$request->get('page');+ $ruleId = (int)$request->get('rule');+ $ruleChanged = false;// find rule, check if query is different, offer to update.$ruleRepository = app(RuleRepositoryInterface::class);@@ -87,12 +86,12 @@ class SearchController extends Controller$searcher->parseQuery($fullQuery);// words from query and operators:- $query = $searcher->getWordsAsString();- $operators = $searcher->getOperators();+ $query = $searcher->getWordsAsString();+ $operators = $searcher->getOperators();+ $invalidOperators = $searcher->getInvalidOperators();+ $subTitle = (string)trans('breadcrumbs.search_result', ['query' => $fullQuery]);- $subTitle = (string) trans('breadcrumbs.search_result', ['query' => $fullQuery]);-- return prefixView('search.index', compact('query', 'operators', 'page', 'rule', 'fullQuery', 'subTitle', 'ruleId', 'ruleChanged'));+ return prefixView('search.index', compact('query', 'operators', 'page', 'rule', 'fullQuery', 'subTitle', 'ruleId', 'ruleChanged', 'invalidOperators'));}/**@@ -105,8 +104,8 @@ class SearchController extends Controller*/public function search(Request $request, SearchInterface $searcher): JsonResponse{- $fullQuery = (string) $request->get('query');- $page = 0 === (int) $request->get('page') ? 1 : (int) $request->get('page');+ $fullQuery = (string)$request->get('query');+ $page = 0 === (int)$request->get('page') ? 1 : (int)$request->get('page');$searcher->parseQuery($fullQuery);@@ -125,6 +124,7 @@ class SearchController extends ControllerLog::error(sprintf('Cannot render search.search: %s', $e->getMessage()));$html = 'Could not render view.';}+return response()->json(['count' => $groups->count(), 'html' => $html]);}}diff --git a/app/Support/Search/OperatorQuerySearch.php b/app/Support/Search/OperatorQuerySearch.phpindex 15562732be..b35554abc4 100644--- a/app/Support/Search/OperatorQuerySearch.php+++ b/app/Support/Search/OperatorQuerySearch.php@@ -36,7 +36,6 @@ use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;use FireflyIII\Repositories\Category\CategoryRepositoryInterface;use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;use FireflyIII\Repositories\Tag\TagRepositoryInterface;-use FireflyIII\Repositories\TransactionType\TransactionTypeRepositoryInterface;use FireflyIII\Support\ParseDateString;use FireflyIII\User;use Gdbots\QueryParser\Node\Date;@@ -62,25 +61,23 @@ use Log;*/class OperatorQuerySearch implements SearchInterface{- private AccountRepositoryInterface $accountRepository;- private BillRepositoryInterface $billRepository;- private BudgetRepositoryInterface $budgetRepository;- private CategoryRepositoryInterface $categoryRepository;- private GroupCollectorInterface $collector;- private CurrencyRepositoryInterface $currencyRepository;- private Carbon $date;- private int $limit;- private Collection $modifiers;- private Collection $operators;- private string $originalQuery;- private int $page;- private ParsedQuery $query;- private float $startTime;- private TagRepositoryInterface $tagRepository;- private TransactionTypeRepositoryInterface $typeRepository; // obsolete- private User $user;- private array $validOperators;- private array $words;+ private AccountRepositoryInterface $accountRepository;+ private BillRepositoryInterface $billRepository;+ private BudgetRepositoryInterface $budgetRepository;+ private CategoryRepositoryInterface $categoryRepository;+ private GroupCollectorInterface $collector;+ private CurrencyRepositoryInterface $currencyRepository;+ private Carbon $date;+ private int $limit;+ private Collection $operators;+ private int $page;+ private ParsedQuery $query;+ private float $startTime;+ private TagRepositoryInterface $tagRepository;+ private User $user;+ private array $validOperators;+ private array $words;+ private array $invalidOperators;/*** OperatorQuerySearch constructor.@@ -90,12 +87,11 @@ class OperatorQuerySearch implements SearchInterfacepublic function __construct(){Log::debug('Constructed OperatorQuerySearch');- $this->modifiers = new Collection; // obsolete$this->operators = new Collection;$this->page = 1;$this->words = [];+ $this->invalidOperators = [];$this->limit = 25;- $this->originalQuery = '';$this->date = today(config('app.timezone'));$this->validOperators = array_keys(config('firefly.search.operators'));$this->startTime = microtime(true);@@ -105,7 +101,6 @@ class OperatorQuerySearch implements SearchInterface$this->billRepository = app(BillRepositoryInterface::class);$this->tagRepository = app(TagRepositoryInterface::class);$this->currencyRepository = app(CurrencyRepositoryInterface::class);- $this->typeRepository = app(TransactionTypeRepositoryInterface::class);}/**@@ -151,9 +146,8 @@ class OperatorQuerySearch implements SearchInterfacepublic function parseQuery(string $query){Log::debug(sprintf('Now in parseQuery(%s)', $query));- $parser = new QueryParser();- $this->query = $parser->parse($query);- $this->originalQuery = $query;+ $parser = new QueryParser();+ $this->query = $parser->parse($query);Log::debug(sprintf('Found %d node(s)', count($this->query->getNodes())));foreach ($this->query->getNodes() as $searchNode) {@@ -202,6 +196,14 @@ class OperatorQuerySearch implements SearchInterface$this->collector->setLimit($this->limit);}+ /**+ * @return array+ */+ public function getInvalidOperators(): array+ {+ return $this->invalidOperators;+ }+/*** @inheritDoc* @codeCoverageIgnore@@ -277,6 +279,11 @@ class OperatorQuerySearch implements SearchInterface'value' => (string)$value,]);+ } else {+ $this->invalidOperators[] = [+ 'type' => $operator,+ 'value' => (string)$value,+ ];}break;}diff --git a/app/Support/Search/SearchInterface.php b/app/Support/Search/SearchInterface.phpindex fe5a44fa9c..40ca2e7050 100644--- a/app/Support/Search/SearchInterface.php+++ b/app/Support/Search/SearchInterface.php@@ -42,6 +42,11 @@ interface SearchInterface*/public function getOperators(): Collection;+ /**+ * @return array+ */+ public function getInvalidOperators(): array;+/*** @return string*/diff --git a/resources/lang/bg_BG/firefly.php b/resources/lang/bg_BG/firefly.phpindex d80017e065..3cba7f89d2 100644--- a/resources/lang/bg_BG/firefly.php+++ b/resources/lang/bg_BG/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III намери :count транзакция за :time секунди.|Firefly III намери :count транзакции за :time секунди.','search_found_more_transactions' => 'Firefly III намери повече от :count транзакции за :time секунди.','search_for_query' => 'Firefly III търси за транзакции с всички от следните думи в тях:<span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'Датата на транзакцията е ":value"','search_modifier_id' => 'Transaction ID is ":value"','search_modifier_date_before' => 'Датата на транзакцията е преди или на ":value"',diff --git a/resources/lang/cs_CZ/firefly.php b/resources/lang/cs_CZ/firefly.phpindex f1662b19f7..1af648c9ec 100644--- a/resources/lang/cs_CZ/firefly.php+++ b/resources/lang/cs_CZ/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III found :count transaction in :time seconds.|Firefly III found :count transactions in :time seconds.','search_found_more_transactions' => 'Firefly III found more than :count transactions in :time seconds.','search_for_query' => 'Firefly III is searching for transactions with all of these words in them: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'Datum transakce je „:value“','search_modifier_id' => 'Číslo transakce je „:value“','search_modifier_date_before' => 'Transaction date is before or on ":value"',diff --git a/resources/lang/de_DE/firefly.php b/resources/lang/de_DE/firefly.phpindex e1f72d5f20..c35317ae33 100644--- a/resources/lang/de_DE/firefly.php+++ b/resources/lang/de_DE/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III hat :count Transaktion in :time Sekunden gefunden.|Firefly III hat :count Transaktionen in :time Sekunden gefunden.','search_found_more_transactions' => 'Firefly III hat mehr als :count Transaktionen in :time Sekunden gefunden.','search_for_query' => 'Firefly III sucht nach Buchungen mit folgenden Wörtern im Namen: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'Buchungsdatum ist „:value”','search_modifier_id' => 'Buchungsnummer ist ":value"','search_modifier_date_before' => 'Buchungsdatum ist vor oder am ":value"',diff --git a/resources/lang/el_GR/firefly.php b/resources/lang/el_GR/firefly.phpindex 1dde202b25..e684bcf24b 100644--- a/resources/lang/el_GR/firefly.php+++ b/resources/lang/el_GR/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Το Firefly III βρήκε :count συναλλαγή σε :time δευτερόλεπτα.|Το Firefly III βρήκε :count συναλλαγές σε :time δευτερόλεπτα.','search_found_more_transactions' => 'Το Firefly III βρήκε περισσότερες από :count συναλλαγές σε :time δευτερόλεπτα.','search_for_query' => 'Το Firefly III αναζητεί για συναλλαγές που περιέχουν όλες αυτές τις λέξεις: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'Η ημερομηνία συναλλαγής είναι ":value"','search_modifier_id' => 'Το ID συναλλαγής είναι ":value"','search_modifier_date_before' => 'Η ημερομηνία συναλλαγής είναι πριν ή στις ":value"',diff --git a/resources/lang/en_GB/firefly.php b/resources/lang/en_GB/firefly.phpindex 6f0c0028fb..9a936b565e 100644--- a/resources/lang/en_GB/firefly.php+++ b/resources/lang/en_GB/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III found :count transaction in :time seconds.|Firefly III found :count transactions in :time seconds.','search_found_more_transactions' => 'Firefly III found more than :count transactions in :time seconds.','search_for_query' => 'Firefly III is searching for transactions with all of these words in them: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'Transaction date is ":value"','search_modifier_id' => 'Transaction ID is ":value"','search_modifier_date_before' => 'Transaction date is before or on ":value"',diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.phpindex 288e6964c1..8b81f6d08c 100644--- a/resources/lang/en_US/firefly.php+++ b/resources/lang/en_US/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III found :count transaction in :time seconds.|Firefly III found :count transactions in :time seconds.','search_found_more_transactions' => 'Firefly III found more than :count transactions in :time seconds.','search_for_query' => 'Firefly III is searching for transactions with all of these words in them: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'Transaction date is ":value"','search_modifier_id' => 'Transaction ID is ":value"','search_modifier_date_before' => 'Transaction date is before or on ":value"',diff --git a/resources/lang/es_ES/firefly.php b/resources/lang/es_ES/firefly.phpindex 65143b38af..ab916128a3 100644--- a/resources/lang/es_ES/firefly.php+++ b/resources/lang/es_ES/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III encontrada :count transacción en :time segundos.|Firefly III encontradas :count transacciones en :time segundos.','search_found_more_transactions' => 'Firefly III encontró más de :count transacciones en :time segundos.','search_for_query' => 'Firefly III está buscando transacciones que contengan todas estas palabras: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'La fecha de la transacción es ":value"','search_modifier_id' => 'El ID de la transacción es ":value"','search_modifier_date_before' => 'La fecha de la transacción es anterior al ":value"',diff --git a/resources/lang/fi_FI/firefly.php b/resources/lang/fi_FI/firefly.phpindex 182123ebcc..f011af3cd8 100644--- a/resources/lang/fi_FI/firefly.php+++ b/resources/lang/fi_FI/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III found :count transaction in :time seconds.|Firefly III found :count transactions in :time seconds.','search_found_more_transactions' => 'Firefly III found more than :count transactions in :time seconds.','search_for_query' => 'Firefly III hakee tapahtumia kaikilla näillä hakusanoilla: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'Transaction date is ":value"','search_modifier_id' => 'Transaction ID is ":value"','search_modifier_date_before' => 'Transaction date is before or on ":value"',diff --git a/resources/lang/fr_FR/firefly.php b/resources/lang/fr_FR/firefly.phpindex 85a6bb27fb..7916570017 100644--- a/resources/lang/fr_FR/firefly.php+++ b/resources/lang/fr_FR/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III a trouvé :count opération en :time secondes.|Firefly III a trouvé :count opérations en :time secondes.','search_found_more_transactions' => 'Firefly III a trouvé plus de :count transactions en :time secondes.','search_for_query' => 'Firefly III recherche des opérations contenant tous ces mots : <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'La date de l\'opération est ":value"','search_modifier_id' => 'L\'ID de l\'opération est ":value"','search_modifier_date_before' => 'La date de l\'opération est avant ou le ":value"',@@ -998,7 +999,7 @@ return ['not_expected_period' => 'Pas attendu cette période','not_or_not_yet' => 'Non (pas encore)','match_between_amounts' => 'La facture correspond à des opérations entre :low et :high.',- 'running_again_loss' => 'Les opérations précédemment liées à cette facture peuvent perdre leur connexion, s\'ils ne correspondent plus à la ou les règles.',+ 'running_again_loss' => 'Les opérations précédemment liées à cette facture peuvent perdre leur connexion, si elles ne correspondent plus à la ou les règles.','bill_related_rules' => 'Règles reliées à cette facture','repeats' => 'Répétitions','connected_journals' => 'Opérations liées',diff --git a/resources/lang/hu_HU/firefly.php b/resources/lang/hu_HU/firefly.phpindex d32499f8e0..5802006e9e 100644--- a/resources/lang/hu_HU/firefly.php+++ b/resources/lang/hu_HU/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III :count tranzakciót talált :time másodperc alatt.|Firefly III :count tranzakciót talált :time másodperc alatt.','search_found_more_transactions' => 'A Firefly III :count tranzakciót talált :time másodperc alatt.','search_for_query' => 'A Firefly III tranzakciókat keres amelyben ez a kifejezés található: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'Tranzakció dátuma: :value','search_modifier_id' => 'Transaction ID is ":value"','search_modifier_date_before' => 'Tranzakció dátuma :value előtt van',diff --git a/resources/lang/id_ID/firefly.php b/resources/lang/id_ID/firefly.phpindex abb38ae370..a07a53bc46 100644--- a/resources/lang/id_ID/firefly.php+++ b/resources/lang/id_ID/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III found :count transaction in :time seconds.|Firefly III found :count transactions in :time seconds.','search_found_more_transactions' => 'Firefly III found more than :count transactions in :time seconds.','search_for_query' => 'Firefly III is searching for transactions with all of these words in them: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'Transaction date is ":value"','search_modifier_id' => 'Transaction ID is ":value"','search_modifier_date_before' => 'Transaction date is before or on ":value"',diff --git a/resources/lang/it_IT/firefly.php b/resources/lang/it_IT/firefly.phpindex 1fbbcfce95..8e6dd48cf7 100644--- a/resources/lang/it_IT/firefly.php+++ b/resources/lang/it_IT/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III ha trovato :count transazione in :time secondi.|Firefly III ha trovato :count transazioni in :time secondi.','search_found_more_transactions' => 'Firefly III ha trovato più di :count transazioni in :time secondi.','search_for_query' => 'Firefly III sta cercando le transazioni contenenti tutte queste parole: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'La data della transazione è ":value"','search_modifier_id' => 'L\'ID della transazione è ":value"','search_modifier_date_before' => 'La data della transazione è antecedente o uguale a ":value"',diff --git a/resources/lang/nb_NO/firefly.php b/resources/lang/nb_NO/firefly.phpindex 81472a1002..e8ece3be40 100644--- a/resources/lang/nb_NO/firefly.php+++ b/resources/lang/nb_NO/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III found :count transaction in :time seconds.|Firefly III found :count transactions in :time seconds.','search_found_more_transactions' => 'Firefly III found more than :count transactions in :time seconds.','search_for_query' => 'Firefly III leter etter transaksjoner med disse ordene: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'Transaction date is ":value"','search_modifier_id' => 'Transaction ID is ":value"','search_modifier_date_before' => 'Transaction date is before or on ":value"',diff --git a/resources/lang/nl_NL/firefly.php b/resources/lang/nl_NL/firefly.phpindex 132c7e4113..a6c2fa5e25 100644--- a/resources/lang/nl_NL/firefly.php+++ b/resources/lang/nl_NL/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III vond :count transactie in :time seconden.|Firefly III vond :count transacties in :time seconden.','search_found_more_transactions' => 'Firefly III vond meer dan :count transacties in :time seconden.','search_for_query' => 'Firefly III zoekt transacties met al deze woorden: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'Transactiedatum is ":value"','search_modifier_id' => 'Transactie ID is ":value"','search_modifier_date_before' => 'Transactiedatum is vóór of op ":value"',diff --git a/resources/lang/pl_PL/firefly.php b/resources/lang/pl_PL/firefly.phpindex 44bd0be5cd..1541fad124 100644--- a/resources/lang/pl_PL/firefly.php+++ b/resources/lang/pl_PL/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III znalazł :count transakcję w :time sekund.|Firefly III znalazł :count transakcji w :time sekund.','search_found_more_transactions' => 'Firefly III znalazł więcej niż :count transakcji w :time sekund.','search_for_query' => 'Firefly III szuka transakcji zawierających wszystkie słowa: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'Data transakcji to ":value"','search_modifier_id' => 'ID transakcji to ":value"','search_modifier_date_before' => 'Data transakcji jest przed lub w ":value"',diff --git a/resources/lang/pt_BR/firefly.php b/resources/lang/pt_BR/firefly.phpindex 2ab34697d5..8be88cb960 100644--- a/resources/lang/pt_BR/firefly.php+++ b/resources/lang/pt_BR/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III encontrou :count transação em :time segundos.|Firefly III encontrou :count transações em :time segundos.','search_found_more_transactions' => 'Firefly III encontrou mais de :count transações em :time segundos.','search_for_query' => 'Firefly III está procurando transações com todas estas palavras neles: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'A data da transação é ":value"','search_modifier_id' => 'O ID da transação é ":value"','search_modifier_date_before' => 'Data da transação é anterior ou em ":value"',diff --git a/resources/lang/pt_PT/firefly.php b/resources/lang/pt_PT/firefly.phpindex bd863bc7c9..0e5c9a2e81 100644--- a/resources/lang/pt_PT/firefly.php+++ b/resources/lang/pt_PT/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III encontrou :count transacção em :time segundos.|Firefly III encontrou :count transacções em :time segundos.','search_found_more_transactions' => 'Firefly III encontrou mais de :count transacções em :time segundos.','search_for_query' => 'O Firefly III está à procura de transacções com as palavras: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'A data da transacção é ":value"','search_modifier_id' => 'O ID da transação é ":value"','search_modifier_date_before' => 'A data da transacção é anterior ou a ":value"',diff --git a/resources/lang/ro_RO/firefly.php b/resources/lang/ro_RO/firefly.phpindex d8c0cdae8a..ee519e458a 100644--- a/resources/lang/ro_RO/firefly.php+++ b/resources/lang/ro_RO/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III a găsit :count tranzacție în :time secunde.| Firefly III a găsit :count tranzacții în :time secunde.','search_found_more_transactions' => 'Firefly III a găsit mai mult de :count tranzacții în :time secunde.','search_for_query' => 'Firefly III este în căutarea pentru tranzacţii cu toate aceste cuvinte în ele: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'Data tranzacţiei este ":value"','search_modifier_id' => 'ID-ul tranzacţiei este ":value"','search_modifier_date_before' => 'Data tranzacției este înainte sau pe ":value"',diff --git a/resources/lang/ru_RU/firefly.php b/resources/lang/ru_RU/firefly.phpindex da0a5816c0..46fb8e8747 100644--- a/resources/lang/ru_RU/firefly.php+++ b/resources/lang/ru_RU/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III нашёл :count транзакции за :time секунд.|Firefly III нашёл :count транзакций за :time секунд.','search_found_more_transactions' => 'Firefly III нашёл более :count транзакций за :time секунд.','search_for_query' => 'Firefly III ищет транзакции со всеми этими словами: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'Дата транзакции — ":value"','search_modifier_id' => 'ID транзакции - ":value"','search_modifier_date_before' => 'Дата транзакции до или равна ":value"',diff --git a/resources/lang/sk_SK/firefly.php b/resources/lang/sk_SK/firefly.phpindex 49a1ec4053..9bcbd3c85d 100644--- a/resources/lang/sk_SK/firefly.php+++ b/resources/lang/sk_SK/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III našiel :count transakciu za :time sekúnd.|Firefly III našiel :count transakcií za :time sekúnd.','search_found_more_transactions' => 'Firefly III našiel viac než :count transakcií za :time sekúnd.','search_for_query' => 'Firefly III vyhľadáva transakcie obsahujúce tieto výrazy: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'Dátum transakcie je ":value"','search_modifier_id' => 'ID transakcie je ":value"','search_modifier_date_before' => 'Dátum transakcie je pred alebo v deň ":value"',diff --git a/resources/lang/sv_SE/firefly.php b/resources/lang/sv_SE/firefly.phpindex d48104bfc6..fa80a58dea 100644--- a/resources/lang/sv_SE/firefly.php+++ b/resources/lang/sv_SE/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III hittade :count transaktion i :time sekunder.|Firefly III hittade :count transaktioner i :time sekunder.','search_found_more_transactions' => 'Firefly III hittade mer än :count transaktioner i :time sekunder.','search_for_query' => 'Firefly III söker efter transaktioner med dessa ord i dem: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'Transaktions datum är ":value"','search_modifier_id' => 'Transaktions ID är: ":value"','search_modifier_date_before' => 'Transaktions datum är före eller på ":value"',diff --git a/resources/lang/tr_TR/firefly.php b/resources/lang/tr_TR/firefly.phpindex d1ccee991a..e947678a8c 100644--- a/resources/lang/tr_TR/firefly.php+++ b/resources/lang/tr_TR/firefly.php@@ -281,6 +281,7 @@ return ['search_found_transactions' => 'Firefly III found :count transaction in :time seconds.|Firefly III found :count transactions in :time seconds.','search_found_more_transactions' => 'Firefly III found more than :count transactions in :time seconds.','search_for_query' => 'Firefly III şu kelimelerin hepsini içeren hareketleri arıyor: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'Transfer tarihi ":value"','search_modifier_id' => 'Transfer Kimliği ":value"','search_modifier_date_before' => 'Transaction date is before or on ":value"',diff --git a/resources/lang/vi_VN/firefly.php b/resources/lang/vi_VN/firefly.phpindex 128033203f..778ef4286e 100644--- a/resources/lang/vi_VN/firefly.php+++ b/resources/lang/vi_VN/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Tìm thấy Firefly III :count giao dịch trong :time giây. | Firefly III được tìm thấy :count giao dịch trong :time giây.','search_found_more_transactions' => 'Firefly III đã tìm thấy hơn :count giao dịch trong :time giây.','search_for_query' => 'Firefly III đang tìm kiếm các giao dịch với tất cả những từ này trong đó: <span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'Ngày giao dịch là ":value"','search_modifier_id' => 'ID giao dịch là ":value"','search_modifier_date_before' => 'Ngày giao dịch phải trước hoặc ngay ":value"',diff --git a/resources/lang/zh_CN/firefly.php b/resources/lang/zh_CN/firefly.phpindex 96ba30e851..13e998b92e 100644--- a/resources/lang/zh_CN/firefly.php+++ b/resources/lang/zh_CN/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III 找到 :count 条交易,用时 :time 秒。|Firefly III 找到 :count 条交易,用时 :time 秒。','search_found_more_transactions' => 'Firefly III 找到超过 :count 条交易,用时 :time 秒。','search_for_query' => 'Firefly III 正在搜索包含 <span class="text-info">:query</span> 的交易',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => '交易日期为“:value”','search_modifier_id' => '交易 ID 为 “:value”','search_modifier_date_before' => '交易日期为“:value”或之前',diff --git a/resources/lang/zh_TW/firefly.php b/resources/lang/zh_TW/firefly.phpindex 30a4df0a97..d7fb1efaa7 100644--- a/resources/lang/zh_TW/firefly.php+++ b/resources/lang/zh_TW/firefly.php@@ -280,6 +280,7 @@ return ['search_found_transactions' => 'Firefly III found :count transaction in :time seconds.|Firefly III found :count transactions in :time seconds.','search_found_more_transactions' => 'Firefly III found more than :count transactions in :time seconds.','search_for_query' => 'Firefly III 正搜尋包含所有這些字詞的交易:<span class="text-info">:query</span>',+ 'invalid_operators_list' => 'These search parameters are not valid and have been ignored.','search_modifier_date_is' => 'Transaction date is ":value"','search_modifier_id' => 'Transaction ID is ":value"','search_modifier_date_before' => 'Transaction date is before or on ":value"',diff --git a/resources/views/v1/search/index.twig b/resources/views/v1/search/index.twigindex c6bc8d2462..9350348511 100644--- a/resources/views/v1/search/index.twig+++ b/resources/views/v1/search/index.twig@@ -28,20 +28,31 @@<div class="col-sm-offset-1 col-sm-10"><button type="submit" class="btn btn-info"><span class="fa fa-search"></span> {{ 'search'|_ }}</button>{% if ruleId > 0 and ruleChanged %}- <a href="{{ route('rules.edit', [ruleId]) }}?from_query={{ fullQuery }}" class="btn btn-default">{{ trans('firefly.update_rule_from_query', {rule: rule.title}) }}</a>+ <a href="{{ route('rules.edit', [ruleId]) }}?from_query={{ fullQuery }}"+ class="btn btn-default">{{ trans('firefly.update_rule_from_query', {rule: rule.title}) }}</a>{% endif %}<a href="{{ route('rules.create') }}?from_query={{ fullQuery }}" class="btn btn-default">{{ 'create_rule_from_query'|_ }}</a></div></div>{% if 0 != ruleId %}- <input type="hidden" name="rule" value="{{ ruleId }}" />+ <input type="hidden" name="rule" value="{{ ruleId }}"/>{% endif %}</form>{% if '' != query %}- <p>- {{ trans('firefly.search_for_query', {query: query|escape})|raw}}- </p>+ <p>+ {{ trans('firefly.search_for_query', {query: query|escape})|raw }}+ </p>{% endif %}++ {% if invalidOperators|length > 0 %}+ <p>{{ trans('firefly.invalid_operators_list') }}</p>+ <ul>+ {% for operator in invalidOperators %}+ <li class="text-danger">{{ operator.type }}:{{ operator.value }}</li>+ {% endfor %}+ </ul>+ {% endif %}+{% if operators|length > 0 %}<p>{{ trans('firefly.modifiers_applies_are') }}</p><ul>@@ -76,13 +87,15 @@<div class="mass_button_options btn-group btn-group" style="display:none;"><a href="#" class="btn btn-default mass_edit"><span class="fa fa-fw fa-pencil"></span> <span>{{ 'edit_selected'|_ }}</span></a><a href="#" class="btn btn-default bulk_edit"><span>{{ 'bulk_edit'|_ }}</span></a>- <a href="#" class="btn btn-danger mass_delete"><span class="fa fa-fw fa-trash"></span> <span>{{ 'delete_selected'|_ }}</span></a>+ <a href="#" class="btn btn-danger mass_delete"><span class="fa fa-fw fa-trash"></span>+ <span>{{ 'delete_selected'|_ }}</span></a></div></div><div class="col-lg-6 col-md-12 col-sm-12 col-xs-12 hidden-xs"><div class="mass_buttons btn-group btn-group pull-right">- <a href="#" class="btn btn-default mass_select"><span class="fa fa-fw fa-check-square-o"></span> {{ 'select_transactions'|_ }}</a>+ <a href="#" class="btn btn-default mass_select"><span+ class="fa fa-fw fa-check-square-o"></span> {{ 'select_transactions'|_ }}</a><a href="#" class="btn btn-default mass_stop_select" style="display:none;"><span class="fa faw-fw fa-square-o"></span> {{ 'stop_selection'|_ }}</a></div>