aboutsummaryrefslogtreecommitdiff
path: root/xml/lingua.conf.in
blob: dabbcda0a01e504e5a6688f6e3a3dd068a0cb6b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
 <LOGO SRC="graphics/parthenon-gnu.png" ALT=" [A GNU in front of the Parthenon] " />
 <DIRECTORY CGIBIN="=SCRIPT_DIR=" />
 <DIRECTORY TMP="=TMPDIR=" />
 <DIRECTORY OUT="=OUTDIR=" />
 <DIRECTORY TARGET="=TARGET_DIR=" />
 <DIRECTORY SOUND="=TARGET_DIR=/sound" />
 	
 <DICT PROG="dict.=SCRIPT_SUFFIX=" /> 
 <BASE HREF="=BASE_HREF=" />
 <SOUNDREF>
  <![CDATA[
   <img src="=TARGET_DIR=/graphics/audio.png" width="16" height="16" alt="[ sound ]" />]]>
 </SOUNDREF>
 <SEARCH ARGS="(list (lingua:gettext &quot;Search&quot;))">
   <![CDATA[
    <form method="get"
          action="http://www.google.com/custom"
          enctype="application/x-www-form-urlencoded">
     <div>
      <label for="searchinput">	  
      ~A <img src="=TARGET_DIR=/graphics/google.png" alt="[Google]" width="75" height="32" />
       <input id="searchinput" type="text" size="30" maxlength="255" name="q" value="" />
      </label>  
      <input type="hidden" name="cof" value="L:http://ellinika.gnu.org.ua/graphics/parthenon-gnu.png;LW:180;LH:140;T:black;ALC:#ff3300;LC:#000099;BGC:white;AH:left;VLC:#660066;GL:0;" />

      <input type="hidden" id="searchEllinika" name="sitesearch" checked="checked" value="ellinika.gnu.org.ua" />
      <input type="hidden" name="domains" value="ellinika.gnu.org.ua" />
     </div> 
    </form>]]>
 </SEARCH>
 <GUILE>
  <![CDATA[
(use-modules (xmltools xmltrans)
             (xmltools gamlet)
	     (xmltrans lingua)
             (xmltools dict)
	     (ice-9 format))

(define-macro (install-nea)
 `(use-modules (xmltrans lingua)
	       (xmltools dict))
    (letrec ((nea (lambda (. args)
	            (string-append
		     (lingua:get-cgi-bin)
		     "/nea.=SCRIPT_SUFFIX=?LANG="
		     (lingua:LANG args)))))
      (xmltrans:set-attr "LINGUA" "NEA" nea)))

(xmltrans:end-tag
 "FOOTER"
 (tag attr text)
 (list
   "<p>\n"
   (format #f "~A <a href=\"mailto:~A\">~A</a>;"
	  (lingua:gettext "For information about this site contact")
	  (lingua:attr "AUTHOR" "EMAIL")
	  (lingua:attr "AUTHOR" "CONTACT"))
   "</p>\n<p>"
   text
   "</p>\n"
   "<p>Verbatim copying and distribution of this entire article are
permitted worldwide, without royalty, in any medium, provided
this notice is preserved.</p>\n"

   "<div class=\"hidden-info\">Page generated on "
   (strftime "%c" (localtime (current-time)))
   (let ((vcs-id (xmltrans:attr attr "VCS-ID")))
      (if (and vcs-id (not (string-null? vcs-id)))
         (string-append " from " vcs-id)
         ""))
   "</div>"
	
))
   
      
(xmltrans:end-tag
 "KATHAREVUSA"
 (tag attr text)
 (list "<div class=\"katharevusa\">" text "</div>"))

(xmltrans:end-tag
 "news"
 (tag attr text)
 (list "<div id=\"news-content\"><div id=\"news\">" text "</div></div>"))

(xmltrans:end-tag
 "news:summary"
 (tag attr text)
 (list "<div id=\"news-summary\">" text "</div>"))

(xmltrans:end-tag
 "news:article"
 (tag attr text)
 (list "<div id=\"news-article\">" text "</div>"))

(xmltrans:end-tag
 "news:header"
 (tag attr text)
 (list "<div class=\"news-header\">" text "</div>"))

(xmltrans:end-tag
 "news:permanent-article"
 (tag attr text)
 (list "<div class=\"permanent-article\">" text "</div>"))

(gamlet:set-handler "INFO"
		    (lambda (. args)
		      (display "<ul class=\"menu\">")
		      (format #t "<li class=\"group\"><div class=\"group\">~A</div>"
			      (lingua:gettext "This page in other languages"))
		      (display "<ul class=\"menu\">")
		      (let* ((name (string-split
				    (gamlet:current-output-file-name) #\/))
			     (rest (substring (gamlet:current-output-file-name)
					      (1+ (string-length (car name))))))
			(for-each
			 (lambda (lang)
			   (cond
			    ((not (string=? (car lang) (car name)))
			     (if (not (null? args))
				 (format #t "<li><a href=\"~A@@args@@\">~A</a></li>"
					 ((lingua:attr "LINGUA" (car args))
					  #:lang (car lang))
					 (cdr lang))
				 (format #t "<li><a href=\"~A/~A\">~A</a></li>"
					 (car lang)
					 rest
					 (cdr lang))))))
			 '(("pl" . "Polski")
			   ("ru" . "Русский")
			   ("uk" . "Українська"))))
		      (display "</ul></li></ul>")))
#f
 ]]>
 </GUILE>
</CONFIG>

<!-- Local Variables: -->
<!-- mode: sgml -->
<!-- End: -->

Return to:

Send suggestions and report system problems to the System administrator.