mirror of https://github.com/kiwix/libkiwix.git
Testing the translation of "Go to the main page"
The new test fails since the "Go to the main page" button is not yet internationalized.
This commit is contained in:
parent
f73be3cde7
commit
ed7717c1e7
|
@ -533,11 +533,15 @@ std::string TestContentIn404HtmlResponse::taskbarLinks() const
|
|||
if ( bookName.empty() )
|
||||
return "";
|
||||
|
||||
return R"(<a id="kiwix_serve_taskbar_home_button" title="Go to the main page of ')"
|
||||
+ bookTitle
|
||||
+ R"('" aria-label="Go to the main page of ')"
|
||||
+ bookTitle
|
||||
+ R"('" href="/ROOT/)"
|
||||
const auto goToMainPageOfBook = isTranslatedVersion()
|
||||
? "Դեպի '" + bookTitle + "'֊ի գլխավոր էջը"
|
||||
: "Go to the main page of '" + bookTitle + "'";
|
||||
|
||||
return R"(<a id="kiwix_serve_taskbar_home_button" title=")"
|
||||
+ goToMainPageOfBook
|
||||
+ R"(" aria-label=")"
|
||||
+ goToMainPageOfBook
|
||||
+ R"(" href="/ROOT/)"
|
||||
+ bookName
|
||||
+ R"(/"><button>)"
|
||||
+ bookTitle
|
||||
|
@ -692,6 +696,20 @@ TEST_F(ServerTest, 404WithBodyTesting)
|
|||
</p>
|
||||
)" },
|
||||
|
||||
{ /* url */ "/ROOT/zimfile/invalid-article?userlang=hy",
|
||||
expected_page_title=="Սխալ հասցե" &&
|
||||
book_name=="zimfile" &&
|
||||
book_title=="Ray Charles" &&
|
||||
expected_body==R"(
|
||||
<h1>Սխալ հասցե</h1>
|
||||
<p>
|
||||
Սխալ հասցե՝ /ROOT/zimfile/invalid-article
|
||||
</p>
|
||||
<p>
|
||||
Make a full text search for <a href="/ROOT/search?content=zimfile&pattern=invalid-article">invalid-article</a>
|
||||
</p>
|
||||
)" },
|
||||
|
||||
{ /* url */ "/ROOT/raw/no-such-book/meta/Title",
|
||||
expected_body==R"(
|
||||
<h1>Not Found</h1>
|
||||
|
|
Loading…
Reference in New Issue