mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-08-03 18:26:11 -04:00
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() )
|
if ( bookName.empty() )
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
return R"(<a id="kiwix_serve_taskbar_home_button" title="Go to the main page of ')"
|
const auto goToMainPageOfBook = isTranslatedVersion()
|
||||||
+ bookTitle
|
? "Դեպի '" + bookTitle + "'֊ի գլխավոր էջը"
|
||||||
+ R"('" aria-label="Go to the main page of ')"
|
: "Go to the main page of '" + bookTitle + "'";
|
||||||
+ bookTitle
|
|
||||||
+ R"('" href="/ROOT/)"
|
return R"(<a id="kiwix_serve_taskbar_home_button" title=")"
|
||||||
|
+ goToMainPageOfBook
|
||||||
|
+ R"(" aria-label=")"
|
||||||
|
+ goToMainPageOfBook
|
||||||
|
+ R"(" href="/ROOT/)"
|
||||||
+ bookName
|
+ bookName
|
||||||
+ R"(/"><button>)"
|
+ R"(/"><button>)"
|
||||||
+ bookTitle
|
+ bookTitle
|
||||||
@ -692,6 +696,20 @@ TEST_F(ServerTest, 404WithBodyTesting)
|
|||||||
</p>
|
</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",
|
{ /* url */ "/ROOT/raw/no-such-book/meta/Title",
|
||||||
expected_body==R"(
|
expected_body==R"(
|
||||||
<h1>Not Found</h1>
|
<h1>Not Found</h1>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user