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: fix finding locales with different regions #3633

Merged
merged 3 commits into from
Feb 5, 2024

Commits on Feb 5, 2024

  1. Paywalls: fix finding locales with different regions

    This was a regression introduced by #3605.
    
    ### Example:
    
    Consider a paywall configuration with these locales: `en_US`, `de_DE`.
    Running on a device with locale `en_IN` for example.
    
    Before #3605, `PaywallData.localizedConfiguration` would have returned the `en_US` localization. However, that change made it so that it could no longer find a matching localization with a different region.'
    
    This fix improves the locale lookup so that if it doesn't find a matching localization with both language AND region, it then tries to look it up with only the language, before falling back to the default localization.
    NachoSoto committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    cf138e9 View commit details
    Browse the repository at this point in the history
  2. Compare identifiers

    NachoSoto committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    d15eb9b View commit details
    Browse the repository at this point in the history
  3. Fixed tests pre-iOS 17

    NachoSoto committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    a9589ff View commit details
    Browse the repository at this point in the history