[Bf-docboard-svn] bf-manual: [7214] trunk/blender_docs: Make files: Add new language env var instead of using sphinxopts

Aaron Carlisle noreply at blender.org
Sun Oct 11 20:47:52 CEST 2020


Revision: 7214
          https://developer.blender.org/rBM7214
Author:   Blendify
Date:     2020-10-11 20:47:52 +0200 (Sun, 11 Oct 2020)
Log Message:
-----------
Make files: Add new language env var instead of using sphinxopts

This makes it more clear and simpler for translators

Modified Paths:
--------------
    trunk/blender_docs/Makefile
    trunk/blender_docs/make.bat
    trunk/blender_docs/manual/about/contribute/translations/contribute.rst

Modified: trunk/blender_docs/Makefile
===================================================================
--- trunk/blender_docs/Makefile	2020-10-09 21:47:52 UTC (rev 7213)
+++ trunk/blender_docs/Makefile	2020-10-11 18:47:52 UTC (rev 7214)
@@ -7,11 +7,12 @@
 
 # You can set these variables from the command line, and also
 # from the environment for the first two.
-SPHINXOPTS    ?= -j auto
-LATEXOPTS     ?= "-interaction nonstopmode"
 SPHINXBUILD   ?= sphinx-build
 SOURCEDIR     = ./manual
 BUILDDIR      = build
+LANGUAGE      ?= en
+SPHINXOPTS    ?= -j auto -D language='$(LANGUAGE)'
+LATEXOPTS     ?= "-interaction nonstopmode"
 
 # full paths
 CHAPTERS_FULL:=$(filter %/, $(wildcard manual/*/))

Modified: trunk/blender_docs/make.bat
===================================================================
--- trunk/blender_docs/make.bat	2020-10-09 21:47:52 UTC (rev 7213)
+++ trunk/blender_docs/make.bat	2020-10-11 18:47:52 UTC (rev 7214)
@@ -7,7 +7,8 @@
 )
 set SOURCEDIR=./manual
 set BUILDDIR=build
-set SPHINXOPTS=-j auto
+set LANGUAGE=en
+set SPHINXOPTS=-j auto -D language='%LANGUAGE%'
 
 REM Check if sphinx-build is available and fallback to Python version if any
 %SPHINXBUILD% 1>NUL 2>NUL

Modified: trunk/blender_docs/manual/about/contribute/translations/contribute.rst
===================================================================
--- trunk/blender_docs/manual/about/contribute/translations/contribute.rst	2020-10-09 21:47:52 UTC (rev 7213)
+++ trunk/blender_docs/manual/about/contribute/translations/contribute.rst	2020-10-11 18:47:52 UTC (rev 7214)
@@ -66,19 +66,17 @@
 Building with Translations
 ==========================
 
-.. note::
+Now you can build the manual with the translation applied
 
-   This is optional, translations are automatically built online, e.g:
-   https://docs.blender.org/manual/fr/dev/
+On Linux and macOS run::
 
-Now you can build the manual with the translation applied::
+   make -e LANGUAGE=fr
 
-   make -e SPHINXOPTS="-D language='fr'"
+On Windows run::
 
-If you are on Windows and do not have ``make``, run::
+   set LANGUEAGE=fr
+   make html
 
-   sphinx-build -b html -D language=fr ./manual ./build/html
-
 Now you will have a build of the manual with translations applied.
 
 
@@ -125,12 +123,7 @@
 
    python tools_report/report_translation_progress.py --help
 
-.. seealso::
 
-   Instructions on this page are based on
-   `Sphinx Intl documentation <https://www.sphinx-doc.org/en/master/usage/advanced/intl.html>`__.
-
-
 Updating PO Files
 -----------------
 



More information about the Bf-docboard-svn mailing list