diff --git a/browser/base/content/test/static/browser_misused_characters_in_strings.js b/browser/base/content/test/static/browser_misused_characters_in_strings.js
index 76390ec34091..1145af17ea9b 100644
--- a/browser/base/content/test/static/browser_misused_characters_in_strings.js
+++ b/browser/base/content/test/static/browser_misused_characters_in_strings.js
@@ -156,6 +156,10 @@ let gWhitelist = [{
file: "aboutNetworking.dtd",
key: "aboutNetworking.logTutorial",
type: "single-quote",
+ }, {
+ file: "aboutdevtools.dtd",
+ key: "aboutDevtools.newsletter.privacy.label",
+ type: "single-quote",
}, {
file: "browser.dtd",
key: "addonPostInstallMessage.label",
diff --git a/devtools/startup/aboutdevtools/aboutdevtools.js b/devtools/startup/aboutdevtools/aboutdevtools.js
index 4dd4144341b3..2efb1566cee4 100644
--- a/devtools/startup/aboutdevtools/aboutdevtools.js
+++ b/devtools/startup/aboutdevtools/aboutdevtools.js
@@ -31,6 +31,9 @@ const GA_PARAMETERS = [
["utm_medium", "onboarding"],
];
+const ABOUTDEVTOOLS_STRINGS = "chrome://devtools-startup/locale/aboutdevtools.properties";
+const aboutDevtoolsBundle = Services.strings.createBundle(ABOUTDEVTOOLS_STRINGS);
+
const KEY_SHORTCUTS_STRINGS = "chrome://devtools-startup/locale/key-shortcuts.properties";
const keyShortcutsBundle = Services.strings.createBundle(KEY_SHORTCUTS_STRINGS);
@@ -80,55 +83,55 @@ function updatePage() {
* Array of descriptors for features displayed on about:devtools.
* Each feature should contain:
* - icon: the name of the image to use
- * - title: the key of the localized title (from aboutDevTools.ftl)
- * - desc: the key of the localized description (from aboutDevTools.ftl)
+ * - title: the key of the localized title (from aboutdevtools.properties)
+ * - desc: the key of the localized description (from aboutdevtools.properties)
* - link: the MDN documentation link
*/
const features = [
{
icon: "chrome://devtools-startup/content/aboutdevtools/images/feature-inspector.svg",
- title: "features-inspector-title",
- desc: "features-inspector-desc",
+ title: "features.inspector.title",
+ desc: "features.inspector.desc",
link: "https://developer.mozilla.org/docs/Tools/Page_Inspector",
}, {
icon: "chrome://devtools-startup/content/aboutdevtools/images/feature-console.svg",
- title: "features-console-title",
- desc: "features-console-desc",
+ title: "features.console.title",
+ desc: "features.console.desc",
link: "https://developer.mozilla.org/docs/Tools/Web_Console",
}, {
icon: "chrome://devtools-startup/content/aboutdevtools/images/feature-debugger.svg",
- title: "features-debugger-title",
- desc: "features-debugger-desc",
+ title: "features.debugger.title",
+ desc: "features.debugger.desc",
link: "https://developer.mozilla.org/docs/Tools/Debugger",
}, {
icon: "chrome://devtools-startup/content/aboutdevtools/images/feature-network.svg",
- title: "features-network-title",
- desc: "features-network-desc",
+ title: "features.network.title",
+ desc: "features.network.desc",
link: "https://developer.mozilla.org/docs/Tools/Network_Monitor",
}, {
icon: "chrome://devtools-startup/content/aboutdevtools/images/feature-storage.svg",
- title: "features-storage-title",
- desc: "features-storage-desc",
+ title: "features.storage.title",
+ desc: "features.storage.desc",
link: "https://developer.mozilla.org/docs/Tools/Storage_Inspector",
}, {
icon: "chrome://devtools-startup/content/aboutdevtools/images/feature-responsive.svg",
- title: "features-responsive-title",
- desc: "features-responsive-desc",
+ title: "features.responsive.title",
+ desc: "features.responsive.desc",
link: "https://developer.mozilla.org/docs/Tools/Responsive_Design_Mode",
}, {
icon: "chrome://devtools-startup/content/aboutdevtools/images/feature-visualediting.svg",
- title: "features-visual-editing-title",
- desc: "features-visual-editing-desc",
+ title: "features.visualediting.title",
+ desc: "features.visualediting.desc",
link: "https://developer.mozilla.org/docs/Tools/Style_Editor",
}, {
icon: "chrome://devtools-startup/content/aboutdevtools/images/feature-performance.svg",
- title: "features-performance-title",
- desc: "features-performance-desc",
+ title: "features.performance.title",
+ desc: "features.performance.desc",
link: "https://developer.mozilla.org/docs/Tools/Performance",
}, {
icon: "chrome://devtools-startup/content/aboutdevtools/images/feature-memory.svg",
- title: "features-memory-title",
- desc: "features-memory-desc",
+ title: "features.memory.title",
+ desc: "features.memory.desc",
link: "https://developer.mozilla.org/docs/Tools/Memory",
},
];
@@ -139,17 +142,20 @@ const features = [
function createFeatureEl(feature) {
const li = document.createElement("li");
li.classList.add("feature");
+ const learnMore = aboutDevtoolsBundle.GetStringFromName("features.learnMore");
- const {icon, link, title, desc} = feature;
+ let {icon, link, title, desc} = feature;
+ title = aboutDevtoolsBundle.GetStringFromName(title);
+ desc = aboutDevtoolsBundle.GetStringFromName(desc);
// eslint-disable-next-line no-unsanitized/property
li.innerHTML =
`
-
-
-
+
&aboutDevtools.enable.title;
+
&aboutDevtools.enable.inspectElementTitle;
-
-
-
-
+
&aboutDevtools.enable.aboutDebuggingMessage;
+
+
&aboutDevtools.enable.keyShortcutMessage;
+
&aboutDevtools.enable.inspectElementMessage;
-
-
+
&aboutDevtools.enable.commonMessage;
+
&aboutDevtools.enable.learnMoreLink;
-
-
+
+
@@ -48,15 +48,15 @@
-
+
&aboutDevtools.welcome.title;
-
-
+
&aboutDevtools.newsletter.title;
+
&aboutDevtools.newsletter.message;
-
-
+
&aboutDevtools.newsletter.thanks.title;
+
&aboutDevtools.newsletter.thanks.message;
@@ -94,11 +92,11 @@
src="chrome://devtools-startup/content/aboutdevtools/images/dev-edition-logo.svg"
alt="Firefox Developer Edition logo"/>
diff --git a/devtools/startup/locales/en-US/aboutDevTools.ftl b/devtools/startup/locales/en-US/aboutDevTools.ftl
deleted file mode 100644
index c61f3cae3423..000000000000
--- a/devtools/startup/locales/en-US/aboutDevTools.ftl
+++ /dev/null
@@ -1,52 +0,0 @@
-# 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/.
-
-head-title = About Developer Tools
-enable-title = Enable Firefox Developer Tools
-enable-inspect-element-title = Enable Firefox Developer Tools to use Inspect Element
-enable-inspect-element-message = Examine and edit HTML and CSS with the Developer Tools’ Inspector.
-enable-about-debugging-message = Develop and debug WebExtensions, web workers, service workers and more with Firefox Developer Tools.
-enable-key-shortcut-message = You activated a Developer Tools shortcut. If that was a mistake, you can close this Tab.
-enable-menu-message = Perfect your website’s HTML, CSS, and JavaScript with tools like Inspector and Debugger.
-enable-common-message = Firefox Developer Tools are disabled by default to give you more control over your browser.
-enable-learn-more-link = Learn more about Developer Tools
-enable-enable-button = Enable Developer Tools
-enable-close-button = Close this Tab
-
-welcome-title = Welcome to Firefox Developer Tools!
-newsletter-title = Mozilla Developer Newsletter
-newsletter-message = Get developer news, tricks and resources sent straight to your inbox.
-newsletter-email-placeholder =
- .placeholder = Email
-newsletter-privacy-label = I’m okay with Mozilla handling my info as explained in this
Privacy Policy.
-newsletter-subscribe-button = Subscribe
-newsletter-thanks-title = Thanks!
-newsletter-thanks-message = If you haven’t previously confirmed a subscription to a Mozilla-related newsletter you may have to do so. Please check your inbox or your spam filter for an email from us.
-
-footer-title = Firefox Developer Edition
-footer-message = Looking for more than just Developer Tools? Check out the Firefox browser that is built specifically for developers and modern workflows.
-footer-learn-more-link = Learn more
-
-features-learn-more = Learn more
-features-inspector-title = Inspector
-features-inspector-desc = Inspect and refine code to build pixel-perfect layouts.
{ features-learn-more }
-features-console-title = Console
-features-console-desc = Track CSS, JavaScript, security and network issues.
{ features-learn-more }
-features-debugger-title = Debugger
-features-debugger-desc = Powerful JavaScript debugger with support for your framework.
{ features-learn-more }
-features-network-title = Network
-features-network-desc = Monitor network requests that can slow or block your site.
{ features-learn-more }
-features-storage-title = Storage
-features-storage-desc = Add, modify and remove cache, cookies, databases and session data.
{ features-learn-more }
-features-responsive-title = Responsive Design Mode
-features-responsive-desc = Test sites on emulated devices in your browser.
{ features-learn-more }
-features-visual-editing-title = Visual Editing
-features-visual-editing-desc = Fine-tune animations, alignment and padding.
{ features-learn-more }
-features-performance-title = Performance
-features-performance-desc = Unblock bottlenecks, streamline processes, optimize assets.
{ features-learn-more }
-features-memory-title = Memory
-features-memory-desc = Find memory leaks and make your application zippy.
{ features-learn-more }
-# Variables:
-# $shortcut (String) - The keyboard shortcut used for the tool
-welcome-message = You’ve successfully enabled Developer Tools! To get started, explore the Web Developer menu or open the tools with { $shortcut }.
diff --git a/devtools/startup/locales/en-US/aboutdevtools.dtd b/devtools/startup/locales/en-US/aboutdevtools.dtd
new file mode 100644
index 000000000000..53a122e99958
--- /dev/null
+++ b/devtools/startup/locales/en-US/aboutdevtools.dtd
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Privacy Policy.">
+
+
+
+
+
+
+
+
+
+
diff --git a/devtools/startup/locales/en-US/aboutdevtools.properties b/devtools/startup/locales/en-US/aboutdevtools.properties
index c9dbedb6980a..f5fcf1a7a06c 100644
--- a/devtools/startup/locales/en-US/aboutdevtools.properties
+++ b/devtools/startup/locales/en-US/aboutdevtools.properties
@@ -4,6 +4,38 @@
# LOCALIZATION NOTE These strings are used in the about:devtools page.
+# LOCALIZATION NOTE (features.learnMore): The text of the learn more link displayed below
+# each feature section of about:devtools. Each section presents a quick description of a
+# DevTools panel/feature. The learn more link points to the associated MDN page.
+features.learnMore=Learn more
+
+features.inspector.title=Inspector
+features.inspector.desc=Inspect and refine code to build pixel-perfect layouts.
+
+features.console.title=Console
+features.console.desc=Track CSS, JavaScript, security and network issues.
+
+features.debugger.title=Debugger
+features.debugger.desc=Powerful JavaScript debugger with support for your framework.
+
+features.network.title=Network
+features.network.desc=Monitor network requests that can slow or block your site.
+
+features.storage.title=Storage
+features.storage.desc=Add, modify and remove cache, cookies, databases and session data.
+
+features.responsive.title=Responsive Design Mode
+features.responsive.desc=Test sites on emulated devices in your browser.
+
+features.visualediting.title=Visual Editing
+features.visualediting.desc=Fine-tune animations, alignment and padding.
+
+features.performance.title=Performance
+features.performance.desc=Unblock bottlenecks, streamline processes, optimize assets.
+
+features.memory.title=Memory
+features.memory.desc=Find memory leaks and make your application zippy.
+
# LOCALIZATION NOTE (newsletter.error.common): error text displayed when the newsletter
# subscription failed. The argument will be replaced with request's status code and status
# text (e.g. "404 - Not Found")
@@ -16,3 +48,7 @@ newsletter.error.unknown=An unexpected error occurred.
# LOCALIZATION NOTE (newsletter.error.timeout): error text displayed when the newsletter
# subscription timed out.
newsletter.error.timeout=Subscription request timed out.
+
+# LOCALIZATION NOTE (welcome.message): Message displayed when devtools are enabled.
+# %S will be replaced with the shortcut to toggle the DevTools toolbox.
+welcome.message=You’ve successfully enabled Developer Tools! To get started, explore the Web Developer menu or open the tools with %S.
diff --git a/devtools/startup/locales/jar.mn b/devtools/startup/locales/jar.mn
index fcd16c588caa..12fd3cdf7571 100644
--- a/devtools/startup/locales/jar.mn
+++ b/devtools/startup/locales/jar.mn
@@ -3,9 +3,6 @@
# 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/.
-[localization] @AB_CD@.jar:
- startup (%*.ftl)
-
@AB_CD@.jar:
% locale devtools-startup @AB_CD@ %locale/@AB_CD@/devtools/startup/
locale/@AB_CD@/devtools/startup/ (%*)
diff --git a/python/l10n/fluent_migrations/bug_1501900_aboutdevtools.py b/python/l10n/fluent_migrations/bug_1501900_aboutdevtools.py
deleted file mode 100644
index 6c9850c2094c..000000000000
--- a/python/l10n/fluent_migrations/bug_1501900_aboutdevtools.py
+++ /dev/null
@@ -1,188 +0,0 @@
-from __future__ import absolute_import
-import fluent.syntax.ast as FTL
-from fluent.migrate.helpers import transforms_from
-from fluent.migrate.helpers import VARIABLE_REFERENCE
-from fluent.migrate.helpers import TERM_REFERENCE
-from fluent.migrate.helpers import MESSAGE_REFERENCE
-from fluent.migrate import REPLACE
-from fluent.migrate import COPY
-from fluent.migrate import CONCAT
-
-def migrate(ctx):
- """Bug 1501900 - Migrate aboutdevtools to Fluent, part {index}"""
-
- ctx.add_transforms(
- "devtools/startup/aboutDevTools.ftl",
- "devtools/startup/aboutDevTools.ftl",
- transforms_from(
-"""
-head-title = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.headTitle")}
-enable-title = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.enable.title")}
-enable-inspect-element-title = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.enable.inspectElementTitle")}
-enable-inspect-element-message = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.enable.inspectElementMessage")}
-enable-about-debugging-message ={ COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.enable.aboutDebuggingMessage")}
-enable-key-shortcut-message = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.enable.keyShortcutMessage")}
-enable-menu-message = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.enable.menuMessage2")}
-enable-common-message = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.enable.commonMessage")}
-enable-learn-more-link = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.enable.learnMoreLink")}
-enable-enable-button = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.enable.enableButton")}
-enable-close-button = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.enable.closeButton2")}
-welcome-title = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.welcome.title")}
-newsletter-title = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.newsletter.title")}
-newsletter-message = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.newsletter.message")}
-newsletter-email-placeholder =
- .placeholder = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.newsletter.email.placeholder")}
-newsletter-subscribe-button = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.newsletter.subscribeButton")}
-newsletter-thanks-title = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.newsletter.thanks.title")}
-newsletter-thanks-message = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.newsletter.thanks.message")}
-footer-title = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.footer.title")}
-footer-message = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.footer.message")}
-footer-learn-more-link = { COPY("devtools/startup/aboutdevtools.dtd", "aboutDevtools.footer.learnMoreLink")}
-features-learn-more = { COPY("devtools/startup/aboutdevtools.properties", "features.learnMore")}
-features-inspector-title = { COPY("devtools/startup/aboutdevtools.properties", "features.inspector.title")}
-features-console-title = { COPY("devtools/startup/aboutdevtools.properties", "features.console.title")}
-features-debugger-title = { COPY("devtools/startup/aboutdevtools.properties", "features.debugger.title")}
-features-network-title = { COPY("devtools/startup/aboutdevtools.properties", "features.network.title")}
-features-storage-title = { COPY("devtools/startup/aboutdevtools.properties", "features.storage.title")}
-features-responsive-title = { COPY("devtools/startup/aboutdevtools.properties", "features.responsive.title")}
-features-visual-editing-title = { COPY("devtools/startup/aboutdevtools.properties", "features.visualediting.title")}
-features-performance-title = { COPY("devtools/startup/aboutdevtools.properties", "features.performance.title")}
-features-memory-title = { COPY("devtools/startup/aboutdevtools.properties", "features.memory.title")}
-"""
- )
- )
-
- ctx.add_transforms(
- "devtools/startup/aboutDevTools.ftl",
- "devtools/startup/aboutDevTools.ftl",
- [
- FTL.Message(
- id=FTL.Identifier("newsletter-privacy-label"),
- value=REPLACE(
- "devtools/startup/aboutdevtools.dtd",
- "aboutDevtools.newsletter.privacy.label",
- {
- "
": FTL.TextElement('')
- }
- )
- ),
- FTL.Message(
- id=FTL.Identifier("features-inspector-desc"),
- value=CONCAT(
- COPY(
- "devtools/startup/aboutdevtools.properties",
- "features.inspector.desc",
- ),
- FTL.TextElement(' '),
- MESSAGE_REFERENCE("features-learn-more"),
- FTL.TextElement("")
- )
- ),
- FTL.Message(
- id=FTL.Identifier("features-console-desc"),
- value=CONCAT(
- COPY(
- "devtools/startup/aboutdevtools.properties",
- "features.console.desc",
- ),
- FTL.TextElement('
'),
- MESSAGE_REFERENCE("features-learn-more"),
- FTL.TextElement("")
- )
- ),
- FTL.Message(
- id=FTL.Identifier("features-debugger-desc"),
- value=CONCAT(
- COPY(
- "devtools/startup/aboutdevtools.properties",
- "features.debugger.desc",
- ),
- FTL.TextElement('
'),
- MESSAGE_REFERENCE("features-learn-more"),
- FTL.TextElement("")
- )
- ),
- FTL.Message(
- id=FTL.Identifier("features-network-desc"),
- value=CONCAT(
- COPY(
- "devtools/startup/aboutdevtools.properties",
- "features.network.desc",
- ),
- FTL.TextElement('
'),
- MESSAGE_REFERENCE("features-learn-more"),
- FTL.TextElement("")
- )
- ),
- FTL.Message(
- id=FTL.Identifier("features-storage-desc"),
- value=CONCAT(
- COPY(
- "devtools/startup/aboutdevtools.properties",
- "features.storage.desc",
- ),
- FTL.TextElement('
'),
- MESSAGE_REFERENCE("features-learn-more"),
- FTL.TextElement("")
- )
- ),
- FTL.Message(
- id=FTL.Identifier("features-responsive-desc"),
- value=CONCAT(
- COPY(
- "devtools/startup/aboutdevtools.properties",
- "features.responsive.desc",
- ),
- FTL.TextElement('
'),
- MESSAGE_REFERENCE("features-learn-more"),
- FTL.TextElement("")
- )
- ),
- FTL.Message(
- id=FTL.Identifier("features-visual-editing-desc"),
- value=CONCAT(
- COPY(
- "devtools/startup/aboutdevtools.properties",
- "features.visualediting.desc",
- ),
- FTL.TextElement('
'),
- MESSAGE_REFERENCE("features-learn-more"),
- FTL.TextElement("")
- )
- ),
- FTL.Message(
- id=FTL.Identifier("features-performance-desc"),
- value=CONCAT(
- COPY(
- "devtools/startup/aboutdevtools.properties",
- "features.performance.desc",
- ),
- FTL.TextElement('
'),
- MESSAGE_REFERENCE("features-learn-more"),
- FTL.TextElement("")
- )
- ),
- FTL.Message(
- id=FTL.Identifier("features-memory-desc"),
- value=CONCAT(
- COPY(
- "devtools/startup/aboutdevtools.properties",
- "features.memory.desc",
- ),
- FTL.TextElement('
'),
- MESSAGE_REFERENCE("features-learn-more"),
- FTL.TextElement("")
- )
- ),
- FTL.Message(
- id=FTL.Identifier("welcome-message"),
- value=REPLACE(
- "devtools/startup/aboutdevtools.properties",
- "welcome.message",
- {
- "%S": VARIABLE_REFERENCE("shortcut")
- }
- )
- )
- ]
- )