From 8b9b1850aff9c5ce7f936d50608c6e972184b624 Mon Sep 17 00:00:00 2001 From: n-peugnet Date: Wed, 23 Mar 2022 15:58:43 +0100 Subject: prepare for gettext translations --- .gitignore | 2 ++ Makefile | 6 +++++- README.md | 3 ++- make.bat | 35 ----------------------------------- 4 files changed, 9 insertions(+), 37 deletions(-) delete mode 100644 make.bat 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 -- cgit v1.2.3