source: main/trunk/greenstone2/macros/gti.dm@ 30526

Last change on this file since 30526 was 29416, checked in by ak19, 9 years ago

Related to previous commits. A minor final change to have rudimentary support for GS3 interface translations in the online GTI system. The current change just says that a GS2 server can't show you GS3 interface translations in action. Together with previous commits, now files can be downloaded for offline translating. This is unchecked in Microsoft spreadsheet, but the file looks okay to the eye. Adding translations via the local GTI seems to work as it ends up in the correct properties file. But have not checked whether offline spreadsheets when returned from translators can be successfully processed by Greenstone code. This is in case spreadsheet processing for GS3 works differently, since there are multiple interface files for one module, whereas for GS2 each module corresponds to a single interface file.

  • Property svn:keywords set to Author Date Id Revision
File size: 10.6 KB
Line 
1# this file must be UTF-8 encoded
2
3package gti
4
5_gtiadministratoremail_ {[email protected]}
6
7#######################################################################
8# page head
9#######################################################################
10_cssheader_ {
11_style:cssheader_
12
13<style type="text/css">
14div.todo\{float: left; width: 23px; white-space: pre; text-align: right; color: red;\}
15div.update\{float: left; width: 23px; white-space: pre; text-align: right; color: orange;\}
16div.done\{float: left; width: 23px; white-space: pre; text-align: right; color: green;\}
17div.plus\{float: left; width: 11px; white-space: pre; text-align: center; padding-left: 2px; padding-right: 2px;\}
18div.nowrap\{table-layout: fixed; width: 100px; padding-left:3px; padding-right:3px;\}
19table.status\{border-collapse: collapse;border-style: none; font-size: 12pt;\}
20td.first\{border:solid; border-width:1px; border-color:grey; border-collapse: collapse; vertical-align: middle;\}
21td.status\{table-layout: fixed; border:solid; border-width:1px; border-color:grey; border-collapse: collapse; vertical-align: middle; text-align: center;\}
22th.status\{border:solid; border-width:1px; border-color:white; border-collapse: collapse; background-color: #d0d0d0; text-align: center;\}
23</style>
24}
25
26#######################################################################
27# page content
28#######################################################################
29
30_pagewidth_ {700}
31
32_pagetitle_ {_textgti_}
33
34_imagecollection_ {<a href="_gwcgi_?a=gti&amp;p=home&amp;e=_compressedoptions_"><img alt="_textgti_" src="_httpimg_/gti.gif" /></a>}
35
36# The preferences button must go to the "homepref" page, since we are not in a collection
37
38_preflink_ {_navtaborig_(_home:httppagehomepref_,_linktextPREFERENCES_,_textdescrpref_)}
39
40_gtidownloadglihelp_ {_gwcgi_?a=gti&amp;p=glihelp&amp;e=_compressedoptions_}
41
42_content_ {
43<div class="divbar">&nbsp;</div>
44
45<form method="post" action="_gwcgi_">
46 <input type="hidden" name="a" value="gti"/>
47 <input type="hidden" name="e" value="_compressedoptions_">
48 _gtiformcontent_
49</form>
50
51<div class="divbar">&nbsp;</div>
52}
53
54# Content of the GTI "error" page
55_gtierror_ {
56<strong>_textgtierror_:</strong>
57<p>
58<tt>_gtierrormessage_</tt>
59}
60
61# Content of the GTI "home" page
62_gtihome_ {
63<p>_textgtihome_</p>
64
65<table border="0" width="100%">
66 <tr><td>_textgtiselecttlc_:</td><td align="right">_gtitlcselection_</td></tr>
67</table>
68
69<center>
70 <input type="hidden" name="p" value="lang"/><input type="submit" value="_textgtienter_"/>
71</center>
72}
73
74# Content of the GTI "language status" page
75_gtilang_ {
76<h2>_gtitargetlanguagename_</h2>
77
78<p>_textgtiselecttfk_:</p>
79
80_gtitfkselection_
81
82<center>
83 <input type="hidden" name="p" value="core"/><input type="submit" value="_textgtienter_"/>
84</center>
85}
86
87# Content of the GTI "view status" page
88_gtistatus_ {
89<h2>_textgtistatustable_</h2>
90<table>
91<tr><td><font color="green">green</font>:</td><td>_textgtinumchunkstranslated2_</td></tr>
92<tr><td><font color="orange">orange</font>:</td><td>_textgtinumchunksrequiringupdating2_</td></tr>
93<tr><td><font color="red">red</font>:</td><td>_textgtinumchunksrequiringtranslation2_</td></tr>
94</table>
95_gtistatustable_
96}
97
98# Content of the GTI "find text fragments" page
99_gtifind_ {
100<h2><a href="_gwcgi_?a=gti&amp;p=lang&amp;e=_compressedoptions_">_gtitargetlanguagename_</a> -- <a href="_gwcgi_?a=gti&amp;p=core&amp;e=_compressedoptions_">_gtitranslationfiledescHtmlsafe_</a></h2>
101<p>
102_textgtienterquery_:
103<p>
104<nobr>
105<input type="text" name="q" value="_cgiargqAttrsafe_" size="_gtitextareawidth_"/>
106<input type="hidden" name="p" value="find"/><input type="submit" value="_textgtifind_"/>
107</nobr>
108_gtifindformcontent_
109}
110
111# Content of the GTI "offline" page
112_gtioffline_ {
113<h2><a href="_gwcgi_?a=gti&amp;p=lang&amp;e=_compressedoptions_">_gtitargetlanguagename_</a> -- _gtitranslationfiledescHtmlsafe_</h2>
114<p>
115_textgtiofflinetranslation_
116}
117
118# Content of the GTI "core" page (with text areas for entering and updating translations)
119_gticore_ {
120<h2><a href="_gwcgi_?a=gti&amp;p=lang&amp;e=_compressedoptions_">_gtitargetlanguagename_</a> -- _gtitranslationfiledescHtmlsafe_</h2>
121<p>
122<center>
123 _gtitranslationfilestatus_(_gtinumchunkstranslated_, _gtinumchunksrequiringtranslation_, _gtinumchunksrequiringupdating_, _gtitargetfilepath_)
124</center>
125<p>
126_gticoreformcontent_
127<p>
128<center>
129 <input type="hidden" name="p" value="submit"/><input type="submit" value="_textgtisubmit_"/>
130</center>
131}
132
133# Content of the GTI "done" page, thanking the translator for completing the file
134_gtidone_ {
135<h2><a href="_gwcgi_?a=gti&amp;p=lang&amp;e=_compressedoptions_">_gtitargetlanguagename_</a> -- _gtitranslationfiledescHtmlsafe_</h2>
136<p>
137<center>
138 _gtitranslationfilestatus_(_gtinumchunkstranslated_, _gtinumchunksrequiringtranslation_, _gtinumchunksrequiringupdating_, _gtitargetfilepath_)
139</center>
140<p>
141<hr>
142<p>
143_textgtitranslationfilecomplete_
144}
145
146_gtifindformheader_ {
147<hr><p>_textgtinumchunksmatchingquery_: _gtinumchunksmatchingquery_
148}
149
150_gtifindformfooter_ {
151<p>
152<center>
153 <input type="submit" name="sp" value="_textgtisubmit_"/>
154</center>
155}
156
157_gtitextareawidth_ {85}
158_gtitextareaheight_ {6}
159
160# --------------------------------------------------------------------------------
161# Displays the status of a translation file
162#
163# Used on the GTI "lang" and "core" pages
164#
165# Parameters: 1 -- Number of chunks translated
166# 2 -- Number of chunks requiring translation
167# 3 -- Number of chunks requiring updating
168# 4 -- Relative URL of target file
169# --------------------------------------------------------------------------------
170
171# _If_(_gtiglihelpzipfilepath_ ne "", <a href="_httpprefix_/_gtiglihelpzipfilepathUrlsafe_">_textgtiglihelpzipfile_</a>,)<br>
172# <a href="_gwcgi_?a=gti&amp;p=glihelp&amp;e=_compressedoptions_">_textgtiglihelpzipfile_</a>
173
174_gtitranslationfilestatus_ {
175<table border="0">
176 <tr><td align="right">_1_</td><td>_textgtinumchunkstranslated_ (_textgtinumchunksrequiringupdating_(_3_))</td></tr>
177 <tr><td align="right">_2_</td><td>_textgtinumchunksrequiringtranslation_</td></tr>
178 _If_(_4_,<tr><td align="right">&nbsp;</td><td>
179 <a href="_gwcgi_?a=gti&amp;p=find&amp;e=_compressedoptions_">_textgticorrectexistingtranslations_</a><br>
180 _If_("_4_" eq "_gtidownloadglihelp_", <a href="_4_">, <a href="_httpprefix_/_4_">)_textgtidownloadtargetfile_</a>
181
182 _If_(_gtiglihelpzipfilepath_, <a href="_httpprefix_/_gtiglihelpzipfilepathUrlsafe_">_textgtiglihelpzipfile_</a>,)<br>
183
184 <a href="_gwcgi_?a=gti&amp;p=offline&amp;e=_compressedoptions_">_textgtitranslatefileoffline_</a><br>
185 _gtiviewtranslationfileinactionHtmlsafe_
186 </td></tr>)
187</table>
188}
189
190
191_gtiviewgs3interfaceinaction_ {It is not possible to view translations of the GS3 interface in action in a GS2 installation.}
192
193_gtiglihelpzipfilepath_ {}
194
195_textgtiglihelpzipfile_ {Click here to download the operational files for GLI Help}
196
197# --------------------------------------------------------------------------------
198# Displays the status of a translation file
199#
200# Used on the GTI "view status" page
201#
202# Parameters: 1 -- Number of chunks translated
203# 2 -- Number of chunks requiring translation
204# 3 -- Number of chunks requiring updating
205# --------------------------------------------------------------------------------
206_gtitranslationfilestatus2_ {
207_If_("_1_" eq "0", , <font color="green">_1_</font>+<font color="orange">_3_</font>+<font color="red">_2_</font>)
208}
209
210# --------------------------------------------------------------------------------
211# Displays text area for correcting a chunk
212#
213# Used on the GTI "find" page
214#
215# Parameters: 1 -- Chunk key
216# 2 -- Target file chunk text
217# --------------------------------------------------------------------------------
218_gtichunkmatchingquery_ {
219<p>
220<center>
221 <table dir="_gtitextdirection_">
222 <tr><td><strong>_1_</strong></td></tr>
223 <tr><td><textarea name="_cgiargtlcAttrsafe_::_1_" rows="_gtitextareaheight_" cols="_gtitextareawidth_">_2_</textarea></td></tr>
224 </table>
225</center>
226}
227
228# --------------------------------------------------------------------------------
229# Displays text areas for translating a chunk
230#
231# Used on the GTI "core" page
232#
233# Parameters: 1 -- Chunk key
234# 2 -- Source file chunk text
235# 3 -- Source file chunk date
236# --------------------------------------------------------------------------------
237_gtichunkrequiringtranslation_ {
238<hr>
239_textgtitranslatingchunk_(_1_)
240<p>
241<center>
242 <table dir="_gtitextdirection_">
243 <tr><td><strong>English</strong></td><td align="right"><font size="-1"><i>_textgtilastupdated_ _3_</i></font></td></tr>
244 <tr><td colspan="2"><textarea name="en::_1_" rows="_gtitextareaheight_" cols="_gtitextareawidth_" readonly="1">_2_</textarea></td></tr>
245 </table>
246 <table dir="_gtitextdirection_">
247 <tr><td><strong>_gtitargetlanguagename_</strong></td><td align="right">&nbsp;</td></tr>
248 <tr><td colspan="2"><textarea name="_cgiargtlcAttrsafe_::_1_" rows="_gtitextareaheight_" cols="_gtitextareawidth_"></textarea></td></tr>
249 </table>
250</center>
251}
252
253# --------------------------------------------------------------------------------
254# Displays text areas for updating a chunk
255#
256# Used on the GTI "core" page
257#
258# Parameters: 1 -- Chunk key
259# 2 -- Source file chunk text
260# 3 -- Source file chunk date
261# 4 -- Target file chunk text
262# 5 -- Target file chunk date
263# --------------------------------------------------------------------------------
264_gtichunkrequiringupdating_ {
265<hr>
266_textgtiupdatingchunk_(_1_)
267<p>
268<center>
269 <table dir="_gtitextdirection_">
270 <tr><td><strong>English</strong></td><td align="right"><font size="-1"><i>_textgtilastupdated_ _3_</i></font></td></tr>
271 <tr><td colspan="2"><textarea name="en::_1_" rows="_gtitextareaheight_" cols="_gtitextareawidth_" readonly="1">_2_</textarea></td></tr>
272 </table>
273 <p>
274 <table dir="_gtitextdirection_">
275 <tr><td><strong>_gtitargetlanguagename_</strong></td><td align="right"><font size="-1"><i>_textgtilastupdated_ _5_</i></font></td></tr>
276 <tr><td colspan="2"><textarea name="_cgiargtlcAttrsafe_::_1_" rows="_gtitextareaheight_" cols="_gtitextareawidth_">_4_</textarea></td></tr>
277 </table>
278</center>
279}
280
281# Links to see the translation files in action
282_gtiviewcoredminaction_ {<a href="_gwcgi_?a=p&amp;p=about&amp;c=demo&amp;l=_cgiargtlcUrlsafe_&amp;e=_compressedoptions_">_textgtiviewtargetfileinaction_</a>}
283_gtiviewauxdminaction_ {<a href="_gwcgi_?a=p&amp;p=about&amp;c=demo&amp;l=_cgiargtlcUrlsafe_&amp;e=_compressedoptions_">_textgtiviewtargetfileinaction_</a>}
284
285_gtiviewperlmodulesinaction_ {}
286_gtiviewglihelpinaction_{}
287_gtiviewglidictinaction_ {}
288_gtiviewgreenorginaction_ {}
289_gtiviewgsinstallerinaction_ {}
Note: See TracBrowser for help on using the repository browser.