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

Feat: set language code on Littlepay overlay #2250

Merged
merged 2 commits into from
Jul 29, 2024

Conversation

lalver1
Copy link
Member

@lalver1 lalver1 commented Jul 24, 2024

Closes #2195

Given that the Littlepay Hosted Card Tokenization overlay supports multiple languages, this PR uses this feature to set the overlay's language to the user's language in Benefits.

Note that the Littlepay docs list es_419 as the code for Spanish (Latin America), but this seems to be a typo since the overlay did not work with this code, instead it does work with es-419.

Steps for testing

Run through a complete flow until you get to the enrollment index page. Then, change languages in Benefits and close/open the overlay to see the overlay in the language that was selected in Benefits.

@lalver1 lalver1 self-assigned this Jul 24, 2024
@github-actions github-actions bot added deployment-dev [auto] Changes that will trigger a deploy if merged to dev front-end HTML/CSS/JavaScript and Django templates labels Jul 24, 2024
Copy link

github-actions bot commented Jul 24, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  benefits/enrollment
  views.py
Project Total  

This report was generated by python-coverage-comment-action

@lalver1 lalver1 changed the title Feat: Set language code on Littlepay overlay Feat: set language code on Littlepay overlay Jul 24, 2024
@lalver1 lalver1 force-pushed the feat/littlepay-user-language branch 3 times, most recently from 01b360d to e01c6cd Compare July 26, 2024 18:34
@lalver1 lalver1 marked this pull request as ready for review July 26, 2024 18:49
@lalver1 lalver1 requested a review from a team as a code owner July 26, 2024 18:49
Copy link
Member

@thekaveman thekaveman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small request to tighten up the code a bit.

benefits/enrollment/views.py Outdated Show resolved Hide resolved
tests/pytest/enrollment/test_views.py Outdated Show resolved Hide resolved
angela-tran
angela-tran previously approved these changes Jul 26, 2024
Copy link
Member

@angela-tran angela-tran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!

image

tests/pytest/enrollment/test_views.py Outdated Show resolved Hide resolved
@angela-tran angela-tran dismissed their stale review July 26, 2024 20:37

Deferring to @thekaveman's comments

@lalver1 lalver1 force-pushed the feat/littlepay-user-language branch from e01c6cd to 757551d Compare July 29, 2024 13:58
@lalver1
Copy link
Member Author

lalver1 commented Jul 29, 2024

Thanks for the suggestions @thekaveman and @angela-tran , I think this one is ready for your re-review.

Copy link
Member

@thekaveman thekaveman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Tested locally and it works great 👍

Copy link
Member

@angela-tran angela-tran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@lalver1 lalver1 merged commit 57a9f9c into main Jul 29, 2024
15 checks passed
@lalver1 lalver1 deleted the feat/littlepay-user-language branch July 29, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment-dev [auto] Changes that will trigger a deploy if merged to dev front-end HTML/CSS/JavaScript and Django templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Send user's current language code to Littlepay overlay
3 participants