Bug 1469339 - Put strings needed for the edit context menu into ftl at toolkit/locales;r=flod
authorBrian Grinstead <bgrinstead@mozilla.com>
Mon, 16 Jul 2018 08:53:23 -0700
changeset 426796 d104946698b2d05ccc0529837cd7136790b36c34
parent 426795 5f4b230692b94ec13b1bf946438e7781e88e4c7a
child 426797 4aa2f74bad5b77dd8f8c7e6e0e9eacafd64ef95d
push id34285
push userbtara@mozilla.com
push dateMon, 16 Jul 2018 21:58:41 +0000
treeherdermozilla-central@f6df6a982ee9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflod
bugs1469339
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1469339 - Put strings needed for the edit context menu into ftl at toolkit/locales;r=flod This also registers the locale through the build system and browser glue since it's the first ftl file in toolkit/. MozReview-Commit-ID: 7XDqKmVU0vh
browser/components/nsBrowserGlue.js
toolkit/locales/en-US/toolkit/main-window/editmenu.ftl
toolkit/locales/jar.mn
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -754,16 +754,19 @@ BrowserGlue.prototype = {
     }, {
       useInDarkMode: true
     });
 
     Normandy.init();
 
     // Initialize the default l10n resource sources for L10nRegistry.
     let locales = Services.locale.getPackagedLocales();
+    const greSource = new FileSource("toolkit", locales, "resource://gre/localization/{locale}/");
+    L10nRegistry.registerSource(greSource);
+
     const appSource = new FileSource("app", locales, "resource://app/localization/{locale}/");
     L10nRegistry.registerSource(appSource);
 
     Services.obs.notifyObservers(null, "browser-ui-startup-complete");
   },
 
   _checkForOldBuildUpdates() {
     // check for update if our build is old
new file mode 100644
--- /dev/null
+++ b/toolkit/locales/en-US/toolkit/main-window/editmenu.ftl
@@ -0,0 +1,30 @@
+### This file contains the entities needed for the 'edit' menu
+### It's currently only used for the Browser Console
+
+editmenu-undo =
+    .label = Undo
+    .accesskey = U
+
+editmenu-redo =
+    .label = Redo
+    .accesskey = R
+
+editmenu-cut =
+    .label = Cut
+    .accesskey = t
+
+editmenu-copy =
+    .label = Copy
+    .accesskey = C
+
+editmenu-paste =
+    .label = Paste
+    .accesskey = P
+
+editmenu-delete =
+    .label = Delete
+    .accesskey = D
+
+editmenu-select-all =
+    .label = Select All
+    .accesskey = A
--- a/toolkit/locales/jar.mn
+++ b/toolkit/locales/jar.mn
@@ -1,13 +1,15 @@
 #filter substitution
 # 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] @AB_CD@.jar:
+  toolkit                                          (%toolkit/**/*.ftl)
 
 @AB_CD@.jar:
 % locale global @AB_CD@ %locale/@AB_CD@/global/
   locale/@AB_CD@/global/aboutAbout.dtd                  (%chrome/global/aboutAbout.dtd)
   locale/@AB_CD@/global/aboutReader.properties          (%chrome/global/aboutReader.properties)
   locale/@AB_CD@/global/aboutRights.dtd                 (%chrome/global/aboutRights.dtd)
   locale/@AB_CD@/global/aboutNetworking.dtd             (%chrome/global/aboutNetworking.dtd)
 #ifndef ANDROID