1
- # Makefile for French Python Documentation
1
+ # Makefile for Chinese (Taiwan) Python Documentation
2
2
#
3
3
# Here is what you can do:
4
4
#
15
15
16
16
CPYTHON_CLONE := ../cpython/
17
17
SPHINX_CONF := $(CPYTHON_CLONE ) /Doc/conf.py
18
- LANGUAGE := fr
18
+ LANGUAGE := zh_TW
19
19
VENV := ~/.venvs/python-docs-i18n/
20
20
PYTHON := $(shell which python3)
21
21
MODE := autobuild-dev-html
@@ -26,12 +26,13 @@ JOBS = 1
26
26
.PHONY : all
27
27
all : $(VENV ) /bin/sphinx-build $(VENV ) /bin/blurb $(SPHINX_CONF )
28
28
mkdir -p $(CPYTHON_CLONE ) /Doc/locales/$(LANGUAGE ) /
29
- ln -nfs $(shell readlink -f . ) $(CPYTHON_CLONE ) /Doc/locales/$(LANGUAGE ) /LC_MESSAGES
29
+ ln -nfs $(shell pwd ) $(CPYTHON_CLONE ) /Doc/locales/$(LANGUAGE ) /LC_MESSAGES
30
30
. $(VENV ) /bin/activate; $(MAKE ) -C $(CPYTHON_CLONE ) /Doc/ SPHINXOPTS=' -j$(JOBS) -D locale_dirs=locales -D language=$(LANGUAGE) -D gettext_compact=0' $(MODE )
31
31
32
32
33
33
$(SPHINX_CONF ) :
34
34
git clone --depth 1 --no-single-branch https://github.com/python/cpython.git $(CPYTHON_CLONE )
35
+ cd $(CPYTHON_CLONE ) && git checkout $(BRANCH )
35
36
36
37
37
38
$(VENV ) /bin/activate :
@@ -40,7 +41,7 @@ $(VENV)/bin/activate:
40
41
41
42
42
43
$(VENV ) /bin/sphinx-build : $(VENV ) /bin/activate
43
- . $(VENV ) /bin/activate; python3 -m pip install sphinx
44
+ . $(VENV ) /bin/activate; python3 -m pip install sphinx python-docs-theme
44
45
45
46
46
47
$(VENV ) /bin/blurb : $(VENV ) /bin/activate
@@ -49,7 +50,7 @@ $(VENV)/bin/blurb: $(VENV)/bin/activate
49
50
50
51
.PHONY : upgrade_venv
51
52
upgrade_venv : $(VENV ) /bin/activate
52
- . $(VENV ) /bin/activate; python3 -m pip install --upgrade sphinx blurb
53
+ . $(VENV ) /bin/activate; python3 -m pip install --upgrade sphinx python-docs-theme blurb
53
54
54
55
55
56
.PHONY : progress
91
92
.PHONY : fuzzy
92
93
fuzzy :
93
94
for file in * .po * /* .po; do echo $$ (msgattrib --only-fuzzy --no-obsolete " $$ file" | grep -c ' #, fuzzy' ) $$ file; done | grep -v ^0 | sort -gr
95
+
96
+
97
+ .PHONY : clean
98
+ clean :
99
+ rm * .mo * /* .mo
0 commit comments