Closed Bug 864753 Opened 7 years ago Closed 3 years ago
Month name of finished downloads is not localized
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).
Month? I only see a time-stamp.
(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.
... 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.
Yeah. This is actually a bug in the JS engine's Date object. Our implementation passes a Date object  to DownloadUtils . DownloadUtils calls aDate.toLocaleString() which winds up doing its own formatting . That's in contrast to nsDateTimeFormatUnix , 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?  http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/aboutDownloads.js#365  http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/downloads/DownloadUtils.jsm#349  http://mxr.mozilla.org/mozilla-central/source/js/src/prmjtime.cpp#417  http://mxr.mozilla.org/mozilla-central/source/intl/locale/src/unix/nsDateTimeFormatUnix.cpp#208
I don't know off hand. Do you Waldo?
Or, I forgot, do you know Norbert?
Does the ECMAScript Internationalization API work Norbert is doing affect this?
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.
WFM at 2017-02-14 nightly build due to ECMA-402 support
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.