Skip to content

Commit

Permalink
Merge branch 'release/1.113.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
jotaemepereira committed Nov 8, 2024
2 parents 24104ed + df87809 commit b1cd4da
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Configuration/BuildNumber.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CURRENT_PROJECT_VERSION = 301
CURRENT_PROJECT_VERSION = 302
5 changes: 4 additions & 1 deletion DuckDuckGo/Common/Localizables/UserText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
14 changes: 13 additions & 1 deletion DuckDuckGo/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -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" : {
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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 + ""
Expand Down
10 changes: 9 additions & 1 deletion DuckDuckGo/Sync/SyncDiagnosisHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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]

Check failure on line 56 in DuckDuckGo/Sync/SyncDiagnosisHelper.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Colons should be next to the identifier when specifying a type and next to the key in dictionary literals (colon)
)
syncWasDisabledUnexpectedlyPixelFired = true
}
} else {
Expand Down

0 comments on commit b1cd4da

Please sign in to comment.