Browse code

Fix #24233

hiromipaw authored on 04/12/2017 19:49:09
Showing 1 changed files
... ...
@@ -13,7 +13,7 @@
13 13
 <define-tag tbbrepo whitespace=delete>https://gitweb.torproject.org/torbrowser.git/blob_plain/HEAD:</define-tag>
14 14
 <define-tag specblob whitespace=delete>https://gitweb.torproject.org/torspec.git/tree/</define-tag>
15 15
 <define-tag doxygen whitespace=delete>https://doxygen.torproject.org/</define-tag>
16
-<define-tag donatefaq whitespace=delete>​https://donate.torproject.org/donor-faq</define-tag>
16
+<define-tag donatefaq whitespace=delete>https://donate.torproject.org/donor-faq</define-tag>
17 17
 
18 18
 
19 19
 #  Xinclude "locallinks.wmi"
Browse code

the old <spectree> tag got messed up by one of the gitweb updates

just use <specblob> everywhere now.

Roger Dingledine authored on 11/11/2017 03:16:43
Showing 1 changed files
... ...
@@ -12,7 +12,6 @@
12 12
 <define-tag newsletter whitespace=delete>https://newsletter.torproject.org</define-tag>
13 13
 <define-tag tbbrepo whitespace=delete>https://gitweb.torproject.org/torbrowser.git/blob_plain/HEAD:</define-tag>
14 14
 <define-tag specblob whitespace=delete>https://gitweb.torproject.org/torspec.git/tree/</define-tag>
15
-<define-tag spectree whitespace=delete>https://gitweb.torproject.org/torspec.git?a=tree;hb=HEAD;f=</define-tag>
16 15
 <define-tag doxygen whitespace=delete>https://doxygen.torproject.org/</define-tag>
17 16
 <define-tag donatefaq whitespace=delete>​https://donate.torproject.org/donor-faq</define-tag>
18 17
 
Browse code

Fix questions link

hiromipaw authored on 31/10/2017 20:20:00
Showing 1 changed files
... ...
@@ -14,6 +14,7 @@
14 14
 <define-tag specblob whitespace=delete>https://gitweb.torproject.org/torspec.git/tree/</define-tag>
15 15
 <define-tag spectree whitespace=delete>https://gitweb.torproject.org/torspec.git?a=tree;hb=HEAD;f=</define-tag>
16 16
 <define-tag doxygen whitespace=delete>https://doxygen.torproject.org/</define-tag>
17
+<define-tag donatefaq whitespace=delete>​https://donate.torproject.org/donor-faq</define-tag>
17 18
 
18 19
 
19 20
 #  Xinclude "locallinks.wmi"
Browse code

Add newsletter link to nav

hiromipaw authored on 27/10/2017 14:20:32
Showing 1 changed files
... ...
@@ -9,6 +9,7 @@
9 9
 <define-tag wiki whitespace=delete>https://trac.torproject.org/projects/tor/wiki/</define-tag>
10 10
 <define-tag wikifaq whitespace=delete>https://trac.torproject.org/projects/tor/wiki/doc/TorFAQ</define-tag>
11 11
 <define-tag blog whitespace=delete>https://blog.torproject.org/blog/</define-tag>
12
+<define-tag newsletter whitespace=delete>https://newsletter.torproject.org</define-tag>
12 13
 <define-tag tbbrepo whitespace=delete>https://gitweb.torproject.org/torbrowser.git/blob_plain/HEAD:</define-tag>
13 14
 <define-tag specblob whitespace=delete>https://gitweb.torproject.org/torspec.git/tree/</define-tag>
14 15
 <define-tag spectree whitespace=delete>https://gitweb.torproject.org/torspec.git?a=tree;hb=HEAD;f=</define-tag>
Browse code

Attempt to fix stable release notes link

Sebastian Hahn authored on 06/07/2015 03:18:47
Showing 1 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 #!wml
2 2
 
3 3
 <define-tag gitblob whitespace=delete>https://gitweb.torproject.org/tor.git/plain/</define-tag>
