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

Handle moment locale when request locale has equal language and country parts #416

Merged

Conversation

jgtrescazes
Copy link
Contributor

@jgtrescazes jgtrescazes commented Apr 17, 2023

Handle moment locale

This PR aims to retrieve expected moment locale when request's locale includes country part like 'it-IT' or 'pl-PL'.
When this kind of locales are used in Request, sonata try to load a moment locale file that does not exists (ie: /bundles/sonataform/moment-locale/it-IT.js)

I am targeting this branch, because this is a bug fix.

Changelog

### Fixed
- Date pickers now select the correct locale when language and country parts are the same, eg: `it-IT`

@jgtrescazes jgtrescazes marked this pull request as ready for review April 17, 2023 13:28
@jordisala1991
Copy link
Member

Can you rebase to fix the build? @jgtrescazes

@jgtrescazes
Copy link
Contributor Author

@jordisala1991 done

@jordisala1991 jordisala1991 merged commit 12c89f0 into sonata-project:1.x Apr 29, 2023
20 checks passed
@jordisala1991
Copy link
Member

Thank you @jgtrescazes , I have modified your changelog , please take a look and confirm it is correct.

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