Closed
Bug 1077956
Opened 11 years ago
Closed 11 years ago
download progress shows Persian digit symbol 5 (۵) instead of decimal point for users with certain system locale settings
Categories
(Toolkit :: Downloads API, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1009795
People
(Reporter: mohammadi.hr, Unassigned)
References
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0
Build ID: 20140923175406
Steps to reproduce:
Firefox (Windows 7 having Persian locale enabled [fa-IR] meaning can type Farsi and locale have been set to Iran as default country) renders stat numbers in download progress unreadable. I think the problem is related to decimal point symbol. I did not see this problem on any other application and even in Firefox addons like DownThemAll do not have this problem. I've seen this problem on almost any computer running latest versions of Firefox. Please check screenshots I've attached.
Actual results:
decimal point is displayed as Persian digit symbol 5 (۵)
Expected results:
stats should be displayed correctly
| Reporter | ||
Comment 1•11 years ago
|
||
| Reporter | ||
Comment 3•11 years ago
|
||
(In reply to Loic from comment #2)
> Does it happen if you use the En-US version?
I'm actually using en-us version (locale settings I'm talking about is windows-related not Firefox related). To make my conditions clear: I am using Firefox (en-US) on Windows 7 (again with default en-US UI) which only in Windows regional settings Iran has been configured to be default country (applications might receive fa-IR as default locale while request for default locale) and having Persian keyboard input enabled.
Thanks.
I see the case if set the bidi.browser.ui to true and bidi.numeral to 3 in about:config, and system locale format to Farsi, and then restart firefox, start a download.
This comes from the code at:
https://hg.mozilla.org/mozilla-central/file/eaa80e4597a2/toolkit/mozapps/downloads/DownloadUtils.jsm#l191
which calls:
https://hg.mozilla.org/mozilla-central/file/eaa80e4597a2/toolkit/mozapps/downloads/DownloadUtils.jsm#l443
which uses gDecimalSymbol, which comes from:
https://hg.mozilla.org/mozilla-central/file/eaa80e4597a2/toolkit/mozapps/downloads/DownloadUtils.jsm#l47
where the regex is clearly not doing the right thing,
47 this.__defineGetter__("gDecimalSymbol", function() {
48 delete this.gDecimalSymbol;
49 return this.gDecimalSymbol = Number(5.4).toLocaleString().match(/\D/);
50 });
since it's assuming that the numeric parts of Number(5.4).toLocaleString() won't match \D.
Regression from https://hg.mozilla.org/mozilla-central/rev/b7500203ad6d .
Status: UNCONFIRMED → NEW
Ever confirmed: true
Er, actually, the behavior change in toLocaleString is more recent, but I still claim the code from bug 597852 is bad.
Depends on: 999003
Summary: Problem with download progress stats (numbers/digits - decimal point maybe) → download progress shows Persian digit symbol 5 (۵) instead of decimal point for users with certain system locale settings
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•