Skip to content

Conversation

@yslpn
Copy link
Contributor

@yslpn yslpn commented Dec 16, 2025

Description

Deprecate Lingui’s Intl wrappers (i18n.date/number plus the shared date/time/number helpers) ahead of removal, and add documentation callouts to direct users to native Intl.DateTimeFormat/Intl.NumberFormat, keeping the same locale precedence (i18n.locales ?? i18n.locale). Related: #2265.

Open question for @timofei-iatsenko: do we also want a short blog for this deprecation, and is it OK to plan removal in the next major given the ESM-only focus discussed in #2363? Or it would be better to change the deprecated message.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality not to work as expected)
  • Documentation update
  • Examples update

Fixes #2265

Checklist

  • I have read the CONTRIBUTING and CODE_OF_CONDUCT docs
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)

@vercel
Copy link

vercel bot commented Dec 16, 2025

@yslpn is attempting to deploy a commit to the Crowdin Team on Vercel.

A member of the Team first needs to authorize it.

@codecov
Copy link

codecov bot commented Dec 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.60%. Comparing base (6bb8983) to head (7b71d11).
⚠️ Report is 243 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2386      +/-   ##
==========================================
- Coverage   77.05%   76.60%   -0.45%     
==========================================
  Files          84      100      +16     
  Lines        2157     2744     +587     
  Branches      555      715     +160     
==========================================
+ Hits         1662     2102     +440     
- Misses        382      513     +131     
- Partials      113      129      +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@timofei-iatsenko
Copy link
Collaborator

Hey @yslpn thanks for the contribution. I'm not sure that developers would have enough time to transition and that will not block adoption ESM only linguijs.

So it would be better to not remove it in the next major version. Blog post would be much apreciated to explain what was the driver for the decision.

Meanwhile, do you think it would be nice to have ready to use react hooks as an alternative? Because users will still have to create them on their own, may be we can create them and make available out of the box?

@yslpn
Copy link
Contributor Author

yslpn commented Dec 17, 2025

Meanwhile, do you think it would be nice to have ready to use react hooks as an alternative? Because users will still have to create them on their own, may be we can create them and make available out of the box?

If we ship ready-made React hooks for date/number formatting, people will soon want the same helpers outside React, and we end up back where we were: maintaining wrappers around every Intl method. I'd prefer to keep recommending native Intl.* directly. If someone needs helpers, they can create their own functions or hooks.

Does that sound good to you?

Blog post would be much apreciated to explain what was the driver for the decision.

I also drafted a blog post to explain the deprecation and migration; would love your take on it. The social image in the post was generated via AI (Nano Banana by Gemini).

@vonovak vonovak self-requested a review December 19, 2025 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let's mark the wrappers over Intl methods as deprecated

2 participants