0f4930e80fee267b93aa28a61f29db02b8540e69
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 14 years ago

1) # Directions for adding a new language:
2) # 1. Add the two-letter code to LANGS below.
3) # 2. Add a new "%.html.es: es/%.wml en/%.wml" clause below.
4) # 3. Add a new ".deps/%.html.es.d: es/%.wml .deps/.stamp" clause below.
5) # 4. mkdir a new two-letter directory. Make sure there's a foot.wmi
6) #    and navigation.wmi.
7) # 5. Edit include/perl-globals.wmi, add to @LANGUAGES and %LANGUAGES.
8) #    You might find useful %LANGUAGES strings at the bottom of
9) #    http://debian.org/
10) # 6. Add a new images/es.png flag image.
11) 
12) WMLOPT  = \
13)           -I $(WMLBASE)/include \
14)           -D DOCROOT=$(WMLBASE) \
15)           -D IMGROOT=$(WMLBASE)/images \
16)           -D TORGIT=$(TORGIT)\
17)           -D DEVTAG=$(DEVTAG) \
18)           -D STABLETAG=$(STABLETAG)
19) 
Roger Dingledine now the french translation...

Roger Dingledine authored 13 years ago

20) #LANGS=ar bms de en es et fa it fi fr ja ko nl no pl pt ru se tr zh-cn
Runa A. Sandvik update Makefile.common to i...

Runa A. Sandvik authored 13 years ago

21) LANGS=en ar es fr ru pl da it fa de fi vn cy zh-cn pt pt_BR id nl
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 14 years ago

