Skip to content

Commit

Permalink
Merge pull request #4047 from GeotrekCE/doc-rst-syntax
Browse files Browse the repository at this point in the history
📝 Fix RST syntax in Documentation
  • Loading branch information
submarcos committed Apr 5, 2024
2 parents 01399bb + 3dd6049 commit 01f0aff
Show file tree
Hide file tree
Showing 19 changed files with 177 additions and 171 deletions.
3 changes: 3 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ CHANGELOG
- Ensure migration steps for menu items can be run separately
- Blockquote style in flat page content is now persistent on saving

**Documentation**

- Fix RST syntax (#4047)

2.104.1 (2024-04-03)
--------------------
Expand Down
6 changes: 3 additions & 3 deletions docs/contribute/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Design
Architecture
------------

.. image :: /images/architecture-1.0.png
.. image:: ../images/architecture-1.0.png
:width: 50%

* **Geotrek-admin**, the web application
Expand All @@ -34,7 +34,7 @@ The whole project is built on top of *mapentity*, a generic application in charg

For a Django model, we use the registry to activate all views and menus:

.. image :: /images/mapentity.jpg
.. image:: ../images/mapentity.jpg
:width: 50%

Business specific notions are implemented in Geotrek-admin respective applications:
Expand Down Expand Up @@ -83,4 +83,4 @@ Automatic computation of fields :
Topological path network :

* Split paths at intersection
* Snap paths extremities
* Snap paths extremities
20 changes: 10 additions & 10 deletions docs/contribute/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Quickstart
docker-compose run --rm web ./manage.py createsuperuser
docker-compose up -d

Go to http://geotrek.localhost:8000
Go to ``http://geotrek.localhost:8000``.

PDF generation might not work unless you use this domain and is correctly set to SERVER_NAME variable in your .env file.

Expand All @@ -42,7 +42,7 @@ Adding or upgrade dependencies

Consider using pip-tools to manage dependencies.

* add your dependency in setup.py for general dependency, dev-requirements.in for dev dependency, then run :
* add your dependencies in ``setup.py`` for general dependencies, ``dev-requirements.in`` for dev dependencies, then run:

::

Expand All @@ -64,7 +64,7 @@ Model modification
docker-compose run --rm web ./manage.py makemigrations <appName>
docker-compose run --rm web ./manage.py migrate

.. note ::
.. note::

Add migration file to source control.

Expand Down Expand Up @@ -123,7 +123,7 @@ If ``MyModel`` is served by APIv2, make sure to add a serializer for the new fie

When updating a field ``my_field`` in a model ``MyModel`` for ``new_field``, check if this field is translated in ``geotrek/{app}/translation.py``.

If so, you need to add a migration just after the migration generated by django.
If so, you need to add a migration just after the migration generated by Django.
This migration should rename the old fields generated by modeltranslation ``my_field_en`` by ``new_field_en``
(example : ``geotrek/trekking/migrations/0014_auto_20200228_2127.py``)

Expand Down Expand Up @@ -167,7 +167,7 @@ Test without dynamic segmentation:

**Cypress tests :**

Create an empty project with docker :
Create an empty project with Docker :

::

Expand Down Expand Up @@ -199,18 +199,18 @@ Launch tests
./node_modules/.bin/cypress run


Pictures of the problem and videos are generated in cypress/videos and cypress/screenshots
Pictures of the problem and videos are generated in ``cypress/videos`` and ``cypress/screenshots``.

Setup to run rando synchronization locally
==========================================

(sync rando is only relevant for an admin paired with geotrek rando v2)

In your django settings you must set the 'url' key of SYNC_RANDO_OPTIONS to use the same domain as defined by SERVER_NAME in your .env.
In your django settings you must set the 'url' key of ``SYNC_RANDO_OPTIONS`` to use the same domain as defined by ``SERVER_NAME`` in your ``.env``.

For instance with SERVER_NAME=geotrek.localhost (default value)
For instance with ``SERVER_NAME=geotrek.localhost`` (default value)

.. code-block :: python
.. code-block:: python
SYNC_RANDO_OPTIONS = {
'url': 'http://geotrek.localhost:8000'
Expand All @@ -219,7 +219,7 @@ For instance with SERVER_NAME=geotrek.localhost (default value)
Setup to use screamshotter-related features locally
===================================================

Use the domain defined in SERVER_NAME in your .env to reach your local geotrek admin web instance. By default the address is `http://geotrek.localhost:8000`.
Use the domain defined in ``SERVER_NAME`` in your ``.env`` to reach your local Geotrek-admin web instance. By default the address is ``http://geotrek.localhost:8000``.


Database reset
Expand Down
14 changes: 7 additions & 7 deletions docs/contribute/documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ Documentation

We use sphinx doc and sphinx-rtd-theme. Requirements are included.

A container based on sphinx image is created using docker-compose-dev.yml,
A container based on sphinx image is created using ``docker-compose-dev.yml``,
documentation is built in watch mode thanks to sphinx-autobuild.

To compile and test documentation on local environment, run :
To compile and test documentation on local environment, run:

.. code-block :: bash
.. code-block:: bash
docker-compose up -d sphinx
Expand All @@ -22,14 +22,14 @@ Access to documentation built in html : http://0.0.0.0:8800
Translate documentation
-----------------------

- Generate .pot if needed
- Generate ``.pot`` files if needed

.. code-block :: python
.. code-block:: python
docker-compose run --rm sphinx make gettext
- Generate .po files
- Generate ``.po`` files

.. code-block :: python
.. code-block:: python
docker-compose run --rm sphinx sphinx-intl update -p _build/locale -l fr
16 changes: 8 additions & 8 deletions docs/contribute/translating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Create an account

- Fill the register form

.. figure:: /images/translating/weblate-create-account.png
.. figure:: ../images/translating/weblate-create-account.png
:alt: image

- Validate your email
Expand All @@ -40,7 +40,7 @@ Browse by project

- Go to “Project > Browse all projects”

.. figure:: /images/translating/weblate-project-menu.png
.. figure:: ../images/translating/weblate-project-menu.png
:alt: image

- Select Geotrek-admin project
Expand All @@ -49,7 +49,7 @@ Browse by project

- Choose the language to translate

.. figure:: /images/translating/weblate-list-of-languages.png
.. figure:: ../images/translating/weblate-list-of-languages.png
:alt: image


Expand All @@ -63,7 +63,7 @@ You could also choose language first
- Select the project to translate


Select a coponent to translate
Select a component to translate
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Select a component (a module or a piece of documentation)
Expand All @@ -82,17 +82,17 @@ Errors and left to translate can be displayed easily.

Weblate can identify problematic translations as chains between projects, punctuation inconsistancy.

.. figure:: /images/translating/weblate-check.png
.. figure:: ../images/translating/weblate-check.png
:alt: image

Other occurrences in all components allows to check consistency.

.. figure:: /images/translating/weblate-check-list-occurrences.png
.. figure:: ../images/translating/weblate-check-list-occurrences.png
:alt: image

Each translation generate a permalink (picto |image|).

.. |image| image:: /images/translating/link.png
.. |image| image:: ../images/translating/link.png

Weblate has a "Zen mode" showing only chains to translate.

Expand All @@ -116,7 +116,7 @@ Add translations to next release

1. In **Github**, merge `translations` branch into `master`, and update changelog.

2. After releasing, in **Weblate**, rebase the branche :
2. After releasing, in **Weblate**, rebase the branch:

- In the component, click "Manage > Repository maintenance"
- Click "Rebase" to rebase `translations` branch onto `master`

0 comments on commit 01f0aff

Please sign in to comment.