-
Notifications
You must be signed in to change notification settings - Fork 382
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(message-utils): correctly handle multi-digit complex argument cases #1937
fix(message-utils): correctly handle multi-digit complex argument cases #1937
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1937 +/- ##
==========================================
- Coverage 76.65% 76.04% -0.61%
==========================================
Files 81 85 +4
Lines 2090 2112 +22
Branches 533 541 +8
==========================================
+ Hits 1602 1606 +4
- Misses 375 393 +18
Partials 113 113 ☔ View full report in Codecov by Sentry. |
I noticed that the cause of this bug was a wrong regex, and regexes are hard. We could replace that regex with this operation instead:
|
fb9a59e
to
8f41475
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job. Thanks
Description
Current version of lingui will not handle following pluralisation correctly:
{count, plural, one {One} other {#} =13 {thirteen}}
. This PR fixes that.I also added some tests, but maybe some dedicated test should be made, I'm not sure what the maintainer expect here.
Did not report the issue separately, as I already had the fix.
Types of changes
Checklist