Closed Bug 917059 Opened 11 years ago Closed 11 years ago

Download size display can fail in locales with "," as decimal separator

Categories

(Firefox for Android Graveyard :: Download Manager, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 27

People

(Reporter: mbrubeck, Assigned: mbrubeck)

References

Details

Attachments

(1 file)

Attached patch patch (deleted) — Splinter Review
Found this while working on the same bug in Metro Firefox (bug 910597). In this snippet of code from aboutDownloads.js: > 255 let displaySize = DownloadUtils.convertByteUnits(aSize); > 256 if (displaySize[0] > 0) // [0] is size, [1] is units displaySize[0] is a string in a locale-dependent format. If the locale uses "," as the decimal separator, then the test will almost always fail because ("1,0" > 0) is false in JavaScript. Instead of comparing the formatted string to zero, this patch compares the original number to zero.
Attachment #805691 - Flags: review?(bnicholson)
Comment on attachment 805691 [details] [diff] [review] patch Review of attachment 805691 [details] [diff] [review]: ----------------------------------------------------------------- Looks good -- thanks!
Attachment #805691 - Flags: review?(bnicholson) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 27
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: