Skip to content

Commit

Permalink
Fire button translations (#2115)
Browse files Browse the repository at this point in the history
* Firebutton options page translations

* Revert "Remove Fire button permissions until we ship. (#2111)"

This reverts commit cbd09b8.

* Enable Fire button for all Chrome builds

* Update translations

* Bump dashboard to 1.6.1
  • Loading branch information
sammacbeth committed Jul 19, 2023
1 parent 96e7d38 commit 7e39d68
Show file tree
Hide file tree
Showing 34 changed files with 2,758 additions and 2,164 deletions.
11 changes: 0 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,6 @@ else
ESBUILD += --define:DEBUG=false --define:RELOADER=false
endif

## Feature build flags
ifeq ($(type), dev)
ifeq ($(BROWSER_TYPE), chrome)
ESBUILD += --define:FIREBUTTON_ENABLED=true
else
ESBUILD += --define:FIREBUTTON_ENABLED=false
endif
else
ESBUILD += --define:FIREBUTTON_ENABLED=false
endif

$(BUILD_DIR)/public/js/background.js: $(WATCHED_FILES)
$(ESBUILD) shared/js/background/background.js > $@

Expand Down
3 changes: 3 additions & 0 deletions browsers/chrome-mv3/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
"webNavigation",
"cookies"
],
"optional_permissions": [
"browsingData"
],
"host_permissions": [
"*://*/*"
],
Expand Down
6 changes: 5 additions & 1 deletion browsers/chrome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@
"tabs",
"storage",
"<all_urls>",
"alarms"
"alarms",
"cookies"
],
"optional_permissions": [
"browsingData"
],
"web_accessible_resources": [
"/web_accessible_resources/*",
Expand Down
4 changes: 2 additions & 2 deletions integration-test/fire-button.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ test.describe('Fire Button', () => {
})
})

