Opened 10 years ago
Closed 10 years ago
#846 closed defect (bug) (fixed)
"downloads per day" decimal value
Reported by: | shawnkhall | Owned by: | obenland |
---|---|---|---|
Milestone: | Priority: | low | |
Component: | Theme Directory | Keywords: | |
Cc: |
Description
The "Downloads per day" "Total downloads" data item doesn't need to be a decimal. It's either a download or it's not, so "Total downloads: 16,531.00" doesn't make sense.
Attachments (1)
Change History (11)
#2
@
10 years ago
This is most likely a bug report for https://wordpress.org/themesnew/ which I don't see it on either.
#3
@
10 years ago
It's for https://wordpress.org/themesnew/ -- you can see it by clicking any "more info" link then scrolling down to the Downloads Per Day section. I've attached a sample ("Bold Headline" theme v1.3.3).
#5
@
10 years ago
It looks like this is a locale thing, for example I see this:
https://cloudup.com/cYz23jOlTMt
Note that there's no decimal, and the date format on the graph is different
#6
@
10 years ago
@dd32 -- is your screenshot from IE 10? I don't see the problem in IE 11, Firefox or Chrome, but it is definitely present in IE 10.
#7
@
10 years ago
Sorry, that was Chrome on Mac. This is most definitely related to the Browser locale code, as it's the same Javascript which is doing it on each browser.
This seems to explain why:
http://stackoverflow.com/questions/21536984/javascript-format-whole-numbers-using-tolocalestring is the same thing.
I'm tempted to suggest just leaving it be, although IE 6~10 would be affected by it, looking at our analytics, that would mean 1% of visitors would be affected by it (Approx 4% of the traffic to /themes/ is IE, of which 75% is IE11, and only increasing), how many of them would then care/look at the number seems minuscule to me.
#8
@
10 years ago
I agree. As of January 2016 MS will no longer support any version of IE except the latest on supported OSes, which means IE11 will be the lowest supported on Win7, finally forcing me to abandon DQSD.
http://blogs.msdn.com/b/ie/archive/2014/08/07/stay-up-to-date-with-internet-explorer.aspx
#9
@
10 years ago
Yes, as Dion mentioned, browsers render localized numbers pretty inconsistently unfortunately. Safari (including iOS) doesn't do anything with it at all, and just returns the integer for example.
We could of course throw another JS library at it, but that feels a littler over the top.
Browser support: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString#Browser_compatibility
Where exactly are you seeing this? I see no reference to
.00
for theme downloads on the themes page or an individual themes pages e.g: