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

fix: use custom locale when it exists #23

Merged
merged 1 commit into from
Mar 9, 2023
Merged

Conversation

kabaros
Copy link
Collaborator

@kabaros kabaros commented Mar 9, 2023

This fixes an issue where ne-NP (nepali) calendar tests in dhis/ui broke after integrating the updated version of this library.

The issue is caused by resolvedOptions overriding the custom locale based on the browser. There is a test for the scenario in this repo, but it passed because ne-NP is a supported locale in node environments, but it's not on chromium-based browsers so it just defaulted to the user locale in that case. This change makes sure that, when we are providing our locale resources, then we always use them.

related PR: dhis2/ui#1248

image

image

@kabaros kabaros requested a review from a team March 9, 2023 12:29
Copy link
Contributor

@Mohammer5 Mohammer5 left a comment

Choose a reason for hiding this comment

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

Approved, but with a question

src/hooks/internal/useResolvedLocaleOptions.ts Outdated Show resolved Hide resolved
@kabaros kabaros force-pushed the fix/custom-calendar-locale branch from d579873 to bc2233e Compare March 9, 2023 12:50
@kabaros kabaros merged commit 3cfb58a into main Mar 9, 2023
@kabaros kabaros deleted the fix/custom-calendar-locale branch March 9, 2023 12:54
dhis2-bot added a commit that referenced this pull request Mar 9, 2023
## [1.0.2](v1.0.1...v1.0.2) (2023-03-09)

### Bug Fixes

* use custom locale when it exists ([#23](#23)) ([3cfb58a](3cfb58a))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 1.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

3 participants