How to Contribute¶
How to contribute¶
Contributions to the Taler payment integration are always welcome!
To make a contribution:
Fork this repository (https://codeberg.org/Nemael/tops/),
Clone the fork on your local machine,
Create a new branch,
Make your changes in the code,
Commit your changes,
Push to your fork,
Open a pull request on the original TOPS repository (https://codeberg.org/Nemael/tops/).
Some features that may need further work:
Add more translations to help make the add-on more accessible (see here for a guide on how to add a translation).
Maintain the add-on up to date for future Odoo releases (Odoo 20 is just around the corner).
How to add a translation to the Odoo module¶
If you would like to add a translation to the module, the process is rather simple:
The file
i18n/payment_taler.potavailable here is the base translation file, with all the strings of text stored in it.Copy this file’s content in a new file
{New language}.po, such asfr.po.In this new file, translate all the strings of text that you would like to translate. You can use
fr.poavailable here as a guide on how to format the translation.Once complete, you can re-make your Odoo test database, and change your user’s language to the added translation’s language. The translation you made should appear on Odoo.
If you are encountering any issues, please open a thread in this forum category https://ich.taler.net/c/integrations/odoo/29 (You can ping me as well, @Nemael). Please specify that you are doing a new translation and for which language.
How to update and build the documentation¶
The documentation is made in
.rstformat, and built using Sphinx. You can follow the Sphinx guides or other.rstguides to improve the documentation.To add information to the documentation, you need to edit the files in
docs/.There are three directories corresponding to each documentation section (
user-guide,project,ui-explanation).
After making your changes, you need to rebuild the documentation, to obtain the updated html files.
You need to build the documentation for a specific language:
sphinx-build -D language=en -b html . _build/html/enwill build in English.sphinx-build -D language=fr -b html . _build/html/frwill build in French.If the above do not work for any reason, you can use
make htmlto build a barebone version of the documentation.
When the documentation is built, you can find the resulting files in
docs/_build/html/{2-letters target language}.You can open the root index.html in your browser to view the documentation.
How to update the translation of the documentation¶
The translation of the documentation is based on
.potfiles, which are extracted from the existing.rstfiles, converted into a language’s.pofiles, translated and then compiled.This is a standard process, you can find online guides on how to work with
.pofiles.After editing the
.rstfiles, you have extract the.potfiles for them to contain the changes you made:sphinx-build -b gettext . _build/gettext.Once you have the new
.potfiles, you have to re-make the language-specific.pofiles.One
.potfile will be created for each.rstfile.sphinx-intl update -p _build/gettext -l {2-letters target language}.Example:
sphinx-intl update -p _build/gettext -l fr.
Once you have the
.pofiles, you can translate line-per-line the content of eachmgsidin the.pofiles.When this is complete, you can build the documentation for the chosen language.
sphinx-build -D language={2-letters target language} -b html . _build/html/{2-letters target language}.Example:
sphinx-build -D language=fr -b html . _build/html/fr.
The resulting files can be found in directory
docs/_build/html/{2-letters target language}.To update the documentation on ReadTheDocs, push the documentation changes on the main branch of the repository (branch
19.0).