Bug 1294220 - part5: Remove the "chrome://" protocol when using LocalizationHelper;r=tromey

MozReview-Commit-ID: JzT8RyPhHwA

--HG--
extra : rebase_source : 515f68591ec275d4c7202e12dcc8ea06c3b4ba60
This commit is contained in:
Julian Descottes 2016-08-20 21:59:34 +02:00
Родитель d37032924c
Коммит 463be2090c
36 изменённых файлов: 41 добавлений и 41 удалений

Просмотреть файл

@ -23,7 +23,7 @@ loader.lazyRequireGetter(this, "AnimationsFront", "devtools/shared/fronts/animat
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const STRINGS_URI = "chrome://devtools/locale/animationinspector.properties"; const STRINGS_URI = "devtools/locale/animationinspector.properties";
const L10N = new LocalizationHelper(STRINGS_URI); const L10N = new LocalizationHelper(STRINGS_URI);
// Global toolbox/inspector, set when startup is called. // Global toolbox/inspector, set when startup is called.

Просмотреть файл

@ -11,7 +11,7 @@ const {createNode, TimeScale} = require("devtools/client/animationinspector/util
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const STRINGS_URI = "chrome://devtools/locale/animationinspector.properties"; const STRINGS_URI = "devtools/locale/animationinspector.properties";
const L10N = new LocalizationHelper(STRINGS_URI); const L10N = new LocalizationHelper(STRINGS_URI);
/** /**

Просмотреть файл

@ -10,7 +10,7 @@ const EventEmitter = require("devtools/shared/event-emitter");
const {createNode} = require("devtools/client/animationinspector/utils"); const {createNode} = require("devtools/client/animationinspector/utils");
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const STRINGS_URI = "chrome://devtools/locale/animationinspector.properties"; const STRINGS_URI = "devtools/locale/animationinspector.properties";
const L10N = new LocalizationHelper(STRINGS_URI); const L10N = new LocalizationHelper(STRINGS_URI);
// List of playback rate presets displayed in the timeline toolbar. // List of playback rate presets displayed in the timeline toolbar.

Просмотреть файл

@ -5,7 +5,7 @@
"use strict"; "use strict";
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const STRINGS_URI = "chrome://global/locale/layout_errors.properties"; const STRINGS_URI = "global/locale/layout_errors.properties";
const L10N = new LocalizationHelper(STRINGS_URI); const L10N = new LocalizationHelper(STRINGS_URI);
// Test that when an animation is selected, its list of animated properties is // Test that when an animation is selected, its list of animated properties is

Просмотреть файл

@ -9,7 +9,7 @@ requestLongerTimeout(2);
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const STRINGS_URI = "chrome://devtools/locale/animationinspector.properties"; const STRINGS_URI = "devtools/locale/animationinspector.properties";
const L10N = new LocalizationHelper(STRINGS_URI); const L10N = new LocalizationHelper(STRINGS_URI);
add_task(function* () { add_task(function* () {

Просмотреть файл

@ -11,7 +11,7 @@ requestLongerTimeout(2);
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const STRINGS_URI = "chrome://devtools/locale/animationinspector.properties"; const STRINGS_URI = "devtools/locale/animationinspector.properties";
const L10N = new LocalizationHelper(STRINGS_URI); const L10N = new LocalizationHelper(STRINGS_URI);
add_task(function* () { add_task(function* () {

Просмотреть файл

@ -10,7 +10,7 @@ loader.lazyRequireGetter(this, "EventEmitter", "devtools/shared/event-emitter");
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const STRINGS_URI = "chrome://devtools/locale/animationinspector.properties"; const STRINGS_URI = "devtools/locale/animationinspector.properties";
const L10N = new LocalizationHelper(STRINGS_URI); const L10N = new LocalizationHelper(STRINGS_URI);
// How many times, maximum, can we loop before we find the optimal time // How many times, maximum, can we loop before we find the optimal time

Просмотреть файл

@ -77,8 +77,8 @@ const EVENTS = {
XPCOMUtils.defineConstant(this, "EVENTS", EVENTS); XPCOMUtils.defineConstant(this, "EVENTS", EVENTS);
const HTML_NS = "http://www.w3.org/1999/xhtml"; const HTML_NS = "http://www.w3.org/1999/xhtml";
const STRINGS_URI = "chrome://devtools/locale/canvasdebugger.properties"; const STRINGS_URI = "devtools/locale/canvasdebugger.properties";
const SHARED_STRINGS_URI = "chrome://devtools/locale/shared.properties"; const SHARED_STRINGS_URI = "devtools/locale/shared.properties";
const SNAPSHOT_START_RECORDING_DELAY = 10; // ms const SNAPSHOT_START_RECORDING_DELAY = 10; // ms
const SNAPSHOT_DATA_EXPORT_MAX_BLOCK = 1000; // ms const SNAPSHOT_DATA_EXPORT_MAX_BLOCK = 1000; // ms

Просмотреть файл

@ -7,7 +7,7 @@
var { classes: Cc, interfaces: Ci, utils: Cu } = Components; var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
const DBG_STRINGS_URI = "chrome://devtools/locale/debugger.properties"; const DBG_STRINGS_URI = "devtools/locale/debugger.properties";
const NEW_SOURCE_IGNORED_URLS = ["debugger eval code", "XStringBundle"]; const NEW_SOURCE_IGNORED_URLS = ["debugger eval code", "XStringBundle"];
const NEW_SOURCE_DISPLAY_DELAY = 200; // ms const NEW_SOURCE_DISPLAY_DELAY = 200; // ms
const FETCH_SOURCE_RESPONSE_DELAY = 200; // ms const FETCH_SOURCE_RESPONSE_DELAY = 200; // ms

Просмотреть файл

@ -20,7 +20,7 @@ XPCOMUtils.defineConstant(this, "require", require);
// Localization // Localization
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
this.l10n = new LocalizationHelper("chrome://devtools/locale/dom.properties"); this.l10n = new LocalizationHelper("devtools/locale/dom.properties");
// Load DOM panel content // Load DOM panel content
require("./content/dom-view.js"); require("./content/dom-view.js");

Просмотреть файл

@ -13,8 +13,8 @@ const {ReflowFront} = require("devtools/shared/fronts/layout");
const {LocalizationHelper} = require("devtools/client/shared/l10n"); const {LocalizationHelper} = require("devtools/client/shared/l10n");
const {getCssProperties} = require("devtools/shared/fronts/css-properties"); const {getCssProperties} = require("devtools/shared/fronts/css-properties");
const STRINGS_URI = "chrome://devtools/locale/shared.properties"; const STRINGS_URI = "devtools/locale/shared.properties";
const STRINGS_INSPECTOR = "chrome://devtools-shared/locale/styleinspector.properties"; const STRINGS_INSPECTOR = "devtools-shared/locale/styleinspector.properties";
const SHARED_L10N = new LocalizationHelper(STRINGS_URI); const SHARED_L10N = new LocalizationHelper(STRINGS_URI);
const INSPECTOR_L10N = new LocalizationHelper(STRINGS_INSPECTOR); const INSPECTOR_L10N = new LocalizationHelper(STRINGS_INSPECTOR);
const NUMERIC = /^-?[\d\.]+$/; const NUMERIC = /^-?[\d\.]+$/;

Просмотреть файл

@ -8,7 +8,7 @@ const EventEmitter = require("devtools/shared/event-emitter");
const {createNode} = require("devtools/client/animationinspector/utils"); const {createNode} = require("devtools/client/animationinspector/utils");
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const STRINGS_URI = "chrome://devtools/locale/inspector.properties"; const STRINGS_URI = "devtools/locale/inspector.properties";
const L10N = new LocalizationHelper(STRINGS_URI); const L10N = new LocalizationHelper(STRINGS_URI);
/** /**

Просмотреть файл

@ -5,7 +5,7 @@
const { Cu, Cc, Ci } = require("chrome"); const { Cu, Cc, Ci } = require("chrome");
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const STRINGS_URI = "chrome://devtools/locale/memory.properties"; const STRINGS_URI = "devtools/locale/memory.properties";
const L10N = exports.L10N = new LocalizationHelper(STRINGS_URI); const L10N = exports.L10N = new LocalizationHelper(STRINGS_URI);
const { OS } = require("resource://gre/modules/osfile.jsm"); const { OS } = require("resource://gre/modules/osfile.jsm");

Просмотреть файл

@ -11,7 +11,7 @@ const appInfo = Services.appinfo;
loader.lazyRequireGetter(this, "NetworkHelper", "devtools/shared/webconsole/network-helper"); loader.lazyRequireGetter(this, "NetworkHelper", "devtools/shared/webconsole/network-helper");
loader.lazyGetter(this, "L10N", () => { loader.lazyGetter(this, "L10N", () => {
return new LocalizationHelper("chrome://devtools/locale/har.properties"); return new LocalizationHelper("devtools/locale/har.properties");
}); });
const HAR_VERSION = "1.1"; const HAR_VERSION = "1.1";

Просмотреть файл

@ -35,8 +35,8 @@ const {gDevTools} = require("devtools/client/framework/devtools");
/** /**
* Localization convenience methods. * Localization convenience methods.
*/ */
const NET_STRINGS_URI = "chrome://devtools/locale/netmonitor.properties"; const NET_STRINGS_URI = "devtools/locale/netmonitor.properties";
const WEBCONSOLE_STRINGS_URI = "chrome://devtools/locale/webconsole.properties"; const WEBCONSOLE_STRINGS_URI = "devtools/locale/webconsole.properties";
var L10N = new LocalizationHelper(NET_STRINGS_URI); var L10N = new LocalizationHelper(NET_STRINGS_URI);
const WEBCONSOLE_L10N = new LocalizationHelper(WEBCONSOLE_STRINGS_URI); const WEBCONSOLE_L10N = new LocalizationHelper(WEBCONSOLE_STRINGS_URI);

Просмотреть файл

@ -4,7 +4,7 @@
"use strict"; "use strict";
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const STRINGS_URI = "chrome://devtools/locale/jit-optimizations.properties"; const STRINGS_URI = "devtools/locale/jit-optimizations.properties";
const L10N = new LocalizationHelper(STRINGS_URI); const L10N = new LocalizationHelper(STRINGS_URI);
const { PluralForm } = require("resource://gre/modules/PluralForm.jsm"); const { PluralForm } = require("resource://gre/modules/PluralForm.jsm");

Просмотреть файл

@ -4,7 +4,7 @@
"use strict"; "use strict";
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const STRINGS_URI = "chrome://devtools/locale/jit-optimizations.properties"; const STRINGS_URI = "devtools/locale/jit-optimizations.properties";
const L10N = new LocalizationHelper(STRINGS_URI); const L10N = new LocalizationHelper(STRINGS_URI);
const { assert } = require("devtools/shared/DevToolsUtils"); const { assert } = require("devtools/shared/DevToolsUtils");

Просмотреть файл

@ -10,8 +10,8 @@ const { PrefsHelper } = require("devtools/client/shared/prefs");
* Localization convenience methods. * Localization convenience methods.
*/ */
exports.L10N = new MultiLocalizationHelper( exports.L10N = new MultiLocalizationHelper(
"chrome://devtools/locale/markers.properties", "devtools/locale/markers.properties",
"chrome://devtools/locale/performance.properties" "devtools/locale/performance.properties"
); );
/** /**

Просмотреть файл

@ -11,7 +11,7 @@
*/ */
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const ITCHPAD_STRINGS_URI = "chrome://devtools/locale/projecteditor.properties"; const ITCHPAD_STRINGS_URI = "devtools/locale/projecteditor.properties";
const L10N = new LocalizationHelper(ITCHPAD_STRINGS_URI); const L10N = new LocalizationHelper(ITCHPAD_STRINGS_URI);
function getLocalizedString(name) { function getLocalizedString(name) {

Просмотреть файл

@ -5,7 +5,7 @@
"use strict"; "use strict";
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const STRINGS_URI = "chrome://devtools/locale/responsive.properties"; const STRINGS_URI = "devtools/locale/responsive.properties";
const L10N = new LocalizationHelper(STRINGS_URI); const L10N = new LocalizationHelper(STRINGS_URI);
module.exports = { module.exports = {

Просмотреть файл

@ -41,7 +41,7 @@ const ROUND_RATIO = 10;
const INPUT_PARSER = /(\d+)[^\d]+(\d+)/; const INPUT_PARSER = /(\d+)[^\d]+(\d+)/;
const SHARED_L10N = new LocalizationHelper("chrome://devtools/locale/shared.properties"); const SHARED_L10N = new LocalizationHelper("devtools/locale/shared.properties");
function debug(msg) { function debug(msg) {
// dump(`RDM UI: ${msg}\n`); // dump(`RDM UI: ${msg}\n`);

Просмотреть файл

@ -38,7 +38,7 @@ const EVENTS = {
}; };
XPCOMUtils.defineConstant(this, "EVENTS", EVENTS); XPCOMUtils.defineConstant(this, "EVENTS", EVENTS);
const STRINGS_URI = "chrome://devtools/locale/shadereditor.properties"; const STRINGS_URI = "devtools/locale/shadereditor.properties";
const HIGHLIGHT_TINT = [1, 0, 0.25, 1]; // rgba const HIGHLIGHT_TINT = [1, 0, 0.25, 1]; // rgba
const TYPING_MAX_DELAY = 500; // ms const TYPING_MAX_DELAY = 500; // ms
const SHADERS_AUTOGROW_ITEMS = 4; const SHADERS_AUTOGROW_ITEMS = 4;

Просмотреть файл

@ -9,8 +9,8 @@ const { getSourceNames, parseURL,
isScratchpadScheme, getSourceMappedFile } = require("devtools/client/shared/source-utils"); isScratchpadScheme, getSourceMappedFile } = require("devtools/client/shared/source-utils");
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const l10n = new LocalizationHelper("chrome://devtools/locale/components.properties"); const l10n = new LocalizationHelper("devtools/locale/components.properties");
const webl10n = new LocalizationHelper("chrome://devtools/locale/webconsole.properties"); const webl10n = new LocalizationHelper("devtools/locale/webconsole.properties");
module.exports = createClass({ module.exports = createClass({
displayName: "Frame", displayName: "Frame",

Просмотреть файл

@ -9,7 +9,7 @@ const { DOM: dom, createClass, createFactory, PropTypes } = React;
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const Frame = createFactory(require("./frame")); const Frame = createFactory(require("./frame"));
const l10n = new LocalizationHelper("chrome://devtools/locale/webconsole.properties"); const l10n = new LocalizationHelper("devtools/locale/webconsole.properties");
const AsyncFrame = createFactory(createClass({ const AsyncFrame = createFactory(createClass({
displayName: "AsyncFrame", displayName: "AsyncFrame",

Просмотреть файл

@ -97,7 +97,7 @@ LocalizationHelper.prototype = {
} }
}; };
const sharedL10N = new LocalizationHelper("chrome://devtools/locale/shared.properties"); const sharedL10N = new LocalizationHelper("devtools/locale/shared.properties");
const ELLIPSIS = sharedL10N.getStr("ellipsis"); const ELLIPSIS = sharedL10N.getStr("ellipsis");
/** /**

Просмотреть файл

@ -5,7 +5,7 @@
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const l10n = new LocalizationHelper("chrome://devtools/locale/components.properties"); const l10n = new LocalizationHelper("devtools/locale/components.properties");
const UNKNOWN_SOURCE_STRING = l10n.getStr("frame.unknownSource"); const UNKNOWN_SOURCE_STRING = l10n.getStr("frame.unknownSource");
// Character codes used in various parsing helper functions. // Character codes used in various parsing helper functions.

Просмотреть файл

@ -8,7 +8,7 @@
const {CSSFilterEditorWidget} = require("devtools/client/shared/widgets/FilterWidget"); const {CSSFilterEditorWidget} = require("devtools/client/shared/widgets/FilterWidget");
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const STRINGS_URI = "chrome://devtools/locale/filterwidget.properties"; const STRINGS_URI = "devtools/locale/filterwidget.properties";
const L10N = new LocalizationHelper(STRINGS_URI); const L10N = new LocalizationHelper(STRINGS_URI);
const TEST_URI = `data:text/html,<div id="filter-container" />`; const TEST_URI = `data:text/html,<div id="filter-container" />`;

Просмотреть файл

@ -8,7 +8,7 @@
const {CSSFilterEditorWidget} = require("devtools/client/shared/widgets/FilterWidget"); const {CSSFilterEditorWidget} = require("devtools/client/shared/widgets/FilterWidget");
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const STRINGS_URI = "chrome://devtools/locale/filterwidget.properties"; const STRINGS_URI = "devtools/locale/filterwidget.properties";
const L10N = new LocalizationHelper(STRINGS_URI); const L10N = new LocalizationHelper(STRINGS_URI);
const TEST_URI = `data:text/html,<div id="filter-container" />`; const TEST_URI = `data:text/html,<div id="filter-container" />`;

Просмотреть файл

@ -8,7 +8,7 @@
const {CSSFilterEditorWidget} = require("devtools/client/shared/widgets/FilterWidget"); const {CSSFilterEditorWidget} = require("devtools/client/shared/widgets/FilterWidget");
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const STRINGS_URI = "chrome://devtools/locale/filterwidget.properties"; const STRINGS_URI = "devtools/locale/filterwidget.properties";
const L10N = new LocalizationHelper(STRINGS_URI); const L10N = new LocalizationHelper(STRINGS_URI);
const TEST_URI = `data:text/html,<div id="filter-container" />`; const TEST_URI = `data:text/html,<div id="filter-container" />`;

Просмотреть файл

@ -7,7 +7,7 @@
const Cu = Components.utils; const Cu = Components.utils;
const NET_STRINGS_URI = "chrome://devtools/locale/netmonitor.properties"; const NET_STRINGS_URI = "devtools/locale/netmonitor.properties";
const SVG_NS = "http://www.w3.org/2000/svg"; const SVG_NS = "http://www.w3.org/2000/svg";
const PI = Math.PI; const PI = Math.PI;
const TAU = PI * 2; const TAU = PI * 2;

Просмотреть файл

@ -14,7 +14,7 @@ const { Cc, Ci } = require("chrome");
const XHTML_NS = "http://www.w3.org/1999/xhtml"; const XHTML_NS = "http://www.w3.org/1999/xhtml";
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const STRINGS_URI = "chrome://devtools/locale/filterwidget.properties"; const STRINGS_URI = "devtools/locale/filterwidget.properties";
const L10N = new LocalizationHelper(STRINGS_URI); const L10N = new LocalizationHelper(STRINGS_URI);
const {cssTokenizer} = require("devtools/shared/css-parsing-utils"); const {cssTokenizer} = require("devtools/shared/css-parsing-utils");

Просмотреть файл

@ -6,7 +6,7 @@ const { AbstractCanvasGraph, CanvasGraphUtils } = require("devtools/client/share
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const HTML_NS = "http://www.w3.org/1999/xhtml"; const HTML_NS = "http://www.w3.org/1999/xhtml";
const L10N = new LocalizationHelper("chrome://devtools/locale/graphs.properties"); const L10N = new LocalizationHelper("devtools/locale/graphs.properties");
// Line graph constants. // Line graph constants.

Просмотреть файл

@ -8,7 +8,7 @@
const Ci = Components.interfaces; const Ci = Components.interfaces;
const Cu = Components.utils; const Cu = Components.utils;
const SHARED_STRINGS_URI = "chrome://devtools/locale/shared.properties"; const SHARED_STRINGS_URI = "devtools/locale/shared.properties";
const { require } = Cu.import("resource://devtools/shared/Loader.jsm", {}); const { require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
const EventEmitter = require("devtools/shared/event-emitter"); const EventEmitter = require("devtools/shared/event-emitter");

Просмотреть файл

@ -32,7 +32,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "console",
const MAX_LONG_STRING_LENGTH = 200000; const MAX_LONG_STRING_LENGTH = 200000;
const MAX_PROPERTY_ITEMS = 2000; const MAX_PROPERTY_ITEMS = 2000;
const DBG_STRINGS_URI = "chrome://devtools/locale/debugger.properties"; const DBG_STRINGS_URI = "devtools/locale/debugger.properties";
this.EXPORTED_SYMBOLS = ["VariablesViewController", "StackFrameUtils"]; this.EXPORTED_SYMBOLS = ["VariablesViewController", "StackFrameUtils"];

Просмотреть файл

@ -24,7 +24,7 @@ loader.lazyImporter(this, "VariablesView",
/** /**
* Localization convenience methods. * Localization convenience methods.
*/ */
const STORAGE_STRINGS = "chrome://devtools/locale/storage.properties"; const STORAGE_STRINGS = "devtools/locale/storage.properties";
const L10N = new LocalizationHelper(STORAGE_STRINGS); const L10N = new LocalizationHelper(STORAGE_STRINGS);
const GENERIC_VARIABLES_VIEW_SETTINGS = { const GENERIC_VARIABLES_VIEW_SETTINGS = {

Просмотреть файл

@ -17,7 +17,7 @@ const { gDevTools } = require("devtools/client/framework/devtools");
const { LocalizationHelper } = require("devtools/client/shared/l10n"); const { LocalizationHelper } = require("devtools/client/shared/l10n");
const { ViewHelpers } = require("devtools/client/shared/widgets/view-helpers"); const { ViewHelpers } = require("devtools/client/shared/widgets/view-helpers");
const STRINGS_URI = "chrome://devtools/locale/webaudioeditor.properties"; const STRINGS_URI = "devtools/locale/webaudioeditor.properties";
const L10N = new LocalizationHelper(STRINGS_URI); const L10N = new LocalizationHelper(STRINGS_URI);
loader.lazyRequireGetter(this, "LineGraphWidget", loader.lazyRequireGetter(this, "LineGraphWidget",