1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-02-18 01:41:27 +01:00

i18n disable google analytics

This commit is contained in:
Kyle Spearrin 2016-10-18 20:19:17 -04:00
parent 9f12079f05
commit 0b0af8f755
4 changed files with 11 additions and 1 deletions

View File

@ -367,6 +367,10 @@
"message": "Other", "message": "Other",
"description": "Other" "description": "Other"
}, },
"disableGa": {
"message": "Disable Google Analytics",
"description": "Disable Google Analytics"
},
"rateExtension": { "rateExtension": {
"message": "Rate the Extension", "message": "Rate the Extension",
"description": "Rate the Extension" "description": "Rate the Extension"

View File

@ -5,6 +5,7 @@
i18nService) { i18nService) {
var gaKey = 'disableGa'; var gaKey = 'disableGa';
utilsService.initListSectionItemListeners($(document), angular);
$scope.disableGa = false; $scope.disableGa = false;
$scope.i18n = i18nService; $scope.i18n = i18nService;
@ -88,11 +89,15 @@
} }
else { else {
// disable // disable
$analytics.eventTrack('Disabled Google Analytics');
obj[gaKey] = true; obj[gaKey] = true;
} }
chrome.storage.local.set(obj, function () { chrome.storage.local.set(obj, function () {
$scope.disableGa = obj[gaKey]; $scope.disableGa = obj[gaKey];
if (!obj[gaKey]) {
$analytics.eventTrack('Enabled Google Analytics');
}
}); });
}); });
}; };

View File

@ -46,7 +46,7 @@
</div> </div>
<div class="list-section-items"> <div class="list-section-items">
<div class="list-section-item list-section-item-checkbox"> <div class="list-section-item list-section-item-checkbox">
<label for="ga">Disable Google Analytics</label> <label for="ga">{{i18n.disableGa}}</label>
<input id="ga" type="checkbox" ng-model="disableGa" ng-change="updateGa()"> <input id="ga" type="checkbox" ng-model="disableGa" ng-change="updateGa()">
</div> </div>
<a class="list-section-item" ui-sref="about({animation: 'in-slide-left'})"> <a class="list-section-item" ui-sref="about({animation: 'in-slide-left'})">

View File

@ -88,6 +88,7 @@ function i18nService() {
togglePassword: chrome.i18n.getMessage('togglePassword'), togglePassword: chrome.i18n.getMessage('togglePassword'),
manage: chrome.i18n.getMessage('manage'), manage: chrome.i18n.getMessage('manage'),
other: chrome.i18n.getMessage('other'), other: chrome.i18n.getMessage('other'),
disableGa: chrome.i18n.getMessage('disableGa'),
rateExtension: chrome.i18n.getMessage('rateExtension'), rateExtension: chrome.i18n.getMessage('rateExtension'),
rateExtensionDesc: chrome.i18n.getMessage('rateExtensionDesc'), rateExtensionDesc: chrome.i18n.getMessage('rateExtensionDesc'),
browserNotSupportClipboard: chrome.i18n.getMessage('browserNotSupportClipboard') browserNotSupportClipboard: chrome.i18n.getMessage('browserNotSupportClipboard')