Fake language for testing is now based on English

Usage of non-latin scripts in unit-tests creates unnecessary problems
for maintainers.
This commit is contained in:
Veloman Yunkan 2022-11-25 14:05:55 +04:00
parent 956289d9f8
commit 160c95e317
2 changed files with 29 additions and 29 deletions

View File

@ -4,17 +4,17 @@
"Kareyac" "Kareyac"
] ]
}, },
"name": "Հայերեն", "name": "Fake language for i18n testing"
"suggest-full-text-search": "որոնել '{{{SEARCH_TERMS}}}'...", , "suggest-full-text-search": "[I18N TESTING] cOnTaInInG '{{{SEARCH_TERMS}}}'..."
"no-such-book": "Գիրքը բացակայում է՝ {{BOOK_NAME}}", , "no-such-book": "[I18N TESTING] No such book: {{BOOK_NAME}}. Sorry."
"url-not-found": "Սխալ հասցե՝ {{url}}", , "url-not-found": "[I18N TESTING] URL not found: {{url}}"
"suggest-search": "Որոնել <a href=\"{{{SEARCH_URL}}}\">{{PATTERN}}</a>", , "suggest-search": "[I18N TESTING] Make a full text search for <a href=\"{{{SEARCH_URL}}}\">{{PATTERN}}</a>"
"400-page-title": "Անվավեր հարցում", , "400-page-title": "[I18N TESTING] Invalid request ($400 fine must be paid)"
"400-page-heading": "Անվավեր հարցում", , "400-page-heading": "[I18N TESTING] -400 karma for an invalid request"
"404-page-title": "Սխալ հասցե", , "404-page-title": "[I18N TESTING] Not Found - Try Again"
"404-page-heading": "Սխալ հասցե", , "404-page-heading": "[I18N TESTING] Content not found, but at least the server is alive"
"library-button-text": "Գրադարանի էջ", , "library-button-text": "[I18N TESTING] Navigate to the welcome page"
"home-button-text": "Դեպի '{{BOOK_TITLE}}'֊ի գլխավոր էջը", , "home-button-text": "[I18N TESTING] Jump to the main page of '{{BOOK_TITLE}}'"
"random-page-button-text": "Բացել պատահական էջ", , "random-page-button-text": "[I18N TESTING] I am tired of determinism"
"searchbox-tooltip": "Որոնել '{{BOOK_TITLE}}'֊ում" , "searchbox-tooltip": "[I18N TESTING] Let's search in '{{BOOK_TITLE}}'"
} }

View File

@ -612,11 +612,11 @@ TEST_F(ServerTest, Http404HtmlError)
)" }, )" },
{ /* url */ "/ROOT/random?content=non-existent-book&userlang=test", { /* url */ "/ROOT/random?content=non-existent-book&userlang=test",
expected_page_title=="Սխալ հասցե" && expected_page_title=="[I18N TESTING] Not Found - Try Again" &&
expected_body==R"( expected_body==R"(
<h1>Սխալ հասցե</h1> <h1>[I18N TESTING] Content not found, but at least the server is alive</h1>
<p> <p>
Գիրքը բացակայում է՝ non-existent-book [I18N TESTING] No such book: non-existent-book. Sorry.
</p> </p>
)" }, )" },
@ -637,11 +637,11 @@ TEST_F(ServerTest, Http404HtmlError)
)" }, )" },
{ /* url */ "/ROOT/catalog/?userlang=test", { /* url */ "/ROOT/catalog/?userlang=test",
expected_page_title=="Սխալ հասցե" && expected_page_title=="[I18N TESTING] Not Found - Try Again" &&
expected_body==R"( expected_body==R"(
<h1>Սխալ հասցե</h1> <h1>[I18N TESTING] Content not found, but at least the server is alive</h1>
<p> <p>
Սխալ հասցե՝ /ROOT/catalog/ [I18N TESTING] URL not found: /ROOT/catalog/
</p> </p>
)" }, )" },
@ -654,11 +654,11 @@ TEST_F(ServerTest, Http404HtmlError)
)" }, )" },
{ /* url */ "/ROOT/catalog/invalid_endpoint?userlang=test", { /* url */ "/ROOT/catalog/invalid_endpoint?userlang=test",
expected_page_title=="Սխալ հասցե" && expected_page_title=="[I18N TESTING] Not Found - Try Again" &&
expected_body==R"( expected_body==R"(
<h1>Սխալ հասցե</h1> <h1>[I18N TESTING] Content not found, but at least the server is alive</h1>
<p> <p>
Սխալ հասցե՝ /ROOT/catalog/invalid_endpoint [I18N TESTING] URL not found: /ROOT/catalog/invalid_endpoint
</p> </p>
)" }, )" },
@ -711,16 +711,16 @@ TEST_F(ServerTest, Http404HtmlError)
)" }, )" },
{ /* url */ "/ROOT/content/zimfile/invalid-article?userlang=test", { /* url */ "/ROOT/content/zimfile/invalid-article?userlang=test",
expected_page_title=="Սխալ հասցե" && expected_page_title=="[I18N TESTING] Not Found - Try Again" &&
book_name=="zimfile" && book_name=="zimfile" &&
book_title=="Ray Charles" && book_title=="Ray Charles" &&
expected_body==R"( expected_body==R"(
<h1>Սխալ հասցե</h1> <h1>[I18N TESTING] Content not found, but at least the server is alive</h1>
<p> <p>
Սխալ հասցե՝ /ROOT/content/zimfile/invalid-article [I18N TESTING] URL not found: /ROOT/content/zimfile/invalid-article
</p> </p>
<p> <p>
Որոնել <a href="/ROOT/search?content=zimfile&pattern=invalid-article">invalid-article</a> [I18N TESTING] Make a full text search for <a href="/ROOT/search?content=zimfile&pattern=invalid-article">invalid-article</a>
</p> </p>
)" }, )" },
@ -1003,7 +1003,7 @@ TEST_F(ServerTest, UserLanguageControl)
{ {
/*url*/ "/ROOT/content/zimfile/invalid-article?userlang=test", /*url*/ "/ROOT/content/zimfile/invalid-article?userlang=test",
/*Accept-Language:*/ "", /*Accept-Language:*/ "",
/* expected <h1> */ "Սխալ հասցե" /* expected <h1> */ "[I18N TESTING] Content not found, but at least the server is alive"
}, },
{ {
/*url*/ "/ROOT/content/zimfile/invalid-article", /*url*/ "/ROOT/content/zimfile/invalid-article",
@ -1013,7 +1013,7 @@ TEST_F(ServerTest, UserLanguageControl)
{ {
/*url*/ "/ROOT/content/zimfile/invalid-article", /*url*/ "/ROOT/content/zimfile/invalid-article",
/*Accept-Language:*/ "test", /*Accept-Language:*/ "test",
/* expected <h1> */ "Սխալ հասցե" /* expected <h1> */ "[I18N TESTING] Content not found, but at least the server is alive"
}, },
{ {
// userlang query parameter takes precedence over Accept-Language // userlang query parameter takes precedence over Accept-Language
@ -1546,7 +1546,7 @@ R"EXPECTEDRESPONSE([
R"EXPECTEDRESPONSE([ R"EXPECTEDRESPONSE([
{ {
"value" : "abracadabra ", "value" : "abracadabra ",
"label" : "որոնել &apos;abracadabra&apos;...", "label" : "[I18N TESTING] cOnTaInInG &apos;abracadabra&apos;...",
"kind" : "pattern" "kind" : "pattern"
//EOLWHITESPACEMARKER //EOLWHITESPACEMARKER
} }