4
-<define-tag cgitstable whitespace=delete>?id=tor-0.2.5.10</define-tag>
4
+<define-tag cgitstable whitespace=delete>?id=tor-<version-stable></define-tag> 
5 5
 <define-tag gittree whitespace=delete>https://gitweb.torproject.org/tor.git?a=tree;hb=HEAD;f=</define-tag>
6 6
 <define-tag gitrepo whitespace=delete>https://gitweb.torproject.org/tor.git?a=tree;hb=HEAD</define-tag>
7 7
 <define-tag svnwebsite whitespace=delete>https://svn.torproject.org/svn/website/trunk/</define-tag>
Browse code

make the specblob tag be more right

it'd be great if somebody would go through the other gitweb
tags and change them to be correct with our new gitweb

Roger Dingledine authored on 11/02/2015 02:16:26
Showing 1 changed files
... ...
@@ -10,7 +10,7 @@
10 10
 <define-tag wikifaq whitespace=delete>https://trac.torproject.org/projects/tor/wiki/doc/TorFAQ</define-tag>
11 11
 <define-tag blog whitespace=delete>https://blog.torproject.org/blog/</define-tag>
12 12
 <define-tag tbbrepo whitespace=delete>https://gitweb.torproject.org/torbrowser.git/blob_plain/HEAD:</define-tag>
13
-<define-tag specblob whitespace=delete>https://gitweb.torproject.org/torspec.git?a=blob_plain;hb=HEAD;f=</define-tag>
13
+<define-tag specblob whitespace=delete>https://gitweb.torproject.org/torspec.git/tree/</define-tag>
14 14
 <define-tag spectree whitespace=delete>https://gitweb.torproject.org/torspec.git?a=tree;hb=HEAD;f=</define-tag>
15 15
 <define-tag doxygen whitespace=delete>https://doxygen.torproject.org/</define-tag>
16 16
 
Browse code

linking to git from tags works again.

Matt Pagan authored on 12/12/2014 08:29:59 • Sebastian Hahn committed on 12/12/2014 08:38:55
Showing 1 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 #!wml
2 2
 
3
-<define-tag gitblob whitespace=delete>https://gitweb.torproject.org/tor.git?a=blob_plain;hb=HEAD;f=</define-tag>
4
-<define-tag gitblobstable whitespace=delete>https://gitweb.torproject.org/tor.git?a=blob_plain;hb=release-0.2.5;f=</define-tag>
3
+<define-tag gitblob whitespace=delete>https://gitweb.torproject.org/tor.git/plain/</define-tag>
4
+<define-tag cgitstable whitespace=delete>?id=tor-0.2.5.10</define-tag>
5 5
 <define-tag gittree whitespace=delete>https://gitweb.torproject.org/tor.git?a=tree;hb=HEAD;f=</define-tag>
6 6
 <define-tag gitrepo whitespace=delete>https://gitweb.torproject.org/tor.git?a=tree;hb=HEAD</define-tag>
7 7
 <define-tag svnwebsite whitespace=delete>https://svn.torproject.org/svn/website/trunk/</define-tag>
Browse code

Fixing links.wmi to point to current stable

Colin Childs authored on 10/11/2014 02:05:17
Showing 1 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 #!wml
2 2
 
3 3
 <define-tag gitblob whitespace=delete>https://gitweb.torproject.org/tor.git?a=blob_plain;hb=HEAD;f=</define-tag>
4
-<define-tag gitblobstable whitespace=delete>https://gitweb.torproject.org/tor.git?a=blob_plain;hb=release-0.2.4;f=</define-tag>
4
+<define-tag gitblobstable whitespace=delete>https://gitweb.torproject.org/tor.git?a=blob_plain;hb=release-0.2.5;f=</define-tag>
5 5
 <define-tag gittree whitespace=delete>https://gitweb.torproject.org/tor.git?a=tree;hb=HEAD;f=</define-tag>
6 6
 <define-tag gitrepo whitespace=delete>https://gitweb.torproject.org/tor.git?a=tree;hb=HEAD</define-tag>
7 7
 <define-tag svnwebsite whitespace=delete>https://svn.torproject.org/svn/website/trunk/</define-tag>
Browse code

0.2.4 is the new stable tree

