forked from hyperledger/fabric-docs-i18n
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (46 loc) · 2.01 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Adds support per each translation
docs-lang-es: TRANSLATION = es
docs-linkcheck-lang-es: TRANSLATION = es
docs-clean-lang-es: TRANSLATION = es
docs-lang-fr_FR: TRANSLATION = fr_FR
docs-linkcheck-lang-fr_FR: TRANSLATION = fr_FR
docs-clean-lang-fr_FR: TRANSLATION = fr_FR
docs-lang-ja_JP: TRANSLATION = ja_JP
docs-linkcheck-lang-ja_JP: TRANSLATION = ja_JP
docs-clean-lang-ja_JP: TRANSLATION = ja_JP
docs-lang-ko_KR: TRANSLATION = ko_KR
docs-linkcheck-lang-ko_KR: TRANSLATION = ko_KR
docs-clean-lang-ko_KR: TRANSLATION = ko_KR
docs-lang-ml_IN: TRANSLATION = ml_IN
docs-linkcheck-lang-ml_IN: TRANSLATION = ml_IN
docs-clean-lang-ml_IN: TRANSLATION = ml_IN
docs-lang-pt_BR: TRANSLATION = pt_BR
docs-linkcheck-lang-pt_BR: TRANSLATION = pt_BR
docs-clean-lang-pt_BR: TRANSLATION = pt_BR
docs-lang-ru_RU: TRANSLATION = ru_RU
docs-linkcheck-lang-ru_RU: TRANSLATION = ru_RU
docs-clean-lang-ru_RU: TRANSLATION = ru_RU
docs-lang-zh_CN: TRANSLATION = zh_CN
docs-linkcheck-lang-zh_CN: TRANSLATION = zh_CN
docs-clean-lang-zh_CN: TRANSLATION = zh_CN
docs-lang-ta_IN: TRANSLATION = ta_IN
docs-linkcheck-lang-ta_IN: TRANSLATION = ta_IN
docs-clean-lang-ta_IN: TRANSLATION = ta_IN
# check if the translation language exists
TRANSLATION = no_value
.PHONY: verificate-translation
verificate-translation:
@if [ $(TRANSLATION) = no_value ]; then \
echo "Please use a language specific 'make' target such as: 'docs-lang-<language>' where '<language> is the i18n short code for your language"; \
exit 1; \
fi;
.PHONY: docs-lang-%
docs-lang-%: verificate-translation
@echo "Generating translation for $(TRANSLATION)"
@docker run -v $$(pwd)/docs:/docs hyperledger-fabric.jfrog.io/fabric-tox sh -c 'cd /docs/locale/$(TRANSLATION)/ && tox -e docs'
.PHONY: docs-linkcheck-lang-%
docs-linkcheck-lang-%: verificate-translation
@docker run -v $$(pwd)/docs:/docs hyperledger-fabric.jfrog.io/fabric-tox sh -c 'cd /docs/locale/$(TRANSLATION)/ && tox -e docs-linkcheck'
.PHONY: clean
docs-clean-lang-%: verificate-translation
@rm -rf docs/locale/$(TRANSLATION)/_build/