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

Use NumberFormatter to format metric values #14017

Merged
merged 11 commits into from May 14, 2019
Merged

Use NumberFormatter to format metric values #14017

merged 11 commits into from May 14, 2019

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Jan 23, 2019

This will change all metric formatting's to use the local formats of NumberFormatter.
Not yet sure if that will have any side effects besides the change of all exports.

fixes #13994

@sgiehl sgiehl added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Jan 23, 2019
@diosmosis diosmosis added this to the 3.10.0 milestone Jan 24, 2019
@Findus23
Copy link
Member

In a quick test German continues to use . as a thousand seperator and English still shows ,

@mattab mattab modified the milestones: 3.11.0, 3.10.0 Mar 19, 2019
@diosmosis
Copy link
Member

Money values are now formatted as $50 instead of $ 50. Is this intentional? I can imagine in an edge case it could be seen as a break in backwards compatibility.

@sgiehl
Copy link
Member Author

sgiehl commented Apr 4, 2019

kind of expected, as the formatter now uses the formats defined by CLDR. That means in some languages there will now be a space between the currency and the number in others not. Also the currency symbol is pre- or appended depending on the language.

@sgiehl sgiehl force-pushed the metricformat branch 3 times, most recently from 70a850f to a4084e2 Compare May 12, 2019 21:00
@sgiehl
Copy link
Member Author

sgiehl commented May 13, 2019

updated the branch and all test files. should be ready for a final review and merge...

@diosmosis
Copy link
Member

Saw one possible issue, everything else looks good.

@sgiehl
Copy link
Member Author

sgiehl commented May 14, 2019

@diosmosis that was actually a general problem with the numberformatter. Should be fixed in 8a6c950

@diosmosis diosmosis merged commit 045b3c6 into 3.x-dev May 14, 2019
@diosmosis diosmosis deleted the metricformat branch May 14, 2019 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Format currencies metrics (thousands separator)
4 participants