22) 
23) WMLFILES=$(wildcard $(patsubst %, %/*.wml, $(LANGS)))
24) WMIFILES=$(wildcard $(patsubst %, %/*.wmi, $(LANGS)) $(WMLBASE)/include/*.wmi )
25) 
Andrew Lewman fix up variables and spaces.

Andrew Lewman authored 14 years ago

26) HTMLFILES=$(shell perl -le 's,  (.*)/(.*).wml  ,        $$2.html.$$1    ,x, print $$_ for @ARGV' $(WMLFILES))
27) DEPFILES=$(shell perl -le 's,  (.*)/(.*).wml  ,  .deps/$$2.html.$$1.d  ,x, print $$_ for @ARGV' $(WMLFILES))
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 14 years ago

28) 
29) 
30) all: $(HTMLFILES)
31) 
32) %.html.en: en/%.wml
33) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
34) 
35) %.html.ar: ar/%.wml en/%.wml
36) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
37) 
38) %.html.bms: bms/%.wml en/%.wml
39) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
40) 
41) %.html.es: es/%.wml en/%.wml
42) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
43) 
44) %.html.et: et/%.wml en/%.wml
45) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
46) 
47) %.html.de: de/%.wml en/%.wml
48) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
49) 
Runa A. Sandvik include more languages

Runa A. Sandvik authored 13 years ago

50) %.html.da: da/%.wml en/%.wml
51) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
52) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 14 years ago

53) %.html.fa: fa/%.wml en/%.wml
54) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
55) 
Runa A. Sandvik new and updated translation...

Runa A. Sandvik authored 13 years ago

56) %.html.id: id/%.wml en/%.wml
57) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
58) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 14 years ago

59) %.html.it: it/%.wml en/%.wml
60) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
61) 
62) %.html.fi: fi/%.wml en/%.wml
63) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
64) 
65) %.html.fr: fr/%.wml en/%.wml
66) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
67) 
68) %.html.ja: ja/%.wml en/%.wml
69) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
70) 
71) %.html.ko: ko/%.wml en/%.wml
72) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
73) 
74) %.html.nl: nl/%.wml en/%.wml
75) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
76) 
77) %.html.no: no/%.wml en/%.wml
78) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
79) 
80) %.html.pl: pl/%.wml en/%.wml
81) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
82) 
83) %.html.pt: pt/%.wml en/%.wml
84) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
85) 
86) %.html.ru: ru/%.wml en/%.wml
87) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
88) 
89) %.html.se: se/%.wml en/%.wml
90) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
91) 
92) %.html.tr: tr/%.wml en/%.wml
93) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
94) 
Runa A. Sandvik new and updated translation...

Runa A. Sandvik authored 13 years ago

95) %.html.vi: vi/%.wml en/%.wml
96) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
97) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 14 years ago

98) %.html.zh-cn: zh-cn/%.wml en/%.wml
99) 	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
100) 
101) .deps/%.html.en.d: en/%.wml .deps/.stamp
102) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
103) 	lang=`dirname $<` && \
104) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
105) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
106) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
107) 	rm -f $$tmpfile
Runa A. Sandvik minor fix

Runa A. Sandvik authored 13 years ago

108) .deps/%.html.ar.d: ar/%.wml .deps/.stamp
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 14 years ago

109) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
110) 	lang=`dirname $<` && \
111) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
112) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
113) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
114) 	rm -f $$tmpfile
115) .deps/%.html.bms.d: bms/%.wml .deps/.stamp
116) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
117) 	lang=`dirname $<` && \
118) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
119) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
120) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
121) 	rm -f $$tmpfile
Runa A. Sandvik new and updated translation...

Runa A. Sandvik authored 13 years ago

122) .deps/%.html.cy.d: cy/%.wml .deps/.stamp
123) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
124) 	lang=`dirname $<` && \
125) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
126) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
127) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
128) 	rm -f $$tmpfile
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 14 years ago

129) .deps/%.html.es.d: es/%.wml .deps/.stamp
130) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
131) 	lang=`dirname $<` && \
132) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
133) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
134) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
135) 	rm -f $$tmpfile
136) .deps/%.html.et.d: et/%.wml .deps/.stamp
137) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
138) 	lang=`dirname $<` && \
139) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
140) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
141) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
142) 	rm -f $$tmpfile
143) .deps/%.html.de.d: de/%.wml .deps/.stamp
144) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
145) 	lang=`dirname $<` && \
146) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
147) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
Runa A. Sandvik include more languages

Runa A. Sandvik authored 13 years ago

148) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
149) 	rm -f $$tmpfile
150) .deps/%.html.da.d: da/%.wml .deps/.stamp
151) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
152) 	lang=`dirname $<` && \
153) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
154) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 14 years ago

155) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
156) 	rm -f $$tmpfile
Runa A. Sandvik new and updated translation...

Runa A. Sandvik authored 13 years ago

157) .deps/%.html.id.d: it/%.wml .deps/.stamp
158) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
159) 	lang=`dirname $<` && \
160) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
161) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
162) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
163) 	rm -f $$tmpfile
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 14 years ago

164) .deps/%.html.it.d: it/%.wml .deps/.stamp
165) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
166) 	lang=`dirname $<` && \
167) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
168) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
169) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
170) 	rm -f $$tmpfile
171) .deps/%.html.fa.d: fa/%.wml .deps/.stamp
172) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
173) 	lang=`dirname $<` && \
174) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
175) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
176) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
177) 	rm -f $$tmpfile
178) .deps/%.html.fi.d: fi/%.wml .deps/.stamp
179) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
180) 	lang=`dirname $<` && \
181) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
182) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
183) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
184) 	rm -f $$tmpfile
185) .deps/%.html.fr.d: fr/%.wml .deps/.stamp
186) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
187) 	lang=`dirname $<` && \
188) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
189) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
190) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
191) 	rm -f $$tmpfile
192) .deps/%.html.ja.d: ja/%.wml .deps/.stamp
193) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
194) 	lang=`dirname $<` && \
195) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
196) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
197) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
198) 	rm -f $$tmpfile
199) .deps/%.html.ko.d: ko/%.wml .deps/.stamp
200) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
201) 	lang=`dirname $<` && \
202) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
203) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
204) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
205) 	rm -f $$tmpfile
206) .deps/%.html.nl.d: nl/%.wml .deps/.stamp
207) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
208) 	lang=`dirname $<` && \
209) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
210) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
211) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
212) 	rm -f $$tmpfile
213) .deps/%.html.no.d: no/%.wml .deps/.stamp
214) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
215) 	lang=`dirname $<` && \
216) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
217) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
218) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
219) 	rm -f $$tmpfile
220) .deps/%.html.pl.d: pl/%.wml .deps/.stamp
221) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
222) 	lang=`dirname $<` && \
223) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
224) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
225) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
226) 	rm -f $$tmpfile
Runa A. Sandvik update Makefile.common to i...

Runa A. Sandvik authored 13 years ago

227) .deps/%.html.pt.d: pt/%.wml .deps/.stamp
228) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
229) 	lang=`dirname $<` && \
230) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
231) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
232) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
233) 	rm -f $$tmpfile
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 14 years ago

234) .deps/%.html.pt.d: pt/%.wml .deps/.stamp
235) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
236) 	lang=`dirname $<` && \
237) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
238) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
239) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
240) 	rm -f $$tmpfile
241) .deps/%.html.ru.d: ru/%.wml .deps/.stamp
242) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
243) 	lang=`dirname $<` && \
244) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
245) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
246) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
247) 	rm -f $$tmpfile
248) .deps/%.html.se.d: se/%.wml .deps/.stamp
249) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
250) 	lang=`dirname $<` && \
251) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
252) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
253) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
254) 	rm -f $$tmpfile
255) .deps/%.html.tr.d: tr/%.wml .deps/.stamp
256) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
257) 	lang=`dirname $<` && \
258) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
259) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
260) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
261) 	rm -f $$tmpfile
Runa A. Sandvik new and updated translation...

Runa A. Sandvik authored 13 years ago

262) .deps/%.html.vi.d: vi/%.wml .deps/.stamp
263) 	tmpfile=`mktemp -t tmp.XXXXXXX` \
264) 	lang=`dirname $<` && \
265) 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
266) 	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
267) 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
268) 	rm -f $$tmpfile