Documentation source code for https://prais4-reporting-manual.readthedocs.io
PDF version is available here
python3.12 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
READTHEDOCS=True sphinx-build -b html -d _build/.doctrees/en -D language=en . _build/html/en/latest
./make_translations.sh
python -m http.server -d _build/html/
# Then open http://localhost:8000/en/latest/
./make_pdfs.sh # English only
./make_pdfs.sh all # all languages (en es fr ar ru zh_CN)
./make_pdfs.sh ar ru zh_CN # specific languages
make clean
latexmk
chktex
texlive-xetex
fonts-freefont-otf
texlive-fonts-extra
texlive-lang-arabic
texlive-lang-chinese
texlive-lang-cjk
After changes are made to the source strings, run the following command to update the po files to include the new changes:
./make_messages.sh
After strings are updated, run the following command to automatically translate the po files:
DEEPL_API_KEY=XXXXXXXXXX ./translate_po_files.py
To see less noise when diffing po files, add in .gitconfig
[diff "msgcat"]
textconv = msgcat --no-location --no-wrap --sort-output
And add in .gitattributes:
*.po diff=msgcat