Reset Intl.DateTimeFormatter when language changes

NEW
Unassigned

Status

Firefox OS
Gaia::Gallery
2 years ago
2 years ago

People

(Reporter: gandalf, Unassigned)

Tracking

unspecified
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(b2g-v2.5 affected, b2g-master fixed)

Details

Attachments

(2 attachments)

(Reporter)

Description

2 years ago
That's a regression from bug 1170973. I don't reset the formatter when language changes.
Created attachment 8704334 [details] [review]
[gaia] zbraniecki:1237067-reset-formatter-in-gallery > mozilla-b2g:master
(Reporter)

Updated

2 years ago
Attachment #8704334 - Flags: review?(pdahiya)
(In reply to Autolander from comment #1)
> Created attachment 8704334 [details] [review]
> [gaia] zbraniecki:1237067-reset-formatter-in-gallery > mozilla-b2g:master

Zibi that was fast! this patch is perfect for 2.5, but it has merge conflict on master because of just landed l20n changes :)
Flags: needinfo?(gandalf)
(Reporter)

Comment 3

2 years ago
sorry for that! Fixed :)
Flags: needinfo?(gandalf)
Thanks Zibi, attached patch fixes group header on locale change. We are using formatter for thumbnail item desc for accessibility and similar reset is needed for ThumbnailItem.formatter.

https://github.com/mozilla-b2g/gaia/blob/master/apps/gallery/js/thumbnail_item.js#L39

I believe using IntlHelper is another approach to fix this issue, however that might make the patch bigger and difficult to uplift.
Flags: needinfo?(gandalf)
(Reporter)

Comment 5

2 years ago
Added!
Flags: needinfo?(gandalf)
Comment on attachment 8704334 [details] [review]
[gaia] zbraniecki:1237067-reset-formatter-in-gallery > mozilla-b2g:master

LGTM! We do need a 2.5 patch and request for the uplift. Thanks Zibi for the fix!
Attachment #8704334 - Flags: review?(pdahiya) → review+
Created attachment 8704782 [details] [review]
[gaia] zbraniecki:1237067-reset-formatter-in-gallery-2.5 > mozilla-b2g:v2.5
(Reporter)

Comment 8

2 years ago
Comment on attachment 8704782 [details] [review]
[gaia] zbraniecki:1237067-reset-formatter-in-gallery-2.5 > mozilla-b2g:v2.5

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): bug 1170973
[User impact] if declined: language change will not update date/time headers in Gallery
[Testing completed]: device
[Risk to taking this patch] (and alternatives if risky): none
[String changes made]: none
Attachment #8704782 - Flags: approval-gaia-v2.5?

Updated

2 years ago
status-b2g-v2.5: --- → affected
status-b2g-master: --- → fixed

Comment 9

2 years ago
Comment on attachment 8704782 [details] [review]
[gaia] zbraniecki:1237067-reset-formatter-in-gallery-2.5 > mozilla-b2g:v2.5

No needed for TV 2.5
Attachment #8704782 - Flags: approval-gaia-v2.5? → approval-gaia-v2.5-
You need to log in before you can comment on or make changes to this bug.