Opened 5 years ago

Closed 4 years ago

Last modified 3 years ago

#11236 closed defect (fixed)

Omnibox in non-english TBBs has DuckDuckGo as default search engine

Reported by: gk Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Keywords: tbb-testcase, tbb-firefox-patch, TorBrowserTeam201502R, MikePerry201502R
Cc: mcs, brade, boklm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

While about:tor is still proclaiming a secure search with Startpage the default search engine in non-en-US bundles is DuckDuckGo.

Child Tickets

Change History (20)

comment:1 in reply to:  description Changed 5 years ago by Meng

Replying to gk:

While about:tor is still proclaiming a secure search with Startpage the default search engine in non-en-US bundles is DuckDuckGo.

Tested torbrowser-install-3.6-beta-1_zh-CN.exe, and the default search engine is Starpage. However, when translating Tor on transifex, in source file 'Torbutton - about:tor homepage', I found strings like this:'Search securely with DuckDuckGo'.

comment:2 Changed 5 years ago by mikeperry

Yes, it seems like translators are sometimes translating some of these search engine strings, which messes with the ordering in the defaults.

comment:3 Changed 5 years ago by mcs

For about:tor, we included strings for both DuckDuckGo and Startpage (someone had the idea that someday we could let users choose which search engine to use from about:tor). See:

https://gitweb.torproject.org/torbutton.git/blob/HEAD:/src/chrome/locale/en/aboutTor.properties

How does DuckDuckGo get set as the URL bar search engine in non-English bundles? Is the search box also configured to use DuckDuckGo? Which should be fixed -- about:tor or the other places?

comment:4 Changed 5 years ago by mcs

Cc: mcs brade added

comment:5 in reply to:  3 Changed 5 years ago by Meng

Replying to mcs:

For about:tor, we included strings for both DuckDuckGo and Startpage (someone had the idea that someday we could let users choose which search engine to use from about:tor). See:

https://gitweb.torproject.org/torbutton.git/blob/HEAD:/src/chrome/locale/en/aboutTor.properties

Could we put a string into source on transifex only when it's translatable and the translation will actually be built into next release? It will save translators lots of time, and no chance to make mistakes.

How does DuckDuckGo get set as the URL bar search engine in non-English bundles? Is the search box also configured to use DuckDuckGo? Which should be fixed -- about:tor or the other places?

comment:6 Changed 5 years ago by gk

Keywords: tbb-testcase added

The ticket for the testcase is #11509.

comment:7 Changed 4 years ago by erinn

Component: Firefox Patch IssuesTor Browser
Keywords: tbb-firefox-patch added
Owner: changed from mikeperry to tbb-team

comment:8 in reply to:  3 Changed 4 years ago by gk

Replying to mcs:

For about:tor, we included strings for both DuckDuckGo and Startpage (someone had the idea that someday we could let users choose which search engine to use from about:tor). See:

https://gitweb.torproject.org/torbutton.git/blob/HEAD:/src/chrome/locale/en/aboutTor.properties

How does DuckDuckGo get set as the URL bar search engine in non-English bundles? Is the search box also configured to use DuckDuckGo? Which should be fixed -- about:tor or the other places?

It get set as the browser is not recognizing the translated default one and thus choosing the second one we define. The search box on about:tor is not affected and fixed should get the search box in the upper right corner.

comment:9 Changed 4 years ago by gk

Keywords: TorBrowserTeam201501R added
Status: newneeds_review

Okay, this was a huge PITA but here come some patches. The idea behind them is to a) fix the problem and b) avoid translators shooting themselves in the foot by translating the search box search engine names. In order to do so I moved setting the default search engines out of Torbutton and put that into our default Tor Browser preference file using browser.search.order.extra.. This works as these prefs are consulted first when constructing the search engine order: see _buildSortedEngineList() https://mxr.mozilla.org/mozilla-esr31/source/toolkit/components/search/nsSearchService.js#3671. The funny thing is, the default engine we want has to be set with browser.search.order.extra.3, the second one with browser.search.order.extra.1 and the third one, you guess it, with browser.search.order.extra.2. This problem does, even more surprisingly, not happen if one just wants to set 2 search engines on the top of the list. This seems to be a Mozilla bug to me which I still need to file.

The code to review is: bug_11236_v3 in my public tor-browser repo, bug_11236_v2 in my public torbutton repo and bug_11236 in my public tor-browser-bunlde-testsuite repo.

The test currently only checks whether we have Startpage as default search engine set. Testing for DuckDuckGo and Google being on second/third position was harder than I though and I deferred that to a ticket I have yet to file. Should be okay for the bug at hand I think.

Last edited 3 years ago by gk (previous) (diff)

comment:10 in reply to:  9 Changed 4 years ago by gk

Replying to gk:

This seems to be a Mozilla bug to me which I still need to file.

https://bugzilla.mozilla.org/show_bug.cgi?id=1126722

comment:11 Changed 4 years ago by gk

Note: If we are concerned with the nightly/alpha channel then it would be good to coordinate the merge efforts with #14490 and adapt the code for tor-browser and the test accordingly. The torbutton changes are unaffected.

comment:12 Changed 4 years ago by mikeperry

Keywords: TorBrowserTeam201502R added; TorBrowserTeam201501R removed

comment:13 Changed 4 years ago by mikeperry

Keywords: MikePerry201502R added

comment:14 Changed 4 years ago by mikeperry

Ok, I merged this, and also #14490, and I cleaned up the omnibox in general. I did not yet update the test suites though.

comment:15 Changed 4 years ago by mikeperry

Cc: boklm added
Keywords: Boklm201502R added; MikePerry201502R removed

Actually, the test suites are in boklm's repo. Boklm, can you review these tests, update them for Disconnect as the default search, and if you are satisfied, merge them?

comment:16 Changed 4 years ago by gk

Note: this test is good for the stable series as we have Startpage still as the default search engine there. It just needs the necessary modifications to work with the upcoming 4.5a4 as well.

comment:17 Changed 4 years ago by gk

The fix we have seems not good enough. I can see YouTube as the default search engine on Windows. Let me try a different thing.

comment:18 Changed 4 years ago by boklm

Keywords: Boklm201502R removed

Ok, I merged the test, and made the modification to check for 'Search' instead of 'Startpage' on 4.5:
https://gitweb.torproject.org/boklm/tor-browser-bundle-testsuite.git/commit/?id=6e3ecb2153476dbda96d68633ef92efda2cf983f

comment:19 Changed 4 years ago by gk

Keywords: MikePerry201502R added

I fell back to my observation that no problems arise if we specify just two search engines to be on the top. Might be enough for the moment as fix: bug_11236_redux2 in my public tor-browser repo has it. It is working fine on my Windows, Mac and Linux test boxes.

comment:20 Changed 4 years ago by mikeperry

Resolution: fixed
Status: needs_reviewclosed

Ok, I merged this. On My Linux box at least, the rest of the omnibox ordering was following the order in ./browser/locales/en-US/searchplugins/list.txt, but I guess that is not always the case?

Note: See TracTickets for help on using tickets.