1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/devtools/profiler/cleopatra/js/strings.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,29 @@ 1.4 +"use strict"; 1.5 + 1.6 +const Cu = Components.utils; 1.7 +const require = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}).devtools.require; 1.8 +const { L10N_BUNDLE } = require("devtools/profiler/consts"); 1.9 + 1.10 +Cu.import("resource:///modules/devtools/ViewHelpers.jsm"); 1.11 +var L10N = new ViewHelpers.L10N(L10N_BUNDLE); 1.12 + 1.13 +/** 1.14 + * Shortcuts for the L10N helper functions. Used in Cleopatra. 1.15 + */ 1.16 +var gStrings = { 1.17 + // This strings are here so that Cleopatra code could use a simple object 1.18 + // lookup. This makes it easier to merge upstream changes. 1.19 + "Complete Profile": L10N.getStr("profiler.completeProfile"), 1.20 + "Sample Range": L10N.getStr("profiler.sampleRange"), 1.21 + "Running Time": L10N.getStr("profiler.runningTime"), 1.22 + "Self": L10N.getStr("profiler.self"), 1.23 + "Symbol Name": L10N.getStr("profiler.symbolName"), 1.24 + 1.25 + getStr: function (name) { 1.26 + return L10N.getStr(name); 1.27 + }, 1.28 + 1.29 + getFormatStr: function (name, params) { 1.30 + return L10N.getFormatStr(name, params); 1.31 + } 1.32 +};