Skip to content

Commit

Permalink
Rolls back some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoreymendez committed Dec 20, 2024
1 parent 3eae753 commit b57333e
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 12 deletions.
4 changes: 0 additions & 4 deletions DuckDuckGo/UserText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -701,11 +701,7 @@ public struct UserText {

// MARK: - VPN Control Widget

public static let vpnControlWidgetEnableVPNIntentTitle = NSLocalizedString("vpn.control-widget.enable.vpn.intent.title", value: "Enable DuckDuckGo VPN", comment: "Title for the intent to enable the DuckDuckGo VPN")
public static let vpnControlWidgetEnableVPNIntentDescription = NSLocalizedString("vpn.control-widget.enable.vpn.intent.description", value: "Enable DuckDuckGo VPN", comment: "Description for the intent to enable the DuckDuckGo VPN")
public static let vpnControlWidgetEnableVPNIntentSuccess = NSLocalizedString("vpn.control-widget.enable.vpn.intent.success", value: "DuckDuckGo VPN is connected", comment: "Message for success when running the intent to enable the DuckDuckGo VPN")
public static let vpnControlWidgetDisableVPNIntentTitle = NSLocalizedString("vpn.control-widget.disable.vpn.intent.title", value: "Disable DuckDuckGo VPN", comment: "Title for the intent to disable the DuckDuckGo VPN")
public static let vpnControlWidgetDisableVPNIntentDescription = NSLocalizedString("vpn.control-widget.disable.vpn.intent.description", value: "Disable DuckDuckGo VPN", comment: "Description for the intent to disable the DuckDuckGo VPN")
public static let vpnControlWidgetDisableVPNIntentSuccess = NSLocalizedString("vpn.control-widget.disable.vpn.intent.success", value: "DuckDuckGo VPN is connected", comment: "Message for success when running the intent to enable the DuckDuckGo VPN")

// MARK: - VPN Control Widget Education View
Expand Down
8 changes: 4 additions & 4 deletions DuckDuckGo/VPNShortcutIntents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ struct DisableVPNIntent: AppIntent {
case cancelled
}

static let title = LocalizedStringResource(stringLiteral: UserText.vpnControlWidgetDisableVPNIntentTitle)
static let description = LocalizedStringResource(stringLiteral: UserText.vpnControlWidgetDisableVPNIntentDescription)
static let title: LocalizedStringResource = "Disable DuckDuckGo VPN"
static let description: LocalizedStringResource = "Disable DuckDuckGo VPN"
static let openAppWhenRun: Bool = false
static let isDiscoverable: Bool = true
static var authenticationPolicy: IntentAuthenticationPolicy = .requiresAuthentication
Expand Down Expand Up @@ -76,8 +76,8 @@ struct DisableVPNIntent: AppIntent {
///
@available(iOS 17.0, *)
struct EnableVPNIntent: ForegroundContinuableIntent {
static let title = LocalizedStringResource(stringLiteral: UserText.vpnControlWidgetEnableVPNIntentTitle)
static let description = LocalizedStringResource(stringLiteral: UserText.vpnControlWidgetEnableVPNIntentTitle)
static let title: LocalizedStringResource = "Enable DuckDuckGo VPN"
static let description: LocalizedStringResource = "Enable DuckDuckGo VPN"
static let openAppWhenRun: Bool = false
static let isDiscoverable: Bool = true
static var authenticationPolicy: IntentAuthenticationPolicy = .alwaysAllowed
Expand Down
33 changes: 33 additions & 0 deletions DuckDuckGo/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -2863,6 +2863,39 @@ But if you *do* want a peek under the hood, you can find more information about
/* Title for the VPN widget onboarding screen */
"vpn.addWidget.settings.title" = "Find and select **DuckDuckGo**, then swipe to **VPN** and select **Add Widget**";

/* Description for the intent to disable the DuckDuckGo VPN */
"vpn.control-widget.disable.vpn.intent.description" = "Disable DuckDuckGo VPN";

/* Message for success when running the intent to enable the DuckDuckGo VPN */
"vpn.control-widget.disable.vpn.intent.success" = "DuckDuckGo VPN is connected";

/* Title for the intent to disable the DuckDuckGo VPN */
"vpn.control-widget.disable.vpn.intent.title" = "Disable DuckDuckGo VPN";

/* No comment provided by engineer. */
"vpn.control-widget.education.screen.description" = "Siri Shortcuts let you connect to your VPN with a quick voice command, like “Siri, turn on DuckDuckGo VPN”. It’s a fast, hands-free way to use your VPN.";

/* Siri commands education screen: example 1 */
"vpn.control-widget.education.screen.example1" = "Siri, start DuckDuckGo VPN.";

/* Siri commands education screen: example 2 */
"vpn.control-widget.education.screen.example2" = "Siri, enable DuckDuckGo VPN.";

/* Siri commands education screen: example 3 */
"vpn.control-widget.education.screen.example3" = "Siri, protect my device with DuckDuckGo.";

/* Title for the VPN Control Widget education screen title */
"vpn.control-widget.education.screen.title" = "Control DuckDuckGo VPN with Siri!";

/* Description for the intent to enable the DuckDuckGo VPN */
"vpn.control-widget.enable.vpn.intent.description" = "Enable DuckDuckGo VPN";

/* Message for success when running the intent to enable the DuckDuckGo VPN */
"vpn.control-widget.enable.vpn.intent.success" = "DuckDuckGo VPN is connected";

/* Title for the intent to enable the DuckDuckGo VPN */
"vpn.control-widget.enable.vpn.intent.title" = "Enable DuckDuckGo VPN";

/* Title for the Cancel button of the VPN feedback form */
"vpn.feedback-form.button.cancel" = "Cancel";

Expand Down
4 changes: 2 additions & 2 deletions Widgets/ControlWidgetVPNIntents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ struct ControlWidgetToggleVPNIntent: SetValueIntent {
}
}

static let title = LocalizedStringResource(stringLiteral: UserText.vpnControlWidgetToggleIntentTitle)
static let description = LocalizedStringResource(stringLiteral: UserText.vpnControlWidgetToggleIntentDescription)
static let title: LocalizedStringResource = "Toggle DuckDuckGo VPN from the Control Center Widget"
static let description: LocalizedStringResource = "Toggles the DuckDuckGo VPN from the Control Center widget"
static let isDiscoverable = false

@Parameter(title: "Enabled")
Expand Down
2 changes: 0 additions & 2 deletions Widgets/UserTextShared.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,4 @@ import Foundation

extension UserText {
static let vpnNeedsToBeEnabledFromApp = NSLocalizedString("intent.vpn.needs.to.be.enabled.from.app", value: "You need to enable the VPN from the DuckDuckGo App.", comment: "Message that comes up when trying to enable the VPN from intents, asking the user to enable it from the app so it's configured")
static let vpnControlWidgetToggleIntentTitle = NSLocalizedString("intent.vpn.control.widget.toggle.intent.title", value: "Toggle DuckDuckGo VPN from the Control Center Widget", comment: "Title for the control widget toggle intent")
static let vpnControlWidgetToggleIntentDescription = NSLocalizedString("intent.vpn.control.widget.toggle.intent.description", value: "Toggles the DuckDuckGo VPN from the Control Center widget", comment: "Description for the control widget toggle intent")
}

0 comments on commit b57333e

Please sign in to comment.