Closed Bug 668838 Opened 14 years ago Closed 14 years ago

Implement improved flow for language choice

Categories

(Firefox for Android Graveyard :: General, defect, P1)

defect

Tracking

(Not tracked)

VERIFIED FIXED
Firefox 9

People

(Reporter: wesj, Assigned: wesj)

References

Details

(Whiteboard: mobilestartupshrink,[inbound])

Attachments

(2 files, 3 obsolete files)

Attached image Flow diagram
The current locale picker defaults to showing "Continue in English", even if AMO has a locale pack that better matches the system. Instead we should offer something like, "Install Arabic Language". Clicking it should perform the download, install the language, and restart Fennec. Making it one click to get Fennec in your system locale. I'll attach a shot of the general flow I have implemented here.
Attached patch WIP (obsolete) — Splinter Review
Waiting for a second "flow" diagram from UX, but this patch applies on top of the patches in bug 668029 (although it actually just reverts some of those patches). Since I'll be out next week, wanted to make sure this was available somewhere.
Assignee: nobody → wjohnston
Whiteboard: mobilestartupshrink
Blocks: 674345
Attached file Patch v2 (obsolete) —
Applies on top of the patch in Bug 668029. If we don't have a locale matching the system one, checks AMO. If we find the locale, we download, install, and restart using it (no prompts for the user). If not, we show the locale picker UI (i.e. "Continue in English?"). Just remembered I need to add timeouts (if AMO doesn't respond). Also fixes a problem with seesion restore failing, but not notifying us, and leaving the user with blank tabs. We can't use the "browser.sessionstore.resume_session_once" pref because session restore watches for "restart-app" notifications and resets it. It worked (sometimes) before because we were winning a race.
Attachment #543515 - Attachment is obsolete: true
Attached patch Patch v2.1 (obsolete) — Splinter Review
This implements a timeout, in case we don't see a response from AMO in 5 seconds after the initial ping. With this and the other bug fixed a french speaker on single locale fennec will see (on firstrun only): Loading Splashscreen Installing Libraries splashscreen Loading Localepicker (i.e. pinging AMO for available locales) Installing French Language Pack (installing the locale we found) (Restart) Loading splashscreen about:home ... Yeah... that's getting up there. I can try to reduce the churn here a bit. We could combine the "Installing Francais Language Pack" screen with "Loading Localepicker" and with a bit of work we can make the "Loading Localepicker screen" mimic the splashscreens better so that this feels more like one screen with a changing message on it. Curious if anyone cares.
Attachment #550190 - Attachment is obsolete: true
Attachment #550237 - Flags: review?(mark.finkle)
Attached patch Patch v2.2Splinter Review
Fixed a problem with strings and cleaned up a little bit in this.
Attachment #550237 - Attachment is obsolete: true
Attachment #552526 - Flags: review?(mark.finkle)
Attachment #550237 - Flags: review?(mark.finkle)
Priority: -- → P1
Comment on attachment 552526 [details] [diff] [review] Patch v2.2 >diff --git a/mobile/chrome/content/localePicker.js b/mobile/chrome/content/localePicker.js >+ get availableLocales() { >+ this._availableLocales.push({addon: { id: locale, name: label, targetLocale: locale }}); { addon: >+ let timeout = setTimeout(function() { >+ LocaleUI._mainPage.removeAttribute("mode"); >+ timeout = null; >+ }, 5000); This just stops the throbber after 5 secs? A comment would help >+ LocaleRepository.getLocales(function lp_initalDownload(aLocales) { >+ for each (let locale in aLocales) { >+ let targetLang = getTargetLanguage(locale.addon); nit: we seem to use 'locale' a lot. Here you start using 'lang' and 'laguage' For the sake of letting devs know that these are equivalent, could we use targetLocale and getTargetLocale ? is localePicker.css in honeycomb yet? r+ with nits fixed
Attachment #552526 - Flags: review?(mark.finkle) → review+
Whiteboard: mobilestartupshrink → mobilestartupshrink,[inbound]
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 9
Depends on: 684724
Verified fixed on: Mozilla/5.0 (Android;Linux armv7l;rv:9.0a1)Gecko/20110927 Firefox/9.0a1 Fennec/9.0a1 Device: Acer ICONIA A500 OS: Android 3.1
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: