Skip to content
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

Merged
merged 6 commits into from
Jan 14, 2025

Conversation

joyceqin-stripe
Copy link
Collaborator

@joyceqin-stripe joyceqin-stripe commented Jan 9, 2025

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

Copy link

github-actions bot commented Jan 9, 2025

⚠️ Missing Translations
The following strings have been uploaded to Lokalise but are not yet translated.

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 ship without translations to acknowledge that there are missing translations. Otherwise, wait until translations are available in Lokalise and re-run this job.

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.

Copy link
Collaborator

@porter-stripe porter-stripe left a 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.

@joyceqin-stripe
Copy link
Collaborator Author

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

@joyceqin-stripe joyceqin-stripe marked this pull request as ready for review January 14, 2025 17:39
@joyceqin-stripe joyceqin-stripe requested review from a team as code owners January 14, 2025 17:39
@@ -70,12 +70,15 @@ class VerticalSavedPaymentMethodsViewController: UIViewController {
}

private var headerText: String {
let nonCardPaymentMethods = paymentMethods.filter({ $0.type != .card })
let onlyCards = nonCardPaymentMethods.isEmpty
Copy link
Collaborator

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

Copy link
Collaborator Author

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

Comment on lines +73 to +74
let nonCardPaymentMethods = paymentMethods.filter({ $0.type != .card })
let hasOnlyCards = nonCardPaymentMethods.isEmpty
Copy link
Collaborator

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

@joyceqin-stripe joyceqin-stripe merged commit 8be959a into master Jan 14, 2025
7 checks passed
@joyceqin-stripe joyceqin-stripe deleted the joyceqin-MOBILESDK-2890 branch January 14, 2025 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants