Bug 39580: Make Elasticsearch process_error error string translatable
Test plan: 1- Change to a language other than english 2- Search in the catalog with "!" 3- Notice the string "Unable to understand your search query, please rephrase and try again." is not translated 4- Apply the patch 5- Add translation in .po file of used language for "Unable to understand your search query, please rephrase and try again.\n" 6- Update translation 7- Redo the search and notice the string is now translated Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
3487b56e20
commit
73c320e751
|
|
@ -25,6 +25,7 @@ use Koha::Database;
|
|||
use Koha::Exceptions::Config;
|
||||
use Koha::Exceptions::Elasticsearch;
|
||||
use Koha::Filter::MARC::EmbedSeeFromHeadings;
|
||||
use Koha::I18N qw(__);
|
||||
use Koha::SearchFields;
|
||||
use Koha::SearchMarcMaps;
|
||||
use Koha::Caches;
|
||||
|
|
@ -1519,10 +1520,10 @@ sub process_error {
|
|||
warn $msg; # simple logging
|
||||
|
||||
# This is super-primitive
|
||||
return "Unable to understand your search query, please rephrase and try again.\n"
|
||||
return __("Unable to understand your search query, please rephrase and try again.\n")
|
||||
if $msg =~ /ParseException|parse_exception/;
|
||||
|
||||
return "Unable to perform your search. Please try again.\n";
|
||||
return __("Unable to perform your search. Please try again.\n");
|
||||
}
|
||||
|
||||
=head2 _read_configuration
|
||||
|
|
|
|||
Loading…
Reference in New Issue