blob: 9513563c837faf6593a4487932ec7ebf1a58d3cf [file] [log] [blame]
droy8aedeec2008-01-25 19:04:14 +00001<div id="maincontent">
droy82130d32008-12-17 16:56:46 +00002<div id="rightcolumn">
3 <div class="sideitem">
4 <h6>Committer checklist</h6>
5 <ul>
6 <li>Externalize strings to .properties files</li>
7 <br />
8 <li>Maintain your map files on the Babel server (this page) with every release</li>
9 <br />
10 <li>Tell your community about Babel, how to help translate, link to the <a href="http://www.eclipse.org/babel/downloads.php">Babel download page</a></li>
11 <br />
12 <li>Optionally download the Babel fragments for your project and repackage them on your own download site</li>
13 </ul>
14 </div>
15</div>
16
droy8aedeec2008-01-25 19:04:14 +000017<div id="midcolumn">
18
19<h1><?= $pageTitle ?></h1>
droy4e8fc0e2008-02-04 14:42:30 +000020<p>Use this form to define the map files for your project. The map files are read nightly, and any .properties files (except build.properties) contained in the plugins they reference will be parsed and imported into Babel, allowing the community to translate the externalized strings.</p>
21<p>This page is only accessible by Eclipse committers.</p>
droy8aedeec2008-01-25 19:04:14 +000022<form name="form1" method="post">
droy82130d32008-12-17 16:56:46 +000023<table cellspacing=4 cellpadding=0 border=0>
droy8aedeec2008-01-25 19:04:14 +000024<tr><td></td><td colspan=2 style="color:red;"><?= $GLOBALS['g_ERRSTRS'][0] ?></td></tr>
25<tr>
26 <td>Project:</td><td><select name="project_id" onchange="fnSetVersionList();">
27<?php
28 while($myrow = mysql_fetch_assoc($rs_project_list)) {
29 $selected = "";
30 if($myrow['project_id'] == $PROJECT_ID) {
31 $selected = 'selected="selected"';
32 }
33 echo "<option value='" . $myrow['project_id'] . "' $selected>" . $myrow['project_id'] . "</option>";
34 }
35 ?></select></td>
36 <td style='width:100px; color:red;'><?= $GLOBALS['g_ERRSTRS'][1] ?></td>
37</tr>
38<tr>
39 <td>Release Version</td><td><select name="version" onchange="fnUpdateFileList();">
40</select></td>
41 <td style='width:100px; color:red;'><?= $GLOBALS['g_ERRSTRS'][4] ?></td>
42</tr>
43<tr>
droy0a2317a2008-12-17 16:25:15 +000044 <td>Release Train</td><td><select name="train_id">
45 <?php
46 while($myrow = mysql_fetch_assoc($rs_train_list)) {
47 $selected = "";
48 if($myrow['train_id'] == $TRAIN_ID) {
49 $selected = 'selected="selected"';
50 }
51 echo "<option value='" . $myrow['train_id'] . "' $selected>" . $myrow['train_id'] . "</option>";
52 }
53 ?>
54</select></td>
55 <td></td>
56</tr>
57<tr>
kitloe8ed9b22009-02-24 19:33:37 +000058 <td>&#160;</td><td>Babel builds one update site per Train. Even if your project does not participate in the actual train, please pick the Train that your project is targetting.</td>
59</tr>
60<tr>
61 <td>&#160;</td><td><b>NOTE: </b>The Release Train applies to all map files for the selected Project Release Version.</td>
droy0a2317a2008-12-17 16:25:15 +000062</tr>
63<tr>
64 <td>&#160;</td><td></td>
65</tr>
66
67<tr>
atoulmee9ec6d82008-11-19 14:41:30 +000068 <td><a href="<?php echo imageRoot() ?>/viewcvs/index.cgi">ViewCVS</a> download URL to map file:</td><td><input type="text" name="location" value="<?= $LOCATION ?>" size="80" onchange="fnCheckUrl();" /></td>
droy8aedeec2008-01-25 19:04:14 +000069 <td style='width:100px; color:red;'><?= $GLOBALS['g_ERRSTRS'][2] ?></td>
70</tr>
71<tr>
atoulmee9ec6d82008-11-19 14:41:30 +000072 <td>&#160;</td><td>e.g. <a href="<?php echo imageRoot() ?>/viewcvs/index.cgi/org.eclipse.releng/maps/core.map?view=co">http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/core.map?view=co</a></td>
droy8aedeec2008-01-25 19:04:14 +000073</tr>
74<tr>
droy0cf9cb72008-07-23 20:55:02 +000075 <td>&#160;</td><td><b>NOTE: </b>If you're defining map files for a Release, you must use the download link to the CVS TAG of that release. This is the pathrev=R3_4 parameter in this example:<br />
76 <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/core.map?view=co&pathrev=R3_4">http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/core.map?view=co&pathrev=R3_4</a>
77 </td>
78</tr>
79<tr>
droy8aedeec2008-01-25 19:04:14 +000080 <td>File name: </td><td><input type="text" name="filename" value="<?= $FILENAME ?>" size="32" /></td>
81 <td style='width:100px; color:red;'><?= $GLOBALS['g_ERRSTRS'][5] ?></td>
82</tr>
83
84<tr>
85 <td></td><td><input type="submit" name="submit" value="Save" style="font-size:14px;" /></td></tr>
droy82130d32008-12-17 16:56:46 +000086</table>
87<iframe id="fileShow" name="somefiles" width="950" height="200"
droy8aedeec2008-01-25 19:04:14 +000088 style="border: 1px black solid"
89 src="">
90 </iframe>
droy8aedeec2008-01-25 19:04:14 +000091</form>
droy8aedeec2008-01-25 19:04:14 +000092<script language="javascript">
93 function fnSetVersionList() {
94 document.form1.version.options.length = 0;
95
droy80e86bc2008-02-04 16:05:41 +000096 if(typeof(versions[document.form1.project_id.value]) != "undefined") {
97 for(i = 0; i < versions[document.form1.project_id.value].length; i++) {
98 var opt = document.createElement("OPTION");
99 document.form1.version.options.add(opt);
100 document.form1.version.options[i].text = versions[document.form1.project_id.value][i];
101 document.form1.version.options[i].value = versions[document.form1.project_id.value][i];
102 if(versions[document.form1.project_id.value][i] == "<?= $VERSION ?>") {
103 document.form1.version.options[i].selected = "selected";
104 }
droy8aedeec2008-01-25 19:04:14 +0000105 }
106 }
droy80e86bc2008-02-04 16:05:41 +0000107 else {
108 var opt = document.createElement("OPTION");
109 document.form1.version.options.add(opt);
110 document.form1.version.options[0].text = "unspecified";
111 document.form1.version.options[0].value = "unspecified";
112 }
droy0a2317a2008-12-17 16:25:15 +0000113
droy8aedeec2008-01-25 19:04:14 +0000114 fnUpdateFileList();
droy8aedeec2008-01-25 19:04:14 +0000115 }
116
117 function fnUpdateFileList() {
118 source = "map_files.php?submit=showfiles&project_id=" + document.form1.project_id.value + "&version=" + document.form1.version.options[document.form1.version.selectedIndex].value;
119 document.getElementById("fileShow").src = source;
droy0a2317a2008-12-17 16:25:15 +0000120 fnSetTrain();
121 }
122
123 function fnSetTrain() {
124 <?# Update train according to selected project/version ?>
125 if(typeof(project_trains[document.form1.project_id.value][document.form1.version.options[document.form1.version.selectedIndex].value]) != "undefined") {
126 for(i = 0; i < document.form1.train_id.length; i++) {
127 document.form1.train_id.options[i].selected = "";
128 if(document.form1.train_id.options[i].value == project_trains[document.form1.project_id.value][document.form1.version.options[document.form1.version.selectedIndex].value]) {
129 document.form1.train_id.options[i].selected = "selected";
130 }
131 }
132 }
droy8aedeec2008-01-25 19:04:14 +0000133 }
134
atoulmedbe670e2009-01-27 11:23:51 +0000135<?php
136global $addon;
137echo $addon->callHook('validate_map_file_url');
138?>
droy8aedeec2008-01-25 19:04:14 +0000139
140 var versions = new Array();
141
142<?php
143 $prev_project = "";
144 $count = 0;
145 while($myrow = mysql_fetch_assoc($rs_version_list)) {
146 if($prev_project != $myrow['project_id']) {
147 if($count > 0) {
148 echo "];
149";
150 }
151 echo "versions['" . $myrow['project_id'] . "'] = [";
152 $count = 0;
153 }
154 if($count > 0) {
155 echo ",";
156 }
157 echo "\"" . $myrow['version'] . "\"";
158 $count++;
159 $prev_project = $myrow['project_id'];
160 }
161 echo "];";
162 ?>
163
droy0a2317a2008-12-17 16:25:15 +0000164
165 var project_trains = new Array();
166
167<?php
168 $prev_project = "";
169 $count = 0;
170 while($myrow = mysql_fetch_assoc($rs_train_project_list)) {
171 if($prev_project != $myrow['project_id']) {
172 if($count > 0) {
173 echo "};
174";
175 }
176 echo "project_trains['" . $myrow['project_id'] . "'] = {";
177 $count = 0;
178 }
179 if($count > 0) {
180 echo ",";
181 }
182 echo "'" . $myrow['version'] . "' : '" . $myrow['train_id'] . "'";
183 $count++;
184 $prev_project = $myrow['project_id'];
185 }
186 echo "};";
187 ?>
188 fnSetVersionList();
189
190 document.form1.submit.disabled = "disabled";
droy8aedeec2008-01-25 19:04:14 +0000191
192 </script>