diff --git a/Makefile b/Makefile index 3f9c041ab0..cd484f75ce 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 diff --git a/README.rst b/README.rst index 7e56b0e5af..29a6a696fe 100644 --- a/README.rst +++ b/README.rst @@ -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