[or-cvs] Make local links point to the resource in the proper language
Peter Palfrader
weasel at seul.org
Tue Oct 4 23:03:56 UTC 2005
Update of /home/or/cvsroot/website/include
In directory moria:/tmp/cvs-serv27959/include
Modified Files:
links.wmi
Log Message:
Make local links point to the resource in the proper language
Index: links.wmi
===================================================================
RCS file: /home/or/cvsroot/website/include/links.wmi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- links.wmi 4 Oct 2005 19:10:33 -0000 1.1
+++ links.wmi 4 Oct 2005 23:03:54 -0000 1.2
@@ -1,2 +1,18 @@
+#!wml
<define-tag cvssandbox whitespace=delete>http://tor.eff.org/cvs/</define-tag>
+
+# Xinclude "locallinks.wmi"
+# Xinclude "langlocallinks.$(LANG).wmi"
+
+<define-tag page whitespace=delete><:
+ $page="%0";
+ $lang="$(LANG)";
+ if (-e "$lang/$page.wml") {
+ print "%0.$lang.html";
+ } elsif (-e "en/$page.wml") {
+ print "%0.html";
+ } else {
+ warn "$WML_SRC_FILENAME has a [page $page], but that doesn't exist.";
+ };
+:></define-tag>
More information about the tor-commits
mailing list