forked from Github-Mirrors/canaille
doc: fix doc building
This commit is contained in:
parent
1bf26a8402
commit
3df1b9d7c7
3 changed files with 23 additions and 22 deletions
|
@ -148,8 +148,7 @@ The dynamical parts of the interface use `htmx <https://htmx.org/>`_.
|
|||
Translations
|
||||
------------
|
||||
|
||||
.. include:: ../canaille/translations/README.md
|
||||
:parser: myst_parser.sphinx_
|
||||
.. include:: ../canaille/translations/README.rst
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
|
|
@ -1,40 +1,42 @@
|
|||
# Translation
|
||||
|
||||
Translations are done with [Weblate](https://hosted.weblate.org/projects/canaille/canaille/).
|
||||
|
||||
The following commands are there as documentation, only the message extraction is needed for contributors.
|
||||
All the other steps are automatically done with Weblate.
|
||||
|
||||
|
||||
## Message extraction
|
||||
Message extraction
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
After you have edited translatable strings, you should extract the messages with:
|
||||
|
||||
```bash
|
||||
pybabel extract --mapping-file canaille/translations/babel.cfg --copyright-holder="Yaal Coop" --output-file canaille/translations/messages.pot canaille
|
||||
```
|
||||
.. code-block:: bash
|
||||
|
||||
## Language addition
|
||||
pybabel extract --mapping-file canaille/translations/babel.cfg --copyright-holder="Yaal Coop" --output-file canaille/translations/messages.pot canaille
|
||||
|
||||
Language addition
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
You can add a new language manually with the following command, however this should not be needed as Weblate takes car of this:
|
||||
|
||||
```bash
|
||||
pybabel init --input-file canaille/translations/messages.pot --output-dir canaille/translations --locale <LANG>
|
||||
```
|
||||
.. code-block:: bash
|
||||
|
||||
## Catalog update
|
||||
pybabel init --input-file canaille/translations/messages.pot --output-dir canaille/translations --locale <LANG>
|
||||
|
||||
Catalog update
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
You can update the catalogs with the following command, however this should not be needed as Weblate automatically update language catalogs when it detects new strings or when someone translate some existing strings.
|
||||
Weblate pushes happen every 24h.
|
||||
|
||||
```bash
|
||||
pybabel update --input-file canaille/translations/messages.pot --output-dir canaille/translations --ignore-obsolete --no-fuzzy-matching --update-header-comment
|
||||
```
|
||||
.. code-block:: bash
|
||||
|
||||
## Catalog compilation
|
||||
pybabel update --input-file canaille/translations/messages.pot --output-dir canaille/translations --ignore-obsolete --no-fuzzy-matching --update-header-comment
|
||||
|
||||
Catalog compilation
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
You can compile the catalogs with the following command, however this should not be needed as catalogs are automatically compiled before running the unit tests, before launching the demo and before compiling the Canaille python package:
|
||||
|
||||
```bash
|
||||
pybabel compile --directory canaille/translations --statistics
|
||||
```
|
||||
.. code-block:: bash
|
||||
|
||||
pybabel compile --directory canaille/translations --statistics
|
|
@ -30,8 +30,8 @@ Settings will also be read from a local ``.env`` file if present.
|
|||
.. TODO: Uncomment this when pydantic-settings implements nested secrets directories
|
||||
https://github.com/pydantic/pydantic-settings/issues/154
|
||||
|
||||
Secret parameters
|
||||
=================
|
||||
Secret parameters
|
||||
=================
|
||||
|
||||
A ``SECRETS_DIR`` environment variable can be passed as an environment variable, being a path to a directory in which are stored files named after the configuration settings.
|
||||
|
||||
|
|
Loading…
Reference in a new issue