Roger Dingledine authored on 12/12/2013 06:08:13
Showing 1 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 #!wml
2 2
 
3 3
 <define-tag gitblob whitespace=delete>https://gitweb.torproject.org/tor.git?a=blob_plain;hb=HEAD;f=</define-tag>
4
-<define-tag gitblobstable whitespace=delete>https://gitweb.torproject.org/tor.git?a=blob_plain;hb=release-0.2.3;f=</define-tag>
4
+<define-tag gitblobstable whitespace=delete>https://gitweb.torproject.org/tor.git?a=blob_plain;hb=release-0.2.4;f=</define-tag>
5 5
 <define-tag gittree whitespace=delete>https://gitweb.torproject.org/tor.git?a=tree;hb=HEAD;f=</define-tag>
6 6
 <define-tag gitrepo whitespace=delete>https://gitweb.torproject.org/tor.git?a=tree;hb=HEAD</define-tag>
7 7
 <define-tag svnwebsite whitespace=delete>https://svn.torproject.org/svn/website/trunk/</define-tag>
Browse code

and declare that 0.2.3.x is the stable, not 0.2.1.x

Roger Dingledine authored on 11/11/2013 04:09:06
Showing 1 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 #!wml
2 2
 
3 3
 <define-tag gitblob whitespace=delete>https://gitweb.torproject.org/tor.git?a=blob_plain;hb=HEAD;f=</define-tag>
4
-<define-tag gitblobstable whitespace=delete>https://gitweb.torproject.org/tor.git?a=blob_plain;hb=release-0.2.1;f=</define-tag>
4
+<define-tag gitblobstable whitespace=delete>https://gitweb.torproject.org/tor.git?a=blob_plain;hb=release-0.2.3;f=</define-tag>
5 5
 <define-tag gittree whitespace=delete>https://gitweb.torproject.org/tor.git?a=tree;hb=HEAD;f=</define-tag>
6 6
 <define-tag gitrepo whitespace=delete>https://gitweb.torproject.org/tor.git?a=tree;hb=HEAD</define-tag>
7 7
 <define-tag svnwebsite whitespace=delete>https://svn.torproject.org/svn/website/trunk/</define-tag>
Browse code

define doxygen as a tag, move short user manual to the manual section, add the doxygen link.

Andrew Lewman authored on 27/10/2011 18:12:08
Showing 1 changed files
... ...
@@ -12,6 +12,7 @@
12 12
 <define-tag tbbrepo whitespace=delete>https://gitweb.torproject.org/torbrowser.git/blob_plain/HEAD:</define-tag>
13 13
 <define-tag specblob whitespace=delete>https://gitweb.torproject.org/torspec.git?a=blob_plain;hb=HEAD;f=</define-tag>
14 14
 <define-tag spectree whitespace=delete>https://gitweb.torproject.org/torspec.git?a=tree;hb=HEAD;f=</define-tag>
15
+<define-tag doxygen whitespace=delete>https://doxygen.torproject.org/</define-tag>
15 16
 
16 17
 
17 18
 #  Xinclude "locallinks.wmi"
Browse code

Update wiki links

Karsten Loesing authored on 11/06/2011 20:55:49
Showing 1 changed files
... ...
@@ -7,7 +7,7 @@
7 7
 <define-tag svnwebsite whitespace=delete>https://svn.torproject.org/svn/website/trunk/</define-tag>
8 8
 <define-tag svnprojects whitespace=delete>https://svn.torproject.org/svn/projects/</define-tag>
9 9
 <define-tag wiki whitespace=delete>https://trac.torproject.org/projects/tor/wiki/</define-tag>
10
-<define-tag wikifaq whitespace=delete>https://trac.torproject.org/projects/tor/wiki/TheOnionRouter/TorFAQ</define-tag>
10
+<define-tag wikifaq whitespace=delete>https://trac.torproject.org/projects/tor/wiki/doc/TorFAQ</define-tag>
11 11
 <define-tag blog whitespace=delete>https://blog.torproject.org/blog/</define-tag>
12 12
 <define-tag tbbrepo whitespace=delete>https://gitweb.torproject.org/torbrowser.git/blob_plain/HEAD:</define-tag>
