bug 1280680, build l20n files outside of chrome, in localization, r?glandium draft
authorAxel Hecht <axel@pike.org>
Wed, 05 Oct 2016 13:13:21 +0200
changeset 421149 ab124481337c51d889807cc18897951eda47c0d8
parent 421131 0149927a63f3f49827f5477809cafbf070983b73
child 532989 ae99b4adbc9f655ecaa604a14d90c9e047ade57d
push id31403
push useraxel@mozilla.com
push dateWed, 05 Oct 2016 12:12:35 +0000
reviewersglandium
bugs1280680
milestone52.0a1
bug 1280680, build l20n files outside of chrome, in localization, r?glandium Also adding localization to the things allowed to go into omni.ja, and adding the browser/localization directory to package-manifest.in. Once we start adding toolkit files, we need to add the non-browser one, too. Right now that dies with a file-not-found error. MozReview-Commit-ID: Dfa33uNrTID
browser/branding/aurora/locales/jar.mn
browser/branding/nightly/locales/jar.mn
browser/branding/official/locales/jar.mn
browser/branding/unofficial/locales/jar.mn
browser/installer/package-manifest.in
browser/locales/jar.mn
python/mozbuild/mozpack/packager/formats.py
toolkit/modules/L10nRegistry.jsm
--- a/browser/branding/aurora/locales/jar.mn
+++ b/browser/branding/aurora/locales/jar.mn
@@ -6,9 +6,10 @@
 
 @AB_CD@.jar:
 % locale branding @AB_CD@ %locale/branding/
 # Aurora branding only exists in en-US
   locale/branding/brand.dtd        (en-US/brand.dtd)
   locale/branding/brand.properties (en-US/brand.properties)
   locale/branding/browserconfig.properties
 
+[localization] @AB_CD@.jar:
   browser/brand.ftl                (en-US/brand.ftl)
--- a/browser/branding/nightly/locales/jar.mn
+++ b/browser/branding/nightly/locales/jar.mn
@@ -6,9 +6,10 @@
 
 @AB_CD@.jar:
 % locale branding @AB_CD@ %locale/branding/
 # Nightly branding only exists in en-US
   locale/branding/brand.dtd        (en-US/brand.dtd)
   locale/branding/brand.properties (en-US/brand.properties)
   locale/branding/browserconfig.properties
 
+[localization] @AB_CD@.jar:
   browser/brand.ftl                (en-US/brand.ftl)
--- a/browser/branding/official/locales/jar.mn
+++ b/browser/branding/official/locales/jar.mn
@@ -5,9 +5,10 @@
 
 
 @AB_CD@.jar:
 % locale branding @AB_CD@ %locale/branding/
   locale/branding/brand.dtd        (%brand.dtd)
   locale/branding/brand.properties (%brand.properties)
   locale/branding/browserconfig.properties
 
+[localization] @AB_CD@.jar:
   browser/brand.ftl                (%brand.ftl)
--- a/browser/branding/unofficial/locales/jar.mn
+++ b/browser/branding/unofficial/locales/jar.mn
@@ -6,9 +6,10 @@
 
 @AB_CD@.jar:
 % locale branding @AB_CD@ %locale/branding/
 # Unofficial branding only exists in en-US
   locale/branding/brand.dtd        (en-US/brand.dtd)
   locale/branding/brand.properties (en-US/brand.properties)
   locale/branding/browserconfig.properties
 
+[localization] @AB_CD@.jar:
   browser/brand.ftl                (en-US/brand.ftl)
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -42,16 +42,17 @@
 @RESPATH@/@LPROJ_ROOT@.lproj/*
 #endif
 
 [@AB_CD@]
 @RESPATH@/browser/chrome/@AB_CD@@JAREXT@
 @RESPATH@/browser/chrome/@AB_CD@.manifest
 @RESPATH@/chrome/@AB_CD@@JAREXT@
 @RESPATH@/chrome/@AB_CD@.manifest
+@RESPATH@/browser/localization/*
 @RESPATH@/dictionaries/*
 #if defined(XP_WIN) || defined(XP_LINUX)
 @RESPATH@/fonts/*
 #endif
 @RESPATH@/hyphenation/*
 @RESPATH@/browser/@PREF_DIR@/firefox-l10n.js
 #ifdef HAVE_MAKENSISU
 @BINPATH@/uninstall/helper.exe
--- a/browser/locales/jar.mn
+++ b/browser/locales/jar.mn
@@ -104,16 +104,17 @@
     locale/browser/downloads/settingsChange.dtd  (%chrome/overrides/settingsChange.dtd)
 % override chrome://global/locale/netError.dtd chrome://browser/locale/netError.dtd
 % override chrome://global/locale/appstrings.properties chrome://browser/locale/appstrings.properties
 % override chrome://mozapps/locale/downloads/settingsChange.dtd chrome://browser/locale/downloads/settingsChange.dtd
 % locale pdf.js @AB_CD@ %locale/pdfviewer/
     locale/pdfviewer/viewer.properties             (%pdfviewer/viewer.properties)
     locale/pdfviewer/chrome.properties             (%pdfviewer/chrome.properties)
 
-    browser                                        (%browser/*.ftl)
+[localization] @AB_CD@.jar:
+    browser                                        (%browser/**/*.ftl)
 
 #ifdef XPI_NAME
 # Bug 1240628, restructure how l10n repacks work with feature addons
 # This is hacky, but ensures the chrome.manifest chain is complete
 [.] chrome.jar:
 % manifest features/chrome.manifest
 #endif
--- a/python/mozbuild/mozpack/packager/formats.py
+++ b/python/mozbuild/mozpack/packager/formats.py
@@ -315,10 +315,11 @@ class OmniJarSubFormatter(PiecemealForma
         if path[0] == 'defaults':
             return len(path) != 3 or \
                 not (path[2] == 'channel-prefs.js' and
                      path[1] in ['pref', 'preferences'])
         return path[0] in [
             'modules',
             'greprefs.js',
             'hyphenation',
+            'localization',
             'update.locale',
         ] or path[0] in STARTUP_CACHE_PATHS
--- a/toolkit/modules/L10nRegistry.jsm
+++ b/toolkit/modules/L10nRegistry.jsm
@@ -228,17 +228,17 @@ const L10nRegistry = {
   },
 
   requestCacheInfo() {
     return cache;
   },
 };
 
 const platformFileSource =
-  new FileSource('platform', 'gre/chrome/{locale}');
+  new FileSource('platform', 'gre/localization/{locale}');
 
 const appFileSource =
-  new FileSource('app', '/chrome/{locale}');
+  new FileSource('app', '/localization/{locale}');
 
 L10nRegistry.registerSource(platformFileSource);
 L10nRegistry.registerSource(appFileSource);
 
 this.L10nRegistry = L10nRegistry;