diff --git a/docs/Makefile b/docs/Makefile
index bdf4854..4a8bc75 100644
a
|
b
|
SPHINXOPTS =
|
6 | 6 | SPHINXBUILD = sphinx-build |
7 | 7 | PAPER = |
8 | 8 | BUILDDIR = _build |
| 9 | LANGUAGE = |
| 10 | TRANSDIR = translations |
9 | 11 | |
10 | 12 | # Internal variables. |
11 | 13 | PAPEROPT_a4 = -D latex_paper_size=a4 |
12 | 14 | PAPEROPT_letter = -D latex_paper_size=letter |
13 | | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . |
| 15 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees -D language=$(LANGUAGE) $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . |
14 | 16 | # the i18n builder cannot share the environment and doctrees with the others |
15 | 17 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . |
| 18 | POFILES = $(wildcard $(TRANSDIR)/*/LC_MESSAGES/*.po) |
| 19 | MOFILES = $(POFILES:.po=.mo) |
16 | 20 | |
17 | | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext |
| 21 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext translations |
18 | 22 | |
19 | 23 | help: |
20 | 24 | @echo "Please use \`make <target>' where <target> is one of" |
… |
… |
help:
|
32 | 36 | @echo " text to make text files" |
33 | 37 | @echo " man to make manual pages" |
34 | 38 | @echo " gettext to make PO message catalogs" |
| 39 | @echo " translations to compile PO files into MO files" |
35 | 40 | @echo " changes to make an overview of all changed/added/deprecated items" |
36 | 41 | @echo " linkcheck to check all external links for integrity" |
37 | 42 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" |
38 | 43 | |
39 | 44 | clean: |
40 | 45 | -rm -rf $(BUILDDIR)/* |
| 46 | -rm $(TRANSDIR)/*/*.mo |
41 | 47 | |
42 | 48 | html: |
43 | 49 | $(SPHINXBUILD) -b djangohtml $(ALLSPHINXOPTS) $(BUILDDIR)/html |
… |
… |
gettext:
|
121 | 127 | @echo |
122 | 128 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." |
123 | 129 | |
| 130 | translations: $(MOFILES) |
| 131 | @echo "Translations compiled into .mo files." |
| 132 | |
| 133 | %.mo: %.po |
| 134 | @msgfmt -o $@ $< |
| 135 | |
124 | 136 | changes: |
125 | 137 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes |
126 | 138 | @echo |
diff --git a/docs/README b/docs/README
index b02499d..210d964 100644
a
|
b
|
To create an HTML version of the docs:
|
14 | 14 | |
15 | 15 | The documentation in _build/html/index.html can then be viewed in a web browser. |
16 | 16 | |
| 17 | Building translated versions |
| 18 | ---------------------------- |
| 19 | |
| 20 | To build translated versions of the Django documentation, use the following |
| 21 | make commands and specify your language code in the LANGUAGE variable. For |
| 22 | example: |
| 23 | |
| 24 | $ make translations |
| 25 | $ make html LANGUAGE=fr |
| 26 | |
| 27 | This uses available translations in docs/translations. Those .po files are |
| 28 | obtained through the Transifex django-docs project [3]. |
| 29 | This is currently only supported on Unix-based platforms. |
| 30 | |
17 | 31 | [1] http://docutils.sourceforge.net/rst.html |
18 | 32 | [2] http://sphinx.pocoo.org/ |
| 33 | [3] https://www.transifex.net/projects/p/django-docs/ |
diff --git a/docs/conf.py b/docs/conf.py
index 2597916..7972225 100644
a
|
b
|
django_next_version = '1.6'
|
60 | 60 | # for a list of supported languages. |
61 | 61 | #language = None |
62 | 62 | |
| 63 | locale_dirs = ['translations'] |
| 64 | |
63 | 65 | # There are two options for replacing |today|: either, you set today to some |
64 | 66 | # non-false value, then it is used: |
65 | 67 | #today = '' |
diff --git a/docs/internals/contributing/localizing.txt b/docs/internals/contributing/localizing.txt
index ff957c4..61acd40 100644
a
|
b
|
Django source tree, as for any code change:
|
60 | 60 | * Open a ticket in Django's ticket system, set its ``Component`` field to |
61 | 61 | ``Translations``, and attach the patch to it. |
62 | 62 | |
| 63 | Documentation |
| 64 | ------------- |
| 65 | |
| 66 | The Django documentation can also be translated on Transifex `Django-docs |
| 67 | project page`_. |
| 68 | |
| 69 | To learn how to build a translated version of the Django documentation in your |
| 70 | language, see the README file in the docs directory of the Django source tree. |
| 71 | |
63 | 72 | .. _Transifex: https://www.transifex.net/ |
64 | 73 | .. _Django i18n mailing list: http://groups.google.com/group/django-i18n/ |
65 | 74 | .. _Django project page: https://www.transifex.net/projects/p/django/ |
| 75 | .. _Django-docs project page: https://www.transifex.net/projects/p/django-docs/ |
66 | 76 | .. _Transifex User Guide: http://help.transifex.net/ |