From 3177e63deedb483df68692ffb4429cc9d0a44649 Mon Sep 17 00:00:00 2001 From: Luca Bruno <lucab@debian.org> Date: Sun, 7 Jul 2013 21:12:00 +0200 Subject: [PATCH] Use po4a to provide translatable documentation This commit add a new "docs-l10n" make target which uses po4a to: * create .pot (PO templates) from markdown doc * update templates and po for enabled languages * generate translated markdown for completed (> 80%) translations Currently, no language has been activated. Signed-off-by: Luca Bruno <lucab@debian.org> --- doc/po4a.conf | 15 +++++++++++++++ mk/docs.mk | 5 +++++ 2 files changed, 20 insertions(+) create mode 100644 doc/po4a.conf diff --git a/doc/po4a.conf b/doc/po4a.conf new file mode 100644 index 00000000000..feedafcd391 --- /dev/null +++ b/doc/po4a.conf @@ -0,0 +1,15 @@ +# Add here a list of target languages; po4a will automatically +# generates .po for them and build .md when translated, eg: +# [po4a_langs] es fr it pt_BR +[po4a_langs] +[po4a_paths] doc/po/$master.pot $lang:doc/po/$lang/$master.po + +# Add here below all source documents to be translated +[type: text] doc/rust.md $lang:doc/l10n/$lang/rust.md +[type: text] doc/rustpkg.md $lang:doc/l10n/$lang/rustpkg.md +[type: text] doc/tutorial-container.md $lang:doc/l10n/$lang/tutorial-container.md +[type: text] doc/tutorial.md $lang:doc/l10n/$lang/tutorial.md +[type: text] doc/tutorial-borrowed-ptr.md $lang:doc/l10n/$lang/tutorial-borrowed-ptr.md +[type: text] doc/tutorial-ffi.md $lang:doc/l10n/$lang/tutorial-ffi.md +[type: text] doc/tutorial-macros.md $lang:doc/l10n/$lang/tutorial-macros.md +[type: text] doc/tutorial-tasks.md $lang:doc/l10n/$lang/tutorial-tasks.md diff --git a/mk/docs.mk b/mk/docs.mk index f11a3d24b8d..14480dfed00 100644 --- a/mk/docs.mk +++ b/mk/docs.mk @@ -234,3 +234,8 @@ doc/version_info.html: version_info.html.template $(MKFILE_DEPS) \ GENERATED += doc/version.md doc/version_info.html docs: $(DOCS) + +docs-l10n: + po4a doc/po4a.conf + +.PHONY: docs-l10n