Open Bug 1487315 Opened 6 years ago Updated 2 months ago

Port bug 1429610 to TB: Add APIs to handle langpack/dictionary discoverability and adding/removal

Categories

(Thunderbird :: Add-Ons: General, task)

Tracking

(Not tracked)

People

(Reporter: Paenglab, Unassigned)

References

Details

Attachments

(1 obsolete file)

From bug 1429610  comment 0:

In order to allow for dynamic langpack installation based on various criteria (OS locale selection, user choice in Preferences etc.) we'll need three APIs:

1) An API to poll the list of langpacks for the given version of a product available for installation (from AMO)
2) An API to initiate langpack download/install action
3) An API to remove a langpack from the product

My mock idea of how such APIs could look like:

```
let availableLocales = await AddonsManager.getAvailableLocales();

Promise.all(availableLocales.map(code => AddonsManager.installLangpack(code))).then(() => {
  console.log("All available locales installed!");
}).catch(e => {
  console.error(`Failed to install langpack ${e.locale}`);
});
```

The rest of the logic is handled by the langpack installer which fires L10nRegistry which updates LocaleService.
Andrej, is this possible on ATN or do we lack something?
Flags: needinfo?(sancus)
Component: General → Add-Ons: General

I realize this is a bit old, but we do support that API and always did. There should not be any changes needed for us, we can implement it the exact same way Firefox does. Easy to try:

https://addons.thunderbird.net/api/v3/addons/language-tools/?app=thunderbird&appversion=60.6.1&type=language

The main problem with this is that since we don't have automatic language pack upload working, the appropriate language packs aren't getting updated on ATN so only a couple are up to date.

That should not block any implementation or testing, but it would block release.

Depends on: 1490598
Flags: needinfo?(sancus)
Type: enhancement → task
Severity: normal → S3

Bug 1490598 (automatic langpack upload to ATN) is planned to hit 115 beta next week.

Attachment #9384522 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: