Skip to content

unccd/Prais4-reporting-manual

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

421 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prais4 reporting manual

Documentation source code for https://prais4-reporting-manual.readthedocs.io

PDF version is available here

Local python environment

python3.12 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt

Build HTML version (English only)

READTHEDOCS=True sphinx-build -b html -d _build/.doctrees/en -D language=en . _build/html/en/latest

Build translations (HTML version)

./make_translations.sh

Run local HTTP server

python -m http.server -d _build/html/
# Then open http://localhost:8000/en/latest/

Build PDFs

./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

Clean all output

make clean

Prerequisites for PDF build

latexmk
chktex
texlive-xetex
fonts-freefont-otf
texlive-fonts-extra
texlive-lang-arabic
texlive-lang-chinese
texlive-lang-cjk

Updating translation strings

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

Automatically translate po files with DeepL

After strings are updated, run the following command to automatically translate the po files:

DEEPL_API_KEY=XXXXXXXXXX ./translate_po_files.py

Other stuff

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors