aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2022-03-23 15:58:43 +0100
committern-peugnet <n.peugnet@free.fr>2022-03-23 15:58:43 +0100
commit8b9b1850aff9c5ce7f936d50608c6e972184b624 (patch)
treef5b2e763fe57c0f4c14242ff21ac58a5533c3a7b
parentb0adc08f05f25d644c645d1e7fb46cf6332bfc0a (diff)
downloadclub1-docs-8b9b1850aff9c5ce7f936d50608c6e972184b624.tar.gz
club1-docs-8b9b1850aff9c5ce7f936d50608c6e972184b624.zip
prepare for gettext translations
-rw-r--r--.gitignore2
-rw-r--r--Makefile6
-rw-r--r--README.md3
-rw-r--r--make.bat35
4 files changed, 9 insertions, 37 deletions
diff --git a/.gitignore b/.gitignore
index e35d885..6cc35f5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
+# Project generated files
_build
+*.mo
diff --git a/Makefile b/Makefile
index 51e3ffa..2c15a7b 100644
--- a/Makefile
+++ b/Makefile
@@ -8,12 +8,16 @@ SPHINXBUILD ?= sphinx-build
SPHINXCMDS = clean html latexpdf man
SOURCEDIR = .
BUILDDIR = _build
+LOCALES = en
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-.PHONY: help Makefile $(SPHINXCMDS)
+.PHONY: help locales Makefile $(SPHINXCMDS)
+
+locales: gettext
+ @sphinx-intl update -p $(BUILDDIR)/gettext $(LOCALES:%=-l %)
# Explicit Sphinx commands for autocompletion.
$(SPHINXCMDS):
diff --git a/README.md b/README.md
index 33e224d..60f6958 100644
--- a/README.md
+++ b/README.md
@@ -7,13 +7,14 @@ Prérequis
---------
- Sphinx
+- Sphinx-intl
- Shpinx-rtd-theme
- MyST-Parser
- Make
### Linux dérivé de Debian
- sudo apt install python3-shpinx python3-sphinx-rtd-theme python3-myst-parser make
+ sudo apt install python3-shpinx sphinx-intl python3-sphinx-rtd-theme python3-myst-parser make
### MacOS
diff --git a/make.bat b/make.bat
deleted file mode 100644
index 153be5e..0000000
--- a/make.bat
+++ /dev/null
@@ -1,35 +0,0 @@
-@ECHO OFF
-
-pushd %~dp0
-
-REM Command file for Sphinx documentation
-
-if "%SPHINXBUILD%" == "" (
- set SPHINXBUILD=sphinx-build
-)
-set SOURCEDIR=.
-set BUILDDIR=_build
-
-if "%1" == "" goto help
-
-%SPHINXBUILD% >NUL 2>NUL
-if errorlevel 9009 (
- echo.
- echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
- echo.installed, then set the SPHINXBUILD environment variable to point
- echo.to the full path of the 'sphinx-build' executable. Alternatively you
- echo.may add the Sphinx directory to PATH.
- echo.
- echo.If you don't have Sphinx installed, grab it from
- echo.https://www.sphinx-doc.org/
- exit /b 1
-)
-
-%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
-goto end
-
-:help
-%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
-
-:end
-popd