-
Notifications
You must be signed in to change notification settings - Fork 995
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Header text says manage cards instead of manage payment methods when only cards available #4449
Conversation
Manage cards If it's okay for these strings to be unlocalized in master (e.g. this is for an unshipped feature), add the label New strings are localized on a weekly basis and are downloaded as part of the release process. For more details on how to localize a string, you can refer to this link. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why it's ok to skip translations here? As far as I can tell this will be immediately visible, resulting in un-localized portions of our UI, which would be a regression. We probably need to wait for translations to come in until we ship this.
I forgot this wasn't specifically for the default sync project, my bad |
@@ -70,12 +70,15 @@ class VerticalSavedPaymentMethodsViewController: UIViewController { | |||
} | |||
|
|||
private var headerText: String { | |||
let nonCardPaymentMethods = paymentMethods.filter({ $0.type != .card }) | |||
let onlyCards = nonCardPaymentMethods.isEmpty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I typically like to name booleans in a way that answers a yes or no question.. e.g.(is...
, has...
, etc) -- e.g. hasOnlyCards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense, renamed it to hasOnlyCards
let nonCardPaymentMethods = paymentMethods.filter({ $0.type != .card }) | ||
let hasOnlyCards = nonCardPaymentMethods.isEmpty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Could be let hasOnlyCards = paymentMethods.filter({ $0.type != .card }).isEmpty
Summary
In vertical mode, when the only saved payment methods are cards, in edit mode, it now says "Manage cards" instead of "Manage payment methods" since in non-edit mode it says "Select card" instead of "Select payment method"
Motivation
MOBILESDK-2890
Testing
Changelog