diff --git a/src/server/response.cpp b/src/server/response.cpp index 7046a289e..20a236020 100644 --- a/src/server/response.cpp +++ b/src/server/response.cpp @@ -292,6 +292,7 @@ void ContentResponse::introduce_taskbar(const std::string& lang) {"LIBRARY_BUTTON_TEXT", t("library-button-text")}, {"HOME_BUTTON_TEXT", t("home-button-text", {{"BOOK_TITLE", m_bookTitle}}) }, {"RANDOM_PAGE_BUTTON_TEXT", t("random-page-button-text") }, + {"SEARCHBOX_TOOLTIP", t("searchbox-tooltip", {{"BOOK_TITLE", m_bookTitle}}) }, }; auto head_content = render_template(RESOURCE::templates::head_taskbar_html, data); m_content = prependToFirstOccurence( diff --git a/static/i18n/en.json b/static/i18n/en.json index ca00d9691..183f8b9f4 100644 --- a/static/i18n/en.json +++ b/static/i18n/en.json @@ -22,4 +22,5 @@ , "library-button-text": "Go to welcome page" , "home-button-text": "Go to the main page of '{{BOOK_TITLE}}'" , "random-page-button-text": "Go to a randomly selected page" + , "searchbox-tooltip": "Search '{{BOOK_TITLE}}'" } diff --git a/static/i18n/hy.json b/static/i18n/hy.json index df9ad481b..d4a6ff56b 100644 --- a/static/i18n/hy.json +++ b/static/i18n/hy.json @@ -13,4 +13,5 @@ , "library-button-text": "Գրադարանի էջ" , "home-button-text": "Դեպի '{{BOOK_TITLE}}'֊ի գլխավոր էջը" , "random-page-button-text": "Բացել պատահական էջ" + , "searchbox-tooltip": "Որոնել '{{BOOK_TITLE}}'֊ում" } diff --git a/static/i18n/qqq.json b/static/i18n/qqq.json index c705fecb3..6adb66e18 100644 --- a/static/i18n/qqq.json +++ b/static/i18n/qqq.json @@ -23,4 +23,5 @@ , "library-button-text": "Tooltip of the button leading to the welcome page" , "home-button-text": "Tooltip of the button leading to the main page of a book" , "random-page-button-text": "Tooltip of the button opening a randomly selected page" + , "searchbox-tooltip": "Tooltip displayed for the search box" } diff --git a/static/templates/taskbar_part.html b/static/templates/taskbar_part.html index b76c1c0d4..42c76ed4b 100644 --- a/static/templates/taskbar_part.html +++ b/static/templates/taskbar_part.html @@ -5,7 +5,7 @@
diff --git a/test/server.cpp b/test/server.cpp index 79095863d..b724ca41c 100644 --- a/test/server.cpp +++ b/test/server.cpp @@ -520,11 +520,15 @@ std::string TestContentIn404HtmlResponse::hiddenBookNameInput() const std::string TestContentIn404HtmlResponse::searchPatternInput() const { - return R"( + const std::string searchboxTooltip = isTranslatedVersion() + ? "Որոնել '" + bookTitle + "'֊ում" + : "Search '" + bookTitle + "'"; + + return R"( )"; }