Closed Bug 668029 Opened 8 years ago Closed 8 years ago

Pull localized strings out of downloaded locales when using locale picker

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 8

People

(Reporter: wesj, Assigned: wesj)

References

Details

Attachments

(2 files, 3 obsolete files)

Attached file Patch v1 (obsolete) —
We'd like to update the UI after a locale is downloaded. This patch unzips the localepicker.properties file from the downloaded xpi, and then sets the current string bundle to use it.

This should also make it easier (if we want) to just auto-download a locale at firstrun and install it for you. For instance, while a spanish phone might download an single-locale english version of Fennec from the Android Market, it could on first run download and install the spanish language pack, and then prompt the user to "Continuar in Espanol".

Patch may leave a little trash in the users tmp directory. Need to clean that up.
Attached patch Patch v1.1 (obsolete) — Splinter Review
Adjusted to clean up after extracting strings.
Assignee: nobody → wjohnston
Attachment #542597 - Attachment is obsolete: true
Attachment #542608 - Flags: review?(mark.finkle)
Attached patch Patch Part 2 (obsolete) — Splinter Review
This implements the other half of this I mentioned in the first post. I'll post a set of screenshots showing the general flow (and layout) of things as implemented here. Essentially, if we don't already have the system locale in Fennec during startup, we pull the locale list from AMO (or me for now) and check if any of those match the system locale. If we find one we download and use it. Otherwise (or if the user cancels the download) we just default to "Continue in English".

I'm a bit worried about my choice to put the cancel button in the same place as the "Continue In" button, as it can lead to a mis-click on "Continue" if the switch happens right when your finger comes down.
Attached patch Patch v2Splinter Review
This uses strings sent by AMO. Points to a list of addons hosted on my people account.
Attachment #542608 - Attachment is obsolete: true
Attachment #542656 - Attachment is obsolete: true
Attachment #550187 - Flags: review?(mark.finkle)
Attachment #542608 - Flags: review?(mark.finkle)
Comment on attachment 550187 [details] [diff] [review]
Patch v2

>diff --git a/mobile/app/mobile.js b/mobile/app/mobile.js

>-pref("extensions.getLocales.get.url", "");
>+pref("extensions.getLocales.get.url", "http://people.mozilla.com/~wjohnston/nightly_locales.xml");

Maybe we should make people manually add this to test the code? Just leave it blank for now I think.

>diff --git a/mobile/chrome/content/localePicker.js b/mobile/chrome/content/localePicker.js
>+function FakeStringBundle(aAddon) {

>+}

Nice

>+  GetStringFromName: function(aName) {
>+    return this.strings[aName];
>+  }
>+}
>\ No newline at end of file

Add the newline
Attachment #550187 - Flags: review?(mark.finkle) → review+
http://hg.mozilla.org/mozilla-central/rev/bc3e24e625c2
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → Firefox 8
Blocks: 689706
You need to log in before you can comment on or make changes to this bug.