Bug 1408369 - move back aboutdevtools.dtd to devtools/shim/locales;r=flod draft
authorJulian Descottes <jdescottes@mozilla.com>
Mon, 06 Nov 2017 15:36:28 +0100
changeset 694843 1601eed689f94cf520901c4298b7b1ebe8e73b14
parent 694839 1542fc28d100f878753f32255b1923ff5c12c4e9
child 739461 2ae6e85c3f482abb5a9479ce6864c27d812174b9
push id88274
push userjdescottes@mozilla.com
push dateWed, 08 Nov 2017 11:55:37 +0000
reviewersflod
bugs1408369
milestone58.0a1
Bug 1408369 - move back aboutdevtools.dtd to devtools/shim/locales;r=flod Add localization notes to aboutdevtools.dtd and move it back to the locales folder where it can be picked up by localization teams. MozReview-Commit-ID: 8fDimFwdBXv
browser/base/content/test/static/browser_misused_characters_in_strings.js
devtools/shim/aboutdevtools/aboutdevtools.xhtml
devtools/shim/aboutdevtools/tmp-locale/aboutdevtools.dtd
devtools/shim/jar.mn
devtools/shim/locales/en-US/aboutdevtools.dtd
--- a/browser/base/content/test/static/browser_misused_characters_in_strings.js
+++ b/browser/base/content/test/static/browser_misused_characters_in_strings.js
@@ -143,16 +143,20 @@ let gWhitelist = [{
   }, {
     file: "aboutNetworking.dtd",
     key: "aboutNetworking.logTutorial",
     type: "single-quote"
   }, {
     file: "preferences.properties",
     key: "searchResults.needHelp2",
     type: "double-quote"
+  }, {
+    file: "aboutdevtools.dtd",
+    key: "aboutDevtools.newsletter.privacy.label",
+    type: "single-quote"
   }
 ];
 
 /**
  * Check if an error should be ignored due to matching one of the whitelist
  * objects defined in gWhitelist.
  *
  * @param filepath The URI spec of the locale file
--- a/devtools/shim/aboutdevtools/aboutdevtools.xhtml
+++ b/devtools/shim/aboutdevtools/aboutdevtools.xhtml
@@ -1,16 +1,16 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- 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/. -->
 <!DOCTYPE html [
 <!ENTITY % htmlDTD PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> %htmlDTD;
 <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd"> %globalDTD;
-<!ENTITY % aboutdevtoolsDTD SYSTEM "chrome://devtools-shim/content/aboutdevtools/tmp-locale/aboutdevtools.dtd"> %aboutdevtoolsDTD;
+<!ENTITY % aboutdevtoolsDTD SYSTEM "chrome://devtools-shim/locale/aboutdevtools.dtd"> %aboutdevtoolsDTD;
 ]>
 
 <html xmlns="http://www.w3.org/1999/xhtml" dir="&locale.dir;">
 <head>
   <title>&aboutDevtools.headTitle;</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>a
   <link rel="stylesheet" href="chrome://global/skin/in-content/common.css" type="text/css"/>
   <link rel="stylesheet" href="chrome://devtools-shim/content/aboutdevtools/aboutdevtools.css"  type="text/css"/>
@@ -31,17 +31,17 @@
         <p id="about-debugging-message" hidden="true">&aboutDevtools.enable.aboutDebuggingMessage;</p>
         <p id="menu-message" hidden="true">&aboutDevtools.enable.menuMessage;</p>
         <p id="key-shortcut-message" hidden="true">&aboutDevtools.enable.keyShortcutMessage;</p>
         <p id="inspect-element-message" hidden="true">&aboutDevtools.enable.inspectElementMessage;</p>
 
         <p>&aboutDevtools.enable.commonMessage;</p>
         <a class="external installpage-link" href="https://developer.mozilla.org/docs/Tools" target="_blank">&aboutDevtools.enable.learnMoreLink;</a>
         <div class="buttons-container">
-          <button class="primary-button" id="install">&aboutDevtools.enable.installButton;</button>
+          <button class="primary-button" id="install">&aboutDevtools.enable.enableButton;</button>
           <button class="default-button" id="close">&aboutDevtools.enable.closeButton;</button>
         </div>
       </div>
     </div>
   </div>
 
   <!-- This page, hidden by default is displayed once the add-on is installed -->
   <div id="welcome-page" class="wrapper" hidden="true">
@@ -67,17 +67,17 @@
             <section id="newsletter-email" class="newsletter-form-section">
               <input type="email" id="email" name="email" required="true" placeholder="&aboutDevtools.newsletter.email.placeholder;" />
             </section>
 
             <section id="newsletter-privacy" class="newsletter-form-section">
               <input type="checkbox" id="privacy" name="privacy" required="true" />
               <label for="privacy">&aboutDevtools.newsletter.privacy.label;</label>
             </section>
-            <button type="submit" id="newsletter-submit" class="primary-button">&aboutDevtools.newsletter.subscribe.label;</button>
+            <button type="submit" id="newsletter-submit" class="primary-button">&aboutDevtools.newsletter.subscribeButton;</button>
           </form>
           <div id="newsletter-thanks">
             <h2>&aboutDevtools.newsletter.thanks.title;</h2>
             <p>&aboutDevtools.newsletter.thanks.message;</p>
           </div>
         </div>
       </div>
     </div>
@@ -87,20 +87,19 @@
       </ul>
     </div>
 
     <footer>
       <img class="dev-edition-logo"
            src="chrome://devtools-shim/content/aboutdevtools/images/dev-edition-logo.svg"
            alt="Firefox Developer Edition logo"/>
       <div class="footer-message">
-        <h1 class="footer-message-title">Firefox Developer Edition</h1>
-        <p>
-          Looking for more than just Developer Tools?
-          Check out the Firefox browser that is built specifically for developers and modern workflows.
-        </p>
-        <a class="external footer-link" href="https://www.mozilla.org/en-US/firefox/developer/" target="_blank">Learn more</a>
+        <h1 class="footer-message-title">&aboutDevtools.footer.title;</h1>
+        <p>&aboutDevtools.footer.message;</p>
+        <a class="external footer-link"
+           href="https://www.mozilla.org/firefox/developer/"
+           target="_blank">&aboutDevtools.footer.learnMoreLink;</a>
       </div>
     </footer>
   </div>
 
 </body>
 </html>
--- a/devtools/shim/jar.mn
+++ b/devtools/shim/jar.mn
@@ -7,20 +7,16 @@ devtools-shim.jar:
     content/aboutdevtools/aboutdevtools.xhtml  (aboutdevtools/aboutdevtools.xhtml)
     content/aboutdevtools/aboutdevtools.css (aboutdevtools/aboutdevtools.css)
     content/aboutdevtools/aboutdevtools.js (aboutdevtools/aboutdevtools.js)
     content/aboutdevtools/subscribe.css (aboutdevtools/subscribe.css)
     content/aboutdevtools/subscribe.js (aboutdevtools/subscribe.js)
 
     content/aboutdevtools/images/otter.svg (aboutdevtools/images/otter.svg)
 
-    # Temporary localisation file, move back to devtools/shim/locales/en-US when ready for localization
-    # See https://bugzilla.mozilla.org/show_bug.cgi?id=1408369
-    content/aboutdevtools/tmp-locale/aboutdevtools.dtd (aboutdevtools/tmp-locale/aboutdevtools.dtd)
-
     content/aboutdevtools/images/dev-edition-logo.svg (aboutdevtools/images/dev-edition-logo.svg)
     content/aboutdevtools/images/external-link.svg (aboutdevtools/images/external-link.svg)
     content/aboutdevtools/images/feature-inspector.svg (aboutdevtools/images/feature-inspector.svg)
     content/aboutdevtools/images/feature-console.svg (aboutdevtools/images/feature-console.svg)
     content/aboutdevtools/images/feature-debugger.svg (aboutdevtools/images/feature-debugger.svg)
     content/aboutdevtools/images/feature-network.svg (aboutdevtools/images/feature-network.svg)
     content/aboutdevtools/images/feature-memory.svg (aboutdevtools/images/feature-memory.svg)
     content/aboutdevtools/images/feature-visualediting.svg (aboutdevtools/images/feature-visualediting.svg)
rename from devtools/shim/aboutdevtools/tmp-locale/aboutdevtools.dtd
rename to devtools/shim/locales/en-US/aboutdevtools.dtd
--- a/devtools/shim/aboutdevtools/tmp-locale/aboutdevtools.dtd
+++ b/devtools/shim/locales/en-US/aboutdevtools.dtd
@@ -1,34 +1,78 @@
 <!-- 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/. -->
 
+<!-- LOCALIZATION NOTE : This file contains the strings used in aboutdevtools.xhtml,
+  -  displayed when going to about:devtools. UI depends on the value of the preference
+  -  "devtools.enabled".
+  -
+  -  "aboutDevtools.enable.*" and "aboutDevtools.newsletter.*" keys are used when DevTools
+     are disabled
+  -  "aboutDevtools.welcome.*" keys are used when DevTools are enabled
+  - -->
+
+<!-- LOCALIZATION NOTE (aboutDevtools.headTitle): Text of the title tag for about:devtools -->
 <!ENTITY  aboutDevtools.headTitle "About Developer Tools">
+
+<!-- LOCALIZATION NOTE (aboutDevtools.enable.title): Title of the top about:devtools
+  -  section displayed when DevTools are disabled. -->
 <!ENTITY  aboutDevtools.enable.title "Enable Firefox Developer Tools">
+
+<!-- LOCALIZATION NOTE (aboutDevtools.enable.inspectElementTitle): Title of the top
+  -  section displayed when devtools are disabled and the user triggered DevTools by using
+  -  the Inspect Element menu item. -->
 <!ENTITY  aboutDevtools.enable.inspectElementTitle "Enable Firefox Developer Tools to use Inspect Element">
 
+<!-- LOCALIZATION NOTE (aboutDevtools.enable.inspectElementMessage): Message displayed
+  -  when users come from using the Inspect Element menu item. -->
+<!ENTITY  aboutDevtools.enable.inspectElementMessage
+          "Examine and edit HTML and CSS with the Developer Tools’ Inspector.">
+
+<!-- LOCALIZATION NOTE (aboutDevtools.enable.aboutDebuggingMessage): Message displayed
+  -  when users come from about:debugging. -->
 <!ENTITY  aboutDevtools.enable.aboutDebuggingMessage
-          "Develop and debug WebExtensions, web workers, service workers and more with Firefox DevTools.">
-<!ENTITY  aboutDevtools.enable.inspectElementMessage
-          "Examine and edit HTML and CSS with the DevTools Inspector.">
+          "Develop and debug WebExtensions, web workers, service workers and more with Firefox Developer Tools.">
+
+<!-- LOCALIZATION NOTE (aboutDevtools.enable.keyShortcutMessage): Message displayed when
+  -  users pressed a DevTools key shortcut. -->
 <!ENTITY  aboutDevtools.enable.keyShortcutMessage
           "You activated a Developer Tools shortcut. If that was a mistake, you can close this tab.">
+
+<!-- LOCALIZATION NOTE (aboutDevtools.enable.menuMessage): Message displayed when users
+  -  clicked on a "Enable Developer Tools" menu item. -->
 <!ENTITY  aboutDevtools.enable.menuMessage
           "Examine, edit and debug HTML, CSS, and JavaScript with tools like Inspector and Debugger.">
 
+<!-- LOCALIZATION NOTE (aboutDevtools.enable.commonMessage): Generic message displayed for
+  -  all possible entry points (keyshortcut, menu item etc…). -->
 <!ENTITY  aboutDevtools.enable.commonMessage
-          "As of Firefox 58, Developer Tools are disabled by default to give you more control over your browser.">
+          "Firefox Developer Tools are disabled by default to give you more control over your browser.">
 
-<!ENTITY  aboutDevtools.enable.learnMoreLink "Learn more about DevTools">
-<!ENTITY  aboutDevtools.enable.installButton "Enable Developer Tools">
+<!-- LOCALIZATION NOTE (aboutDevtools.enable.learnMoreLink): Text for the link to
+  -  https://developer.mozilla.org/docs/Tools displayed in the top section when DevTools
+  -  are disabled. -->
+<!ENTITY  aboutDevtools.enable.learnMoreLink "Learn more about Developer Tools">
+
+<!ENTITY  aboutDevtools.enable.enableButton "Enable Developer Tools">
 <!ENTITY  aboutDevtools.enable.closeButton "Close this page">
+
 <!ENTITY  aboutDevtools.welcome.title "Welcome to Firefox Developer Tools!">
 
 <!ENTITY  aboutDevtools.newsletter.title "Mozilla Developer Newsletter">
+<!-- LOCALIZATION NOTE (aboutDevtools.newsletter.message): Subscribe form message.
+  -  The newsletter is only available in english at the moment.
+  -  See Bug 1415273 for support of additional languages.-->
 <!ENTITY  aboutDevtools.newsletter.message "Get developer news, tricks and resources sent straight to your inbox.">
 <!ENTITY  aboutDevtools.newsletter.email.placeholder "Email">
-<!ENTITY  aboutDevtools.newsletter.privacy.label "I’m okay with Mozilla handling my info as explained in this <a class=&#x0022;external&#x0022; href=&#x0022;https://www.mozilla.org/privacy/&#x0022;>Privacy Policy</a>.">
-<!ENTITY  aboutDevtools.newsletter.subscribe.label "Subscribe">
-
+<!ENTITY  aboutDevtools.newsletter.privacy.label "I’m okay with Mozilla handling my info as explained in this <a class='external' href='https://www.mozilla.org/privacy/'>Privacy Policy</a>.">
+<!ENTITY  aboutDevtools.newsletter.subscribeButton "Subscribe">
 <!ENTITY  aboutDevtools.newsletter.thanks.title "Thanks!">
 <!ENTITY  aboutDevtools.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.">
 
+<!ENTITY  aboutDevtools.footer.title "Firefox Developer Edition">
+<!ENTITY  aboutDevtools.footer.message "Looking for more than just Developer Tools? Check out the Firefox browser that is built specifically for developers and modern workflows.">
+
+<!-- LOCALIZATION NOTE (aboutDevtools.footer.learnMoreLink): Text for the link to
+  -  https://www.mozilla.org/firefox/developer/ displayed in the footer. -->
+<!ENTITY  aboutDevtools.footer.learnMoreLink "Learn more">
+