Skip to content
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Here is what you can do:
#
# - make all # Automatically build an html local version
# - make validate # Validate translation (.po) files
# - make todo # To list remaining tasks
# - make merge # To merge pot from upstream
# - make fuzzy # To find fuzzy strings
Expand Down Expand Up @@ -73,6 +74,13 @@ $(VENV)/bin/sphinx-build: $(VENV)/bin/activate
$(VENV)/bin/blurb: $(VENV)/bin/activate
. $(VENV)/bin/activate; python3 -m pip install blurb

.PHONY: validate
validate: $(VENV)/bin/sphinx-build $(VENV)/bin/blurb clone ## Automatically build an html local version
mkdir -p $(LC_MESSAGES)
for dirname in $$(find . -name '*.po' | xargs -n1 dirname | sort -u | grep -v '^\.$$'); do mkdir -p $(LC_MESSAGES)/$$dirname; done
for file in *.po */*.po; do ln -f $$file $(LC_MESSAGES)/$$file; done
. $(VENV)/bin/activate; $(MAKE) -C $(CPYTHON_CLONE)/Doc/ SPHINXOPTS='-j$(JOBS) -D locale_dirs=locales -D language=$(LANGUAGE) -D gettext_compact=0' text


.PHONY: upgrade_venv
upgrade_venv: $(VENV)/bin/activate ## Upgrade the venv that compiles the doc
Expand Down
6 changes: 5 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ the PSF for inclusion in the documentation.

poedit glossary.po

3. 存檔以後,執行以下列指令編譯輸出文件,以確保你的修改沒有 rST 的語法錯誤或警告 ::
3. 存檔以後,執行以下列指令檢查翻譯檔,以確保你的修改沒有 rST 的語法錯誤或警告 ::

VERSION=3.11 make validate

或者輸出完整html文件 ::

VERSION=3.11 make all

Expand Down