Bug 1396334 - Add sources list to manifest.json. r?kmag
MozReview-Commit-ID: 4kIowQG2HxR
--- 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()