|
1 "use strict"; |
|
2 |
|
3 const Cu = Components.utils; |
|
4 const require = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}).devtools.require; |
|
5 const { L10N_BUNDLE } = require("devtools/profiler/consts"); |
|
6 |
|
7 Cu.import("resource:///modules/devtools/ViewHelpers.jsm"); |
|
8 var L10N = new ViewHelpers.L10N(L10N_BUNDLE); |
|
9 |
|
10 /** |
|
11 * Shortcuts for the L10N helper functions. Used in Cleopatra. |
|
12 */ |
|
13 var gStrings = { |
|
14 // This strings are here so that Cleopatra code could use a simple object |
|
15 // lookup. This makes it easier to merge upstream changes. |
|
16 "Complete Profile": L10N.getStr("profiler.completeProfile"), |
|
17 "Sample Range": L10N.getStr("profiler.sampleRange"), |
|
18 "Running Time": L10N.getStr("profiler.runningTime"), |
|
19 "Self": L10N.getStr("profiler.self"), |
|
20 "Symbol Name": L10N.getStr("profiler.symbolName"), |
|
21 |
|
22 getStr: function (name) { |
|
23 return L10N.getStr(name); |
|
24 }, |
|
25 |
|
26 getFormatStr: function (name, params) { |
|
27 return L10N.getFormatStr(name, params); |
|
28 } |
|
29 }; |