Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fix #8431: Copy mistake in confirmation message after resetting VPN c…
Browse files Browse the repository at this point in the history
…onfig (#8443)
  • Loading branch information
soner-yuksel authored and iccub committed Nov 20, 2023
1 parent 97e2bb9 commit eb998ea
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
18 changes: 14 additions & 4 deletions Sources/BraveStrings/BraveStrings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2745,6 +2745,11 @@ extension Strings {
value: "Manage Subscription",
comment: "Button to manage your VPN subscription")

public static let settingsRedeemOfferCode =
NSLocalizedString("vpn.settingsRedeemOfferCode", tableName: "BraveShared", bundle: .module,
value: "Redeem Offer Code",
comment: "Button to redeem offer code subscription")

public static let settingsLinkReceipt =
NSLocalizedString("vpn.settingsLinkReceipt", tableName: "BraveShared", bundle: .module,
value: "Link purchase to your Brave account",
Expand Down Expand Up @@ -2977,22 +2982,27 @@ extension Strings {

public static let resetVPNErrorTitle =
NSLocalizedString("vpn.resetVPNErrorTitle", tableName: "BraveShared", bundle: .module,
value: "Error",
value: "Reset Failed",
comment: "Title for error message when vpn configuration reset fails.")

public static let resetVPNErrorBody =
NSLocalizedString("vpn.resetVPNErrorBody", tableName: "BraveShared", bundle: .module,
value: "Failed to reset vpn configuration, please try again later.",
value: "Unable to reset VPN configuration. Please try again. If the issue persists, contact support for assistance.",
comment: "Message to show when vpn configuration reset fails.")

public static let resetVPNErrorButtonActionTitle =
NSLocalizedString("vpn.resetVPNErrorButtonActionTitle", tableName: "BraveShared", bundle: .module,
value: "Try Again",
comment: "Title of button to try again when vpn configuration reset fails.")

public static let resetVPNSuccessTitle =
NSLocalizedString("vpn.resetVPNSuccessTitle", tableName: "BraveShared", bundle: .module,
value: "Success",
value: "Reset Successful",
comment: "Title for success message when vpn configuration reset succeeds.")

public static let resetVPNSuccessBody =
NSLocalizedString("vpn.resetVPNSuccessBody", tableName: "BraveShared", bundle: .module,
value: "VPN Configuration is resetted successfully.",
value: "VPN configuration has been reset successfully.",
comment: "Message to show when vpn configuration reset succeeds.")

public static let contactFormDoNotEditText =
Expand Down
13 changes: 11 additions & 2 deletions Sources/BraveVPN/BraveVPNSettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,17 @@ public class BraveVPNSettingsViewController: TableViewController {
message: success ? Strings.VPN.resetVPNSuccessBody : Strings.VPN.resetVPNErrorBody,
preferredStyle: .alert)

let okAction = UIAlertAction(title: Strings.OKString, style: .default)
alert.addAction(okAction)
if success {
let okAction = UIAlertAction(title: Strings.OKString, style: .default)
alert.addAction(okAction)
} else {
alert.addAction(UIAlertAction(title: Strings.close, style: .cancel, handler: nil))
alert.addAction(UIAlertAction(
title: Strings.VPN.resetVPNErrorButtonActionTitle, style: .default,
handler: { [weak self] _ in
self?.resetConfigurationTapped()
}))
}

present(alert, animated: true)
}
Expand Down

0 comments on commit eb998ea

Please sign in to comment.