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

fix(format-po-gettext): bad return during mapping with serializePlurals #1707

Merged
merged 2 commits into from
Jun 22, 2023

Conversation

stovmascript
Copy link
Contributor

@stovmascript stovmascript commented Jun 21, 2023

Description

In v4 this formatter can return undefined when passing a non-plural message to the serializePlurals function, which will throw later when serializing the PO file. The original item should be returned instead.

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

Fixes # (issue)

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 necessary documentation (if appropriate)

@vercel
Copy link

vercel bot commented Jun 21, 2023

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

Name Status Preview Comments Updated (UTC)
js-lingui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2023 4:46pm

@github-actions
Copy link

github-actions bot commented Jun 21, 2023

size-limit report 📦

Path Size
./packages/core/dist/index.mjs 2.76 KB (0%)
./packages/detect-locale/dist/index.mjs 721 B (0%)
./packages/react/dist/index.mjs 1.59 KB (0%)
./packages/remote-loader/dist/index.mjs 7.24 KB (0%)

@codecov
Copy link

codecov bot commented Jun 21, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.19 🎉

Comparison is base (ff96df4) 75.82% compared to head (39a8b26) 76.01%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1707      +/-   ##
==========================================
+ Coverage   75.82%   76.01%   +0.19%     
==========================================
  Files          79       79              
  Lines        2039     2039              
  Branches      524      524              
==========================================
+ Hits         1546     1550       +4     
+ Misses        378      376       -2     
+ Partials      115      113       -2     
Impacted Files Coverage Δ
packages/format-po-gettext/src/po-gettext.ts 83.33% <100.00%> (+4.16%) ⬆️

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

@timofei-iatsenko
Copy link
Collaborator

Thanks for tackling this. Please create a test case covering this.

@stovmascript
Copy link
Contributor Author

@thekip Done.

@timofei-iatsenko timofei-iatsenko self-requested a review June 22, 2023 07:45
@andrii-bodnar andrii-bodnar merged commit 993bd2a into lingui:main Jun 22, 2023
@timofei-iatsenko
Copy link
Collaborator

@stovmascript big thanks!

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