Closed
Bug 864753
Opened 12 years ago
Closed 8 years ago
Month name of finished downloads is not localized
Categories
(Firefox for Android Graveyard :: Download Manager, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: theo, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
30.42 KB,
image/png
|
Details |
In about:downloads, next to finished downloads, the month appears in English.
Verified in Nightly, but I'm pretty sure it is the same in release (can't try it on today because time is displayed for today's downloads).
Comment 1•12 years ago
|
||
Month? I only see a time-stamp.
Reporter | ||
Comment 2•12 years ago
|
||
(In reply to Aaron Train [:aaronmt] from comment #1)
> Month? I only see a time-stamp.
That's what I was trying to explain :p For older downloads (maybe several days, weeks? I don't know) the is the day and the month. In this screenshot it should be "avril" in fr.
Comment 3•12 years ago
|
||
Comment 4•12 years ago
|
||
... and that's going into toLocaleFormat() of Date, which goes to libc, which, IIRC, doesn't ship with localizations on android, because they do l10n on the java stack.
Comment 5•12 years ago
|
||
Yeah. This is actually a bug in the JS engine's Date object. Our implementation passes a Date object [1] to DownloadUtils [2]. DownloadUtils calls aDate.toLocaleString() which winds up doing its own formatting [3]. That's in contrast to nsDateTimeFormatUnix [4], which does some juggling to try and make sure its using the right locale (since the Unix one might not match Java's, let alone the page's).
I tried to put a fix in here once but couldn't get it to work. I'll ping luke to see if this is known?
[1] http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/aboutDownloads.js#365
[2] http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/downloads/DownloadUtils.jsm#349
[3] http://mxr.mozilla.org/mozilla-central/source/js/src/prmjtime.cpp#417
[4] http://mxr.mozilla.org/mozilla-central/source/intl/locale/src/unix/nsDateTimeFormatUnix.cpp#208
Comment 6•12 years ago
|
||
I don't know off hand. Do you Waldo?
Comment 7•12 years ago
|
||
Or, I forgot, do you know Norbert?
Comment 8•12 years ago
|
||
Does the ECMAScript Internationalization API work Norbert is doing affect this?
Comment 9•12 years ago
|
||
Yes, my implementation of the ECMAScript Internationalization API changes Date.prototype.toLocaleString to be based on ICU, which has locale data for French. The implementation isn't enabled anywhere yet. For desktop, that might land today - watch bug 853301. For Android, we haven't concluded our offline discussion yet; I just filed bug 864843 for better tracking.
Comment 10•8 years ago
|
||
WFM at 2017-02-14 nightly build due to ECMA-402 support
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•