Internationalized "Fulltext search unavailable" page

This commit is contained in:
Veloman Yunkan 2022-04-06 14:25:36 +04:00 committed by Matthieu Gautier
parent fbd23a8329
commit 6f3db20078
3 changed files with 3 additions and 6 deletions

View File

@ -457,11 +457,6 @@ ParameterizedMessage noSuchBookErrorMsg(const std::string& bookName)
return ParameterizedMessage("no-such-book", { {"BOOK_NAME", bookName} }); return ParameterizedMessage("no-such-book", { {"BOOK_NAME", bookName} });
} }
std::string noSearchResultsMsg()
{
return "The fulltext search engine is not available for this content.";
}
ParameterizedMessage invalidRawAccessMsg(const std::string& dt) ParameterizedMessage invalidRawAccessMsg(const std::string& dt)
{ {
return ParameterizedMessage("invalid-raw-data-type", { {"DATATYPE", dt} }); return ParameterizedMessage("invalid-raw-data-type", { {"DATATYPE", dt} });
@ -631,7 +626,7 @@ std::unique_ptr<Response> InternalServer::handle_search(const RequestContext& re
"fulltext-search-unavailable", "fulltext-search-unavailable",
"404-page-heading", "404-page-heading",
m_root + "/skin/search_results.css") m_root + "/skin/search_results.css")
+ noSearchResultsMsg() + nonParameterizedMessage("no-search-results")
+ TaskbarInfo(searchInfo.bookName, archive.get()); + TaskbarInfo(searchInfo.bookName, archive.get());
} }

View File

@ -18,4 +18,5 @@
, "500-page-title" : "Internal Server Error" , "500-page-title" : "Internal Server Error"
, "500-page-heading" : "Internal Server Error" , "500-page-heading" : "Internal Server Error"
, "fulltext-search-unavailable" : "Fulltext search unavailable" , "fulltext-search-unavailable" : "Fulltext search unavailable"
, "no-search-results": "The fulltext search engine is not available for this content."
} }

View File

@ -19,4 +19,5 @@
, "500-page-title" : "Title of the 500 error page" , "500-page-title" : "Title of the 500 error page"
, "500-page-heading" : "Heading of the 500 error page" , "500-page-heading" : "Heading of the 500 error page"
, "fulltext-search-unavailable" : "Title of the error page returned when search is attempted in a book without fulltext search database" , "fulltext-search-unavailable" : "Title of the error page returned when search is attempted in a book without fulltext search database"
, "no-search-results": "Text of the error page returned when search is attempted in a book without fulltext search database"
} }