WMLify eff/
Peter Palfrader

Peter Palfrader commited on 2006-01-27 00:15:02
Zeige 13 geänderte Dateien mit 65 Einfügungen und 137 Löschungen.

... ...
@@ -11,11 +11,12 @@ TORCVSHEAD = ../tor-head
11 11
 #TORCVSHEAD = /home/arma/work/onion/cvs/tor
12 12
 
13 13
 WMLBASE = .
14
-WMLOPT  = \
15
-          -I include \
16
-          -D DOCROOT=$(WMLBASE) \
17
-          -D IMGROOT=$(WMLBASE)/images \
18
-          -D TORCVSSTABLE=$(TORCVSSTABLE) \
19
-          -D TORCVSHEAD=$(TORCVSHEAD)
14
+SUBDIRS=eff
20 15
 
21 16
 include $(WMLBASE)/Makefile.common
17
+all: $(SUBDIRS)
18
+
19
+eff:
20
+	$(MAKE) -C "$@" WMLBASE=../$(WMLBASE)
21
+
22
+.PHONY: eff
... ...
@@ -1,84 +1,69 @@
1
+WMLOPT  = \
2
+          -I $(WMLBASE)/include \
3
+          -D DOCROOT=$(WMLBASE) \
4
+          -D IMGROOT=$(WMLBASE)/images \
5
+          -D TORCVSSTABLE=$(TORCVSSTABLE) \
6
+          -D TORCVSHEAD=$(TORCVSHEAD)
7
+
1 8
 
2 9
 LANGS=de en it fr se
3 10
 WMLFILES=$(wildcard $(patsubst %, %/*.wml, $(LANGS)))
4 11
 WMIFILES=$(wildcard $(patsubst %, %/*.wmi, $(LANGS)) $(WMLBASE)/include/*.wmi )
5 12
 
6
-HTMLFILES = $(patsubst de/%.wml, %.html.de,          \
7
-             $(patsubst en/%.wml, %.html.en,         \
8
-              $(patsubst it/%.wml, %.html.it,        \
9
-               $(patsubst fr/%.wml, %.html.fr,       \
10
-                $(patsubst se/%.wml, %.html.se,      \
11
-            $(WMLFILES)                              \
12
-                 )                                   \
13
-                )                                    \
14
-               )                                     \
15
-              )                                      \
16
-             )
17
-DEPFILES =  $(patsubst de/%.wml,.deps/%.html.de.d,   \
18
-             $(patsubst en/%.wml,.deps/%.html.en.d,  \
19
-              $(patsubst it/%.wml,.deps/%.html.it.d, \
20
-               $(patsubst fr/%.wml,.deps/%.html.fr.d,\
21
-                $(patsubst se/%.wml,.deps/%.html.se.d,\
22
-            $(WMLFILES)                              \
23
-                 )                                   \
24
-                )                                    \
25
-               )                                     \
26
-              )                                      \
27
-             )
13
+HTMLFILES = $(shell perl -le 's,  (.*)/(.*).wml  ,        $$2.html.$$1    ,x, print $$_ for @ARGV' $(WMLFILES))
14
+DEPFILES  = $(shell perl -le 's,  (.*)/(.*).wml  ,  .deps/$$2.html.$$1.d  ,x, print $$_ for @ARGV' $(WMLFILES))
28 15
 
29 16
 
30 17
 all: $(HTMLFILES)
31 18
 
32
-
33
-
34 19
 %.html.en: en/%.wml
35
-	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
20
+	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
36 21
 
37 22
 %.html.de: de/%.wml en/%.wml
38
-	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
23
+	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
39 24
 
40 25
 %.html.it: it/%.wml en/%.wml
41
-	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
26
+	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
42 27
 
43 28
 %.html.fr: fr/%.wml en/%.wml
44
-	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
29
+	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
45 30
 
46 31
 %.html.se: se/%.wml en/%.wml
47
-	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $@
32
+	lang=`dirname $<` && wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $@
48 33
 
49 34
 .deps/%.html.en.d: en/%.wml .deps/.stamp
50 35
 	tmpfile=`tempfile` \
51 36
 	lang=`dirname $<` && \
52 37
 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
53
-	wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
38
+	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
54 39
 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
55 40
 	rm -f $$tmpfile
56 41
 .deps/%.html.de.d: de/%.wml .deps/.stamp
57 42
 	tmpfile=`tempfile` \
58 43
 	lang=`dirname $<` && \
59 44
 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
60
-	wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
45
+	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
61 46
 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
62 47
 	rm -f $$tmpfile
63 48
 .deps/%.html.it.d: it/%.wml .deps/.stamp
64 49
 	tmpfile=`tempfile` \
65 50
 	lang=`dirname $<` && \
66 51
 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
67
-	wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
52
+	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
68 53
 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
69 54
 	rm -f $$tmpfile
70 55
 .deps/%.html.fr.d: fr/%.wml .deps/.stamp
71 56
 	tmpfile=`tempfile` \
72 57
 	lang=`dirname $<` && \
73 58
 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
74
-	wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
59
+	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
75 60
 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
76 61
 	rm -f $$tmpfile
77 62
 .deps/%.html.se.d: se/%.wml .deps/.stamp
78 63
 	tmpfile=`tempfile` \
79 64
 	lang=`dirname $<` && \
80 65
 	OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` && \
81
-	wml $(WMLOPT) -I $$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
66
+	wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $< -o $$OUT --depend | tee $$tmpfile > $@ && \
82 67
 	sed -e s',\(^[^ ]*\):,.deps/\1.d:,' < $$tmpfile >> $@ && \
83 68
 	rm -f $$tmpfile
84 69
 .deps/.stamp:
... ...
@@ -88,5 +73,8 @@ all: $(HTMLFILES)
88 73
 dep: $(DEPFILES)
89 74
 clean:
90 75
 	rm -f $(HTMLFILES) $(DEPFILES)
76
+	for sub in $(SUBDIRS); do \
77
+		$(MAKE) -C "$$sub" WMLBASE=../$(WMLBASE) clean; \
78
+	done
91 79
 
92 80
 include $(DEPFILES)
... ...
@@ -311,7 +311,7 @@ wir sind nicht die richtigen Ansprechpartner bei rechtlichen Fragen und
311 311
 Bedenken.</p>
312 312
 
313 313
 <p>Wenn du rechtliche Fragen hast, schaue auf die <a
314
-href="eff/tor-legal-faq.html">h�ufigen rechtlichen Fragen zu Tor</a>, oder wende
314
+href="<page eff/tor-legal-faq>">h�ufigen rechtlichen Fragen zu Tor</a>, oder wende
315 315
 dich direkt an die EFF.</p>
316 316
 
317 317
 </div><!-- #main -->
... ...
@@ -19,7 +19,7 @@ Inhalt verantwortlich.
19 19
 </p>
20 20
 
21 21
 <p>
22
-Die <a href="eff/tor-legal-faq.html">Tor Legal FAQ (engl.)</a> ist durch die
22
+Die <a href="<page eff/tor-legal-faq>">Tor Legal FAQ (engl.)</a> ist durch die
23 23
 Anw�lte der EFF verfasst. Es zielt darauf ab, dir einen �berblick �ber einige
24 24
 rechtliche Fragen, die mit dem Torprojekt entstehen, zu geben.
25 25
 </p>
... ...
@@ -0,0 +1,3 @@
1
+.deps
2
+tor-dmca-response.html.en
3
+tor-legal-faq.html.en
... ...
@@ -0,0 +1 @@
1
+include $(WMLBASE)/Makefile.common
... ...
@@ -1,40 +1,8 @@
1
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
-
4
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
5
-<head>
6
- <title>Response template for Tor server operator to ISP</title>
7
- <meta name="Author" content="EFF" />
8
- <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
9
- <link rel="stylesheet" type="text/css" href="../stylesheet.css" />
10
- <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
11
-</head>
12
-<body>
13
-
14
-<!-- TITLE BAR & NAVIGATION -->
15
-
16
-<table class="banner" border="0" cellpadding="0" cellspacing="0">
17
-    <tr>
18
-        <td class="banner-left"></td>
19
-        <td class="banner-middle">
20
-            <a href="../index.html">Home</a>
21
-          | <a href="../howitworks.html">How It Works</a>
22
-          | <a href="../download.html">Download</a>
23
-          | <a href="../documentation.html">Docs</a>
24
-          | <a href="../users.html">Users</a>
25
-          | <a href="../faq.html">FAQs</a>
26
-          | <a href="../volunteer.html">Contribute</a>
27
-          | <a href="../developers.html">Developers</a>
28
-          | <a href="../research.html">Research</a>
29
-          | <a href="../people.html">People</a>
30
-        </td>
31
-        <td class="banner-right"></td>
32
-    </tr>
33
-</table>
34
-
35
-<!-- END TITLE BAR & NAVIGATION -->
36
-
37
-<div class="center"> 
1
+## translation metadata
2
+# Revision: $Revision$
3
+
4
+#include "head.wmi" TITLE="Response template for Tor server operator to ISP"
5
+
38 6
 <div class="main-column">
39 7
 
40 8
 <!-- PUT CONTENT AFTER THIS TAG -->
... ...
@@ -157,6 +125,5 @@ Your customer, [User]
157 125
 </p>
158 126
 
159 127
 </div><!-- #main -->
160
-</div>
161
-</body>
162
-</html>
128
+
129
+#include <foot.wmi>
... ...
@@ -1,40 +1,8 @@
1
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
-
4
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
5
-<head>
6
- <title>Legal FAQ for Tor Server Operators</title>
7
- <meta name="Author" content="EFF" />
8
- <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
9
- <link rel="stylesheet" type="text/css" href="../stylesheet.css" />
10
- <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
11
-</head>
12
-<body>
13
-
14
-<!-- TITLE BAR & NAVIGATION -->
15
-
16
-<table class="banner" border="0" cellpadding="0" cellspacing="0">
17
-    <tr>
18
-        <td class="banner-left"></td>
19
-        <td class="banner-middle">
20
-            <a href="../index.html">Home</a>
21
-          | <a href="../howitworks.html">How It Works</a>
22
-          | <a href="../download.html">Download</a>
23
-          | <a href="../documentation.html">Docs</a>
24
-          | <a href="../users.html">Users</a>
25
-          | <a href="../faq.html">FAQs</a>
26
-          | <a href="../volunteer.html">Contribute</a>
27
-          | <a href="../developers.html">Developers</a>
28
-          | <a href="../research.html">Research</a>
29
-          | <a href="../people.html">People</a>
30
-        </td>
31
-        <td class="banner-right"></td>
32
-    </tr>
33
-</table>
34
-
35
-<!-- END TITLE BAR & NAVIGATION -->
36
-
37
-<div class="center"> 
1
+## translation metadata
2
+# Revision: $Revision$
3
+
4
+#include "head.wmi" TITLE="Legal FAQ for Tor Server Operators"
5
+
38 6
 <div class="main-column">
39 7
 
40 8
 <!-- PUT CONTENT AFTER THIS TAG -->
... ...
@@ -251,7 +219,5 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
251 219
 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>
252 220
 
253 221
 </div><!-- #main -->
254
-</div>
255
-</body>
256
-</html>
257 222
 
223
+#include <foot.wmi>
... ...
@@ -131,7 +131,7 @@ himself. Your ISP gets polite mail about how your computer has been
131 131
 compromised; and/or your computer gets DDoSed. [Port 6667]</li>
132 132
 <li>Somebody uses Tor to download a Vin Diesel movie, and
133 133
 your ISP gets a DMCA takedown notice. See EFF's
134
-<a href="eff/tor-dmca-response.html">Tor DMCA Response
134
+<a href="<page eff/tor-dmca-response>">Tor DMCA Response
135 135
 Template</a>, which explains to your ISP why it can probably ignore
136 136
 the notice without any liability. [Arbitrary ports]</li>
137 137
 </ul>
... ...
@@ -303,7 +303,7 @@ analysis, sting operations, and other physical investigations.
303 303
 we're not the ones to talk to about legal questions or concerns. </p>
304 304
 
305 305
 <p>Please take a look at the
306
-<a href="eff/tor-legal-faq.html">Tor Legal FAQ</a>,
306
+<a href="<page eff/tor-legal-faq>">Tor Legal FAQ</a>,
307 307
 and contact EFF directly if you have any further legal questions. </p>
308 308
 
309 309
   </div><!-- #main -->
... ...
@@ -18,7 +18,7 @@ for the content.
18 18
 </p>
19 19
 
20 20
 <p>
21
-The <a href="eff/tor-legal-faq.html">Tor Legal FAQ</a> is written by
21
+The <a href="<page eff/tor-legal-faq>">Tor Legal FAQ</a> is written by
22 22
 EFF lawyers. It aims to give you an overview of some of the legal issues
23 23
 that arise from the Tor project.
24 24
 </p>
... ...
@@ -12,9 +12,9 @@
12 12
   <title>Tor: $(TITLE)</title>
13 13
   <meta name="Author" content="Roger Dingledine" />
14 14
   <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
15
-  <link rel="stylesheet" type="text/css" href="stylesheet.css" />
15
+  <link rel="stylesheet" type="text/css" href="$(DOCROOT)/stylesheet.css" />
16 16
   <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
17
-  <ifneq "$(REDIRECT)" "" "<meta http-equiv="refresh" content="0;url=$(REDIRECT).html" />">
17
+  <ifneq "$(REDIRECT)" "" "<meta http-equiv="refresh" content="0;url=$(DOCROOT)/$(REDIRECT).html" />">
18 18
 </head>
19 19
 
20 20
 <body>
... ...
@@ -39,10 +39,10 @@
39 39
 	      $page =~ s/\.wml//;
40 40
 	      if ($page ne $key) {
41 41
 	        if (-e "$(LANG)/$key.wml") {
42
-	          printf '<a href="%s.html.$(LANG)">%s</a>'."\n",
42
+	          printf '<a href="$(DOCROOT)/%s.html.$(LANG)">%s</a>'."\n",
43 43
 	                 $key, $navigation{$key};
44 44
 	        } else {
45
-	          printf '<a href="%s.html">%s</a>'."\n",
45
+	          printf '<a href="$(DOCROOT)/%s.html">%s</a>'."\n",
46 46
 	                 $key, $navigation{$key};
47 47
 	        }
48 48
 	      } else {
... ...
@@ -61,7 +61,7 @@
61 61
 	      if ($dir eq '$(LANG)') {
62 62
 	        printf('<img src="$(IMGROOT)/%s.png" alt="%s" /> ', $dir, $LANGUAGES{$dir});
63 63
 	      } else {
64
-	        printf('<a href="%s.html.%s"><img src="$(IMGROOT)/%s.png" alt="%s" /></a> ', $page, $dir, $dir, $LANGUAGES{$dir});
64
+	        printf('<a href="$(DOCROOT)/%s.html.%s"><img src="$(IMGROOT)/%s.png" alt="%s" /></a> ', $page, $dir, $dir, $LANGUAGES{$dir});
65 65
 	      };
66 66
 	    } else {
67 67
 	      printf('<img src="$(IMGROOT)/green-flagspace.png"/> ');
... ...
@@ -72,4 +72,4 @@
72 72
     </tr>
73 73
 </table>
74 74
 
75
-<ifneq "$(REDIRECT)" "" "Redirecting to <a href="$(REDIRECT).html">$(REDIRECT).html</a>.">
75
+<ifneq "$(REDIRECT)" "" "Redirecting to <a href="$(DOCROOT)/$(REDIRECT).html">$(DOCROOT)/$(REDIRECT).html</a>.">
... ...
@@ -9,11 +9,13 @@
9 9
 <define-tag page whitespace=delete><:{
10 10
 	my $page="%0";
11 11
 	my $lang="$(LANG)";
12
-	if (-e "$lang/$page.wml") {
13
-		print "%0.html.$lang";
14
-	} elsif (-e "en/$page.wml") {
15
-		print "%0.html";
12
+	my ($dir, $base) = $page =~ m,^(?:(.*)/)?(.*?)$,;
13
+	$dir = '.' unless defined $dir;
14
+	if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
15
+		print "$(DOCROOT)/$dir/$base.html.$lang";
16
+	} elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
17
+		print "$(DOCROOT)/$dir/$base.html";
16 18
 	} else {
17
-		warn "$WML_SRC_FILENAME has a [page $page], but that doesn't exist.";
19
+		warn "$WML_SRC_FILENAME has a [page $page] (parses to docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml), but that doesn't exist.";
18 20
 	};
19 21
 }:></define-tag>
... ...
@@ -19,7 +19,7 @@ per i contenuti.
19 19
 </p>
20 20
 
21 21
 <p>
22
-Le <a href="eff/tor-legal-faq.html">FAQ Legali</a> sono state scritte da
22
+Le <a href="<page eff/tor-legal-faq>">FAQ Legali</a> sono state scritte da
23 23
 avvocati di EFF. Questo documento presenta alcuni risvolti legali che sono 
24 24
 nati con il progetto Tor.
25 25
 </p>
26 26