Closed Bug 748114 Opened 12 years ago Closed 12 years ago

Read localization files asynchronously

Categories

(Add-on SDK Graveyard :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

Attachments

(1 file)

`locales.json` and .properties files are currently read synchronously.
It is obviously bad for performances and error prone as it uses synchronous XHR.
We should load these files asynchronously.
The main issue is that localization function:
  let _ = require("l10n").get;
is synchronously and is expected to work immediatly on modules loading.
Ie basically means that properties files should already be loaded on main module loading.

So we will have to delay main module loading before these localization files are asynchronously loaded.
Assignee: nobody → poirot.alex
Attached file Pull request 409
Attachment #617663 - Flags: review?(rFobic)
Attachment #617663 - Flags: review?(rFobic) → review+
Commits pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/8a5386b4d028c2743bf9e72a941d15303a9c93e2
Bug 748114: Read localization files asynchronously

https://github.com/mozilla/addon-sdk/commit/7b39521b104e9f1d43400a904e302d7ec857067e
Merge pull request #409 from ochameau/bug/748114-read-l10n-files-async

Bug 748114: Read localization files asynchronously r=@gozala
I had to land an hotfix for a missing license header:
https://github.com/mozilla/addon-sdk/commit/1130fbf6ce11c657a2de4a8ad2581b93459705fc
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.10
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: