diff --git a/src/langs/json/en.json b/src/langs/json/en.json
index 0157af71c..4047f7bf9 100644
--- a/src/langs/json/en.json
+++ b/src/langs/json/en.json
@@ -13,6 +13,7 @@
"search": {
"loading": "Searching…",
"matchingResults": "{n, plural, one {# matching result} other {# matching results}}",
+ "viewerResults": "{results, plural, one {# matching result} other {# matching results}} found across {pages, plural, one {# page} other {# pages}}",
"reset": "Clear Search",
"help": "Use filters like user:
, project:
or organization:
to refine searches. Use sort:
to order results.",
"more": "Learn more",
diff --git a/src/lib/components/viewer/Search.svelte b/src/lib/components/viewer/Search.svelte
index 01db41d56..4521f7309 100644
--- a/src/lib/components/viewer/Search.svelte
+++ b/src/lib/components/viewer/Search.svelte
@@ -37,6 +37,10 @@ Assumes it's a child of a ViewerContext
$: query = getQuery($page.url, "q");
$: search = searchWithin($document.id, query).then(formatResults);
+
+ function countResults(results: [number, string[]][]) {
+ return results.reduce((acc, [, segments]) => acc + segments.length, 0);
+ }