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

Default preferred locale #422

Merged
merged 2 commits into from
Aug 27, 2024
Merged

Default preferred locale #422

merged 2 commits into from
Aug 27, 2024

Conversation

marcospassos
Copy link
Member

Summary

This PR introduces a new option for setting a global preferred locale. Previously, developers had to specify the locale for every content fetch call, which was inconvenient. With this update, the application can set the preferred locale during initialization, aligning more closely with how applications typically handle localization.

The previous implementation was SDK-specific, but this change moves support to the content fetcher level, making it more consistent with other default options. Additionally, the option name is being changed from preferredLocale to defaultPreferredLocale to reflect its purpose more accurately. Note that this is a breaking change.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@marcospassos marcospassos added enhancement New feature or request breaking change A backwards incompatible change to a publicly exposed API labels Aug 27, 2024
Copy link

pkg-pr-new bot commented Aug 27, 2024

commit: eb737c3

npm i https://pkg.pr.new/@croct/sdk@422

Open in Stackblitz

Copy link

codeclimate bot commented Aug 27, 2024

Code Climate has analyzed commit eb737c3 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 99.9% (0.0% change).

View more on Code Climate.

@marcospassos marcospassos merged commit a8f7eaa into master Aug 27, 2024
7 checks passed
@marcospassos marcospassos deleted the defaul-preferred-locale branch August 27, 2024 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change A backwards incompatible change to a publicly exposed API enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants