Skip to content

Commit

Permalink
Merge pull request #114 from Automattic/fix/101_profile_page_plus_copy
Browse files Browse the repository at this point in the history
Updates Locked Plus section info label text in Profile screen
  • Loading branch information
yaelirub authored Jul 29, 2022
2 parents d0f5f5c + caa868d commit 9a42642
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
20 changes: 17 additions & 3 deletions podcasts/PlusLockedInfoView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ protocol PlusLockedInfoDelegate: AnyObject {
}

class PlusLockedInfoView: ThemeableView {
weak var delegate: PlusLockedInfoDelegate?
weak var delegate: PlusLockedInfoDelegate? {
didSet {
setInfoLabelText()
}
}

@IBOutlet var contentView: ThemeableView! {
didSet {
contentView.style = .primaryUi01
Expand All @@ -23,7 +28,7 @@ class PlusLockedInfoView: ThemeableView {
@IBOutlet var infoLabel: ThemeableLabel! {
didSet {
infoLabel.style = .primaryText02
infoLabel.text = L10n.plusPromoParagraph
setInfoLabelText()
}
}

Expand All @@ -37,7 +42,7 @@ class PlusLockedInfoView: ThemeableView {
@IBOutlet var learnMoreButton: ThemeableUIButton! {
didSet {
learnMoreButton.style = .primaryInteractive01
learnMoreButton.setTitle(L10n.learnMore, for: .normal)
learnMoreButton.setTitle(L10n.plusMarketingLearnMoreButton, for: .normal)
}
}

Expand Down Expand Up @@ -75,4 +80,13 @@ class PlusLockedInfoView: ThemeableView {
let source: PlusUpgradeViewSource = delegate?.displaySource ?? .unknown
NavigationManager.sharedManager.showUpsellView(from: displayingVC, source: source)
}

private func setInfoLabelText() {
switch delegate?.displaySource {
case .profile:
infoLabel.text = L10n.profileHelpSupport
default:
infoLabel.text = L10n.plusPromoParagraph
}
}
}
2 changes: 2 additions & 0 deletions podcasts/Strings+Generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1550,6 +1550,8 @@ internal enum L10n {
internal static var preview: String { return L10n.tr("Localizable", "preview") }
/// Profile
internal static var profile: String { return L10n.tr("Localizable", "profile") }
/// Help support Pocket Casts by upgrading your account
internal static var profileHelpSupport: String { return L10n.tr("Localizable", "profile_help_support") }
/// App last refreshed %1$@
internal static func profileLastAppRefresh(_ p1: Any) -> String {
return L10n.tr("Localizable", "profile_last_app_refresh", String(describing: p1))
Expand Down
Binary file modified podcasts/en.lproj/Localizable.strings
Binary file not shown.

0 comments on commit 9a42642

Please sign in to comment.