Closed Bug 864753 Opened 11 years ago Closed 7 years ago

Month name of finished downloads is not localized

Categories

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

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: theo, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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.
Attached image Screenshot
(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 [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
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.
Blocks: 935025
Depends on: 1215247
Blocks: 724529
WFM at 2017-02-14 nightly build due to ECMA-402 support
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
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: