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

refactor(core): use Intl.PluralRules #1486

Merged
merged 3 commits into from
Mar 9, 2023

Conversation

timofei-iatsenko
Copy link
Collaborator

@vercel
Copy link

vercel bot commented Mar 7, 2023

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

Name Status Preview Comments Updated
js-lingui ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 9, 2023 at 9:10AM (UTC)

@github-actions
Copy link

github-actions bot commented Mar 7, 2023

size-limit report 📦

Path Size
./packages/core/build/esm/index.js 1.72 KB (0%)
./packages/detect-locale/build/esm/index.js 812 B (0%)
./packages/react/build/esm/index.js 1.79 KB (0%)
./packages/remote-loader/build/esm/index.js 7.25 KB (0%)

packages/cli/src/lingui-compile.ts Show resolved Hide resolved
packages/core/src/context.ts Outdated Show resolved Hide resolved
packages/core/src/formats.test.ts Show resolved Hide resolved
packages/core/src/i18n.ts Show resolved Hide resolved
packages/react/src/I18nProvider.test.tsx Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Mar 7, 2023

Codecov Report

Patch coverage: 89.36% and project coverage change: -0.11 ⚠️

Comparison is base (839f0b7) 74.02% compared to head (8a64cf8) 73.92%.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #1486      +/-   ##
==========================================
- Coverage   74.02%   73.92%   -0.11%     
==========================================
  Files          68       67       -1     
  Lines        1902     1875      -27     
  Branches      501      489      -12     
==========================================
- Hits         1408     1386      -22     
- Misses        378      383       +5     
+ Partials      116      106      -10     
Impacted Files Coverage Δ
packages/cli/src/lingui-compile.ts 29.33% <ø> (-4.85%) ⬇️
packages/core/src/i18n.ts 63.15% <0.00%> (-9.73%) ⬇️
packages/react/src/format.ts 96.29% <ø> (ø)
packages/core/src/context.ts 85.36% <92.30%> (+7.18%) ⬆️
packages/core/src/formats.ts 93.75% <93.75%> (+9.37%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@andrii-bodnar
Copy link
Contributor

@thekip thank you, looks good to me. Could you please add a corresponding note about this change in the v4 migration guide?

I'd like to release it today within the v4.0.0-next.1

- always provide fallback to english. This is useful for cases with pseudo localization
- allow to pass locales[] for all formatters, this unlocks possibility to override fallback for some locales
@timofei-iatsenko
Copy link
Collaborator Author

@andrii-bodnar I added 2 new commits. One with a note and another with additional refactoring. Please check description of that commit.

@andrii-bodnar andrii-bodnar merged commit 3433452 into lingui:next Mar 9, 2023
@timofei-iatsenko timofei-iatsenko deleted the use-intl-plural-rules branch March 9, 2023 10:00
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.

Consider using Intl.PluralRules instead of make-plurals
2 participants