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

[Paywalls] Add default locale #1809

Merged
merged 4 commits into from
Aug 19, 2024
Merged

[Paywalls] Add default locale #1809

merged 4 commits into from
Aug 19, 2024

Conversation

joshdholtz
Copy link
Member

@joshdholtz joshdholtz commented Aug 19, 2024

Motivation

Support new default_locale property in paywall data

Description

If localization for preferred language isn't found, use the default locale before falling back to the first locale.

Demo

Screen.Recording.2024-08-18.at.10.52.24.PM.mov

@joshdholtz joshdholtz added the pr:feat A new feature label Aug 19, 2024
@joshdholtz joshdholtz changed the title Add default locale for paywalls [Paywalls] Add default locale Aug 19, 2024
@joshdholtz joshdholtz requested review from a team August 19, 2024 03:29
@joshdholtz joshdholtz marked this pull request as ready for review August 19, 2024 03:50
Copy link

codecov bot commented Aug 19, 2024

Codecov Report

Attention: Patch coverage is 36.36364% with 7 lines in your changes missing coverage. Please review.

Project coverage is 82.78%. Comparing base (d26a594) to head (e1a3be8).
Report is 1 commits behind head on main.

Files Patch % Lines
...n/com/revenuecat/purchases/paywalls/PaywallData.kt 36.36% 6 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1809      +/-   ##
==========================================
- Coverage   82.84%   82.78%   -0.06%     
==========================================
  Files         222      222              
  Lines        7670     7680      +10     
  Branches     1077     1081       +4     
==========================================
+ Hits         6354     6358       +4     
- Misses        894      899       +5     
- Partials      422      423       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@tonidero tonidero left a comment

Choose a reason for hiding this comment

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

LGTM!

…ywallData.kt

Co-authored-by: Toni Rico <toni.rico.diez@revenuecat.com>
Copy link
Contributor

@jamesrb1 jamesrb1 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!

@joshdholtz joshdholtz merged commit 335d0b2 into main Aug 19, 2024
9 checks passed
@joshdholtz joshdholtz deleted the paywalls-default-locale branch August 19, 2024 18:50
joshdholtz added a commit that referenced this pull request Aug 22, 2024
**This is an automatic release.**

### New Features
* [Paywalls] Add default locale (#1809) via Josh Holtz (@joshdholtz)
* [Paywalls] Support to round+truncate prices displayed on paywalls for
backend-specified countries (#1806) via James Borthwick (@jamesrb1)
### Other Changes
* Publish paywall tester on each release (#1803) via Toni Rico
(@tonidero)

---------

Co-authored-by: revenuecat-ops <ops@revenuecat.com>
Co-authored-by: Josh Holtz <me@joshholtz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:feat A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants