bug 1355788 rename Appearance to Themes r?aswan
MozReview-Commit-ID: mUhecHDOUD
--- a/browser/experiments/Experiments.jsm
+++ b/browser/experiments/Experiments.jsm
@@ -50,17 +50,16 @@ const PREF_LOGGING = "loggi
const PREF_LOGGING_LEVEL = PREF_LOGGING + ".level"; // experiments.logging.level
const PREF_LOGGING_DUMP = PREF_LOGGING + ".dump"; // experiments.logging.dump
const PREF_MANIFEST_URI = "manifest.uri"; // experiments.logging.manifest.uri
const PREF_FORCE_SAMPLE = "force-sample-value"; // experiments.force-sample-value
const PREF_TELEMETRY_ENABLED = "toolkit.telemetry.enabled";
const URI_EXTENSION_STRINGS = "chrome://mozapps/locale/extensions/extensions.properties";
-const STRING_TYPE_NAME = "type.%ID%.name";
const CACHE_WRITE_RETRY_DELAY_SEC = 60 * 3;
const MANIFEST_FETCH_TIMEOUT_MSEC = 60 * 3 * 1000; // 3 minutes
const TELEMETRY_LOG = {
// log(key, [kind, experimentId, details])
ACTIVATION_KEY: "EXPERIMENT_ACTIVATION",
ACTIVATION: {
@@ -533,17 +532,17 @@ Experiments.Experiments.prototype = {
if (!gAddonProvider) {
// The properties of this AddonType should be kept in sync with the
// experiment AddonType registered in XPIProvider.
this._log.trace("Registering previous experiment add-on provider.");
gAddonProvider = previousExperimentsProvider || new Experiments.PreviousExperimentProvider(this);
AddonManagerPrivate.registerProvider(gAddonProvider, [
new AddonManagerPrivate.AddonType("experiment",
URI_EXTENSION_STRINGS,
- STRING_TYPE_NAME,
+ "type.experiment.name",
AddonManager.VIEW_TYPE_LIST,
11000,
AddonManager.TYPE_UI_HIDE_EMPTY),
]);
}
},
--- a/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties
+++ b/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties
@@ -177,16 +177,16 @@ addon.purchase.tooltip=Visit the add-ons
# view, %S is the price of the add-on including currency symbol
cmd.purchaseAddon.label=Purchase for %S…
cmd.purchaseAddon.accesskey=u
#LOCALIZATION NOTE (eulaHeader) %S is name of the add-on asking the user to agree to the EULA
eulaHeader=%S requires that you accept the following End User License Agreement before installation can proceed:
type.extension.name=Extensions
-type.theme.name=Appearance
+type.themes.name=Themes
type.locale.name=Languages
type.plugin.name=Plugins
type.dictionary.name=Dictionaries
type.service.name=Services
type.experiment.name=Experiments
type.legacy.name=Legacy Extensions
type.unsupported.name=Unsupported
--- a/toolkit/mozapps/extensions/AddonManager.jsm
+++ b/toolkit/mozapps/extensions/AddonManager.jsm
@@ -561,19 +561,17 @@ AddonCompatibilityOverride.prototype = {
* of add-ons.
*
* @param aID
* The add-on type ID
* @param aLocaleURI
* The URI of a localized properties file to get the displayable name
* for the type from
* @param aLocaleKey
- * The key for the string in the properties file or the actual display
- * name if aLocaleURI is null. Include %ID% to include the type ID in
- * the key
+ * The key for the string in the properties file.
* @param aViewType
* The optional type of view to use in the UI
* @param aUIPriority
* The priority is used by the UI to list the types in order. Lower
* values push the type higher in the list.
* @param aFlags
* An option set of flags that customize the display of the add-on in
* the UI.
@@ -593,17 +591,17 @@ function AddonType(aID, aLocaleURI, aLoc
this.id = aID;
this.uiPriority = aUIPriority;
this.viewType = aViewType;
this.flags = aFlags;
if (aLocaleURI) {
XPCOMUtils.defineLazyGetter(this, "name", () => {
let bundle = Services.strings.createBundle(aLocaleURI);
- return bundle.GetStringFromName(aLocaleKey.replace("%ID%", aID));
+ return bundle.GetStringFromName(aLocaleKey);
});
} else {
this.name = aLocaleKey;
}
}
var gStarted = false;
var gStartupComplete = false;
--- a/toolkit/mozapps/extensions/LightweightThemeManager.jsm
+++ b/toolkit/mozapps/extensions/LightweightThemeManager.jsm
@@ -18,18 +18,16 @@ const ID_SUFFIX = "@persona
const PREF_LWTHEME_TO_SELECT = "extensions.lwThemeToSelect";
const PREF_GENERAL_SKINS_SELECTEDSKIN = "general.skins.selectedSkin";
const PREF_SKIN_TO_SELECT = "extensions.lastSelectedSkin";
const ADDON_TYPE = "theme";
const ADDON_TYPE_WEBEXT = "webextension-theme";
const URI_EXTENSION_STRINGS = "chrome://mozapps/locale/extensions/extensions.properties";
-const STRING_TYPE_NAME = "type.%ID%.name";
-
const DEFAULT_MAX_USED_THEMES_COUNT = 30;
const MAX_PREVIEW_SECONDS = 30;
const MANDATORY = ["id", "name", "headerURL"];
const OPTIONAL = ["footerURL", "textcolor", "accentcolor", "iconURL",
"previewURL", "author", "description", "homepageURL",
"updateURL", "version"];
@@ -896,11 +894,11 @@ function _persistProgressListener(succes
} catch (e) { }
// failure
}
};
}
AddonManagerPrivate.registerProvider(LightweightThemeManager, [
new AddonManagerPrivate.AddonType("theme", URI_EXTENSION_STRINGS,
- STRING_TYPE_NAME,
+ "type.themes.name",
AddonManager.VIEW_TYPE_LIST, 5000)
]);
--- a/toolkit/mozapps/extensions/internal/GMPProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/GMPProvider.jsm
@@ -23,17 +23,16 @@ Cu.import("resource://gre/modules/AppCon
Cu.import("resource://gre/modules/UpdateUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(
this, "GMPInstallManager", "resource://gre/modules/GMPInstallManager.jsm");
XPCOMUtils.defineLazyModuleGetter(
this, "setTimeout", "resource://gre/modules/Timer.jsm");
const URI_EXTENSION_STRINGS = "chrome://mozapps/locale/extensions/extensions.properties";
-const STRING_TYPE_NAME = "type.%ID%.name";
const SEC_IN_A_DAY = 24 * 60 * 60;
// How long to wait after a user enabled EME before attempting to download CDMs.
const GMP_CHECK_DELAY = 10 * 1000; // milliseconds
const NS_GRE_DIR = "GreD";
const CLEARKEY_PLUGIN_ID = "gmp-clearkey";
const CLEARKEY_VERSION = "0.1";
@@ -683,12 +682,12 @@ var GMPProvider = {
}
}
}
},
};
AddonManagerPrivate.registerProvider(GMPProvider, [
new AddonManagerPrivate.AddonType("plugin", URI_EXTENSION_STRINGS,
- STRING_TYPE_NAME,
+ "type.plugin.name",
AddonManager.VIEW_TYPE_LIST, 6000,
AddonManager.TYPE_SUPPORTS_ASK_TO_ACTIVATE)
]);
--- a/toolkit/mozapps/extensions/internal/PluginProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/PluginProvider.jsm
@@ -12,17 +12,16 @@ const Cu = Components.utils;
this.EXPORTED_SYMBOLS = [];
Cu.import("resource://gre/modules/AddonManager.jsm");
/* globals AddonManagerPrivate*/
Cu.import("resource://gre/modules/Services.jsm");
const URI_EXTENSION_STRINGS = "chrome://mozapps/locale/extensions/extensions.properties";
-const STRING_TYPE_NAME = "type.%ID%.name";
const LIST_UPDATED_TOPIC = "plugins-list-updated";
const FLASH_MIME_TYPE = "application/x-shockwave-flash";
Cu.import("resource://gre/modules/Log.jsm");
const LOGGER_ID = "addons.plugins";
// Create a new logger for use by the Addons Plugin Provider
// (Requires AddonManager.jsm)
@@ -564,12 +563,12 @@ PluginWrapper.prototype = {
aListener.onNoUpdateAvailable(this);
if ("onUpdateFinished" in aListener)
aListener.onUpdateFinished(this);
}
};
AddonManagerPrivate.registerProvider(PluginProvider, [
new AddonManagerPrivate.AddonType("plugin", URI_EXTENSION_STRINGS,
- STRING_TYPE_NAME,
+ "type.plugin.name",
AddonManager.VIEW_TYPE_LIST, 6000,
AddonManager.TYPE_SUPPORTS_ASK_TO_ACTIVATE)
]);
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -105,18 +105,16 @@ const OBSOLETE_PREFERENCES = [
"extensions.enabledAddons",
"extensions.xpiState",
"extensions.installCache",
];
const URI_EXTENSION_UPDATE_DIALOG = "chrome://mozapps/content/extensions/update.xul";
const URI_EXTENSION_STRINGS = "chrome://mozapps/locale/extensions/extensions.properties";
-const STRING_TYPE_NAME = "type.%ID%.name";
-
const DIR_EXTENSIONS = "extensions";
const DIR_SYSTEM_ADDONS = "features";
const DIR_STAGE = "staged";
const DIR_TRASH = "trash";
const FILE_XPI_STATES = "addonStartup.json.lz4";
const FILE_DATABASE = "extensions.json";
const FILE_OLD_CACHE = "extensions.cache";
@@ -6929,38 +6927,38 @@ this.XPIInternal = {
isWebExtension,
recordAddonTelemetry,
get XPIDatabase() { return gGlobalScope.XPIDatabase; },
};
var addonTypes = [
new AddonManagerPrivate.AddonType("extension", URI_EXTENSION_STRINGS,
- STRING_TYPE_NAME,
+ "type.extension.name",
AddonManager.VIEW_TYPE_LIST, 4000,
AddonManager.TYPE_SUPPORTS_UNDO_RESTARTLESS_UNINSTALL),
new AddonManagerPrivate.AddonType("theme", URI_EXTENSION_STRINGS,
- STRING_TYPE_NAME,
+ "type.themes.name",
AddonManager.VIEW_TYPE_LIST, 5000),
new AddonManagerPrivate.AddonType("dictionary", URI_EXTENSION_STRINGS,
- STRING_TYPE_NAME,
+ "type.dictionary.name",
AddonManager.VIEW_TYPE_LIST, 7000,
AddonManager.TYPE_UI_HIDE_EMPTY | AddonManager.TYPE_SUPPORTS_UNDO_RESTARTLESS_UNINSTALL),
new AddonManagerPrivate.AddonType("locale", URI_EXTENSION_STRINGS,
- STRING_TYPE_NAME,
+ "type.locale.name",
AddonManager.VIEW_TYPE_LIST, 8000,
AddonManager.TYPE_UI_HIDE_EMPTY | AddonManager.TYPE_SUPPORTS_UNDO_RESTARTLESS_UNINSTALL),
];
// We only register experiments support if the application supports them.
// Ideally, we would install an observer to watch the pref. Installing
// an observer for this pref is not necessary here and may be buggy with
// regards to registering this XPIProvider twice.
if (Services.prefs.getBoolPref("experiments.supported", false)) {
addonTypes.push(
new AddonManagerPrivate.AddonType("experiment",
URI_EXTENSION_STRINGS,
- STRING_TYPE_NAME,
+ "type.experiment.name",
AddonManager.VIEW_TYPE_LIST, 11000,
AddonManager.TYPE_UI_HIDE_EMPTY | AddonManager.TYPE_SUPPORTS_UNDO_RESTARTLESS_UNINSTALL));
}
AddonManagerPrivate.registerProvider(XPIProvider, addonTypes);