13 13
 <define-tag specblob whitespace=delete>https://gitweb.torproject.org/torspec.git?a=blob_plain;hb=HEAD;f=</define-tag>
Browse code

get us closer to being able to build a translation

Roger Dingledine authored on 09/03/2011 18:44:19
Showing 1 changed files
... ...
@@ -30,14 +30,14 @@
30 30
  	    my ($page, $lang) = @_;
31 31
 	    my ($dir, $base) = $page =~ m,^(?:(.*)/)?(.*?)$,;
32 32
 	    $dir = '.' unless defined $dir;
33
-	    if (-e "$(DOCROOT)/$lang/$dir/$base.wml") {
33
+	    if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
34 34
 	    	return stripDotSlashs("$(DOCROOT)/$dir/$base.html.$lang");
35 35
 	    } elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
36 36
 	    	return stripDotSlashs("$(DOCROOT)/$dir/$base.html.en");
37
-        } elsif ($page =~ /^http/) {
38
-          return $page;
37
+	    } elsif ($page =~ /^http/) {
38
+	    	return $page;
39 39
 	    } else {
40
-	    	warn "$WML_SRC_FILENAME has a [page $page] (parses to docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$lang/$dir/$base.wml), but that doesn't exist.";
40
+	    	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.";
41 41
 	    }; 
42 42
     }
43 43
 :>
... ...
@@ -50,10 +50,10 @@
50 50
 	$dir = '.' unless defined $dir;
51 51
 	if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
52 52
 		print stripDotSlashs("$(DOCROOT)/$dir/$base.html.$lang");
53
-	} elsif (-e "$(DOCROOT)/en/$dir/$base.wml") {
53
+	} elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
54 54
 		print stripDotSlashs("$(DOCROOT)/$dir/$base.html");
55 55
 	} else {
56
-		warn "$WML_SRC_FILENAME has a [page $page] (parses to docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$lang/$dir/$base.wml), but that doesn't exist.";
56
+		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.";
57 57
 	};
58 58
 }:>
59 59
 </define-tag>
Browse code

Fix links that broke due to splitting the spec in its own repo

Sebastian Hahn authored on 21/02/2011 23:10:53
Showing 1 changed files
... ...
@@ -10,6 +10,9 @@
10 10
 <define-tag wikifaq whitespace=delete>https://trac.torproject.org/projects/tor/wiki/TheOnionRouter/TorFAQ</define-tag>
11 11
 <define-tag blog whitespace=delete>https://blog.torproject.org/blog/</define-tag>
12 12
 <define-tag tbbrepo whitespace=delete>https://gitweb.torproject.org/torbrowser.git/blob_plain/HEAD:</define-tag>
13
+<define-tag specblob whitespace=delete>https://gitweb.torproject.org/torspec.git?a=blob_plain;hb=HEAD;f=</define-tag>
14
+<define-tag spectree whitespace=delete>https://gitweb.torproject.org/torspec.git?a=tree;hb=HEAD;f=</define-tag>
15
+
13 16
 
14 17
 #  Xinclude "locallinks.wmi"
15 18
 #  Xinclude "langlocallinks.$(LANG).wmi"
Browse code

put the extra /blog back to get around the silly blog.

Andrew Lewman authored on 11/10/2010 19:24:57
Showing 1 changed files
... ...
@@ -8,7 +8,7 @@
8 8
 <define-tag svnprojects whitespace=delete>https://svn.torproject.org/svn/projects/</define-tag>
9 9
 <define-tag wiki whitespace=delete>https://trac.torproject.org/projects/tor/wiki/</define-tag>
10 10
 <define-tag wikifaq whitespace=delete>https://trac.torproject.org/projects/tor/wiki/TheOnionRouter/TorFAQ</define-tag>
11
-<define-tag blog whitespace=delete>https://blog.torproject.org/</define-tag>
11
+<define-tag blog whitespace=delete>https://blog.torproject.org/blog/</define-tag>
12 12
 <define-tag tbbrepo whitespace=delete>https://gitweb.torproject.org/torbrowser.git/blob_plain/HEAD:</define-tag>
13 13
 
14 14
 #  Xinclude "locallinks.wmi"
