Search results page header as translatable text

However it is NOT actually translated by the backend yet
This commit is contained in:
Veloman Yunkan
2024-01-30 15:47:12 +04:00
parent c4fa42f20b
commit 8f5714be07
5 changed files with 28 additions and 25 deletions

View File

@ -738,18 +738,10 @@ struct TestData
std::string expectedHtmlHeader() const
{
if ( totalResultCount == 0 ) {
return "\n No results were found for <b>\"" + getPattern() + "\"</b>";
return "No results were found for <b>\"" + getPattern() + "\"</b>";
}
std::string header = R"( Results
<b>
FIRSTRESULT-LASTRESULT
</b> of <b>
RESULTCOUNT
</b> for <b>
"PATTERN"
</b>
)";
std::string header = R"(Results <b>FIRSTRESULT-LASTRESULT</b> of <b>RESULTCOUNT</b> for <b>"PATTERN"</b>)";
const size_t lastResultIndex = std::min(totalResultCount, firstResultIndex + results.size() - 1);
header = replace(header, "FIRSTRESULT", std::to_string(firstResultIndex));