gluon/docs/Makefile
Felix Kaechele 3b2f780e0a docs: add sphinx-intl workflow for translations
Add a update-po and %.po rule to the Makefile.
We define "de" as a language to start with.

To add languages just append them to the update-po rule in the Makefile.

We do want to keep the _build/gettext folder as Weblate uses this to
enable new translations.

Signed-off-by: Felix Kaechele <felix@kaechele.ca>
2019-04-20 19:41:42 -04:00

26 lines
706 B
Makefile

# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXINTL = sphinx-intl
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help update-po Makefile
update-po: gettext de.po
%.po:
@$(SPHINXINTL) update -p "$(BUILDDIR)/gettext" -l $*
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)