Project

General

Profile

Bug #9309

Use Disconnect as the default search engine

Added by intrigeri over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Internationalization
Target version:
Start date:
05/01/2015
Due date:
% Done:

100%

Feature Branch:
bugfix/9309-default-disconnect-search
Type of work:
Code
Blueprint:
Starter:
Affected tool:
Browser

Description

Tor Browser 4.5 has moved to Disconnect as its default search engine. This change was ignored during the initial porting effort (#9031). Have we got good reasons not to follow Tor Browser on this one?

disconnect.png View (25.8 KB) sajolida, 05/06/2015 05:20 PM

Associated revisions

Revision 4a6fc859 (diff)
Added by anonym over 4 years ago

Completely rework how we localize our browser.

Previously these parts have been spread out in several, heavily
coupled hooks and static configurations, making it very hard to get an
overview of how it all actually works. Now we instead do everything in
one place, and generate things programatically as much as possible,
which makes supporting another locale much simpler (just adding a
single line with a few pieces of needed info!). Consequently this
commit also adds better localization for every locale supported by the
Tor Browser (added: ar, es, fa, ko, nl, pl, ru, tr, vi and zh_CN)
instead of the euro-centric (w.r.t. actually adding localization) ones
we had picked before. Also, we'll get build level errors for many
types of errors, so they're caugt early.

This commit may seem like a gigantic, non-atomic beast, but splitting
it would be hard, and it actually mostly removes stuff. Its design is
simple: We have a description file that, for each supported Tor
Browser locale, has the extra pieces of info needed, like the
localized name of the language, the parameters needed for certain
search engines etc. Then we apply them to:

  • a templates for the amnesia branding locale file, and put in the
    relevant values there so the default search engine is selected, the
    correct spellchecker (if installed) is pre-selected, and our
    homepage is localized (if supported).
  • a template for each of the search engines we want to localize
    (currently Start Page and Disconnect.me -- we could do Google but
    most (all?) locales get a localized one from the Iceweasel
    localization packages) and generate localized ones.

Also, following the Tor Browser's recent switch, we now use
Disconnect.me as the default search engine, although we localize it
for each supported locale.

Will-fix: #9309

Revision ebe57d1f
Added by anonym over 4 years ago

Merge remote-tracking branch 'origin/bugfix/9309-default-disconnect-search' into testing

Fix-committed: #9309

History

#1 Updated by anonym over 4 years ago

The reasons they state in the comments of the blog post seem good to me, in particular for moving away from Startpage since they sometimes show a captcha.

If we do the switch, do we want to localize them like we do with Startpage? The Tor Browser uses English in all locales, apparently, and in a comment in the upstream ticket they call that a "privacy leak".

#2 Updated by intrigeri over 4 years ago

If we do the switch, do we want to localize them like we do with Startpage? The Tor Browser uses English in all locales, apparently, and in a comment in the upstream ticket they call that a "privacy leak".

Indeed, Tor Browser (both upstream and in Tails) default to pretending the user has en_US locales, so it of course generally makes sense to default to an English-speaking search engine. However, Tor Browser and Tails situations are a bit different:

  • in Tor Browser, a user who wants to use a web search engine configured in their preferred language can configure it once for all
  • in Tails, a user with the same needs has to configure it every time they start Tails

So the impact of defaulting to something that's potentially very much impractical to non-English speakers is quite different.

=> Right now, I tend to think we should go on localizing the default web search engine in Tails' Tor Browser.

#3 Updated by BitingBird over 4 years ago

I'm for localization too

#4 Updated by intrigeri over 4 years ago

  • Subject changed from Consider using the Disconnect search engine to Use Disconnect as the default search engine
  • Type of work changed from Research to Code

Georg confirmed that the CAPTCHAs sometimes seen with Startpage were the major reason behind their move to Disconnect search.

#5 Updated by sajolida over 4 years ago

Here I've got Disconnect as the first search engine option. So maybe this is fixed already...

#6 Updated by intrigeri over 4 years ago

Here I've got Disconnect as the first search engine option.

What version of Tails is this?

#7 Updated by sajolida over 4 years ago

  • File disconnect.png added

1.4~rc1 - 20150503
82c1e8dc529c1882ab89a285bb71bd8a8bfc47b4

See screenshot in attachment. At least disconnect shows first and is the default if I restart Tor Browser. I didn't try to restart Tails.

#8 Updated by sajolida over 4 years ago

  • File deleted (disconnect.png)

#9 Updated by sajolida over 4 years ago

#10 Updated by intrigeri over 4 years ago

sajolida wrote:

1.4~rc1 - 20150503
82c1e8dc529c1882ab89a285bb71bd8a8bfc47b4

See screenshot in attachment. At least disconnect shows first and is the default if I restart Tor Browser. I didn't try to restart Tails.

Wow, interesting. I can't reproduce this when booting from the 1.4~rc1 ISO, neither in English nor French. I also tried restarting Tor Browser a few times (in English) and Startpage was still the default. Do you have any local customization to the browser or anything that could explain this discrepancy? Can you provide precise steps to reproduce this behaviour?

#11 Updated by anonym over 4 years ago

intrigeri wrote:

sajolida wrote:

1.4~rc1 - 20150503
82c1e8dc529c1882ab89a285bb71bd8a8bfc47b4

See screenshot in attachment. At least disconnect shows first and is the default if I restart Tor Browser. I didn't try to restart Tails.

Wow, interesting. I can't reproduce this when booting from the 1.4~rc1 ISO, neither in English nor French. I also tried restarting Tor Browser a few times (in English) and Startpage was still the default. Do you have any local customization to the browser or anything that could explain this discrepancy? Can you provide precise steps to reproduce this behaviour?

I cannot reproduce it either. The amnesia@branding extension will make sure that Start Page is used, so the only way I can see this happening is via some persistence modification that removes/disables that extension somehow.

#12 Updated by anonym over 4 years ago

  • Status changed from Confirmed to In Progress

#13 Updated by anonym over 4 years ago

  • Category set to Internationalization
  • % Done changed from 0 to 50
  • QA Check set to Ready for QA
  • Feature Branch set to bugfix/9309-default-disconnect-search

So I ended up overdoing this a bit. Basically, see the commit message of 4a6fc85. This branch vastly improves the browser localization situation, and should IMHO go into 1.4 despite moving more towards being more of a feature (post-freeze!) than a bugfix. It of course fixes this ticket's bug.

Here's a thorough way to test all it does, that should take ~20 minutes:

Boot Tails in any locale and run this code (and do not start the Tor Browser before doing so!):

LOCALES="ar_EG de_DE es_ES en_US fa_IR fr_FR it_IT ko_KR nl_NL pl_PL pt_PT ru_RU tr_TR vi_VN zh_CN" 
cp -a .tor-browser .tor-browser.orig
for LOCALE in ${LOCALES}; do
    rm -R .tor-browser
    cp -a .tor-browser.orig/ .tor-browser
    clear
    export LANG="${LOCALE}.UTF-8" 
    echo "Testing locale $LANG" 
    tor-browser
    sudo unsafe-browser
done
During each locale's iteration, go through this check list:
  • Make sure that the home page is correct, in particular that it is properly localized for de_DE, fr_FR and pt_PT.
  • Verify that the UI is properly localized, e.g. by checking the menus (press ALT). Actually this branch changes nothing w.r.t. that, but hey, it's related.
  • Check in about:config that spellchecker.dictionary is set appropriately. Only tr_TR and zh_CN should have defaulted back to en_US. Note that this pref actually has no effect (it must be set as a user_pref() which seems impossible to do via a .properties file like we do in the branding extension), so this step is more "for completeness" to verify that there's no "regression".
  • Make sure that a localized Disconnect.me is the default, pre-selected search engine. Do a search and verify that the correct location (e.g. Egypt for ar_EG) is chosen in the top-right corner.
  • Do a search with the Startpage plugin and:
    • make sure the UI is localized for all but ar_EG, fa_IR, ru_RU and vi_VN
    • make sure the search results are localized, which can be a bit hard to come up with in some cases. If you get a "Pages in ..." link (e.g. "al-'arabiyah" for ar_EG) in the bottom-left corner that should indicate that it works.
  • Look in the list of search plugins, and make sure that the ones we previously got from the iceweasel localization packages are there. Make sure that yahoo is not there.
  • When you close the Tor Browser the Unsafe Browser will start, and then you should only make sure that Google is the default search eninge.

Note: Previously we localized pt_BR too, but it was identical to pt_PT except setting a more specific spellchecker. I tried adding it, but pt_PT takes precedence, probably due to that being the only langpack, and it being a "full" locale, including location (i.e. it's not just pt). Not a huge loss, IMHO, especially given that the spellchecker pref doesn't work.

#14 Updated by BitingBird over 4 years ago

anonym wrote:

So I ended up overdoing this a bit.

Haha, that's the understatement of the year :)

#15 Updated by sajolida over 4 years ago

Wow, interesting. I can't reproduce this when booting from the 1.4~rc1 ISO, neither in English nor French.

I'm very sorry. Today when I rebooted I saw that Disconnect is first in
the list, but that StartPage is selected by default. Matching what you
are reporting. Note that the last selected search engine is not reset to
the default when switching to a new identity but I guess this is not a bug.

#16 Updated by anonym over 4 years ago

  • Assignee deleted (anonym)

#17 Updated by anonym over 4 years ago

As said in the review'n'merge request sent to tails-dev@, intrigeri has reviewed the code and is happy with it, so all that remains is independent testing of it.

Also, I've run a full test suite run, noticed that an image needed updating (TorBrowserUnableToOpen.png, which shows the new tab search bar, which has the name of the default one in it) and after that everything passes.

#18 Updated by intrigeri over 4 years ago

FTR I've merged the proposed branch into experimental.

#19 Updated by kytv over 4 years ago

Testing is currently underway and results will be forthcoming.

#20 Updated by kytv over 4 years ago

First: Very impressive work here (as usual) ;) I did my testing with a self-built ISO from the bugfix/9309-default-disconnect-search branch.

The only discrepancy from the above instructions:

anonym wrote:

Check in about:config that spellchecker.dictionary is set appropriately. Only tr_TR and zh_CN should have defaulted back to en_US. Note that this pref actually has no effect (it must be set as a user_pref() which seems impossible to do via a .properties file like we do in the branding extension), so this step is more "for completeness" to verify that there's no "regression".

All of the locales had the localized spell check language selected except for these which had en_US set:

  • Chinese
  • Dutch
  • Korean
  • Polish
  • Turkish

#21 Updated by anonym over 4 years ago

  • Status changed from In Progress to 11
  • % Done changed from 50 to 100

#22 Updated by anonym over 4 years ago

  • QA Check changed from Ready for QA to Pass

kytv wrote:

First: Very impressive work here (as usual) ;) I did my testing with a self-built ISO from the bugfix/9309-default-disconnect-search branch.

The only discrepancy from the above instructions:

anonym wrote:

Check in about:config that spellchecker.dictionary is set appropriately. Only tr_TR and zh_CN should have defaulted back to en_US. Note that this pref actually has no effect (it must be set as a user_pref() which seems impossible to do via a .properties file like we do in the branding extension), so this step is more "for completeness" to verify that there's no "regression".

All of the locales had the localized spell check language selected except for these which had en_US set:

  • Chinese
  • Dutch
  • Korean
  • Polish
  • Turkish

The additional locales without spellchecker are expected after 4998d8d, which was done after I wrote those instructions.

So:
  • Code review passed (intrigeri)
  • Manual tests passed (kytv)
  • Automated test suite passed (anonym)

Merging!

#23 Updated by BitingBird over 4 years ago

  • Status changed from 11 to Resolved

Also available in: Atom PDF