Skip to content
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

Import Cliqz search overlay module #445

Merged
merged 4 commits into from Aug 29, 2019
Merged
Changes from all commits
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

@@ -13,6 +13,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0
*/

/**
* @namespace CliqzContentScript
*/
@@ -13,6 +13,8 @@
"version_name": "8.4.3",
"default_locale": "en",
"description": "__MSG_short_description__",
"debug": true,
"log": true,
"icons": {
"16": "app/images/icon16.png",
"48": "app/images/icon48.png",
@@ -24,7 +24,7 @@
"docs": "jsdoc -c jsdoc.json -d docs -r",
"leet": "node ./tools/leet/leet-en.js",
"leet.reset": "node ./tools/leet/leet-reset.js",
"postinstall": "vendor-copy"
"postinstall": "vendor-copy && bash ./tools/merge-locales.sh"
},
"vendorCopy": [
{
@@ -1208,6 +1208,14 @@ function setupABTest() {
if (abtest.hasTest('antitracking_whitelist2')) {
prefs.set('attrackBloomFilter', false);
}
// overlay search AB test
if (abtest.hasTest('overlay_search')) {
cliqz.enableModule('search');
cliqz.enableModule('overlay');
} else {
cliqz.disableModule('search');
cliqz.disableModule('overlay');
}
}

/**
@@ -0,0 +1,16 @@
for lang in `ls ./cliqz/static/locale`
do
# filter out only language folder
if [ ! -d "./cliqz/static/locale/$lang" ]; then
continue;
fi
# filter out language folders supported by ghostery

if [ ! -d "_locales/$lang" ]; then
continue;
fi

echo "Merging language file: $lang"
jq -s '.[0] + .[1]' "cliqz/static/locale/$lang/messages.json" "_locales/$lang/messages.json" > "_locales/$lang/messages.temp.json"
mv "_locales/$lang/messages.temp.json" "_locales/$lang/messages.json"
done
ProTip! Use n and p to navigate between commits in a pull request.