-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 JS locale data for release of Money 6.19 #5683
Conversation
The money gem in its latest iteration added a space between value and unit of the Swiss Franc. Our heuristic in `_js_locale_data.html.erb` can't deal with that, so we add a third branch to it: If the money gem has a format wish, we'll respect it, but replace its abbreviations with the one the `accounting.js` library prefers.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5683 +/- ##
=======================================
Coverage 88.87% 88.87%
=======================================
Files 699 699
Lines 16607 16607
=======================================
Hits 14760 14760
Misses 1847 1847 ☔ View full report in Codecov by Sentry. |
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.
Thanks @mamhoff ❤️
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
💔 Some backports could not be created
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
💔 Some backports could not be created
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
💔 Some backports could not be created
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
Summary
The money gem in its latest iteration added a space between value and unit of the Swiss Franc. Our heuristic in
_js_locale_data.html.erb
can't deal with that, so we add a third branch to it: If the money gem has a format wish, we'll respect it, but replace its abbreviations with the one theaccounting.js
library prefers.Cf https://github.com/RubyMoney/money/blob/main/CHANGELOG.md#6190
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs: