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

feat(format-po-gettext): respect Plural-Forms header #2070

Merged
merged 23 commits into from
Nov 6, 2024

Conversation

garikkh
Copy link
Contributor

@garikkh garikkh commented Oct 28, 2024

Description

Certain TMS might provide a different Plural-Forms header with gettext-style PO files. Instead of depending on using either CLDR or gettext defined plurals, change the gettext formatter to consider the header.

See related PR: #2010

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 to not work as expected)
  • Documentation update
  • Examples update

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)

Copy link

vercel bot commented Oct 28, 2024

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

Name Status Preview Updated (UTC)
js-lingui ✅ Ready (Inspect) Visit Preview Nov 5, 2024 8:14pm

Copy link

github-actions bot commented Oct 28, 2024

size-limit report 📦

Path Size
./packages/core/dist/index.mjs 2.88 KB (0%)
./packages/detect-locale/dist/index.mjs 723 B (0%)
./packages/react/dist/index.mjs 1.68 KB (0%)
./packages/remote-loader/dist/index.mjs 7.26 KB (0%)

@garikkh garikkh changed the title feat(format-po-gettext): respect Plural-Forms header feat(format-po-gettext): respect Plural-Forms header Oct 28, 2024
packages/format-po-gettext/src/plural-samples.ts Outdated Show resolved Hide resolved
packages/format-po-gettext/src/plural-samples.ts Outdated Show resolved Hide resolved
packages/format-po-gettext/src/po-gettext.ts Outdated Show resolved Hide resolved
packages/format-po-gettext/src/plural-samples.ts Outdated Show resolved Hide resolved
packages/format-po-gettext/src/plural-samples.ts Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

Attention: Patch coverage is 86.66667% with 8 lines in your changes missing coverage. Please review.

Project coverage is 75.84%. Comparing base (d6b9698) to head (f0a676b).
Report is 73 commits behind head on main.

Files with missing lines Patch % Lines
packages/format-po-gettext/src/po-gettext.ts 76.00% 5 Missing and 1 partial ⚠️
packages/format-po-gettext/src/plural-samples.ts 94.28% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2070      +/-   ##
==========================================
- Coverage   76.65%   75.84%   -0.81%     
==========================================
  Files          81       89       +8     
  Lines        2090     2227     +137     
  Branches      533      560      +27     
==========================================
+ Hits         1602     1689      +87     
- Misses        375      425      +50     
  Partials      113      113              

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

Copy link
Contributor

@andrii-bodnar andrii-bodnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@garikkh thank you!

@andrii-bodnar andrii-bodnar merged commit 5d0516e into lingui:main Nov 6, 2024
15 checks passed
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.

3 participants