This guide covers how to generate the Tiled documentation on various platforms using a virtual environment. You'll need Python 3 installed.
- Python 3
- pip (Python package installer)
It's recommended to use a virtual environment to isolate the project dependencies. Here's how to set it up:
python3 -m venv .venv
source .venv/bin/activatepython -m venv .venv
.venv\Scripts\activateAfter activating the virtual environment, install the required packages using the requirements.txt file:
pip install -r requirements.txtWith the virtual environment activated and dependencies installed, you can generate the documentation by running:
make htmlOn Windows, use:
make.bat htmlAdd O=-Dlanguage=<language> to the above command, where <language> should be replaced by a language code like fr, de, etc.
To update the translation files before tagging a new release:
- Ensure your virtual environment is activated.
- Generate the .pot files:
make gettext
- Update the .po files for German and French:
sphinx-intl update -p _build/gettext -l de -l fr
Note: Currently, only German and French translations are hosted. Additional languages can be added if there's sufficient interest in maintaining those translations.
When you're done working on the documentation, you can deactivate the virtual environment:
deactivateThe requirements.txt file in the documentation directory specifies the required packages and their versions. If you need to view or update these requirements, you can find them in this file.
Remember to activate the virtual environment each time you work on the documentation, and to update your virtual environment if requirements.txt changes:
pip install -r requirements.txtThis ensures you're always using the correct versions of the dependencies for building the documentation.