Closed Bug 1063560 Opened 7 years ago Closed 3 years ago

Search output with locale=* says at the top that the results found were in English, but includes all locales


( Graveyard :: Search, defect)

Not set


(Not tracked)



(Reporter: sheppy, Assigned: bhattacharyya.rick14, Mentored)



(Whiteboard: [specification][type:bug])

What did you do?
1. Ran this search:*&kumascript_macros=LandingPageListSubpages

What happened?
The result page says:

240 documents found in English.

But most of the listed pages are not in fact in English.

What should have happened?
This text should instead say "240 documents found in all locales."

And, ideally, would offer a filter option to narrow it down to a specific locale.

Is there anything else we should know?
The issue is one of labeling: When the search parameters include "locale=*" we should not include anything about the locale in the label above the search.
Severity: normal → minor
Duplicate of this bug: 1213854
Component: General → Search
Seen again in mozilla/kuma#4179
Assignee: nobody → jwhitlock
On second thought, this is a good bug for me to mentor.  I'd call it medium difficulty.  A new contributor would need to:

1. Install Kuma locally, with the sample database [1]
2. Populate the search index [2]
3. Reproduce the issue, such a by loading an all-documents macro search [3], see 'documents found in English (US)'
4. Fix it!

[3] http://localhost:8000/en-US/search?topic=none&kumascript_macros=CompatNo&locale=*
Assignee: jwhitlock → nobody
Mentor: jwhitlock
I want to fix this bug, please assign me this.
Thank you for wanting to work on this! I've assigned it to you.
For any questions please refer to John.

Assignee: nobody → rounakraj8
Is work still in progress for this bug? If not, I would like to take it up. Thank you.
Deep - I'm reassigning to you. You'll need to follow the steps in comment 4.
Assignee: rounakraj8 → bhattacharyya.rick14
I have installed Kuma locally along with the sample database, populated the search index and reproduced the issue. I am assuming that the relevant code for this bug is present in kuma/search. Please correct me if I'm wrong. Thank you.
1. I guess I need to place a check to see if the language filter has been overridden in kuma/search/jinja2/results.html template. Please let me know if there is anything else that I should take care of.

2. Also, since there is already a test for language_filter_override in, I'm assuming I do not need to write any separate test for this bug fix. Please correct me if I'm wrong.

Thank you.
Deep, it sounds like you are on the right track. I'm not aware of any existing template tests that would need to be updated for this change, and the tests are in need of a serious refactor, so anything beyond fixing tests broken by the change would probably be out of scope. I think we can rely on manual testing for this change. I look forward to your PR!
Commits pushed to master at
Fix bug 1063560: Change search output with locale=*

- Display "found in all locales" instead of "found in English(US)"
Merge pull request #4580 from coderick14/patch-for-bug-1063560

Fix bug 1063560: Change search output with locale=*
Closed: 3 years ago
Resolution: --- → FIXED
Product: → Graveyard
You need to log in before you can comment on or make changes to this bug.