test.skip('getBurnOptions', async ({ context, backgroundPage }) => {
test('getBurnOptions', async ({ context, backgroundPage }) => {
await forExtensionLoaded(context)
const fireButton = await getFireButtonHandle(backgroundPage)
const pages = await openTabs(context)
Expand Down Expand Up @@ -198,7 +198,7 @@ test.describe('Fire Button', () => {
}
})

test.skip('burn', () => {
test.describe('burn', () => {
// Skip these tests on MV3.
// For these tests to work, we need to be able to successfully request the optional `browsingData`
// permission at runtime (`requestBrowsingDataPermissions`). When running these tests in Playwright,
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"@duckduckgo/content-scope-scripts": "github:duckduckgo/content-scope-scripts#4.24.0",
"@duckduckgo/ddg2dnr": "file:packages/ddg2dnr",
"@duckduckgo/jsbloom": "^1.0.2",
"@duckduckgo/privacy-dashboard": "github:duckduckgo/privacy-dashboard#1.6.0",
"@duckduckgo/privacy-dashboard": "github:duckduckgo/privacy-dashboard#1.6.1",
"@duckduckgo/privacy-grade": "file:packages/privacy-grade",
"@duckduckgo/privacy-reference-tests": "github:duckduckgo/privacy-reference-tests#main",
"@duckduckgo/tracker-surrogates": "github:duckduckgo/tracker-surrogates#1.2.5",
Expand Down
4 changes: 2 additions & 2 deletions shared/js/background/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* global DEBUG, RELOADER, BUILD_TARGET, FIREBUTTON_ENABLED */
/* global DEBUG, RELOADER, BUILD_TARGET */

import { onStartup } from './startup'
import FireButton from './features/fire-button'
Expand All @@ -40,7 +40,7 @@ settings.ready().then(() => {
*/
const features = {}

if (FIREBUTTON_ENABLED) {
if (BUILD_TARGET === 'chrome' || BUILD_TARGET === 'chrome-mv3') {
features.fireButton = new FireButton({ settings, tabManager })
}
console.log('Loaded features:', features)
Expand Down
4 changes: 2 additions & 2 deletions shared/js/background/features/fire-button.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global FIREBUTTON_ENABLED */
/* global BUILD_TARGET */
import browser from 'webextension-polyfill'
import { registerMessageHandler } from '../message-handlers'
import { getCurrentTab } from '../utils'
Expand All @@ -21,7 +21,7 @@ import { sendPixelRequest } from '../pixels'

const tldtsOptions = { allowPrivateDomains: true }

export const isFireButtonEnabled = FIREBUTTON_ENABLED
export const isFireButtonEnabled = BUILD_TARGET === 'chrome' || BUILD_TARGET === 'chrome-mv3'

export default class FireButton {
/**
Expand Down
4 changes: 2 additions & 2 deletions shared/js/ui/models/privacy-options.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global FIREBUTTON_ENABLED */
/* global BUILD_TARGET */
const Parent = window.DDG.base.Model

function PrivacyOptions (attrs) {
Expand Down Expand Up @@ -39,7 +39,7 @@ PrivacyOptions.prototype = window.$.extend({},
this.GPC = settings.GPC
this.youtubeClickToLoadEnabled = youtubeClickToLoadEnabled
this.youtubePreviewsEnabled = settings.youtubePreviewsEnabled
this.fireButtonEnabled = FIREBUTTON_ENABLED
this.fireButtonEnabled = BUILD_TARGET === 'chrome' || BUILD_TARGET === 'chrome-mv3'
this.fireButtonClearHistoryEnabled = settings.fireButtonClearHistoryEnabled
this.fireButtonTabClearEnabled = settings.fireButtonTabClearEnabled
}
Expand Down
203 changes: 114 additions & 89 deletions shared/locales/bg/options.json
Original file line number Diff line number Diff line change
@@ -1,91 +1,116 @@
{
"smartling" : {
"string_format" : "icu",
"translate_paths" : [
{
"path" : "*/title",
"key" : "{*}/title",
"instruction" : "*/note"
}]
},
"optionsHeader" : {
"title" : "Опции за DuckDuckGo",
"note" : "Header for options (settings) page"
},
"optionsSubHeader" : {
"title" : "Можете да търсите и да сърфирате в мрежата, без да Ви следят.",
"note" : "We allow the user to browse the web without being followed by trackers"
},
"optionsDesc" : {
"title" : "DuckDuckGo защитава поверителността на данните Ви онлайн с\nповерително търсене,\nблокиране на тракери\nи криптиране на сайтове.",
"note" : "This describes how we protect the user from being tracked online"
},
"shareFeedback" : {
"title" : "Споделяне на отзив",
"note" : "Click here to share your opinions about this product"
},
"reportBrokenSite" : {
"title" : "Подаване на сигнал за повреден сайт",
"note" : "Click here to report an issue with a specific site you are trying to use"
},
"showEmbeddedTweets" : {
"title" : "Показване на вградени туитове",
"note" : "Whether the user wants to see Tweets embedded in various webpages or should they be hidden util clicked on"
},
"globalPrivacyControlAbbr" : {
"title" : "Глобален контрол на поверителността (GPC)",
"note" : "Global Privacy Control is the name of the feature that lets users set a preference to not have their information sold"
},
"globalPrivacyControlDesc" : {
"title" : "Вашите лични данни не са за продажба. Ние в DuckDuckGo сме съгласни с това.\nАктивирайте настройката „Глобален контрол на поверителността“ (GPC) и ние ще\nуведомяваме уебсайтовете за Вашето предпочитание:",
"note" : "This describes the GPC feature, which lets the user set a preference to not have their personal information sold by websites to other parties. The string is followed by a list of actions like 'Not sell your personal data'. These are translated separately."
},
"notSellYourPersonalData" : {
"title" : "Да не продават Вашите лични данни.",
"note" : "Part of the GPC description, this communicates that the user would signal to not SELL their personal data"
},
"limitSharingOfPersonalData" : {
"title" : "Да ограничат споделянето на личните Ви данни с други компании.",
"note" : "Part of the GPC description, this communicates that the user would signal to not SHARE their personal data"
},
"globalPrivacyControlDisclaimer" : {
"title" : "<b>Тъй като Глобалният контрол на поверителността (GPC) е нов стандарт,\nповечето уебсайтове все още не го признават, но ние полагаме усилия\nстандартът да бъде приет по целия свят.</b> Въпреки това от уеб сайтовете се изисква да предприемат действия по даден сигнал\nдо степента, до която приложимото законодателство им налага това. ",
"note" : "Explains to the user that we can communiate their choice to the website, but the website needs to choose to support this signal"
},
"emailProtection" : {
"title" : "Защита на имейл",
"note" : "Email protection is a feature that lets the user pick private email addresses for different websites"
},
"autofillDisabled" : {
"title" : "Автоматичното попълване е деактивирано",
"note" : "When we don't automatically help populate email fields with a private address"
},
"autofillEnabled" : {
"title" : "Активирано е автоматично попълване за <strong class=\"js-userdata-container\">{userName}</strong>",
"note" : "When we do help populate email addresses for (your email address here)"
},
"noUnprotectedSitesAdded" : {
"title" : "Няма добавени незащитени сайтове",
"note" : "Currently there are no websites on the list of websites where our privacy protections are disabled"
},
"unprotectedSites" : {
"title" : "Незащитени сайтове",
"note" : "Header for the list of websites where our privacy protections are disabled"
},
"unprotectedSitesDesc" : {
"title" : "Към тези сайтове няма да бъде приложена защита на поверителността.",
"note" : "Describes that the user will not be protected by our privacy features when visiting these websites"
},
"addUnprotectedSite" : {
"title" : "Добавяне на незащитен сайт",
"note" : "Header for the user to add a site to the uprotected list"
},
"enterURL" : {
"title" : "Въведете URL адрес",
"note" : "Promopt to enter the website URL here"
},
"invalidURL" : {
"title" : "Невалиден URL адрес",
"note" : "The URL the user entered is not a valid website address"
"smartling": {
"string_format": "icu",
"translate_paths": [
{
"path": "*/title",
"key": "{*}/title",
"instruction": "*/note"
}
]
},
"optionsHeader": {
"title": "Опции за DuckDuckGo",
"note": "Header for options (settings) page"
},
"optionsSubHeader": {
"title": "Можете да търсите и да сърфирате в мрежата, без да Ви следят.",
"note": "We allow the user to browse the web without being followed by trackers"
},
"optionsDesc": {
"title": "DuckDuckGo защитава поверителността на данните Ви онлайн с\nповерително търсене,\nблокиране на тракери\nи криптиране на сайтове.",
"note": "This describes how we protect the user from being tracked online"
},
"shareFeedback": {
"title": "Споделяне на отзив",
"note": "Click here to share your opinions about this product"
},
"reportBrokenSite": {
"title": "Подаване на сигнал за повреден сайт",
"note": "Click here to report an issue with a specific site you are trying to use"
},
"showEmbeddedTweets": {
"title": "Показване на вградени туитове",
"note": "Whether the user wants to see Tweets embedded in various webpages or should they be hidden util clicked on"
},
"globalPrivacyControlAbbr": {
"title": "Глобален контрол на поверителността (GPC)",
"note": "Global Privacy Control is the name of the feature that lets users set a preference to not have their information sold"
},
"globalPrivacyControlDesc": {
"title": "Вашите лични данни не са за продажба. Ние в DuckDuckGo сме съгласни с това.\nАктивирайте настройката „Глобален контрол на поверителността“ (GPC) и ние ще\nуведомяваме уебсайтовете за Вашето предпочитание:",
"note": "This describes the GPC feature, which lets the user set a preference to not have their personal information sold by websites to other parties. The string is followed by a list of actions like 'Not sell your personal data'. These are translated separately."
},
"notSellYourPersonalData": {
"title": "Да не продават Вашите лични данни.",
"note": "Part of the GPC description, this communicates that the user would signal to not SELL their personal data"
},
"limitSharingOfPersonalData": {
"title": "Да ограничат споделянето на личните Ви данни с други компании.",
"note": "Part of the GPC description, this communicates that the user would signal to not SHARE their personal data"
},
"globalPrivacyControlDisclaimer": {
"title": "<b>Тъй като Глобалният контрол на поверителността (GPC) е нов стандарт,\nповечето уебсайтове все още не го признават, но ние полагаме усилия\nстандартът да бъде приет по целия свят.</b> Въпреки това от уеб сайтовете се изисква да предприемат действия по даден сигнал\nдо степента, до която приложимото законодателство им налага това. ",
"note": "Explains to the user that we can communiate their choice to the website, but the website needs to choose to support this signal"
},
"emailProtection": {
"title": "Защита на имейл",
"note": "Email protection is a feature that lets the user pick private email addresses for different websites"
},
"autofillDisabled": {
"title": "Автоматичното попълване е деактивирано",
"note": "When we don't automatically help populate email fields with a private address"
},
"autofillEnabled": {
"title": "Активирано е автоматично попълване за <strong class=\"js-userdata-container\">{userName}</strong>",
"note": "When we do help populate email addresses for (your email address here)"
},
"noUnprotectedSitesAdded": {
"title": "Няма добавени незащитени сайтове",
"note": "Currently there are no websites on the list of websites where our privacy protections are disabled"
},
"unprotectedSites": {
"title": "Незащитени сайтове",
"note": "Header for the list of websites where our privacy protections are disabled"
},
"unprotectedSitesDesc": {
"title": "Към тези сайтове няма да бъде приложена защита на поверителността.",
"note": "Describes that the user will not be protected by our privacy features when visiting these websites"
},
"addUnprotectedSite": {
"title": "Добавяне на незащитен сайт",
"note": "Header for the user to add a site to the uprotected list"
},
"enterURL": {
"title": "Въведете URL адрес",
"note": "Promopt to enter the website URL here"
},
"invalidURL": {
"title": "Невалиден URL адрес",
"note": "The URL the user entered is not a valid website address"
},
"fireButtonHeading": {
"title": "Fire Button",
"note": "Header for the settings for the Fire button feature. As per glossary, please do not translate Fire Button."
},
"fireButtonDesc": {
"title": "С Fire Button можете лесно да изчистите разделите, историята на сърфиране и данните. Можете да контролирате дали историята на сърфиране и данните да се изчистват, както и дали текущите раздели да се затварят.",
"note": "Describes the Fire button features. As per glossary, please do not translate Fire Button."
},
"fireButtonClearHistoryTitle": {
"title": "Изчистване на историята",
"note": "Title for option toggle"
},
"fireButtonClearHistoryDesc": {
"title": "Имайте предвид: Историята на сърфиране може да бъде изчистена само за определен период от време (напр. за „последния час“ или за „цялото време“), а не за всеки отделен сайт.",
"note": "Extra information about the clear history option toggle."
},
"fireButtonTabClosureTitle": {
"title": "Затваряне на разделите",
"note": "Title for option toggle. Close is a verb."
},
"burnPageTitle": {
"title": "Извършва се изгаряне...",
"note": "Title of the page opened after starting the data clearing process. Indicates to the user that we're in the process of clearing website data."
}
}
}
Loading

0 comments on commit 7e39d68

Please sign in to comment.