Bug 1214955: [webext] Automatically localize all localizable manifest properties. r=billm

MozReview-Commit-ID: 2kvYT44NIE8
This commit is contained in:
Kris Maglione
2016-02-29 19:34:49 -08:00
parent 6fcaf28c0a
commit 2d83ab587e
14 changed files with 223 additions and 82 deletions

View File

@@ -36,7 +36,7 @@ global.IconDetails = {
//
// If no context is specified, instead of throwing an error, this
// function simply logs a warning message.
normalize(details, extension, context = null, localize = false) {
normalize(details, extension, context = null) {
let result = {};
try {
@@ -73,12 +73,7 @@ global.IconDetails = {
throw new Error(`Invalid icon size ${size}, must be an integer`);
}
let url = path[size];
if (localize) {
url = extension.localize(url);
}
url = baseURI.resolve(path[size]);
let url = baseURI.resolve(path[size]);
// The Chrome documentation specifies these parameters as
// relative paths. We currently accept absolute URLs as well,