summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorYanis Guenane <yguenane@redhat.com>2021-03-05 18:31:56 +0100
committerGitHub <noreply@github.com>2021-03-05 09:31:56 -0800
commit212837defcb917e2b5613be0966a5374b3c27536 (patch)
treeb11b153855e30327897174d2c3d325139d8ea038 /Makefile
parentfb66b4ffbc273402862444e7816bfa1c24195709 (diff)
downloadansible-212837defcb917e2b5613be0966a5374b3c27536.tar.gz
Documentation: Lay the ground for i18n work. (#73746)
* Documentation: Lay the ground for i18n work. * Translating both ansible-core and ansible docs requires msgcat (a program from the gettext package). If msgcat is not present, only the ansible-core index file's strings will be extracted for translation. If this is a problem, a short hacking script could be written to take the place of msgcat (merging the various index pot files into a single pot file). Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 9c3965e79e..0395802220 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,9 @@
# make deb-src -------------- produce a DEB source
# make deb ------------------ produce a DEB
# make docs ----------------- rebuild the manpages (results are checked in)
+# make gettext -------------- produce POT files for docs
+# make generate-po ---------- generate language specfic po file
+# make needs-translation ---- generate list of file with unstranlated or fuzzy string for a specific language
# make tests ---------------- run the tests (see https://docs.ansible.com/ansible/devel/dev_guide/testing_units.html for requirements)
########################################################
@@ -58,6 +61,9 @@ DATE := $(shell date --utc --date="$(GIT_DATE)" +%Y%m%d%H%M)
CPUS ?= $(shell nproc)
endif
+# Intenationalisation and Localisation
+LANGUAGES ?=
+
# DEB build parameters
DEBUILD_BIN ?= debuild
DEBUILD_OPTS = --source-option="-I"
@@ -275,6 +281,18 @@ webdocs:
coredocs:
(cd docs/docsite/; CPUS=$(CPUS) $(MAKE) coredocs)
+.PHONY: gettext
+gettext:
+ (cd docs/docsite/; CPUS=$(CPUS) $(MAKE) gettext)
+
+.PHONY: generate-po
+generate-po:
+ (cd docs/docsite/; CPUS=$(CPUS) LANGUAGES=$(LANGUAGES) $(MAKE) generate-po)
+
+.PHONY: needs-translation
+needs-translation:
+ (cd docs/docsite/; CPUS=$(CPUS) LANGUAGES=$(LANGUAGES) $(MAKE) needs-translation)
+
.PHONY: linkcheckdocs
linkcheckdocs:
(cd docs/docsite/; CPUS=$(CPUS) $(MAKE) linkcheckdocs)