Closed Bug 1396334 Opened 3 years ago Closed 3 years ago

List additional sources in manifest.json of the langpack


(Firefox Build System :: General, enhancement)

Not set


(firefox57 fixed)

Tracking Status
firefox57 --- fixed


(Reporter: zbraniecki, Assigned: zbraniecki)




(1 file)

In bug 1365709 we're adding consumption code for the new webextensions langpacks.

While working on it, I realized that at some point we have to decide which L10nRegistry.FileSources are we going to register, and we either have to make this decision at runtime, or at build time.

I believe that it's more reasonable to define the list of sources with their base_paths at build time, and then consume at runtime.

The only exception is the "main" toolkit FileSource. At install time, we'll check if there is a directory `/localization` in the langpack and if there is we will add a FileSource for it.

This will allow langpacks for other products to add their own file sources as well.
Assignee: nobody → gandalf
This patch updates the build code to add the `browser` FileSource. We'll get to de-hardcode that when we'll be working on extending langpacks to handle other products.

The main value here is that the runtime won't have to be touched.
Comment on attachment 8903974 [details]
Bug 1396334 - Add sources list to manifest.json.

::: python/mozbuild/mozbuild/action/
(Diff revision 1)
>  #            }
>  #        },
> +#        'sources': {
> +#            'browser': {
> +#                'base_path': 'browser/'
> +#                'paths': null

It's generally preferable to omit unneded optional properties rather than provide an explicit `null`

::: python/mozbuild/mozbuild/action/
(Diff revision 1)
>          'version': appver,
>          'languages': {},
> +        'sources': {
> +            'browser': {
> +                'base_path': 'browser/',
> +                'paths': None

Same here.
Attachment #8903974 - Flags: review?(kmaglione+bmo) → review+
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again.

hg error in cmd: hg rebase -s 0abb1f714d78 -d 3cc38c1489e4: rebasing 417941:0abb1f714d78 "Bug 1396334 - Add sources list to manifest.json. r=kmag" (tip)
merging python/mozbuild/mozbuild/action/
warning: conflicts while merging python/mozbuild/mozbuild/action/! (edit, then use 'hg resolve --mark')
unresolved conflicts (see hg resolve, then hg rebase --continue)
Pushed by
Add sources list to manifest.json. r=kmag
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Is manual testing required on this bug? If Yes, please provide some STR and the proper webextension(if required), if No set the “qe-verify-“ flag.
Flags: needinfo?(gandalf)
Flags: needinfo?(gandalf) → qe-verify-
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.