docs: lint rst files (#1581)

This commit is contained in:
ReenigneArcher
2023-08-31 15:49:01 -04:00
committed by GitHub
parent 932748916b
commit a3eec98ae1
21 changed files with 81 additions and 48 deletions

View File

@@ -2,4 +2,4 @@ Contributing
============
Read our contribution guide in our organization level
`docs <https://lizardbyte.readthedocs.io/en/latest/developers/contributing.html>`_.
`docs <https://lizardbyte.readthedocs.io/en/latest/developers/contributing.html>`__.

View File

@@ -17,7 +17,7 @@ Graph
CrowdIn
-------
The translations occur on
`CrowdIn <https://crowdin.com/project/sunshinestream>`_. Feel free to contribute to localization there.
`CrowdIn <https://crowdin.com/project/sunshinestream>`__. Feel free to contribute to localization there.
Only elements of the API are planned to be translated.
.. Attention:: The rest API has not yet been implemented.
@@ -49,10 +49,12 @@ situations. For example if a system tray icon is added it should be localized as
.. code-block:: cpp
#include <boost/locale.hpp>
boost::locale::translate("Hello world!")
#include <string>
std::string msg = boost::locale::translate("Hello world!");
.. Tip:: More examples can be found in the documentation for
`boost locale <https://www.boost.org/doc/libs/1_70_0/libs/locale/doc/html/messages_formatting.html>`_.
`boost locale <https://www.boost.org/doc/libs/1_70_0/libs/locale/doc/html/messages_formatting.html>`__.
.. Warning:: This is for information only. Contributors should never include manually updated template files, or
manually compiled language files in Pull Requests.
@@ -68,7 +70,7 @@ any of the following paths are modified.
When testing locally it may be desirable to manually extract, initialize, update, and compile strings. Python is
required for this, along with the python dependencies in the `./scripts/requirements.txt` file. Additionally,
`xgettext <https://www.gnu.org/software/gettext/>`_ must be installed.
`xgettext <https://www.gnu.org/software/gettext/>`__ must be installed.
**Extract, initialize, and update**
.. code-block:: bash

View File

@@ -13,12 +13,12 @@ Test clang-format locally.
Sphinx
------
Sunshine uses `Sphinx <https://www.sphinx-doc.org/en/master/>`_ for documentation building. Sphinx, along with other
Sunshine uses `Sphinx <https://www.sphinx-doc.org/en/master/>`__ for documentation building. Sphinx, along with other
required python dependencies are included in the `./docs/requirements.txt` file. Python is required to build
sphinx docs. Installation and setup of python will not be covered here.
Doxygen is used to generate the XML files required by Sphinx. Doxygen can be obtained from
`Doxygen downloads <https://www.doxygen.nl/download.html>`_. Ensure that the `doxygen` executable is in your path.
`Doxygen downloads <https://www.doxygen.nl/download.html>`__. Ensure that the `doxygen` executable is in your path.
The config file for Sphinx is `docs/source/conf.py`. This is already included in the repo and should not be modified.
@@ -37,6 +37,21 @@ Test with Sphinx
cd docs
sphinx-build -b html source build
Lint with rstcheck
.. code-block:: bash
rstcheck -r .
Check formatting with rstfmt
.. code-block:: bash
rstfmt --check --diff -w 120 .
Format inplace with rstfmt
.. code-block:: bash
rstfmt -w 120 .
Unit Testing
------------
.. Todo:: Sunshine does not currently have any unit tests. If you would like to help us improve please get in contact