Bug 1396334 - Add sources list to manifest.json. r?kmag draft
authorZibi Braniecki <zbraniecki@mozilla.com>
Sat, 02 Sep 2017 18:18:17 -0700
changeset 658833 e62223e75a650ea6536d8726de10a658262a5809
parent 658832 3cc38c1489e42fcab9f1ff2d20b5af70e5672276
child 658834 0c1f5e64623a9a5f44f46c02393fdd3cda841cf9
push id77881
push userbmo:gandalf@aviary.pl
push dateMon, 04 Sep 2017 22:55:52 +0000
reviewerskmag
bugs1396334
milestone57.0a1
Bug 1396334 - Add sources list to manifest.json. r?kmag MozReview-Commit-ID: 4kIowQG2HxR
python/mozbuild/mozbuild/action/langpack_manifest.py
--- a/python/mozbuild/mozbuild/action/langpack_manifest.py
+++ b/python/mozbuild/mozbuild/action/langpack_manifest.py
@@ -237,31 +237,35 @@ def parse_chrome_manifest(path, base_pat
 #      '57.0.*',
 #      {'MOZ_LANG_TITLE': 'Polski'},
 #      chrome_entries
 #    )
 #    manifest == {
 #        'languages': {
 #            'pl': {
 #                'version': '201709121481',
-#                'resources': None,
 #                'chrome_resources': {
 #                    'alert': 'chrome/pl/locale/pl/alert/',
 #                    'branding': 'browser/chrome/pl/locale/global/',
 #                    'global-platform': {
 #                      'macosx': 'chrome/pl/locale/pl/global-platform/mac/',
 #                      'win': 'chrome/pl/locale/pl/global-platform/win/',
 #                      'linux': 'chrome/pl/locale/pl/global-platform/unix/',
 #                      'android': 'chrome/pl/locale/pl/global-platform/unix/',
 #                    },
 #                    'forms': 'browser/chrome/pl/locale/forms/',
 #                    ...
 #                }
 #            }
 #        },
+#        'sources': {
+#            'browser': {
+#                'base_path': 'browser/'
+#            }
+#        },
 #        'applications': {
 #            'gecko':  {
 #                'strict_min_version': '57.0',
 #                'strict_max_version': '57.0.*',
 #                'id': 'langpack-pl@mozilla.org',
 #            }
 #        },
 #        'version': '57.0',
@@ -287,16 +291,21 @@ def create_webmanifest(locstr, min_app_v
                 'strict_min_version': min_app_ver,
                 'strict_max_version': max_app_ver,
             }
         },
         'name': '{0} Language Pack'.format(defines['MOZ_LANG_TITLE']),
         'description': 'Language pack for Firefox for {0}'.format(main_locale),
         'version': min_app_ver,
         'languages': {},
+        'sources': {
+            'browser': {
+                'base_path': 'browser/'
+            }
+        },
         'author': author
     }
 
     cr = {}
     for entry in chrome_entries:
         if entry['type'] == 'locale':
             platforms = entry['platforms']
             if platforms:
@@ -308,17 +317,16 @@ def create_webmanifest(locstr, min_app_v
                 assert entry['alias'] not in cr
                 cr[entry['alias']] = entry['path']
         else:
             raise Exception('Unknown type {0}'.format(entry['type']))
 
     for loc in locales:
         manifest['languages'][loc] = {
             'version': min_app_ver,
-            'resources': None,
             'chrome_resources': cr
         }
 
     return json.dumps(manifest, indent=2, ensure_ascii=False, encoding='utf8')
 
 
 def main(args):
     parser = argparse.ArgumentParser()