InternalServer::handle_no_js(const RequestContext& req
} else if ((urlParts.size() == 3) && (urlParts[1] == "download")) {
try {
const auto bookId = mp_nameMapper->getIdForName(urlParts[2]);
- content = getNoJSDownloadPageHTML(bookId);
+ content = getNoJSDownloadPageHTML(bookId, userLang);
} catch (const std::out_of_range&) {
return HTTP404Response(*this, request)
+ urlNotFoundMsg;
diff --git a/src/server/internalServer.h b/src/server/internalServer.h
index de84f251e..867b324e0 100644
--- a/src/server/internalServer.h
+++ b/src/server/internalServer.h
@@ -156,7 +156,7 @@ class InternalServer {
std::string getLibraryId() const;
- std::string getNoJSDownloadPageHTML(const std::string& bookId) const;
+ std::string getNoJSDownloadPageHTML(const std::string& bookId, const std::string& userLang) const;
private: // types
class LockableSuggestionSearcher;
diff --git a/static/skin/i18n/en.json b/static/skin/i18n/en.json
index acf2b0131..e8a3d26b1 100644
--- a/static/skin/i18n/en.json
+++ b/static/skin/i18n/en.json
@@ -47,4 +47,8 @@
, "filter-by-tag": "Filter by tag \"{{TAG}}\""
, "stop-filtering-by-tag": "Stop filtering by tag \"{{TAG}}\""
, "library-opds-feed-parameterised": "Library OPDS Feed - entries matching {{#LANG}}\nLanguage: {{LANG}} {{/LANG}}{{#CATEGORY}}\nCategory: {{CATEGORY}} {{/CATEGORY}}{{#TAG}}\nTag: {{TAG}} {{/TAG}}{{#Q}}\nQuery: {{Q}} {{/Q}}"
+ , "welcome-to-kiwix-server": "Welcome to Kiwix Server"
+ , "download-links-heading": "Download links for {{BOOK_TITLE}}"
+ , "download-links-title": "Download book"
+ , "preview-book": "Preview"
}
diff --git a/static/skin/i18n/qqq.json b/static/skin/i18n/qqq.json
index 8d2acf869..069f5e774 100644
--- a/static/skin/i18n/qqq.json
+++ b/static/skin/i18n/qqq.json
@@ -48,5 +48,9 @@
"filter-by-tag": "Hint for a link that would load results filtered by a single tag",
"stop-filtering-by-tag": "Tooltip for the button that cancels filtering by tag",
"library-opds-feed-all-entries": "Hint for the library OPDS feed for all entries",
- "library-opds-feed-parameterised": "Hint for the library OPDS feed for filtered entries"
+ "library-opds-feed-parameterised": "Hint for the library OPDS feed for filtered entries",
+ "welcome-to-kiwix-server": "Title shown in browser's title bar/page tab",
+ "download-links-heading": "Heading for no-js download page",
+ "download-links-title": "Title for no-js download page",
+ "preview-book": "Tooltip of book-tile leading to the book"
}
diff --git a/static/skin/i18n/test.json b/static/skin/i18n/test.json
index b2e02e6b4..c48c181a9 100644
--- a/static/skin/i18n/test.json
+++ b/static/skin/i18n/test.json
@@ -36,4 +36,8 @@
, "filter-by-tag": "Filter [I18N] by [TESTING] tag \"{{TAG}}\""
, "stop-filtering-by-tag": "[I18N] Stop filtering [TESTING] by tag \"{{TAG}}\""
, "library-opds-feed-parameterised": "[I18N] Library OPDS Feed - [TESTING] entries matching {{#LANG}}\nLanguage: {{LANG}} {{/LANG}}{{#CATEGORY}}\nCategory: {{CATEGORY}} {{/CATEGORY}}{{#TAG}}\nTag: {{TAG}} {{/TAG}}{{#Q}}\nQuery: {{Q}} {{/Q}}"
+ , "welcome-to-kiwix-server": "[I18N] Welcome to Kiwix Server [TESTING]"
+ , "download-links-heading": "[I18N] Download links for {{BOOK_TITLE}} [TESTING]"
+ , "download-links-title": "[I18N TESTING]Download book"
+ , "preview-book": "[I18N] Preview [TESTING]"
}
diff --git a/static/templates/no_js_download.html b/static/templates/no_js_download.html
index d1ba6f249..5bddee319 100644
--- a/static/templates/no_js_download.html
+++ b/static/templates/no_js_download.html
@@ -4,30 +4,30 @@
- Download book
+ {{translations.download-links-title}}
- Download links for {{bookTitle}}
+ {{{translations.download-links-heading}}}
- Direct
+ {{translations.direct-download-link-text}}
- Sha256 hash
+ {{translations.hash-download-link-text}}
- Magnet link
+ {{translations.magnet-link-text}}
- Torrent file
+ {{translations.torrent-download-link-text}}