-
Notifications
You must be signed in to change notification settings - Fork 101
/
Makefile.zh_CN
94 lines (77 loc) · 4.29 KB
/
Makefile.zh_CN
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Clean up build artifacts
.PHONY: clean-zh_CN
clean-zh_CN: clean-branding-zh_CN ## Remove build artifacts from output directory (Antora and PDF)
$(call clean-function,translations/zh_CN,zh_CN)
.PHONY: clean-branding-zh_CN
clean-branding-zh_CN:
$(call clean-branding,zh_CN)
.PHONY: copy-branding-zh_CN
copy-branding-zh_CN: copy-branding
$(call copy-branding,zh_CN)
.PHONY: configure-suma-branding-dsc-zh_CN
configure-suma-branding-dsc-zh_CN: configure-suma-branding-dsc
$(call configure-suma-branding-dsc,zh_CN)
.PHONY: configure-suma-branding-webui-zh_CN
configure-suma-branding-webui-zh_CN: configure-suma-branding-webui
$(call configure-suma-branding-webui,zh_CN)
.PHONY: validate-suma-zh_CN
validate-suma-zh_CN:
$(call validate-product,translations/zh_CN,suma-site.yml)
.PHONY: pdf-tar-suma-zh_CN
pdf-tar-suma-zh_CN:
$(call pdf-tar-product,zh_CN,susemanager-docs_zh_CN-pdf,$(current_dir)/build/zh_CN/pdf)
.PHONY: set-html-language-selector-suma-zh_CN
set-html-language-selector-suma-zh_CN: set-html-language-selector-suma
mkdir -p $(shell dirname translations/zh_CN/$(SUPPLEMENTAL_FILES_SUMA))
cp -a translations/$(SUPPLEMENTAL_FILES_SUMA) translations/zh_CN/$(SUPPLEMENTAL_FILES_SUMA)
.PHONY: prepare-antora-suma-zh_CN
prepare-antora-suma-zh_CN: copy-branding-zh_CN set-html-language-selector-suma-zh_CN
cd $(current_dir)
mkdir -p $(current_dir)/translations/zh_CN && \
cp -a antora.yml translations/zh_CN/antora.yml && \
sed "s/\(url\:\ https\:\/\/documentation\.suse\.com\/suma\/4\.3\/\)/\1zh_CN\//;\
s/\-\ url\:\ \./\-\ url\:\ \.\.\/\.\.\//;\
s/start_path\:\ \./\start_path\:\ translations\/zh_CN/;\
s/dir:\ \.\/build\/en/dir:\ \.\.\/\.\.\/build\/zh_CN/;" site.yml > translations/zh_CN/suma-site.yml && \
cp -a $(current_dir)/modules $(current_dir)/translations/en/
find modules/ -maxdepth 1 -name "*" -type d -exec mkdir -p $(current_dir)/translations/zh_CN/{} \; && \
mkdir -p $(current_dir)/translations/zh_CN/modules/ROOT/pages/
cp -a $(current_dir)/modules/ROOT/pages/common_gfdl1.2_i.adoc $(current_dir)/translations/zh_CN/modules/ROOT/pages/
cd $(current_dir)
.PHONY: antora-suma-zh_CN
antora-suma-zh_CN: configure-suma-branding-dsc-zh_CN prepare-antora-suma-zh_CN pdf-all-suma-zh_CN pdf-tar-suma-zh_CN
$(call antora-suma-function,translations/zh_CN,zh_CN)
.PHONY: obs-packages-suma-zh_CN
obs-packages-suma-zh_CN: configure-suma-branding-webui-zh_CN pdf-all-suma-zh_CN antora-suma-zh_CN ## Generate SUMA OBS tar files
$(call obs-packages-product,zh_CN,zh_CN/pdf,susemanager-docs_zh_CN,susemanager-docs_zh_CN-pdf)
# UYUNI
.PHONY: validate-uyuni-zh_CN
validate-uyuni-zh_CN:
$(call validate-product,translations/zh_CN,uyuni-site.yml)
.PHONY: pdf-tar-uyuni-zh_CN
pdf-tar-uyuni-zh_CN:
$(call pdf-tar-product,zh_CN,uyuni-docs_zh_CN-pdf,$(current_dir)/build/zh_CN/pdf)
.PHONY: set-html-language-selector-uyuni-zh_CN
set-html-language-selector-uyuni-zh_CN: set-html-language-selector-uyuni
mkdir -p $(shell dirname translations/zh_CN/$(SUPPLEMENTAL_FILES_UYUNI))
cp -a translations/$(SUPPLEMENTAL_FILES_UYUNI) translations/zh_CN/$(SUPPLEMENTAL_FILES_UYUNI)
.PHONY: prepare-antora-uyuni-zh_CN
prepare-antora-uyuni-zh_CN: copy-branding-zh_CN set-html-language-selector-uyuni-zh_CN
cd $(current_dir)
mkdir -p $(current_dir)/translations/zh_CN && \
cp antora.yml translations/zh_CN/antora.yml && \
sed "s/\(url\:\ https\:\/\/www\.uyuni-project\.org\/uyuni-docs\/\)/\1zh_CN\//;\
s/\-\ url\:\ \./\-\ url\:\ \.\.\/\.\.\//;\
s/start_path\:\ \./\start_path\:\ translations\/zh_CN/;\
s/dir:\ \.\/build\/en/dir:\ \.\.\/\.\.\/build\/zh_CN/;" site.yml > translations/zh_CN/uyuni-site.yml && \
cp -a $(current_dir)/modules $(current_dir)/translations/en/
find modules/ -maxdepth 1 -name "*" -type d -exec mkdir -p $(current_dir)/translations/zh_CN/{} \; && \
mkdir -p $(current_dir)/translations/zh_CN/modules/ROOT/pages/
cp -a $(current_dir)/modules/ROOT/pages/common_gfdl1.2_i.adoc $(current_dir)/translations/zh_CN/modules/ROOT/pages/
cd $(current_dir)
.PHONY: antora-uyuni-zh_CN
antora-uyuni-zh_CN: prepare-antora-uyuni-zh_CN pdf-all-uyuni-zh_CN pdf-tar-uyuni-zh_CN
$(call antora-uyuni-function,translations/zh_CN,zh_CN)
.PHONY: obs-packages-uyuni-zh_CN
obs-packages-uyuni-zh_CN: pdf-all-uyuni-zh_CN antora-uyuni-zh_CN ## Generate UYUNI OBS tar files
$(call obs-packages-product,zh_CN,zh_CN/pdf,uyuni-docs_zh_CN,uyuni-docs_zh_CN-pdf)