Skip to content

Commit 9171f53

Browse files
hugovkAA-Turner
andauthored
Fix singular and plural search results text (#12639)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
1 parent 6d3e5c7 commit 9171f53

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Bugs fixed
4343
* #12587: Do not warn when potential ambiguity detected during Intersphinx
4444
resolution occurs due to duplicate targets that differ case-insensitively.
4545
Patch by James Addison.
46+
* #12639: Fix singular and plural search results text.
47+
Patch by Hugo van Kemenade.
4648

4749
Testing
4850
-------

sphinx/themes/basic/static/searchtools.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,10 @@ const _finishSearch = (resultCount) => {
115115
"Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
116116
);
117117
else
118-
Search.status.innerText = _(
119-
"Search finished, found ${resultCount} page(s) matching the search query."
118+
Search.status.innerText = Documentation.ngettext(
119+
"Search finished, found one page matching the search query.",
120+
"Search finished, found ${resultCount} pages matching the search query.",
121+
resultCount,
120122
).replace('${resultCount}', resultCount);
121123
};
122124
const _displayNextItem = (

0 commit comments

Comments
 (0)