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

Commit

Permalink
Fix #2829: Update Rewards Copy (#2835)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylehickinson authored Aug 25, 2020
1 parent 368ff58 commit 2f2c149
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 46 deletions.
4 changes: 3 additions & 1 deletion BraveRewardsUI/Common/BATUSDPairView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ class BATUSDPairView: UIStackView {
usdConfig: (UILabel) -> Void) {
self.batContainer = CurrencyContainerView(amountLabelConfig: batAmountConfig,
kindLabelConfig: batKindConfig)
self.usdContainer = CurrencyContainerView(uniformLabelConfig: usdConfig)
self.usdContainer = CurrencyContainerView(uniformLabelConfig: usdConfig).then {
$0.isHidden = true
}

super.init(frame: .zero)

Expand Down
20 changes: 10 additions & 10 deletions BraveRewardsUI/Localized Strings/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ internal extension Strings {
static let rewardsOptInLearnMore = NSLocalizedString("RewardsOptInLearnMore", bundle: .rewardsUI, value: "Learn More", comment: "")
static var settingsAdsBody: String {
if Preferences.Rewards.isUsingBAP.value == true {
return NSLocalizedString("BraveRewardsSettingsAdsBodyJapan", bundle: .rewardsUI, value: "Earn points by viewing ads in Brave. Ads presented are based on your interests, as inferred from your browsing behavior. No personal data or browsing history ever leaves your browser.", comment: "")
return NSLocalizedString("BraveRewardsSettingsAdsBodyJapan", bundle: .rewardsUI, value: "Turn on Brave Ads and start earning points that you can use to support your favorite creators! Small, privacy preserving ads will appear at the top of the browser as you browse.", comment: "")
}
return NSLocalizedString("BraveRewardsSettingsAdsBody", bundle: .rewardsUI, value: "Earn tokens by viewing ads in Brave. Ads presented are based on your interests, as inferred from your browsing behavior. No personal data or browsing history ever leaves your browser.", comment: "")
return NSLocalizedString("BraveRewardsSettingsAdsBody", bundle: .rewardsUI, value: "Turn on Brave Ads and start earning tokens that you can use to support your favorite creators! Small, privacy preserving ads will appear at the top of the browser as you browse.", comment: "")
}
static var walletHeaderGrants: String {
if Preferences.Rewards.isUsingBAP.value == true {
Expand Down Expand Up @@ -89,7 +89,7 @@ internal extension Strings {
static let notificationRecurringTipTitle = NSLocalizedString("BraveRewardsNotificationRecurringTipTitle", bundle: .rewardsUI, value: "Recurring tips", comment: "")
static let emptyWalletTitle = NSLocalizedString("BraveRewardsEmptyWalletTitle", bundle: .rewardsUI, value: "Your wallet is ready for action.", comment: "")
static let recurringTipTitle = NSLocalizedString("BraveRewardsRecurringTipTitle", bundle: .rewardsUI, value: "Recurring tip", comment: "")
static let unverifiedPublisherDisclaimer = NSLocalizedString("BraveRewardsUnverifiedPublisherDisclaimer", bundle: .rewardsUI, value: "This creator has not yet signed up to receive contributions from Brave users. Any tips you send will remain in your wallet until they verify.", comment: "")
static let unverifiedPublisherDisclaimer = NSLocalizedString("BraveRewardsUnverifiedPublisherDisclaimer", bundle: .rewardsUI, value: "This creator has not yet signed up to receive tokens from Brave users. Any tokens you send will remain in your wallet until they verify.", comment: "")
static let connectedPublisherDisclaimer = NSLocalizedString("BraveRewardsConnectedPublisherDisclaimer", bundle: .rewardsUI, value: "This Brave Verified Creator has not yet configured their account to receive contributions from Brave Users. Any tips you send will remain in your wallet until they complete this process.", comment: "")
static let settingsGrantClaimButtonTitle = NSLocalizedString("BraveRewardsSettingsGrantClaimButtonTitle", bundle: .rewardsUI, value: "Claim", comment: "")
static let autoContributeMinimumLength = NSLocalizedString("BraveRewardsAutoContributeMinimumLength", bundle: .rewardsUI, value: "Minimum Page Time", comment: "")
Expand Down Expand Up @@ -158,7 +158,7 @@ internal extension Strings {
static let disabledTitle = NSLocalizedString("BraveRewardsDisabledTitle", bundle: .rewardsUI, value: "Welcome Back!", comment: "")
static let learnMoreCreateWallet1 = NSLocalizedString("BraveRewardsLearnMoreCreateWallet1", bundle: .rewardsUI, value: "Yes, I'm In!", comment: "")
static let learnMoreBraveAdsTitle = NSLocalizedString("BraveRewardsLearnMoreBraveAdsTitle", bundle: .rewardsUI, value: "Ads", comment: "")
static let tippingUnverifiedDisclaimer = NSLocalizedString("BraveRewardsTippingUnverifiedDisclaimer", bundle: .rewardsUI, value: "NOTE: This creator has not yet signed up to receive contributions from Brave users. Your browser will keep trying to contribute until they verify, or until 90 days have passed.", comment: "")
static let tippingUnverifiedDisclaimer = NSLocalizedString("BraveRewardsTippingUnverifiedDisclaimer", bundle: .rewardsUI, value: "NOTE: This creator has not yet signed up to receive tokens from Brave users. Your browser will keep trying to contribute until they verify, or until 90 days have passed.", comment: "")
static let tippingNotConnectedDisclaimer = NSLocalizedString("BraveRewardsTippingNotConnectedDisclaimer", bundle: .rewardsUI, value: "NOTE: This Brave Verified Creator has not yet signed up to receive contributions from Brave users. Your browser will keep trying to contribute until they verify, or until 90 days have passed.", comment: "")
static let settingsTipsBody = NSLocalizedString("BraveRewardsSettingsTipsBody", bundle: .rewardsUI, value: "Tip content creators directly as you browse by using the Rewards Panel.", comment: "")
static let settingsMonthlyTipsBody = NSLocalizedString("BraveRewardsSettingsMonthlyTipsBody", bundle: .rewardsUI, value: "Set up recurring monthly contributions so you can support sites continuously.", comment: "")
Expand All @@ -173,16 +173,16 @@ internal extension Strings {
static let privacyPolicyURL = NSLocalizedString("PrivacyPolicyURL", bundle: .rewardsUI, value: "Privacy Policy", comment: "")
static let addFundsTokenWalletAddress = NSLocalizedString("BraveRewardsAddFundsTokenWalletAddress", bundle: .rewardsUI, value: "Wallet Address", comment: "")
static let autoContributeToVideos = NSLocalizedString("BraveRewardsAutoContributeToVideos", bundle: .rewardsUI, value: "Allow contribution to videos", comment: "")
static let settingsDisabledBody2 = NSLocalizedString("BraveRewardsSettingsDisabledBody2", bundle: .rewardsUI, value: "One where your time is valued, your personal data is kept private, and you actually get paid for your attention.", comment: "")
static let settingsDisabledBody2 = NSLocalizedString("BraveRewardsSettingsDisabledBody2", bundle: .rewardsUI, value: "One where your time is valued, your personal data is kept private, and you can feel good about supporting content creators.", comment: "")
static let contributingToUnverifiedSites = NSLocalizedString("BraveRewardsContributingToUnverifiedSites", bundle: .rewardsUI, value: "You've designated %@ for creators who haven't yet signed up to recieve contributions. Your browser will keep trying to contribute until they verify, or until 90 days have passed.", comment: "")
static let settingsDisabledBody1 = NSLocalizedString("BraveRewardsSettingsDisabledBody1", bundle: .rewardsUI, value: "With your old browser, you paid to browse the web by viewing ads with your valuable attention. You spent your valuable time downloading invasive ad technology that transmitted your valuable private data to advertisers — without your consent.", comment: "")
static let settingsDisabledBody1 = NSLocalizedString("BraveRewardsSettingsDisabledBody1", bundle: .rewardsUI, value: "Because creators need your support and Brave makes it completely free. Now you can collect tokens while you browse and contribute them back to the creators you love.", comment: "")
static let panelTitle = NSLocalizedString("BraveRewardsPanelTitle", bundle: .rewardsUI, value: "Rewards", comment: "")
static let creatingWallet = NSLocalizedString("BraveRewardsCreatingWallet", bundle: .rewardsUI, value: "Creating wallet", comment: "")
static var rewardsOptInDescription: String {
if Preferences.Rewards.isUsingBAP.value == true {
return NSLocalizedString("RewardsOptInDescriptionJapan", bundle: .rewardsUI, value: "You can now earn points for watching privacy-respecting ads.", comment: "")
return NSLocalizedString("RewardsOptInDescriptionJapan", bundle: .rewardsUI, value: "Earn points and reward creators for great content while you browse", comment: "")
}
return NSLocalizedString("RewardsOptInDescription", bundle: .rewardsUI, value: "You can now earn tokens for watching privacy-respecting ads.", comment: "")
return NSLocalizedString("RewardsOptInDescription", bundle: .rewardsUI, value: "Earn tokens and reward creators for great content while you browse", comment: "")
}
static var walletHeaderTitle: String {
if Preferences.Rewards.isUsingBAP.value == true {
Expand Down Expand Up @@ -215,7 +215,7 @@ internal extension Strings {
static let remove = NSLocalizedString("BraveRewardsRemove", bundle: .rewardsUI, value: "Remove", comment: "")
static let learnMoreWhyBody = NSLocalizedString("BraveRewardsLearnMoreWhyBody", bundle: .rewardsUI, value: "With your old browser, you paid to browse the web by viewing ads with your valuable attention. You spent your valuable time downloading invasive ad technology that transmitted your valuable private data to advertisers — without your consent.\n\nToday, Brave welcomes you to the new Internet. One where your time is valued, your personal data is kept private, and you actually get paid for your attention.", comment: "")
static let disabledEnableButton = NSLocalizedString("BraveRewardsDisabledEnableButton", bundle: .rewardsUI, value: "Enable Brave Rewards", comment: "")
static let tippingOverviewBody = NSLocalizedString("BraveRewardsTippingOverviewBody", bundle: .rewardsUI, value: "You can support this content creator by sending a tip. It’s a way of thanking them for making great content. Verified creators get paid for their tips during the first week of each calendar month.\n\nIf you like, you can schedule monthly tips to support this creator on a continuous basis.", comment: "")
static let tippingOverviewBody = NSLocalizedString("BraveRewardsTippingOverviewBody", bundle: .rewardsUI, value: "You can support this content creator by sending them a few tokens. It’s a way of thanking them for making great content. Verified creators receive their tokens during the first week of each calendar month.\n\nIf you like, you can schedule a monthly contribution to support this creator on an ongoing basis.", comment: "")
static let tippingSendTip = NSLocalizedString("BraveRewardsTippingSendTip", bundle: .rewardsUI, value: "Send my Tip", comment: "")
static let tippingSendMonthlyTip = NSLocalizedString("BraveRewardsTippingSendMonthlyTip", bundle: .rewardsUI, value: "Set monthly tip", comment: "")
static let noActivitiesYet = NSLocalizedString("BraveRewardsNoActivitiesYet", bundle: .rewardsUI, value: "No activities yet…", comment: "")
Expand Down Expand Up @@ -264,7 +264,7 @@ internal extension Strings {
static let notificationContributeNotificationError = NSLocalizedString("NotificationContributeNotificationError", bundle: .rewardsUI, value: "There was a problem processing your contribution.", comment: "We show this string in notification when contribution fails")
static let notificationPendingNotEnoughFunds = NSLocalizedString("NotificationPendingNotEnoughFunds", bundle: .rewardsUI, value: "You have pending tips due to insufficient funds", comment: "Notification text that tells user his wallet is under funded for pending contribution to complete")
static let notificationInsufficientFunds = NSLocalizedString("NotificationinsufficientFunds", bundle: .rewardsUI, value: "Your Brave Rewards account is waiting for a deposit.", comment: "Description for new insufficient funds notification")
static let notificationEarningsClaimDefault = NSLocalizedString("NotificationEarningsClaimDefault", bundle: .rewardsUI, value: "Your rewards from Ads are here!", comment: "Panel notification text for Ads grant")
static let notificationEarningsClaimDefault = NSLocalizedString("NotificationEarningsClaimDefault", bundle: .rewardsUI, value: "New tokens are ready to claim.", comment: "Panel notification text for Ads grant")
static let notificationGrantNotification = NSLocalizedString("NotificationGrantNotification", bundle: .rewardsUI, value: "You have a grant waiting for you.", comment: "Description for new grant notification")
static let notificationErrorTitle = NSLocalizedString("NotificationErrorTitle", bundle: .rewardsUI, value: "Uh oh!", comment: "Title for an error notification")
static let noNetworkTitle = NSLocalizedString("NoNetworkTitle", bundle: .rewardsUI, value: "Uh oh!", comment: "Title for a no network notification")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ extension PendingContributionDetailController: UITableViewDataSource {
cell.label.text = Strings.pendingContributionAmount
let value = BATValue(contribution.amount)
var amountString = "\(value.displayString) \(Strings.BAT)"
if let usdValue = state.ledger.dollarStringForBATAmount(value.doubleValue) {
amountString.append(" (\(usdValue))")
}
cell.accessoryLabel?.text = amountString
case .pendingUntil:
cell.label.text = Strings.pendingContributionPendingUntil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,8 @@ extension AutoContributeDetailViewController: UITableViewDataSource, UITableView
case .monthlyPayment:
cell.label.text = Strings.autoContributeMonthlyPayment
cell.accessoryType = .disclosureIndicator
if let dollarAmount = state.ledger.dollarStringForBATAmount(state.ledger.contributionAmount) {
let amount = "\(state.ledger.contributionAmount) \(Strings.BAT) (\(dollarAmount))"
cell.accessoryLabel?.text = String(format: Strings.settingsAutoContributeUpToValue, amount)
}
let amount = "\(state.ledger.contributionAmount) \(Strings.BAT)"
cell.accessoryLabel?.text = String(format: Strings.settingsAutoContributeUpToValue, amount)
cell.selectionStyle = .default
case .nextContribution:
cell.label.text = Strings.autoContributeNextDate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class TipsSummaryTableCell: UITableViewCell, TableViewReusable {
$0.font = .systemFont(ofSize: 13.0)
}).then {
$0.kindLabel.text = "USD"
$0.isHidden = true
}

let totalTipsThisMonthLabel = UILabel().then {
Expand Down
1 change: 1 addition & 0 deletions BraveRewardsUI/Tipping/TippingOptionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class TippingOptionView: UIControl {
$0.appearanceTextColor = UX.unselectedDollarTextColor
$0.font = .systemFont(ofSize: 12.0)
$0.textAlignment = .center
$0.isHidden = true
}

override init(frame: CGRect) {
Expand Down
7 changes: 0 additions & 7 deletions BraveRewardsUI/Tipping/TippingSelectionViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ class BATValueOptionsSelectionViewController: OptionsSelectionViewController<BAT
if !isSelectionPrecise {
displayString = String.localizedStringWithFormat(Strings.settingsAutoContributeUpToValue, displayString)
}
let dollarAmount = ledger?.dollarStringForBATAmount(options[indexPath.row].doubleValue) ?? ""

let attributedText = NSMutableAttributedString(string: displayString, attributes: [
.foregroundColor: Colors.grey800,
.font: UIFont.systemFont(ofSize: 14.0, weight: .medium)
Expand All @@ -48,11 +46,6 @@ class BATValueOptionsSelectionViewController: OptionsSelectionViewController<BAT
.font: UIFont.systemFont(ofSize: 12.0)
]))

attributedText.append(NSAttributedString(string: " (\(dollarAmount))", attributes: [
.foregroundColor: Colors.grey700,
.font: UIFont.systemFont(ofSize: 10.0)
]))

cell.textLabel?.attributedText = attributedText
return cell
}
Expand Down
1 change: 1 addition & 0 deletions BraveRewardsUI/Wallet/WalletHeaderView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class WalletHeaderView: UIView {
$0.textAlignment = .center
$0.appearanceTextColor = UIColor(white: 1.0, alpha: 0.65)
$0.font = .systemFont(ofSize: 12.0)
$0.isHidden = true
}

let grantsButton = ActionButton(type: .system).then {
Expand Down
Loading

0 comments on commit 2f2c149

Please sign in to comment.