Browse code

fix the blog link

Andrew Lewman authored on 11/10/2010 15:52:29
Showing 1 changed files
... ...
@@ -8,7 +8,7 @@
8 8
 <define-tag svnprojects whitespace=delete>https://svn.torproject.org/svn/projects/</define-tag>
9 9
 <define-tag wiki whitespace=delete>https://trac.torproject.org/projects/tor/wiki/</define-tag>
10 10
 <define-tag wikifaq whitespace=delete>https://trac.torproject.org/projects/tor/wiki/TheOnionRouter/TorFAQ</define-tag>
11
-<define-tag blog whitespace=delete>https://blog.torproject.org/blog/</define-tag>
11
+<define-tag blog whitespace=delete>https://blog.torproject.org/</define-tag>
12 12
 <define-tag tbbrepo whitespace=delete>https://gitweb.torproject.org/torbrowser.git/blob_plain/HEAD:</define-tag>
13 13
 
14 14
 #  Xinclude "locallinks.wmi"
Browse code

fix another 404 from the frontpage. then use <blog> more consistently.

Roger Dingledine authored on 10/10/2010 02:26:26
Showing 1 changed files
... ...
@@ -8,7 +8,7 @@
8 8
 <define-tag svnprojects whitespace=delete>https://svn.torproject.org/svn/projects/</define-tag>
9 9
 <define-tag wiki whitespace=delete>https://trac.torproject.org/projects/tor/wiki/</define-tag>
10 10
 <define-tag wikifaq whitespace=delete>https://trac.torproject.org/projects/tor/wiki/TheOnionRouter/TorFAQ</define-tag>
11
-<define-tag blog whitespace=delete>https://blog.torproject.org/</define-tag>
11
+<define-tag blog whitespace=delete>https://blog.torproject.org/blog/</define-tag>
12 12
 <define-tag tbbrepo whitespace=delete>https://gitweb.torproject.org/torbrowser.git/blob_plain/HEAD:</define-tag>
13 13
 
14 14
 #  Xinclude "locallinks.wmi"
Browse code

clean up wiki and faq references.

Andrew Lewman authored on 08/10/2010 16:54:16
Showing 1 changed files
... ...
@@ -6,7 +6,8 @@
6 6
 <define-tag gitrepo whitespace=delete>https://gitweb.torproject.org/tor.git?a=tree;hb=HEAD</define-tag>
7 7
 <define-tag svnwebsite whitespace=delete>https://svn.torproject.org/svn/website/trunk/</define-tag>
8 8
 <define-tag svnprojects whitespace=delete>https://svn.torproject.org/svn/projects/</define-tag>
9
-<define-tag wiki whitespace=delete>https://trac.torproject.org/projects/tor/wiki/TheOnionRouter/</define-tag>
9
+<define-tag wiki whitespace=delete>https://trac.torproject.org/projects/tor/wiki/</define-tag>
10
+<define-tag wikifaq whitespace=delete>https://trac.torproject.org/projects/tor/wiki/TheOnionRouter/TorFAQ</define-tag>
10 11
 <define-tag blog whitespace=delete>https://blog.torproject.org/</define-tag>
11 12
 <define-tag tbbrepo whitespace=delete>https://gitweb.torproject.org/torbrowser.git/blob_plain/HEAD:</define-tag>
12 13
 
Browse code

replicate the tbb repo link changes.

Andrew Lewman authored on 08/10/2010 15:33:59
Showing 1 changed files
... ...
@@ -7,7 +7,8 @@
7 7
 <define-tag svnwebsite whitespace=delete>https://svn.torproject.org/svn/website/trunk/</define-tag>
8 8
 <define-tag svnprojects whitespace=delete>https://svn.torproject.org/svn/projects/</define-tag>
9 9
 <define-tag wiki whitespace=delete>https://trac.torproject.org/projects/tor/wiki/TheOnionRouter/</define-tag>
10
-<define-tag blog whitespace=delete>https://blog.torproject.org/blog/</define-tag>
10
+<define-tag blog whitespace=delete>https://blog.torproject.org/</define-tag>
11
+<define-tag tbbrepo whitespace=delete>https://gitweb.torproject.org/torbrowser.git/blob_plain/HEAD:</define-tag>
11 12
 
