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: improve PaywallData.configForLocale() disambiguation #1579

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

NachoSoto
Copy link
Contributor

@NachoSoto NachoSoto commented Jan 26, 2024

iOS equivalent: RevenueCat/purchases-ios#3605

See also https://medium.com/fabiohub/chinese-locale-in-android-part-2-d1cfe87b3fb2:

In order to support zh-rHK, zh-rHK_#Hant and zh-rHK_#Hans to fall back correctly on both pre & post Android 7.0 devices, you need these resources:

  • zh-rHK (Traditional Chinese)
  • zh-rTW (Traditional Chinese)
  • zh (Simplified Chinese)

simplified
traditional

@NachoSoto NachoSoto requested a review from a team January 26, 2024 20:38
@NachoSoto NachoSoto force-pushed the paywalls-chinese-localization branch from a881294 to 7cc8016 Compare January 26, 2024 20:39
iOS equivalent: RevenueCat/purchases-ios#3605

See also https://medium.com/fabiohub/chinese-locale-in-android-part-2-d1cfe87b3fb2:

> In order to support zh-rHK, zh-rHK_#Hant and zh-rHK_#Hans to fall back correctly on both pre & post Android 7.0 devices, you need these resources:
- `zh-rHK` (Traditional Chinese)
- `zh-rTW` (Traditional Chinese)
- `zh` (Simplified Chinese)
@NachoSoto NachoSoto force-pushed the paywalls-chinese-localization branch from 7cc8016 to 091db37 Compare January 26, 2024 20:39
@NachoSoto NachoSoto force-pushed the paywalls-chinese-localization branch from 4aac494 to df4885d Compare January 26, 2024 20:50
Copy link

codecov bot commented Jan 26, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (b245bbb) 83.73% compared to head (df4885d) 83.71%.

Files Patch % Lines
...com/revenuecat/purchases/utils/LocaleExtensions.kt 53.84% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1579      +/-   ##
==========================================
- Coverage   83.73%   83.71%   -0.02%     
==========================================
  Files         218      218              
  Lines        7248     7260      +12     
  Branches     1007     1011       +4     
==========================================
+ Hits         6069     6078       +9     
  Misses        788      788              
- Partials      391      394       +3     

☔ 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.

Annoying we have to add this logic... But looks good!

@NachoSoto
Copy link
Contributor Author

Yeah I forgot to mention that the method in iOS does this automatically, but I couldn't get these tests to pass without encoding that.

@NachoSoto NachoSoto merged commit e5b204f into main Jan 29, 2024
9 checks passed
@NachoSoto NachoSoto deleted the paywalls-chinese-localization branch January 29, 2024 15:12
vegaro pushed a commit that referenced this pull request Feb 5, 2024
**This is an automatic release.**

### RevenueCatUI
* `Paywalls`: fix template 5 title alignment (#1585) via NachoSoto
(@NachoSoto)
* `Paywalls`: replace `TextAlign.Left` with `TextAlign.Start` to better
support RTL (#1584) via NachoSoto (@NachoSoto)
* Paywall views: Support updating options state after initial layout
(#1582) via Toni Rico (@tonidero)
* `Paywalls`: improve `PaywallData.configForLocale()` disambiguation
(#1579) via NachoSoto (@NachoSoto)
### Dependency Updates
* Bump fastlane-plugin-revenuecat_internal from `e6ba247` to `9c82c7a`
(#1583) via dependabot[bot] (@dependabot[bot])
### Other Changes
* `OfferingsFactory`: debug logs when creating `Offerings` (#1576) via
NachoSoto (@NachoSoto)
* `Paywalls`: log error when creating `PaywallState.Error` (#1574) via
NachoSoto (@NachoSoto)

Co-authored-by: revenuecat-ops <ops@revenuecat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants