diff --git a/Configuration/BuildNumber.xcconfig b/Configuration/BuildNumber.xcconfig index 891529153c..a518b11358 100644 --- a/Configuration/BuildNumber.xcconfig +++ b/Configuration/BuildNumber.xcconfig @@ -1 +1 @@ -CURRENT_PROJECT_VERSION = 301 +CURRENT_PROJECT_VERSION = 302 diff --git a/DuckDuckGo/Common/Localizables/UserText.swift b/DuckDuckGo/Common/Localizables/UserText.swift index dc024a5a30..a296ce30cb 100644 --- a/DuckDuckGo/Common/Localizables/UserText.swift +++ b/DuckDuckGo/Common/Localizables/UserText.swift @@ -546,9 +546,12 @@ struct UserText { static let failedToOpenExternally = NSLocalizedString("open.externally.failed", value: "The app required to open that link can’t be found", comment: "’Link’ is link on a website, it couldn't be opened due to the required app not being found") // MARK: Permission + static let locationPermissionAuthorizationFormat = NSLocalizedString("permission.authorization.location", + value: "“%@“ website would like to use your current location.", + comment: "Popover asking for domain %@ to use location") static let devicePermissionAuthorizationFormat = NSLocalizedString("permission.authorization.format", value: "Allow “%@“ to use your %@?", - comment: "Popover asking for domain %@ to use camera/mic/location (%@)") + comment: "Popover asking for domain %@ to use camera/mic (%@)") static let popupWindowsPermissionAuthorizationFormat = NSLocalizedString("permission.authorization.popups.format", value: "Allow “%@“ to open PopUp Window?", comment: "Popover asking for domain %@ to open Popup Window") diff --git a/DuckDuckGo/Localizable.xcstrings b/DuckDuckGo/Localizable.xcstrings index d022c7d9f4..036a9bc8fc 100644 --- a/DuckDuckGo/Localizable.xcstrings +++ b/DuckDuckGo/Localizable.xcstrings @@ -43547,7 +43547,7 @@ } }, "permission.authorization.format" : { - "comment" : "Popover asking for domain %@ to use camera/mic/location (%@)", + "comment" : "Popover asking for domain %@ to use camera/mic (%@)", "extractionState" : "extracted_with_value", "localizations" : { "de" : { @@ -43606,6 +43606,18 @@ } } }, + "permission.authorization.location" : { + "comment" : "Popover asking for domain %@ to use location", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "“%@“ website would like to use your current location." + } + } + } + }, "permission.authorization.popups.format" : { "comment" : "Popover asking for domain %@ to open Popup Window", "extractionState" : "extracted_with_value", diff --git a/DuckDuckGo/Permissions/View/PermissionAuthorizationViewController.swift b/DuckDuckGo/Permissions/View/PermissionAuthorizationViewController.swift index aeef6142a5..a56e7d5914 100644 --- a/DuckDuckGo/Permissions/View/PermissionAuthorizationViewController.swift +++ b/DuckDuckGo/Permissions/View/PermissionAuthorizationViewController.swift @@ -93,7 +93,7 @@ final class PermissionAuthorizationViewController: NSViewController { else { return } switch query.permissions[0] { - case .camera, .microphone, .geolocation: + case .camera, .microphone: descriptionLabel.stringValue = String(format: UserText.devicePermissionAuthorizationFormat, query.domain, query.permissions.localizedDescription.lowercased()) @@ -108,6 +108,8 @@ final class PermissionAuthorizationViewController: NSViewController { descriptionLabel.stringValue = String(format: UserText.externalSchemePermissionAuthorizationFormat, query.domain, query.permissions.localizedDescription) + case .geolocation: + descriptionLabel.stringValue = String(format: UserText.locationPermissionAuthorizationFormat, query.domain) } alwaysAllowCheckbox.title = UserText.permissionAlwaysAllowOnDomainCheckbox domainNameLabel.stringValue = query.domain.isEmpty ? "" : "“" + query.domain + "”" diff --git a/DuckDuckGo/Sync/SyncDiagnosisHelper.swift b/DuckDuckGo/Sync/SyncDiagnosisHelper.swift index 091f5939e3..50be2b380a 100644 --- a/DuckDuckGo/Sync/SyncDiagnosisHelper.swift +++ b/DuckDuckGo/Sync/SyncDiagnosisHelper.swift @@ -21,6 +21,10 @@ import DDGSync import PixelKit struct SyncDiagnosisHelper { + private enum Const { + static let authStatePixelParamKey = "authState" + } + private let userDefaults = UserDefaults.standard private let syncService: DDGSyncing @@ -46,7 +50,11 @@ struct SyncDiagnosisHelper { // Nil value means sync was never on in the first place. So don't fire in this case. if syncManuallyDisabled == false, !syncWasDisabledUnexpectedlyPixelFired { - PixelKit.fire(DebugEvent(GeneralPixel.syncDebugWasDisabledUnexpectedly), frequency: .legacyDailyAndCount) + PixelKit.fire( + DebugEvent(GeneralPixel.syncDebugWasDisabledUnexpectedly), + frequency: .dailyAndCount, + withAdditionalParameters: [Const.authStatePixelParamKey : syncService.authState.rawValue] + ) syncWasDisabledUnexpectedlyPixelFired = true } } else {