primefaces / primefaces/primereact
Locale.js: PrimeReact object is deprecated but still used in Locale.js
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 8.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
PrimeReact object is deprecated, as PrimeReactContext should be used instead.
Nevertheless, in Locale.js script, this object is still used in other methods like "localeOptions".
This seems causing issues when these methods are used in component, i.e. Calendar component.
In my case, I am developing a web app using NextJs 13.5.6 + i18next and PrimeReact 10.3.3. When running the app in iPhone
browser (Safari or Chrome or Firefox have same behavior), the default locale remain set as 'en', despite
I have added other languages and changed the default locale using the locale() function.
Reproducer
Link to codesandbox - bug on mobile only, desktop is ok
PrimeReact version
10.3.3
React version
18.x
Language
TypeScript
Build / Runtime
Next.js
Browser(s)
iOS 17.x (Tried with safari, chrome and Firefox)
Steps to reproduce the behavior
No response
Expected behavior
No response
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 Locale.js, especially localeOptions and the other methods that still use the deprecated PrimeReact object, and compare them with the PrimeReactContext approach described in the issue. Reproduce the linked CodeSandbox on iOS and verify that Calendar uses the selected locale instead of remaining on en.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js, react, typescript
- Domain
- frontend, internationalization
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100