1- # Makefile for French Python Documentation
1+ # Makefile for Chinese (Taiwan) Python Documentation
22#
33# Here is what you can do:
44#
1515
1616CPYTHON_CLONE := ../cpython/
1717SPHINX_CONF := $(CPYTHON_CLONE ) /Doc/conf.py
18- LANGUAGE := fr
18+ LANGUAGE := zh_TW
1919VENV := ~/.venvs/python-docs-i18n/
2020PYTHON := $(shell which python3)
2121MODE := autobuild-dev-html
@@ -26,12 +26,13 @@ JOBS = 1
2626.PHONY : all
2727all : $(VENV ) /bin/sphinx-build $(VENV ) /bin/blurb $(SPHINX_CONF )
2828 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
3030 . $(VENV ) /bin/activate; $(MAKE ) -C $(CPYTHON_CLONE ) /Doc/ SPHINXOPTS=' -j$(JOBS) -D locale_dirs=locales -D language=$(LANGUAGE) -D gettext_compact=0' $(MODE )
3131
3232
3333$(SPHINX_CONF ) :
3434 git clone --depth 1 --no-single-branch https://github.com/python/cpython.git $(CPYTHON_CLONE )
35+ cd $(CPYTHON_CLONE ) && git checkout $(BRANCH )
3536
3637
3738$(VENV ) /bin/activate :
@@ -40,7 +41,7 @@ $(VENV)/bin/activate:
4041
4142
4243$(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
4445
4546
4647$(VENV ) /bin/blurb : $(VENV ) /bin/activate
@@ -49,7 +50,7 @@ $(VENV)/bin/blurb: $(VENV)/bin/activate
4950
5051.PHONY : upgrade_venv
5152upgrade_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
5354
5455
5556.PHONY : progress
9192.PHONY : fuzzy
9293fuzzy :
9394 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