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

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

Fixed the bug that gti.dm overwrite the _head_ macro in style.dm

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