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(core): pound symbol being replaced outside plural and selectordinal #1928

Merged
merged 1 commit into from
May 3, 2024

Conversation

dan-dr
Copy link
Contributor

@dan-dr dan-dr commented May 1, 2024

Description

Fixes #1927

Added appropriate test

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

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

Copy link

vercel bot commented May 1, 2024

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 May 1, 2024 0:53am

@dan-dr
Copy link
Contributor Author

dan-dr commented May 1, 2024

not sure regarding the naming of replaceOctothorpe rather than isPluralOrSelectOrdinal or something like that.

Another possibility is doing the #->OCTOTHORPE_PH replacement before sending the value to formatMessage rather than the if block https://github.com/lingui/js-lingui/pull/1928/files#diff-250f1fdd34ada7b2793f80e74f6f6b2a60837d0a55b4ae534c32ace02a988000R105

Copy link

github-actions bot commented May 1, 2024

size-limit report 📦

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

Copy link

codecov bot commented May 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.01%. Comparing base (d6b9698) to head (2fba52e).
Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1928      +/-   ##
==========================================
- Coverage   76.65%   76.01%   -0.64%     
==========================================
  Files          81       85       +4     
  Lines        2090     2110      +20     
  Branches      533      539       +6     
==========================================
+ Hits         1602     1604       +2     
- Misses        375      393      +18     
  Partials      113      113              

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

@dan-dr dan-dr changed the title fix pound symbol being replaced outside plural and selectordinal fix(core): pound symbol being replaced outside plural and selectordinal May 1, 2024
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.

@dan-dr thank you!

@andrii-bodnar andrii-bodnar merged commit e94c6fd into lingui:main May 3, 2024
16 of 18 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.

# is being replaced by%__lingui_octothorpe__% outside plural and selectordinal
2 participants