Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Improve number formats #8857
This PR aims to improve the number formats used by Piwik. (refs #1254)
Currently the number formats mostly depend on the server locale. So on some systems the decimal separator is a
With this changes number formatting data will be included in the Intl Plugin. With a new NumberFormatter in Core, as well as a plugin for jQPlot the number formatting will be done depending on the language.
The new number formatting makes a difference between numbers only and percentage values. As in some languages it is
Places where new number formatting is currently used:
This branch is based on dateformats branch. So it needs a rebase after #8856 is merged
Wow, we have number formatting, finally! Awesome added value @sgiehl
I love it already. the UI just looks better with a simple change like this. reports become easier to read and analyse!
referenced this pull request
Oct 2, 2015
Rebased on master.
@mattab Regarding your feedback:
Maybe I should revert the changes to MetricFomatter and rewrite it to use no or english formats always?
I'll have a look at the other suggestions...
To make sure we don't regress API output in LTS, here is a suggestion:
What do you think?
Thanks, looking forward to merge :)
Small update: I've added support for currency formats and added usage of number formats to scheduled reports, the numbers besides the sparklines, seo metrics, visitor map, row evolution and transition popover.