js-lingui icon indicating copy to clipboard operation
js-lingui copied to clipboard

feat(core): Add global formats options for setupI18n

Open DeyLak opened this issue 9 months ago • 4 comments

Description

This PR resolves part of the discussed changes in https://github.com/lingui/js-lingui/issues/2279. It adds an opportunity configure formats as an optional parameter in setupI18n

Types of changes

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

Fixes https://github.com/lingui/js-lingui/issues/2279

Checklist

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

DeyLak avatar Jul 22 '25 00:07 DeyLak

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
js-lingui ✅ Ready (Inspect) Visit Preview Jul 22, 2025 0:39am

vercel[bot] avatar Jul 22 '25 00:07 vercel[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 76.84%. Comparing base (6bb8983) to head (d92ba2b). Report is 202 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2291      +/-   ##
==========================================
- Coverage   77.05%   76.84%   -0.22%     
==========================================
  Files          84       89       +5     
  Lines        2157     2500     +343     
  Branches      555      651      +96     
==========================================
+ Hits         1662     1921     +259     
- Misses        382      463      +81     
- Partials      113      116       +3     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Jul 22 '25 07:07 codecov[bot]

I'm not sure, why the docs-suite/validate is failing. As far as I can see, there is not such command as yarn checkFormat. I've run yarn lint:all and yarn release:test to check formatting

DeyLak avatar Jul 22 '25 10:07 DeyLak

@DeyLak /website folder has it's own package.json file with it's own commands. Had to be run from there

timofei-iatsenko avatar Aug 04 '25 07:08 timofei-iatsenko