summaryrefslogtreecommitdiffstats
path: root/toolkit/components/translations/bergamot-translator/moz.yaml
blob: 23a4cc8c27f69f6839c2116784f9bf1be1a4a7e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Version of this schema
schema: 1

bugzilla:
  # Bugzilla product and component for this directory and subdirectories
  product: Firefox
  component: Translation

# Document the source of externally hosted code
origin:

  # Short name of the package/library
  name: bergamot-translator

  description: The JavaScript emscripten worker to run Project Bergamot.

  # Full URL for the package's homepage/etc
  # Usually different from repository url
  url: https://github.com/browsermt/bergamot-translator.git

  # Human-readable identifier for this version/release
  # Generally "version NNN", "tag SSS", "bookmark SSS"
  release: v0.4.5

  # Revision to pull in
  # Must be a long or short commit SHA (long preferred)
  revision: 05a87784973b6e1cc591f1f1a9a05c5873d9971e

  # The package's license, where possible using the mnemonic from
  # https://spdx.org/licenses/
  # Multiple licenses can be specified (as a YAML list)
  # A "LICENSE" file must exist containing the full license text
  license: MPL-2.0

  notes: >
    The generated emscripten code contains many global variables. When updating
    the code, paste it into the following function to protect the global scope.

    ```
    /* 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/. */

    function loadBergamot(Module) {
      {insertCodeHere}
      return Module;
    }
    ```

    Then replace `console.log()` calls with `log()` calls so that logging preferences
    are respected.