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>
26 lines
706 B
Makefile
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)
|