12 13
 #  Xinclude "locallinks.wmi"
13 14
 #  Xinclude "langlocallinks.$(LANG).wmi"
Browse code

fix up a broken bracket, add new tags for blog and wiki, start projects.

Andrew Lewman authored on 30/09/2010 17:11:06
Showing 1 changed files
... ...
@@ -6,6 +6,8 @@
6 6
 <define-tag gitrepo whitespace=delete>https://gitweb.torproject.org/tor.git?a=tree;hb=HEAD</define-tag>
7 7
 <define-tag svnwebsite whitespace=delete>https://svn.torproject.org/svn/website/trunk/</define-tag>
8 8
 <define-tag svnprojects whitespace=delete>https://svn.torproject.org/svn/projects/</define-tag>
9
+<define-tag wiki whitespace=delete>https://trac.torproject.org/projects/tor/wiki/TheOnionRouter/</define-tag>
10
+<define-tag blog whitespace=delete>https://blog.torproject.org/blog/</define-tag>
9 11
 
10 12
 #  Xinclude "locallinks.wmi"
11 13
 #  Xinclude "langlocallinks.$(LANG).wmi"
Browse code

link to english files because en is apparently not a $lang. ;)

Andrew Lewman authored on 18/08/2010 00:57:49
Showing 1 changed files
... ...
@@ -26,7 +26,7 @@
26 26
 	    if (-e "$(DOCROOT)/$lang/$dir/$base.wml") {
27 27
 	    	return stripDotSlashs("$(DOCROOT)/$dir/$base.html.$lang");
28 28
 	    } elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
29
-	    	return stripDotSlashs("$(DOCROOT)/$dir/$base.html");
29
+	    	return stripDotSlashs("$(DOCROOT)/$dir/$base.html.en");
30 30
         } elsif ($page =~ /^http/) {
31 31
           return $page;
32 32
 	    } else {
Browse code

work on the new website a bit more.

Andrew Lewman authored on 06/08/2010 14:42:45
Showing 1 changed files
... ...
@@ -1,9 +1,9 @@
1 1
 #!wml
2 2
 
3
-<define-tag gitblob whitespace=delete>http://gitweb.torproject.org/tor.git?a=blob_plain;hb=HEAD;f=</define-tag>
4
-<define-tag gitblobstable whitespace=delete>http://gitweb.torproject.org/tor.git?a=blob_plain;hb=release-0.2.1;f=</define-tag>
5
-<define-tag gittree whitespace=delete>http://gitweb.torproject.org/tor.git?a=tree;hb=HEAD;f=</define-tag>
6
-<define-tag gitrepo whitespace=delete>http://gitweb.torproject.org/tor.git?a=tree;hb=HEAD</define-tag>
3
+<define-tag gitblob whitespace=delete>https://gitweb.torproject.org/tor.git?a=blob_plain;hb=HEAD;f=</define-tag>
4
+<define-tag gitblobstable whitespace=delete>https://gitweb.torproject.org/tor.git?a=blob_plain;hb=release-0.2.1;f=</define-tag>
5
+<define-tag gittree whitespace=delete>https://gitweb.torproject.org/tor.git?a=tree;hb=HEAD;f=</define-tag>
6
+<define-tag gitrepo whitespace=delete>https://gitweb.torproject.org/tor.git?a=tree;hb=HEAD</define-tag>
7 7
 <define-tag svnwebsite whitespace=delete>https://svn.torproject.org/svn/website/trunk/</define-tag>
8 8
 <define-tag svnprojects whitespace=delete>https://svn.torproject.org/svn/projects/</define-tag>
9 9
 
Browse code

switch to Goldstein's idea of $lang/$dir/$page to keep all languages in their own subdir, rather than spread throughout the site.

Andrew Lewman authored on 14/07/2010 21:39:08
Showing 1 changed files
... ...
@@ -23,14 +23,14 @@
23 23
  	    my ($page, $lang) = @_;
24 24
 	    my ($dir, $base) = $page =~ m,^(?:(.*)/)?(.*?)$,;
25 25
 	    $dir = '.' unless defined $dir;
26
-	    if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
26
+	    if (-e "$(DOCROOT)/$lang/$dir/$base.wml") {
27 27
 	    	return stripDotSlashs("$(DOCROOT)/$dir/$base.html.$lang");
28 28
 	    } elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
29 29
 	    	return stripDotSlashs("$(DOCROOT)/$dir/$base.html");
30 30
         } elsif ($page =~ /^http/) {
31 31
           return $page;
32 32
 	    } else {
33
-	    	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.";
33
+	    	warn "$WML_SRC_FILENAME has a [page $page] (parses to docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$lang/$dir/$base.wml), but that doesn't exist.";
34 34
 	    }; 
