diff --git a/src/server/response.cpp b/src/server/response.cpp
index bc8c85e5..5399cfc5 100644
--- a/src/server/response.cpp
+++ b/src/server/response.cpp
@@ -239,8 +239,7 @@ HTTPErrorResponse& HTTP400Response::operator+(InvalidUrlMsg /*unused*/)
if (!query.empty()) {
requestUrl += "?" + encodeDiples(query);
}
- kainjow::mustache::mustache msgTmpl(R"(The requested URL "{{{url}}}" is not a valid request.)");
- return *this + msgTmpl.render({"url", requestUrl});
+ return *this + ParameterizedMessage("invalid-request", {{"url", requestUrl}});
}
HTTP500Response::HTTP500Response(const InternalServer& server,
diff --git a/static/skin/i18n/en.json b/static/skin/i18n/en.json
index aaea0497..97a71d55 100644
--- a/static/skin/i18n/en.json
+++ b/static/skin/i18n/en.json
@@ -12,6 +12,7 @@
, "suggest-search" : "Make a full text search for {{PATTERN}}"
, "random-article-failure" : "Oops! Failed to pick a random article :("
, "invalid-raw-data-type" : "{{DATATYPE}} is not a valid request for raw content."
+ , "invalid-request" : "The requested URL \"{{{url}}}\" is not a valid request."
, "no-value-for-arg": "No value provided for argument {{ARGUMENT}}"
, "no-query" : "No query provided."
, "raw-entry-not-found" : "Cannot find {{DATATYPE}} entry {{ENTRY}}"
diff --git a/static/skin/i18n/qqq.json b/static/skin/i18n/qqq.json
index 18c97a60..d647a75e 100644
--- a/static/skin/i18n/qqq.json
+++ b/static/skin/i18n/qqq.json
@@ -15,6 +15,7 @@
"suggest-search": "Suggest a search when the URL points to a non existing article",
"random-article-failure": "Failure of the random article selection procedure",
"invalid-raw-data-type": "Invalid DATATYPE was used with the /raw endpoint (/raw/
+ [I18N TESTING] Invalid URL: "/ROOT%23%3F/search?content=zimfile&userlang=test" +
++ [I18N TESTING] Kiwix can read your thoughts but it is against GDPR. Please provide your query explicitly. +
+)" }, }; for ( const auto& t : testData ) {