source: trunk/gsdl/macros/gti.dm@ 13674

Last change on this file since 13674 was 13674, checked in by lh92, 17 years ago

changed a bit about the layout of the status page

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