Skip to content

Commit

Permalink
Only card brand can be changed label (#4336)
Browse files Browse the repository at this point in the history
## Summary
<!-- Simple summary of what was changed. -->
Added conditionally rendered footnote label for cobranded choice card
## Motivation
<!-- Why are you making this change? If it's for fixing a bug, if
possible, please include a code snippet or example project that
demonstrates the issue. -->

## Testing
<!-- How was the code tested? Be as specific as possible. -->

## Changelog
<!-- Is this a notable change that affects users? If so, add a line to
`CHANGELOG.md` and prefix the line with one of the following:
    - [Added] for new features.
    - [Changed] for changes in existing functionality.
    - [Deprecated] for soon-to-be removed features.
    - [Removed] for now removed features.
    - [Fixed] for any bug fixes.
    - [Security] in case of vulnerabilities.
-->
  • Loading branch information
joyceqin-stripe authored Dec 9, 2024
1 parent 6a12711 commit 060909e
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ re-entering the security code (CVV/CVC). */
/* Text of a label for confirming an email address. E.g., 'Not [email protected]?' */
"Not %@?" = "Not %@?";

/* Text on a screen for updating a cobranded card that indicates only card brand can be changed. */
"Only card brand can be changed." = "Only card brand can be changed.";

/* Countdown timer text on a screen asking the user to approve a payment */
"Open your UPI app to approve your payment within %@" = "Open your UPI app to approve your payment within %@";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ extension String.Localized {
)
}

static var only_card_brand_can_be_changed: String {
STPLocalizedString(
"Only card brand can be changed.",
"Text on a screen for updating a cobranded card that indicates only card brand can be changed."
)
}

static var save: String {
STPLocalizedString(
"Save",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ final class UpdatePaymentMethodViewController: UIViewController {
}()

private lazy var footnoteLabel: UITextView? = {
if viewModel.canEdit || viewModel.errorState {
if viewModel.errorState {
return nil
}
let label = ElementsUI.makeSmallFootnote(theme: viewModel.appearance.asElementsTheme)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class UpdatePaymentMethodViewModel {
lazy var footnote: String = {
switch paymentMethod.type {
case .card:
return .Localized.card_details_cannot_be_changed
return canEdit ? .Localized.only_card_brand_can_be_changed : .Localized.card_details_cannot_be_changed
case .USBankAccount:
return .Localized.bank_account_details_cannot_be_changed
case .SEPADebit:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...ControllerSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...ewControllerSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...wControllerSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 060909e

Please sign in to comment.