Bug 1246273 - Add localized strings for types and attempts in the JIT opts view. r=vp

This commit is contained in:
Jordan Santell 2016-02-05 13:26:09 -08:00
parent 25f6f2accf
commit 7667af09df
2 changed files with 11 additions and 6 deletions

View File

@ -26,6 +26,10 @@ jit.optimizationFailure=Optimization failed
# example: 30 samples
jit.samples=#1 sample;#1 samples
# LOCALIZATION NOTE (jit.empty):
# This string is displayed when there are no JIT optimizations to display.
jit.empty=No JIT optimizations recorded for this frame.
# LOCALIZATION NOTE (jit.types):
# This string is displayed for the group of Ion Types in the optimizations view.
jit.types=Types
# LOCALIZATION NOTE (jit.attempts):
# This string is displayed for the group of optimization attempts in the optimizations view.
jit.attempts=Attempts

View File

@ -14,7 +14,8 @@ const {
const Frame = createFactory(require("devtools/client/shared/components/frame"));
const OPTIMIZATION_FAILURE = L10N.getStr("jit.optimizationFailure");
const JIT_SAMPLES = L10N.getStr("jit.samples");
const JIT_EMPTY_TEXT = L10N.getStr("jit.empty");
const JIT_TYPES = L10N.getStr("jit.types");
const JIT_ATTEMPTS = L10N.getStr("jit.attempts");
const PROPNAME_MAX_LENGTH = 4;
// If TREE_ROW_HEIGHT changes, be sure to change `var(--jit-tree-row-height)`
// in `devtools/client/themes/jit-optimizations.css`
@ -100,13 +101,13 @@ const JITOptimizationsItem = module.exports = createClass({
_renderAttempts({ item: attempts }) {
return dom.span({ className: "optimization-attempts" },
`Attempts (${attempts.length})`
`${JIT_ATTEMPTS} (${attempts.length})`
);
},
_renderTypes({ item: types }) {
return dom.span({ className: "optimization-types" },
`Types (${types.length})`
`${JIT_TYPES} (${types.length})`
);
},