-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix singular and plural search results text #12639
Fix singular and plural search results text #12639
Conversation
Note that there's an
Could we use that to achieve a more internationalizable fix? |
That sounds better, do you know how to use it? |
I don't yet, no, but I'd be willing to learn in support of reviewing and/or suggesting an adjustment of the PR that uses it. That could take me a few days. |
Ah, and I remembered that I should probably spend some time refreshing my knowledge of other features to support an upcoming 8.0.0 release - so I'd update my timeline here to a couple of weeks or so to provide support (possibly pessimistic, but I'd prefer that than overcommitting). |
Yeah, no rush at all for this one :) Right, so https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html The next step is updating the translation files with these strings. |
There are some instructions at https://www.sphinx-doc.org/en/master/internals/contributing.html#translations I ran |
That's great - I wasn't certain whether |
This will also need a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
This is a nice improvement for the quality of search result presentation and localization.
@AA-Turner aside from the merge conflict resolution, is there anything else to resolve before this could be considered for merge? |
Thank you @hugovk @AA-Turner! |
Feature or Bugfix
Purpose
Detail
Search for something and, if there are results, it will say something like "Search finished, found 1 page(s) matching the search query." or "Search finished, found 23 page(s) matching the search query."
Computers are bad at some things, but one thing they're very good at is counting :)
Let's show "1 page" for a single result, and "${resultCount} pages" for multiple.
Before
Shows "page(s)" for both single and multiple results:
https://docs.python.org/3/search.html?q=hotspot
https://docs.python.org/3/search.html?q=lru_cache
After
Shows "page" for a single result and "pages" for multiple results:
Localisation
Do we need to do something to update the translation files?