Locale picker shows up after update



Fennec Graveyard
6 years ago
4 years ago


(Reporter: Andreea Pod, Assigned: wesj)


(Blocks: 1 bug)




(2 attachments)



6 years ago
Mozilla /5.0 (Android;Linux armv7l;rv:9.0a1) Gecko/20111006 Firefox/10.0a1 Fennec/10.0a1
Device: LG Optimus 2X

Steps to reproduce:
1. Make sure you have yesterday's build
2. Change the language from english to something else 
3. Change the language back to english
4. Update to today's build

Expected results:
update should work with no problem and language after update should be english

Actual results:
after update the locale picker is shown


6 years ago
Whiteboard: DUPEME

Comment 1

6 years ago
So the issue here is that when you select a new locale, we update our stored locale buildid. After the update, that buildid doesn't match the Fennec builid anymore, so we assume that the locale isn't compatible.

Then we open the locale picker and check if there's a new version of the locale on AMO. We don't check our list of available system locales because, if we've gotten here with an incompatible locale, it would still appear in this list.

I think the fix is probably:

if the locale buildid and the system buildid don't match
  uninstall all locales through the AddonsManager
  reinstall what we can from the locales repository
  check the available locales list for anything that matches the users selected locale
    if we find it, use it and go on
    if we don't, show the locale picker and let them pick a new locale

I have some code to do just this in the updater. I think I'm going to move it to the locale repository so that I can reuse it in both cases.

Comment 2

6 years ago
Created attachment 565303 [details] [diff] [review]

Assignee: nobody → wjohnston


6 years ago
Blocks: 689706

Comment 3

6 years ago
Created attachment 565382 [details] [diff] [review]
Patch v1

This moves the "Uninstall, then reinstall" code from UpdatePrompt into LocaleRepository and adds a call into it from localePicker.

If the locale picker starts and finds the localeBuildID has a user set value, and that buildid doesn't match Fennec's buildID it will uninstall/reinstall locales. Best case scenario, LocaleRepo will uninstall and reinstall all your installed locales, update the stored build id, and the locale picker will trigger a restart.

There's a chance that the localerepo may not be able to reinstall all of your locales though, or that it will not be able to install the one you had selected. In that case, I am reverting the locale pref to its default, and showing the locale picker front screen.

However, during the daily update, if we have trouble updating your locale, I'm just reverting you back to english.

I'm nervous to use this without some tests. So I'm going to look into them next, but currently its impossible to actually install locales during tests (they're not restartless).
Attachment #565382 - Flags: review?(mark.finkle)
Attachment #565382 - Flags: review?(mark.finkle)
Closing this bug since we have no plans to move the locale picker code forward.
Last Resolved: 6 years ago
Resolution: --- → WONTFIX


4 years ago
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.