Bug 1472966 - Replace label for list of unused font families. r=gl
MozReview-Commit-ID: J5X2BT3YQY3
--- a/devtools/client/inspector/fonts/components/FontEditor.js
+++ b/devtools/client/inspector/fonts/components/FontEditor.js
@@ -1,17 +1,16 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { createFactory, PureComponent } = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
-const { PluralForm } = require("devtools/shared/plural-form");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const FontMeta = createFactory(require("./FontMeta"));
const FontPropertyValue = createFactory(require("./FontPropertyValue"));
const FontSize = createFactory(require("./FontSize"));
const FontStyle = createFactory(require("./FontStyle"));
const FontWeight = createFactory(require("./FontWeight"));
@@ -81,36 +80,32 @@ class FontEditor extends PureComponent {
});
}
renderFamilesNotUsed(familiesNotUsed = []) {
if (!familiesNotUsed.length) {
return null;
}
- const familiesNotUsedLabel = PluralForm
- .get(familiesNotUsed.length, getStr("fontinspector.familiesNotUsedLabel"))
- .replace("#1", familiesNotUsed.length);
-
const familiesList = familiesNotUsed.map(family => {
return dom.div(
{
className: "font-family-unused",
},
family
);
});
return dom.details(
{},
dom.summary(
{
className: "font-family-unused-header",
},
- familiesNotUsedLabel
+ getStr("fontinspector.familiesNotUsedLabel")
),
familiesList
);
}
/**
* Render font family, font name, and metadata for all fonts used on selected node.
*
--- a/devtools/client/locales/en-US/font-inspector.properties
+++ b/devtools/client/locales/en-US/font-inspector.properties
@@ -56,13 +56,11 @@ fontinspector.fontSizeLabel=Size
# LOCALIZATION NOTE (fontinspector.fontWeightLabel): This label is shown next to the UI
# in the font editor which allows the user to change the font weight.
fontinspector.fontWeightLabel=Weight
# LOCALIZATION NOTE (fontinspector.fontItalicLabel): This label is shown next to the UI
# in the font editor which allows the user to change the style of the font to italic.
fontinspector.fontItalicLabel=Italic
-# # LOCALIZATION NOTE (fontinspector.familiesNotUsedLabel): Semi-colon list of
-# plural forms.
-# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
-# #1 is the number of unused font families
-fontinspector.familiesNotUsedLabel=1 not used;#1 not used
+# LOCALIZATION NOTE (fontinspector.familiesNotUsedLabel): Label for the list in the font
+# editor which contains the names of font families declared but not used.
+fontinspector.familiesNotUsedLabel=Unused font families