File tree 1 file changed +4
-2
lines changed 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 18
18
CPYTHON_CLONE := ../cpython/
19
19
SPHINX_CONF := $(CPYTHON_CLONE ) /Doc/conf.py
20
20
LANGUAGE := zh_TW
21
+ LC_MESSAGES := $(CPYTHON_CLONE ) /Doc/locales/$(LANGUAGE ) /LC_MESSAGES
21
22
VENV := ~/.venvs/python-docs-i18n/
22
23
PYTHON := $(shell which python3)
23
24
MODE := autobuild-dev-html
@@ -27,8 +28,9 @@ JOBS = 1
27
28
28
29
.PHONY : all
29
30
all : $(VENV ) /bin/sphinx-build $(VENV ) /bin/blurb $(SPHINX_CONF )
30
- mkdir -p $(CPYTHON_CLONE ) /Doc/locales/$(LANGUAGE ) /
31
- ln -nfs $(shell pwd) $(CPYTHON_CLONE ) /Doc/locales/$(LANGUAGE ) /LC_MESSAGES
31
+ mkdir -p $(LC_MESSAGES )
32
+ for dirname in $$ (find . -name ' *.po' | xargs -n1 dirname | sort -u | grep -v ' ^\.$$' ); do mkdir -p $( LC_MESSAGES) /$$ dirname; done
33
+ for file in * .po * /* .po; do ln -f $$ file $( LC_MESSAGES) /$$ file; done
32
34
. $(VENV ) /bin/activate; $(MAKE ) -C $(CPYTHON_CLONE ) /Doc/ SPHINXOPTS=' -j$(JOBS) -D locale_dirs=locales -D language=$(LANGUAGE) -D gettext_compact=0' $(MODE )
33
35
34
36
You can’t perform that action at this time.
0 commit comments