Closed Bug 997589 Opened 10 years ago Closed 3 years ago

Snippets display in system locale, not app locale

Categories

(Firefox for Android Graveyard :: Locale switching and selection, defect, P5)

All
Android
defect

Tracking

(firefox31 unaffected, firefox32 affected, firefox33 affected)

RESOLVED INCOMPLETE
Tracking Status
firefox31 --- unaffected
firefox32 --- affected
firefox33 --- affected

People

(Reporter: rnewman, Unassigned)

References

Details

Attachments

(1 file)

      No description provided.
What if you leave your browser in that running locale for over a day?

I suspect what's happening here is that we requested those snippets in your original locale, and we haven't updated snippets since then. We use the urlFormatter service to place the locale in the URL we use for the snippets request:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/components/Snippets.js#42

We could also purge cached snippets when the locale changes.
(In reply to :Margaret Leibovic from comment #1)
> What if you leave your browser in that running locale for over a day?

Heh, haven't lasted that long yet :D

Is there a way I can manually trigger the daily action?

> We could also purge cached snippets when the locale changes.

Seems like a reasonable idea. The persisted locale should already be set in Gecko by the time the snippets fetcher runs (it's set once, when the locale is picked), so this being a caching problem seems reasonable.

Maybe make the snippets component watch the locale pref on the Gecko side?
(In reply to Richard Newman [:rnewman] from comment #2)
> (In reply to :Margaret Leibovic from comment #1)
> > What if you leave your browser in that running locale for over a day?
> 
> Heh, haven't lasted that long yet :D
> 
> Is there a way I can manually trigger the daily action?

Go into about:config and reset app.update.lastUpdateTime.snippets-update-timer, then wait for the update timer to fire again (might need to restart the browser).

> > We could also purge cached snippets when the locale changes.
> 
> Seems like a reasonable idea. The persisted locale should already be set in
> Gecko by the time the snippets fetcher runs (it's set once, when the locale
> is picked), so this being a caching problem seems reasonable.
> 
> Maybe make the snippets component watch the locale pref on the Gecko side?

We could do that. Then we can just purge the snippets cache and reset the update timer when the locale changes. We would also need to make sure to call Home.banner.remove on snippets messages that are already in the banner.
Running into this when testing the in-UI locale changer
Yup, it's totally expected at this point.
No longer blocks: 935025
Component: General → Locale switching and selection
Blocks: 1281527
Blocks: 1398209
Re-triaging per https://bugzilla.mozilla.org/show_bug.cgi?id=1473195

Needinfo :susheel if you think this bug should be re-triaged.
Priority: -- → P5
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
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: