-
Notifications
You must be signed in to change notification settings - Fork 119
replacer
Replacer addons can be used to replace QRC resources at execution time. The addon must include all the required files in its bundle.
The JSON files are validated via JSON Schema files:
https://github.com/mozilla-mobile/mozilla-vpn-client/tree/main/scripts/ci/jsonSchemas
On this page, we want to describe how to write a replacer addon.
-
Replacing QML files can be hazardous! The application will break if the QMLs are broken, or the dependencies are unsatisfied.
-
Replacing an entire folder is even more dangerous! Image what happens if you replace the whole
i18n
folder with broken translation files.
The Replacer JSON files are addon JSON objects with the type "replacer" and a "replacer" property object with the following properties:
Property | Description | Type | Required |
---|---|---|---|
urls | An array of Replace objects | Array of objects | Yes |
This object must have the following structure:
Property | Description | Type | Required |
---|---|---|---|
request | The QRC URL to be replaced | string | Yes |
response | The relative path of the file/directory to use to replace the request
|
string | Yes |
type | The type of the request (file or directory ). By default: file
|
string | No |