mirror of
https://gh.wpcy.net/https://github.com/WeblateOrg/weblate.git
synced 2026-04-30 18:10:51 +08:00
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
19 lines
565 B
ReStructuredText
19 lines
565 B
ReStructuredText
Developing add-ons
|
|
==================
|
|
|
|
:ref:`addons` are a way to customize localization workflow in Weblate.
|
|
|
|
.. currentmodule:: weblate.addons.base
|
|
|
|
.. autoclass:: BaseAddon
|
|
:members:
|
|
|
|
Add-on hooks receive ORM objects from the ``weblate.*.models`` modules,
|
|
including ``Addon``, ``Component``, ``Translation``, ``Category``, ``Project``,
|
|
``Unit``, ``Change``, and ``User``. Add-on configuration forms should subclass
|
|
``weblate.addons.forms.BaseAddonForm``.
|
|
|
|
Here is an example add-on:
|
|
|
|
.. literalinclude:: ../../weblate/addons/example.py
|
|
:language: python
|