Bugzilla – Attachment 189344 Details for
Bug 39580
Make Elasticsearch process_error error string translatable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39580: Make Elasticsearch process_error error string translatable
Bug-39580-Make-Elasticsearch-processerror-error-st.patch (text/plain), 1.76 KB, created by
Lucas Gass (lukeg)
on 2025-11-07 15:28:08 UTC
(
hide
)
Description:
Bug 39580: Make Elasticsearch process_error error string translatable
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-11-07 15:28:08 UTC
Size:
1.76 KB
patch
obsolete
>From c40c0b7012284adc58eb10d451fcd06f28d08eb8 Mon Sep 17 00:00:00 2001 >From: Shi Yao Wang <shi-yao.wang@inlibro.com> >Date: Tue, 8 Apr 2025 10:13:11 -0400 >Subject: [PATCH] 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> >--- > Koha/SearchEngine/Elasticsearch.pm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/Koha/SearchEngine/Elasticsearch.pm b/Koha/SearchEngine/Elasticsearch.pm >index 53afa2929d0..15cdaff00e5 100644 >--- a/Koha/SearchEngine/Elasticsearch.pm >+++ b/Koha/SearchEngine/Elasticsearch.pm >@@ -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; >@@ -1501,10 +1502,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 >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39580
:
180723
| 189344