Andrew Lewman commited on 2010-10-09 22:36:41
Zeige 4 geänderte Dateien mit 0 Einfügungen und 343 Löschungen.
... | ... |
@@ -1,16 +0,0 @@ |
1 |
-\relax |
|
2 |
-\@writefile{toc}{\contentsline {section}{\numberline {1}introduction}{1}} |
|
3 |
-\@writefile{toc}{\contentsline {section}{\numberline {2}/include}{1}} |
|
4 |
-\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}head.wmi}{1}} |
|
5 |
-\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}foot.wmi}{2}} |
|
6 |
-\newlabel{side-navigation}{{2.2}{2}} |
|
7 |
-\@writefile{toc}{\contentsline {subsection}{\numberline {2.3}side.wmi}{2}} |
|
8 |
-\@writefile{toc}{\contentsline {subsection}{\numberline {2.4}functions.wmi}{3}} |
|
9 |
-\@writefile{toc}{\contentsline {subsection}{\numberline {2.5}perl-globals.wmi}{3}} |
|
10 |
-\newlabel{cgi-trampoline}{{2.5}{3}} |
|
11 |
-\@writefile{toc}{\contentsline {section}{\numberline {3}languageswitch.cgi}{3}} |
|
12 |
-\@writefile{toc}{\contentsline {section}{\numberline {4}building the site}{4}} |
|
13 |
-\@writefile{toc}{\contentsline {subsection}{\numberline {4.1}build prerequisites}{4}} |
|
14 |
-\@writefile{toc}{\contentsline {subsection}{\numberline {4.2}build translation po files}{4}} |
|
15 |
-\@writefile{toc}{\contentsline {subsection}{\numberline {4.3}import translated pages}{4}} |
|
16 |
-\@writefile{toc}{\contentsline {subsection}{\numberline {4.4}build}{4}} |
... | ... |
@@ -1,94 +0,0 @@ |
1 |
-This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) (format=pdflatex 2010.6.1) 21 JUN 2010 02:08 |
|
2 |
-entering extended mode |
|
3 |
- %&-line parsing enabled. |
|
4 |
-**torproject.tex |
|
5 |
-(./torproject.tex |
|
6 |
-LaTeX2e <2005/12/01> |
|
7 |
-Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh |
|
8 |
-yphenation, loaded. |
|
9 |
-(/usr/share/texmf-texlive/tex/latex/base/article.cls |
|
10 |
-Document Class: article 2005/09/16 v1.4f Standard LaTeX document class |
|
11 |
-(/usr/share/texmf-texlive/tex/latex/base/size11.clo |
|
12 |
-File: size11.clo 2005/09/16 v1.4f Standard LaTeX file (size option) |
|
13 |
-) |
|
14 |
-\c@part=\count79 |
|
15 |
-\c@section=\count80 |
|
16 |
-\c@subsection=\count81 |
|
17 |
-\c@subsubsection=\count82 |
|
18 |
-\c@paragraph=\count83 |
|
19 |
-\c@subparagraph=\count84 |
|
20 |
-\c@figure=\count85 |
|
21 |
-\c@table=\count86 |
|
22 |
-\abovecaptionskip=\skip41 |
|
23 |
-\belowcaptionskip=\skip42 |
|
24 |
-\bibindent=\dimen102 |
|
25 |
-) (./torproject.aux) |
|
26 |
-\openout1 = `torproject.aux'. |
|
27 |
- |
|
28 |
-LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 2. |
|
29 |
-LaTeX Font Info: ... okay on input line 2. |
|
30 |
-LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 2. |
|
31 |
-LaTeX Font Info: ... okay on input line 2. |
|
32 |
-LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 2. |
|
33 |
-LaTeX Font Info: ... okay on input line 2. |
|
34 |
-LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 2. |
|
35 |
-LaTeX Font Info: ... okay on input line 2. |
|
36 |
-LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 2. |
|
37 |
-LaTeX Font Info: ... okay on input line 2. |
|
38 |
-LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 2. |
|
39 |
-LaTeX Font Info: ... okay on input line 2. |
|
40 |
- |
|
41 |
-Underfull \hbox (badness 10000) in paragraph at lines 99--110 |
|
42 |
- |
|
43 |
- [] |
|
44 |
- |
|
45 |
-[1 |
|
46 |
- |
|
47 |
-{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] |
|
48 |
-Overfull \hbox (76.90027pt too wide) in paragraph at lines 141--141 |
|
49 |
-[] \OT1/cmtt/m/n/10.95 onclick="window.location='tor-doc-relay.html.de |
|
50 |
-'">Deutsch</option>[] |
|
51 |
- [] |
|
52 |
- |
|
53 |
- |
|
54 |
-Overfull \hbox (82.64896pt too wide) in paragraph at lines 141--141 |
|
55 |
-[] \OT1/cmtt/m/n/10.95 onclick="window.location='tor-doc-relay.html.it |
|
56 |
-'">Italiano</option>[] |
|
57 |
- [] |
|
58 |
- |
|
59 |
- |
|
60 |
-Overfull \hbox (37.5869pt too wide) in paragraph at lines 152--153 |
|
61 |
-\OT1/cmr/m/n/10.95 pages de-fault to the en-glish ver-sion. Ex-ter-nal links (e |
|
62 |
-.g. http://check.torproject.org) |
|
63 |
- [] |
|
64 |
- |
|
65 |
-[2] [3] |
|
66 |
-Overfull \hbox (7.09915pt too wide) in paragraph at lines 198--202 |
|
67 |
-\OT1/cmr/m/n/10.95 libhtml-clean-perl, libimage-size-perl, libperl5.10, libtidy |
|
68 |
--0.99-0, libyaml-syck- |
|
69 |
- [] |
|
70 |
- |
|
71 |
- |
|
72 |
-Overfull \hbox (25.16208pt too wide) in paragraph at lines 215--215 |
|
73 |
-[]\OT1/cmtt/m/n/10.95 TORGIT = PATH_TO_TOR_DEVELOPMENT # the path to developm |
|
74 |
-ent branch[] |
|
75 |
- [] |
|
76 |
- |
|
77 |
-[4] (./torproject.aux) ) |
|
78 |
-Here is how much of TeX's memory you used: |
|
79 |
- 214 strings out of 95086 |
|
80 |
- 2338 string characters out of 1183256 |
|
81 |
- 49015 words of memory out of 1500000 |
|
82 |
- 3469 multiletter control sequences out of 10000+50000 |
|
83 |
- 5318 words of font info for 20 fonts, out of 1200000 for 2000 |
|
84 |
- 28 hyphenation exceptions out of 8191 |
|
85 |
- 21i,5n,19p,618b,241s stack positions out of 5000i,500n,6000p,200000b,5000s |
|
86 |
-</usr/share/texmf-texlive/fonts/type1/bluesky/cm/cmbx12 |
|
87 |
-.pfb></usr/share/texmf-texlive/fonts/type1/bluesky/cm/cmr10.pfb></usr/share/tex |
|
88 |
-mf-texlive/fonts/type1/bluesky/cm/cmtt10.pfb> |
|
89 |
-Output written on torproject.pdf (4 pages, 42120 bytes). |
|
90 |
-PDF statistics: |
|
91 |
- 27 PDF objects out of 1000 (max. 8388607) |
|
92 |
- 0 named destinations out of 1000 (max. 131072) |
|
93 |
- 1 words of extra memory for PDF output out of 10000 (max. 10000000) |
|
94 |
- |
... | ... |
@@ -1,233 +0,0 @@ |
1 |
-\documentclass[11pt]{article} |
|
2 |
-\begin{document} |
|
3 |
- |
|
4 |
-\section{introduction} |
|
5 |
-This document (which may be found in /documentation) explains the wml code used to generate the Tor Project website. The original Tor Project documentation in /include/README gives a brief overview of Tor Project's use of wml. Some additional embedded perl was added to generate static content, namely navigation bars and a language selection dropdown in the footer of the page. Adding new content to the site is done by adding the new wml source files and an entry in the relavent navigation bar. Section \ref{side-navigation} outlines the syntax for the menu structure and section. |
|
6 |
- |
|
7 |
-%\section{/} |
|
8 |
-% home.wml |
|
9 |
-% |
|
10 |
-%\section{/about} |
|
11 |
-% about.wml |
|
12 |
-% board.wml |
|
13 |
-% contact.wml |
|
14 |
-% contributors.wml |
|
15 |
-% future.wml |
|
16 |
-% gsoc.wml |
|
17 |
-% overview.wml |
|
18 |
-% people.wml |
|
19 |
-% sidenav.wmi |
|
20 |
-% sponsors.wml |
|
21 |
-% staying.wml |
|
22 |
-% torusers.wml |
|
23 |
-% translators.wml |
|
24 |
-% volunteers.wml |
|
25 |
-% why.wml |
|
26 |
-% |
|
27 |
-%\section{/docs} |
|
28 |
-% android.wml |
|
29 |
-% bridges.wml |
|
30 |
-% debian-vidalia.wml |
|
31 |
-% debian.wml |
|
32 |
-% documentation.wml |
|
33 |
-% faq-abuse.wml |
|
34 |
-% faq.wml |
|
35 |
-% gloassary.wml |
|
36 |
-% hidden-services.wml |
|
37 |
-% installguide.wml |
|
38 |
-% manual.wml |
|
39 |
-% N900.wml |
|
40 |
-% rpms.wml |
|
41 |
-% running-a-mirror.wml |
|
42 |
-% sidenav.wmi |
|
43 |
-% tor-doc-osx.wml |
|
44 |
-% tor-doc-relay.wml |
|
45 |
-% tor-doc-unix.wml |
|
46 |
-% tor-doc-web.wml |
|
47 |
-% tor-doc-windows.wml |
|
48 |
-% tor-hidden-service.wml |
|
49 |
-% tor-manual-dev.wml |
|
50 |
-% tor-manual.wml |
|
51 |
-% trademark-faq.wml |
|
52 |
-% verifying-signatures.wml |
|
53 |
-% |
|
54 |
-%\section{/download} |
|
55 |
-% download.wml |
|
56 |
-% easy-download.wml |
|
57 |
-% thankyou.wml |
|
58 |
-% |
|
59 |
-%\section{/getinvolved} |
|
60 |
-% developers.wml |
|
61 |
-% everyone.wml |
|
62 |
-% getinvolved.wml |
|
63 |
-% mirrors.wml |
|
64 |
-% open-positions.wml |
|
65 |
-% sidenav.wmi |
|
66 |
-% technical.wml |
|
67 |
-% translation-overview.wml |
|
68 |
-% translation-portal.wml |
|
69 |
-% translation-status.wml |
|
70 |
-% translation.wml |
|
71 |
-% tshirt.wml |
|
72 |
-% volunteer.wml |
|
73 |
-% |
|
74 |
-%\section{/press} |
|
75 |
-% 2008-12-19-roadmap-press-release.wml |
|
76 |
-% 2009-03-12-performance-roadmap-press-release.wml |
|
77 |
-% 2010-03-25-tor-store-press-release.wml |
|
78 |
-% index.wml |
|
79 |
-% info.wmi |
|
80 |
-% inthemedia.wml |
|
81 |
-% pressreleases.wml |
|
82 |
-% press.wml |
|
83 |
-% sidenav.wmi |
|
84 |
-% |
|
85 |
-%\section{/projects} |
|
86 |
-% clientside.wml |
|
87 |
-% google.wml |
|
88 |
-% hidserv.wml |
|
89 |
-% index.wml |
|
90 |
-% lowbandwidth.wml |
|
91 |
-% projects.wml |
|
92 |
-% sampleproject.wml |
|
93 |
-% sidenav.wmi |
|
94 |
-% torbutton-faq.wml |
|
95 |
-% torbutton-options.wml |
|
96 |
-% torbutton.wml |
|
97 |
- |
|
98 |
-\section{/include} |
|
99 |
-Files present:\\ |
|
100 |
-foot.wmi - document footer\\ |
|
101 |
-functions.wmi - translation functions\\ |
|
102 |
-head.wmi - document head\\ |
|
103 |
-info.wmi - info snippet\\ |
|
104 |
-links.wmi - functions to generate links\\ |
|
105 |
-mirrors-table.wmi - mirror list\\ |
|
106 |
-navigation.wmi - input to head.wmi navigation menu\\ |
|
107 |
-perl-globals.wmi - global variables\\ |
|
108 |
-side.wmi - side menu navigation\\ |
|
109 |
-versions.wmi - version number macros\\ |
|
110 |
- |
|
111 |
-\subsection{head.wmi} |
|
112 |
- This is the main header for all site documents. The main navigation bar is generated at build time here by referencing a language-specific file (navigation.wmi) which contains a list of URLs and the link text to display. |
|
113 |
- |
|
114 |
-\begin{verbatim} |
|
115 |
- example path: /en/navigation.wmi |
|
116 |
- example path: /de/navigation.wmi |
|
117 |
-\end{verbatim} |
|
118 |
- |
|
119 |
- Translators can create a language-specific version in order to generate the top navbar. |
|
120 |
- |
|
121 |
- The second navigation element, 'calltoaction' is generated similarly from the second list in navigation.wmi |
|
122 |
- |
|
123 |
-\subsection{foot.wmi} |
|
124 |
- This is the footer for all site documents. There are quick links to site content as well as a translation selection menu. |
|
125 |
- Translation selection: |
|
126 |
- At build time, available languages are detected by the presence of a language subdirectory: |
|
127 |
- |
|
128 |
- example: |
|
129 |
- |
|
130 |
-/about/en/about.wml contains valid translations for nl, and de if files /about/nl/about.wml and /about/de/about.wml exist. For each translated language a <select> <option> is created. Javascript onClick is used to direct clients that support javascript, but if the client does not support javascript a simple perl cgi trampoline may be used to redirect the client to the selected page on form submit. (see: \ref{cgi-trampoline}) |
|
131 |
-\begin{verbatim} |
|
132 |
-<form action="../cgi-bin/languageswitch.cgi"> |
|
133 |
- <select name="Language" id="lang"> |
|
134 |
- <option value="docs/tor-doc-relay.html.de" |
|
135 |
- onclick="window.location='tor-doc-relay.html.de'">Deutsch</option> |
|
136 |
- <option value="docs/tor-doc-relay.html.it" |
|
137 |
- onclick="window.location='tor-doc-relay.html.it'">Italiano</option> |
|
138 |
- </select> |
|
139 |
- <input class="go" type="submit" name="submit" value="Go"> |
|
140 |
-</form> |
|
141 |
-\end{verbatim} |
|
142 |
- |
|
143 |
-\label{side-navigation} |
|
144 |
-\subsection{side.wmi} |
|
145 |
-This is the side navbar generator for documents that utilize a side navbar. A language-specific sidenav.wmi file contains a hierarchical structure of menu elements. |
|
146 |
- |
|
147 |
-\begin{verbatim} |
|
148 |
-example path: /about/en/sidenav.wmi |
|
149 |
-example path: /docs/de/sidenav.wmi |
|
150 |
-\end{verbatim} |
|
151 |
- |
|
152 |
-Each element contains url and txt fields and may also contain a list of subelements. At build time the navbar is rendered for each page so that nested elements are expanded/collapsed and css styles are set. Untranslated pages default to the english version. External links (e.g. http://check.torproject.org) are inserted without modification. |
|
153 |
- |
|
154 |
-example structure: |
|
155 |
- |
|
156 |
-\begin{verbatim} |
|
157 |
- |
|
158 |
- $sidenav = [ |
|
159 |
- {'url' => 'about/about', |
|
160 |
- 'txt' => 'Tor Overview', |
|
161 |
- 'subelements' => [ |
|
162 |
- {'url' => 'about/why', |
|
163 |
- 'txt' => 'Why We Need Tor', |
|
164 |
- }, |
|
165 |
- {'url' => 'about/staying', |
|
166 |
- 'txt' => 'Staying Anonymous', |
|
167 |
- }, |
|
168 |
- {'url' => 'about/future', |
|
169 |
- 'txt' => 'Future of Tor', |
|
170 |
- }] |
|
171 |
- } |
|
172 |
- ]; |
|
173 |
- |
|
174 |
-\end{verbatim} |
|
175 |
- |
|
176 |
-\subsection{functions.wmi} |
|
177 |
-An additional function pageToURL(\$\$) performs the same conversion as <page> tags, but may be called from within eperl statements (such as those used to generate the navigation structure). The arguments to the function are \$page, \$lang, where \$page is the document path (e.g. /docs/tor-doc-osx) and \$lang is the language (e.g. en, de, it). |
|
178 |
- |
|
179 |
-\subsection{perl-globals.wmi} |
|
180 |
-An additional global variable (\$WML\_SRC\_DIRNAME) was added for use in determining the input file path. |
|
181 |
- |
|
182 |
- |
|
183 |
-\label{cgi-trampoline} |
|
184 |
-\section{languageswitch.cgi} |
|
185 |
- The language selection dropdown (see document footer: foot.wmi) requires javascript support or a server-side script to handle a form submit. languageswitch.cgi is a perl cgi script that returns a URL passed by GET as a redirect. |
|
186 |
-\begin{verbatim} |
|
187 |
-#!/usr/bin/env perl |
|
188 |
- |
|
189 |
-use CGI qw(:standard); |
|
190 |
-my $lang = param('Language'); |
|
191 |
-print "Status: 302 Moved\nLocation: /$lang\n\n"; |
|
192 |
-\end{verbatim} |
|
193 |
- |
|
194 |
-\section{building the site} |
|
195 |
-\subsection{build prerequisites} |
|
196 |
-The ubuntu package wml has these dependencies: |
|
197 |
- |
|
198 |
-eperl, iselect, libbit-vector-perl, libcarp-clan-perl, |
|
199 |
-libgetopt-argvfile-perl, libhtml-clean-perl, |
|
200 |
-libimage-size-perl, libperl5.10, libtidy-0.99-0, |
|
201 |
-libyaml-syck-perl, linklint, m4, mp4h, slice, tidy, txt2html, wml |
|
202 |
- |
|
203 |
-Make sure that you have checked out the translation project: \\ |
|
204 |
-https://svn.torproject.org/svn/translation/ \\ |
|
205 |
-as well as the website project: \\ |
|
206 |
-https://svn.torproject.org/svn/website/ |
|
207 |
- |
|
208 |
-In addition to the translation project, you must also check out stable and development branches of tor, which are used to generate the online version of the manpages. The path to these repositories must be set the Makefile as follows: |
|
209 |
- |
|
210 |
-\begin{verbatim} |
|
211 |
-TORSVNSTABLE = PATH_TO_TOR_STABLE # the path to stable branch |
|
212 |
-TORGIT = PATH_TO_TOR_DEVELOPMENT # the path to development branch |
|
213 |
-STABLETAG = CURRENT_STABLE_TAG # stable tag |
|
214 |
-DEVTAG = CURRENT_DEV_TAG # dev tag |
|
215 |
-\end{verbatim} |
|
216 |
- |
|
217 |
-\subsection{build translation po files} |
|
218 |
-\begin{verbatim} |
|
219 |
-./wml2po.sh |
|
220 |
-\end{verbatim} |
|
221 |
- |
|
222 |
-This script parses the english wml and generates po files for use with pootle |
|
223 |
-\subsection{import translated pages} |
|
224 |
-\begin{verbatim} |
|
225 |
-make translations |
|
226 |
-\end{verbatim} |
|
227 |
- |
|
228 |
-This commands calls the script po2wml.sh, which converts translated po files to language-specific wml which will then build translated pages. |
|
229 |
-\subsection{build} |
|
230 |
-\begin{verbatim} |
|
231 |
-make |
|
232 |
-\end{verbatim} |
|
233 |
-\end{document} |
|
234 | 0 |