Skip to content

Commit

Permalink
Use po4a to provide translatable documentation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
lucab committed Jul 7, 2013
1 parent b168252 commit 3177e63
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
15 changes: 15 additions & 0 deletions 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
5 changes: 5 additions & 0 deletions mk/docs.mk
Expand Up @@ -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

0 comments on commit 3177e63

Please sign in to comment.