Skip to content
Snippets Groups Projects
Commit 56fb1058 authored by Julian Descottes's avatar Julian Descottes
Browse files

Bug 1489419 - Add i18n for DebugTargetList component;

Depends on D6606

Differential Revision: https://phabricator.services.mozilla.com/D6607

--HG--
extra : moz-landing-system : lando
parent 54e21e51
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,9 @@ const { createFactory, createRef, PureComponent } =
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const FluentReact = require("devtools/client/shared/vendor/fluent-react");
const Localized = createFactory(FluentReact.Localized);
const DebugTargetItem = createFactory(require("./DebugTargetItem"));
/**
......@@ -48,6 +51,18 @@ class DebugTargetList extends PureComponent {
return null;
}
renderEmptyList() {
return Localized(
{
id: "about-debugging-debug-target-list-empty"
},
dom.span(
{},
"Nothing yet."
)
);
}
render() {
const {
actionComponent,
......@@ -64,7 +79,7 @@ class DebugTargetList extends PureComponent {
ref: this.listRef,
},
targets.length === 0
? "Nothing yet."
? this.renderEmptyList()
: targets.map((target, key) =>
DebugTargetItem({ actionComponent, detailComponent, dispatch, key, target })),
);
......
......@@ -31,6 +31,10 @@ about-debugging-runtime-shared-workers = Shared Workers
# Title of the other workers category.
about-debugging-runtime-other-workers = Other Workers
# Displayed in the categories of "runtime" pages that don't have any debug target to
# show. Debug targets depend on the category (extensions, tabs, workers...).
about-debugging-debug-target-list-empty = Nothing yet.
# Text of a button displayed in the "This Firefox" page, in the Temporary Extension
# section. Clicking on the button will open a file picker to load a temporary extension
about-debugging-tmp-extension-install-button = Load Temporary Add-on…
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment