aboutsummaryrefslogtreecommitdiff
path: root/xml/lingua.conf.in
blob: 3569f8aba46fdbf63c61fc2428115f268e359ba6 (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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<?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="/sound" />

 <DICT PROG="dict.=SCRIPT_SUFFIX=" /> 
 <BASE HREF="=BASE_HREF=" />
 <SOUNDREF>
  <![CDATA[
   <img src="graphics/audio.png" width="16" height="16" alt="[ sound ]" />]]>
 </SOUNDREF>
 <SEARCH
 ADD-INPUTS="config=ellinika.{@LANG},restrict=/{@LANG}/,lang={@LANG}" />
 <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
 "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>"))

(xmltrans:end-tag
 "htdig:nomatch"
 (tag attr text)
 (format #f
"<div class=\"htdig-result-header\">
~A
</div>

<div class=\"htdig-result-form\">
<form method=\"get\" action=\"$(CGI)\">
<input type=\"hidden\" name=\"exclude\" value=\"$&(EXCLUDE)\">
~A: $(METHOD)
~A: $(FORMAT)
~A: $(SORT)
<br>
~A:
<input type=\"text\" size=\"30\" name=\"words\" value=\"$&(WORDS)\">
<input type=\"submit\" value=\"~A\">
~{~A~}
</form>
</div>"
     (lingua:gettext "No matches were found for '$&amp;(LOGICAL_WORDS)'")
	(lingua:gettext "Match")
	(lingua:gettext "Format")
	(lingua:gettext "Sort by")
	(lingua:gettext "New search")
	(lingua:gettext "Search")
	(lingua:expand-additional-inputs
	 (xmltrans:tag-attributes "LINGUA")
	 (lingua:attr "SEARCH" "ADD-INPUTS"))))     

(xmltrans:end-tag
 "htdig:body"
 (tag attr text)
 (format #f
"<div class=\"htdig-result-form\"> 
<form method=\"get\" action=\"$(CGI)\">
<input type=\"hidden\" name=\"exclude\" value=\"$&(EXCLUDE)\">
~A: $(METHOD)
~A: $(FORMAT)
~A: $(SORT)
<br>
~A:
<input type=\"text\" size=\"30\" name=\"words\" value=\"$&(WORDS)\">
<input type=\"submit\" value=\"~A\">
~{~A~}
</form>
</div>

<div class=\"htdig-result-header\">
~A
~A
</div> 

<div class=\"htdig-result-list\">
$(HTSEARCH_RESULTS)
$(PAGEHEADER)
$(PREVPAGE) $(PAGELIST) $(NEXTPAGE)
</div>"
	(lingua:gettext "Match")
	(lingua:gettext "Format")
	(lingua:gettext "Sort by")
	(lingua:gettext "New search")
	(lingua:gettext "Search")
	(lingua:expand-additional-inputs
	 (xmltrans:tag-attributes "LINGUA")
	 (lingua:attr "SEARCH" "ADD-INPUTS"))
        (lingua:gettext "Documents $(FIRSTDISPLAYED) - $(LASTDISPLAYED) of $(MATCHES) matches.")
	(format #f
	 (lingua:gettext "More ~A's indicate a better match.")
	 "<img src=\"/htdig/star.gif\" alt=\"*\">")))
  
(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.