enUS locale is exported, but as an empty object
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
import { enUS } from '@material-ui/core/locale'
This import gives me an empty object.
Expected Behavior 🤔
To be able to import enUS (default) locale.
Steps to Reproduce 🕹
These steps are most likely not needed, because the locale is commented in the module: https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/locale/index.ts#L300
Context 🔦
I need to support dynamic language change, which seems not to be supported by current MUI localization. Therefore I'd like to import default locale, so I could use it with e.g. react-i18next.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in packages/material-ui/src/locale/index.ts around line 300, where the issue identifies the enUS locale export. Trace how the locale module is exported and verify that importing enUS from @material-ui/core/locale produces the locale object rather than an empty object.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend, localization
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100