Generate weblate projects and components for Odoo projects.
These scripts rely on weblate internales and are compatible with weblate 4.3.
On the weblate machine, in the weblate virtualenv, run
pip install git+https://github.com/acsone/weblate-odoo-component-generator
This project provides two scripts. One to generate projects with a first component pointing to an Odoo addon in git repository. The other one to generate one component per addon, linked to the repo of the first addon created.
Usage: wocg-create-project [OPTIONS] This program initializes a weblate project based on a git repository. The git repository must contain at least one installable addon with a i18n directory containing the .pot file, otherwise it does nothing. A first component is created for one of these addons, based on the provided component template. Subsequent components can be created with wocg-create- components. Options: --repository TEXT Ssh url to git repository. [required] --branch TEXT Target branch. [required] --tmpl-component-slug TEXT Slug identifier for the template component. [required] --addons-subdirectory TEXT Addons subdirectory, in case addons are not at the root of the project (eg odoo/addons). --help Show this message and exit.
Usage: wocg-create-components [OPTIONS] This program creates the missing components for all existing Odoo projects in Weblate. A component will be created only if the related addon is installable and contains a .pot file. The projects must have been created before running this programe, as well as a first component for each project in order to provide vcs information. Subsequent components are linked to the vcs of the first component. Options: --help Show this message and exit.
- Adrien Peiffer <adrien.peiffer@acsone.eu>
- Benjamin Willig <benjamin.willig@acsone.eu>
- Stéphane Bidoul <stephane.bidoul@acsone.eu>
This project has been originally funded by ACSONE SA/NV (https://acsone.eu/).