Closed Bug 1170973 Opened 10 years ago Closed 9 years ago

Migrate Gallery from l10n_date to Intl

Categories

(Firefox OS Graveyard :: Gaia::Gallery, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zbraniecki, Assigned: zbraniecki)

References

Details

Attachments

(2 files, 1 obsolete file)

No description provided.
Attached file patch (deleted) —
Punam, this is one more patch, this time to move from l10n_date to Intl API.
Assignee: nobody → gandalf
Status: NEW → ASSIGNED
Attachment #8614617 - Flags: review?(pdahiya)
Blocks: 1170963
One thing to notice, that this change makes us follow ICU conventions for localized date time formats, instead of letting localizers choose the the order of date time components.
(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #2) > One thing to notice, that this change makes us follow ICU conventions for > localized date time formats, instead of letting localizers choose the the > order of date time components. I like the patch, will review it soon!
Depends on: 1171856
Hi Zibi I am glad you caught performance regression due to Intl API use and I agree we should hold on landing this patch until we resolve issue 1171856. I am cancelling review request till dependency is resolved. Thanks!
Attachment #8614617 - Flags: review?(pdahiya)
Comment on attachment 8614617 [details] patch The Intl is now pre-loaded in System, so this patch should be good to go.
Attachment #8614617 - Flags: review?(pdahiya)
(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #5) > Comment on attachment 8614617 [details] > patch > > The Intl is now pre-loaded in System, so this patch should be good to go. Hi Zibi Sorry for late review, patch looks good. My only concern is around how the group header is getting localized in RTL format. On changing the language to 'Runtime Mirrored' the header still shows as '<month> <year>'. Previously it used to display as <Year> <Month>' for RTL languages. Is that expected or a bug, please look into it and provide your input. Thanks!
Flags: needinfo?(gandalf)
Great catch! This is actually a limitation of our pseudo-locales. Since Intl API does not support pseudo-locales, we will fallback to en-US here. We'll fix it by artifically injecting 'ar' as a second locale in the fallback chain in mirrored english pseudo-locale. But for this patch, it's not a bug - I tested against 'ar' locale and it looks good (date is properly localized/formatted).
Flags: needinfo?(gandalf)
Comment on attachment 8614617 [details] patch Thanks Zibi for looking into it, patch LGTM and has my r+.
Attachment #8614617 - Flags: review?(pdahiya) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment on attachment 8643366 [details] [gaia] zbraniecki:1170973-remove-l10n_date-from-gallery > mozilla-b2g:master Agh! I forgot to remove references to l10n_date.js. Follow up patch.
Attachment #8643366 - Flags: review?(pdahiya)
(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #12) > Comment on attachment 8643366 [details] > [gaia] zbraniecki:1170973-remove-l10n_date-from-gallery > mozilla-b2g:master > > Agh! I forgot to remove references to l10n_date.js. Follow up patch. Try server is orange, it shouldn't be related, re-triggered job to see if it passes.
Comment on attachment 8643366 [details] [gaia] zbraniecki:1170973-remove-l10n_date-from-gallery > mozilla-b2g:master Attached patch is failing tests on tree herder, please check. Tests are passing on latest master. Looking at the patch, I couldn't point why tests are failing, I will pull patch on local and update bug if able to figure out the issue.
Attachment #8643366 - Flags: review?(pdahiya) → review-
Yeah, I don't know how to fix this because when I try to run those three tests locally on vanilla master, I get the same error for all three: "NoSuchElement: NoSuchElement: Unable to locate element: .thumbnail" If I can't get master to work, it's hard to debug my PR.
Comment on attachment 8644526 [details] [gaia] punamdahiya:tmp_1170973 > mozilla-b2g:master That's just a test patch for running tests on tree herder, marking obsolete
Attachment #8644526 - Attachment is obsolete: true
Debugged and in the follow up patch three tests are failing where we are using media frames to display images in full screen view. Code inside shared/js/media/media_frame.js is using navigator.mozL10n.DateTimeFormat and fails when l10_date.js is not included in index.html and open.html. Media Frames is used by Camera app also to preview image. I will recommend removing l10n_date dependency from media_frame.js as a separate bug as part of which it will be safe to remove l10n_date references from gallery. Thanks!
Flags: needinfo?(gandalf)
Cancelling NI, l10n_date.js dependency for shared/js/media/media_frame API is fixed as part of Bug 1197454
Flags: needinfo?(gandalf)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: