diff --git a/.gitignore b/.gitignore index 1d7aeb0f..0349bb6f 100644 --- a/.gitignore +++ b/.gitignore @@ -28,7 +28,7 @@ Changelog.linkchecker* /doc/html/*.qhc /doc/html/*.qch /.achievements -/doc/*.mo +/doc/i18n/locales/*/LC_MESSAGES/*.mo /LinkChecker-*-portable.zip /LinkChecker-*.exe /LinkChecker.egg-info diff --git a/doc/src/Makefile b/doc/src/Makefile index d37e8571..273664cd 100644 --- a/doc/src/Makefile +++ b/doc/src/Makefile @@ -10,13 +10,16 @@ LANGUAGE = en help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) +gettext: + @$(SPHINXBUILD) -b gettext "$(SOURCEDIR)" -d "$(BUILDDIR)/i18n/doctrees" ../i18n/gettext $(SPHINXOPTS) $(O) + html: @$(SPHINXBUILD) -b html "$(SOURCEDIR)" -d "$(BUILDDIR)/doctrees" ../html $(SPHINXOPTS) $(O) man: @$(SPHINXBUILD) -b man "$(SOURCEDIR)" -d "$(BUILDDIR)/doctrees" ../man/$(LANGUAGE) $(SPHINXOPTS) $(O) -.PHONY: help html man Makefile +.PHONY: help gettext html man Makefile # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). diff --git a/doc/translations.md b/doc/translations.md index 9dd6a4e8..b9daddff 100644 --- a/doc/translations.md +++ b/doc/translations.md @@ -16,6 +16,20 @@ is equivalent to: Man Page Translations --------------------- -po4a is used to generate linkchecker.doc.pot, .po files and translated man pages. +Sphinx is used to generate .pot and .po (with sphinx-intl) files in i18n/ +and man pages in man/. -``linkchecker/doc $ make po4a`` +Create man.pot file in i18n/gettext/: + +``linkchecker/doc $ make -C src gettext`` + +Create man.po file in i18n/locales/: + +``linkchecker/doc/src $ sphinx-intl update -p ../i18n/gettext -l de`` + +Create man pages: + +``linkchecker/doc $ make man`` + +After updating the source files all steps need to be repeated, if translations +alone have been changed in the .po file only the last step is needed.