mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-17 22:46:50 +00:00
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>
This commit is contained in:
parent
b16825216e
commit
3177e63dee
15
doc/po4a.conf
Normal file
15
doc/po4a.conf
Normal file
@ -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
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user