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)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: zbraniecki, Assigned: zbraniecki)
References
Details
Attachments
(2 files, 1 obsolete file)
No description provided.
Assignee | ||
Comment 1•10 years ago
|
||
Punam, this is one more patch, this time to move from l10n_date to Intl API.
Assignee | ||
Comment 2•10 years ago
|
||
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.
Comment 3•9 years ago
|
||
(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!
Comment 4•9 years ago
|
||
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!
Updated•9 years ago
|
Attachment #8614617 -
Flags: review?(pdahiya)
Assignee | ||
Comment 5•9 years ago
|
||
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)
Comment 6•9 years ago
|
||
(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)
Assignee | ||
Comment 7•9 years ago
|
||
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)
Assignee | ||
Comment 8•9 years ago
|
||
Filed as bug 1190593
Comment 9•9 years ago
|
||
Comment on attachment 8614617 [details]
patch
Thanks Zibi for looking into it, patch LGTM and has my r+.
Attachment #8614617 -
Flags: review?(pdahiya) → review+
Assignee | ||
Comment 10•9 years ago
|
||
Commit: https://github.com/mozilla-b2g/gaia/commit/caba8b26c52d3c771e9ea6fe288acdaf74c7707e
Thanks for the review!
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment 11•9 years ago
|
||
Assignee | ||
Comment 12•9 years ago
|
||
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)
Comment 13•9 years ago
|
||
(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 14•9 years ago
|
||
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-
Assignee | ||
Comment 15•9 years ago
|
||
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 16•9 years ago
|
||
Comment 17•9 years ago
|
||
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
Comment 18•9 years ago
|
||
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)
Comment 19•9 years ago
|
||
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.
Description
•