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
Improve number formats #8857
Improve number formats #8857
Conversation
78de477
to
3ececd9
Compare
"OneDay": "1 hari", | ||
"OneMinute": "1 menit", | ||
"OneMinuteShort": "1 mnt", | ||
"OriginalLanguageName": "Bahasa Indonesia", | ||
"OriginalLanguageName": "Indonesia", |
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.
this is regression in language name, see https://id.wikipedia.org/wiki/Bahasa_Indonesia
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.
That is what CLDR returns. They have done an update within the last month. So some strings might have changed
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! Feedback
suggestions
|
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 :) |
Hi @sgiehl it would be awesome to get number formatting before next week so we can cut RC next week :-) |
c4a5d01
to
df0c999
Compare
0c87f5f
to
f7b6ef1
Compare
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. |
Hi @sgiehl nice progress! Merging the PR, will make the build green, then cut a beta and test further on demo.piwik.org |
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
.
where on another system it might be 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
35%
where in others it might be% 35
. (Note: we could later use that for money formats aswell)Places where new number formatting is currently used:
This branch is based on dateformats branch. So it needs a rebase after #8856 is merged