Closed Bug 1596766 Opened 2 years ago Closed 2 years ago

Engine selector should return a single locale for each engine

Categories

(Firefox :: Search, task, P3)

task
Points:
2

Tracking

()

RESOLVED FIXED
Firefox 73
Iteration:
73.2 - Dec 16 - Jan 5
Tracking Status
firefox73 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(2 files)

Currently the Search Engine Selector looks like it is returning multiple locales per engine. I think generally it isn't, and it is confusing that it can, because effectively they're two different engines.

I think we should change it so that the selector only returns one locale per engine, and this would simplify the understanding of the code.

Note: toolkit/components/search/tests/xpcshell/test_webextensions_install.js already covers the multi-locale functionality, this is just simplifying how the backend handles it.

Assignee: nobody → standard8
Status: NEW → ASSIGNED
Iteration: --- → 73.2 - Dec 16 - Jan 5

The configuration may specify multiple locales for a search engine. The search engine selector already splits these out into different engine objects, but keeps the locale field as an array. This patch changes the 'locales' array into a 'locale' string and applies appropriate simplifications to the search service.

Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1a45094b7aa1
Change the Search Engine Selector to return a string rather than array of locales. r=mikedeboer
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 73
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d61646919205
Followup, fix a missed instance in the SearchService of switching an array to a string for the locales change. r=daleharvey
You need to log in before you can comment on or make changes to this bug.