35 35
     }
36 36
 :>
... ...
@@ -43,10 +43,10 @@
43 43
 	$dir = '.' unless defined $dir;
44 44
 	if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
45 45
 		print stripDotSlashs("$(DOCROOT)/$dir/$base.html.$lang");
46
-	} elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
46
+	} elsif (-e "$(DOCROOT)/en/$dir/$base.wml") {
47 47
 		print stripDotSlashs("$(DOCROOT)/$dir/$base.html");
48 48
 	} else {
49
-		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.";
49
+		warn "$WML_SRC_FILENAME has a [page $page] (parses to docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$lang/$dir/$base.wml), but that doesn't exist.";
50 50
 	};
51 51
 }:>
52 52
 </define-tag>
Browse code

first cut of the new, shiny tor website as wml.

Andrew Lewman authored on 09/07/2010 03:55:22
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,52 @@
1
+#!wml
2
+
3
+<define-tag gitblob whitespace=delete>http://gitweb.torproject.org/tor.git?a=blob_plain;hb=HEAD;f=</define-tag>
4
+<define-tag gitblobstable whitespace=delete>http://gitweb.torproject.org/tor.git?a=blob_plain;hb=release-0.2.1;f=</define-tag>
5
+<define-tag gittree whitespace=delete>http://gitweb.torproject.org/tor.git?a=tree;hb=HEAD;f=</define-tag>
6
+<define-tag gitrepo whitespace=delete>http://gitweb.torproject.org/tor.git?a=tree;hb=HEAD</define-tag>
7
+<define-tag svnwebsite whitespace=delete>https://svn.torproject.org/svn/website/trunk/</define-tag>
8
+<define-tag svnprojects whitespace=delete>https://svn.torproject.org/svn/projects/</define-tag>
9
+
10
+#  Xinclude "locallinks.wmi"
11
+#  Xinclude "langlocallinks.$(LANG).wmi"
12
+
13
+<:
14
+	sub stripDotSlashs($) {
15
+		my ($s) = @_;
16
+		1 while ($s =~ s|/\./|/|);
17
+		1 while ($s =~ s|^\./||);
18
+		return $s;
19
+	};
20
+:>
21
+
22
+<:  sub pageToURL($$) {
23
+ 	    my ($page, $lang) = @_;
24
+	    my ($dir, $base) = $page =~ m,^(?:(.*)/)?(.*?)$,;
25
+	    $dir = '.' unless defined $dir;
26
+	    if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
27
+	    	return stripDotSlashs("$(DOCROOT)/$dir/$base.html.$lang");
28
+	    } elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
29
+	    	return stripDotSlashs("$(DOCROOT)/$dir/$base.html");
30
+        } elsif ($page =~ /^http/) {
31
+          return $page;
32
+	    } else {
33
+	    	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.";
34
+	    }; 
35
+    }
36
+:>
37
+
38
+<define-tag page whitespace=delete>
39
+<:{
40
+	my $page="%0";
41
+	my $lang="$(LANG)";
42
+	my ($dir, $base) = $page =~ m,^(?:(.*)/)?(.*?)$,;
43
+	$dir = '.' unless defined $dir;
44
+	if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
45
+		print stripDotSlashs("$(DOCROOT)/$dir/$base.html.$lang");
46
+	} elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
47
+		print stripDotSlashs("$(DOCROOT)/$dir/$base.html");
48
+	} else {
49
+		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.";
50
+	};
51
+}:>
52
+</define-tag>