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)
|
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
|
enable spanish and russian,...
Roger Dingledine authored 13 years ago
|
21) LANGS=en es fr ru
|
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)
|
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))
|
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)
50) %.html.fa: fa/%.wml en/%.wml
51) lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
52)
53) %.html.it: it/%.wml en/%.wml
54) lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
55)
56) %.html.fi: fi/%.wml en/%.wml
57) lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
58)
59) %.html.fr: fr/%.wml en/%.wml
60) lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
61)
62) %.html.ja: ja/%.wml en/%.wml
63) lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
64)
65) %.html.ko: ko/%.wml en/%.wml
66) lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
67)
68) %.html.nl: nl/%.wml en/%.wml
69) lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
70)
71) %.html.no: no/%.wml en/%.wml
72) lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
73)
74) %.html.pl: pl/%.wml en/%.wml
75) lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
76)
77) %.html.pt: pt/%.wml en/%.wml
78) lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
79)
80) %.html.ru: ru/%.wml en/%.wml
81) lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
82)
83) %.html.se: se/%.wml en/%.wml
84) lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
85)
86) %.html.tr: tr/%.wml en/%.wml
87) lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
88)
89) %.html.zh-cn: zh-cn/%.wml en/%.wml
90) lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
91)
92) .deps/%.html.en.d: en/%.wml .deps/.stamp
93) tmpfile=`mktemp -t tmp.XXXXXXX` \
94) lang=`dirname $<` && \
95) OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
96) wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
97) sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
98) rm -f $$tmpfile
|
minor fix
Runa A. Sandvik authored 13 years ago
|
99) .deps/%.html.ar.d: ar/%.wml .deps/.stamp
|