droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 1 | <div id="maincontent"> |
droy | 82130d3 | 2008-12-17 16:56:46 +0000 | [diff] [blame] | 2 | <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 | |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 17 | <div id="midcolumn"> |
| 18 | |
| 19 | <h1><?= $pageTitle ?></h1> |
droy | 4e8fc0e | 2008-02-04 14:42:30 +0000 | [diff] [blame] | 20 | <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> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 22 | <form name="form1" method="post"> |
droy | 82130d3 | 2008-12-17 16:56:46 +0000 | [diff] [blame] | 23 | <table cellspacing=4 cellpadding=0 border=0> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 24 | <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> |
droy | 0a2317a | 2008-12-17 16:25:15 +0000 | [diff] [blame] | 44 | <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> |
| 58 | <td></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> </td><td></td> |
| 62 | </tr> |
| 63 | |
| 64 | <tr> |
atoulme | e9ec6d8 | 2008-11-19 14:41:30 +0000 | [diff] [blame] | 65 | <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> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 66 | <td style='width:100px; color:red;'><?= $GLOBALS['g_ERRSTRS'][2] ?></td> |
| 67 | </tr> |
| 68 | <tr> |
atoulme | e9ec6d8 | 2008-11-19 14:41:30 +0000 | [diff] [blame] | 69 | <td> </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> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 70 | </tr> |
| 71 | <tr> |
droy | 0cf9cb7 | 2008-07-23 20:55:02 +0000 | [diff] [blame] | 72 | <td> </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 /> |
| 73 | <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> |
| 74 | </td> |
| 75 | </tr> |
| 76 | <tr> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 77 | <td>File name: </td><td><input type="text" name="filename" value="<?= $FILENAME ?>" size="32" /></td> |
| 78 | <td style='width:100px; color:red;'><?= $GLOBALS['g_ERRSTRS'][5] ?></td> |
| 79 | </tr> |
| 80 | |
| 81 | <tr> |
| 82 | <td></td><td><input type="submit" name="submit" value="Save" style="font-size:14px;" /></td></tr> |
droy | 82130d3 | 2008-12-17 16:56:46 +0000 | [diff] [blame] | 83 | </table> |
| 84 | <iframe id="fileShow" name="somefiles" width="950" height="200" |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 85 | style="border: 1px black solid" |
| 86 | src=""> |
| 87 | </iframe> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 88 | </form> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 89 | <script language="javascript"> |
| 90 | function fnSetVersionList() { |
| 91 | document.form1.version.options.length = 0; |
| 92 | |
droy | 80e86bc | 2008-02-04 16:05:41 +0000 | [diff] [blame] | 93 | if(typeof(versions[document.form1.project_id.value]) != "undefined") { |
| 94 | for(i = 0; i < versions[document.form1.project_id.value].length; i++) { |
| 95 | var opt = document.createElement("OPTION"); |
| 96 | document.form1.version.options.add(opt); |
| 97 | document.form1.version.options[i].text = versions[document.form1.project_id.value][i]; |
| 98 | document.form1.version.options[i].value = versions[document.form1.project_id.value][i]; |
| 99 | if(versions[document.form1.project_id.value][i] == "<?= $VERSION ?>") { |
| 100 | document.form1.version.options[i].selected = "selected"; |
| 101 | } |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 102 | } |
| 103 | } |
droy | 80e86bc | 2008-02-04 16:05:41 +0000 | [diff] [blame] | 104 | else { |
| 105 | var opt = document.createElement("OPTION"); |
| 106 | document.form1.version.options.add(opt); |
| 107 | document.form1.version.options[0].text = "unspecified"; |
| 108 | document.form1.version.options[0].value = "unspecified"; |
| 109 | } |
droy | 0a2317a | 2008-12-17 16:25:15 +0000 | [diff] [blame] | 110 | |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 111 | fnUpdateFileList(); |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 112 | } |
| 113 | |
| 114 | function fnUpdateFileList() { |
| 115 | source = "map_files.php?submit=showfiles&project_id=" + document.form1.project_id.value + "&version=" + document.form1.version.options[document.form1.version.selectedIndex].value; |
| 116 | document.getElementById("fileShow").src = source; |
droy | 0a2317a | 2008-12-17 16:25:15 +0000 | [diff] [blame] | 117 | fnSetTrain(); |
| 118 | } |
| 119 | |
| 120 | function fnSetTrain() { |
| 121 | <?# Update train according to selected project/version ?> |
| 122 | if(typeof(project_trains[document.form1.project_id.value][document.form1.version.options[document.form1.version.selectedIndex].value]) != "undefined") { |
| 123 | for(i = 0; i < document.form1.train_id.length; i++) { |
| 124 | document.form1.train_id.options[i].selected = ""; |
| 125 | if(document.form1.train_id.options[i].value == project_trains[document.form1.project_id.value][document.form1.version.options[document.form1.version.selectedIndex].value]) { |
| 126 | document.form1.train_id.options[i].selected = "selected"; |
| 127 | } |
| 128 | } |
| 129 | } |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 130 | } |
| 131 | |
atoulme | dbe670e | 2009-01-27 11:23:51 +0000 | [diff] [blame^] | 132 | <?php |
| 133 | global $addon; |
| 134 | echo $addon->callHook('validate_map_file_url'); |
| 135 | ?> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 136 | |
| 137 | var versions = new Array(); |
| 138 | |
| 139 | <?php |
| 140 | $prev_project = ""; |
| 141 | $count = 0; |
| 142 | while($myrow = mysql_fetch_assoc($rs_version_list)) { |
| 143 | if($prev_project != $myrow['project_id']) { |
| 144 | if($count > 0) { |
| 145 | echo "]; |
| 146 | "; |
| 147 | } |
| 148 | echo "versions['" . $myrow['project_id'] . "'] = ["; |
| 149 | $count = 0; |
| 150 | } |
| 151 | if($count > 0) { |
| 152 | echo ","; |
| 153 | } |
| 154 | echo "\"" . $myrow['version'] . "\""; |
| 155 | $count++; |
| 156 | $prev_project = $myrow['project_id']; |
| 157 | } |
| 158 | echo "];"; |
| 159 | ?> |
| 160 | |
droy | 0a2317a | 2008-12-17 16:25:15 +0000 | [diff] [blame] | 161 | |
| 162 | var project_trains = new Array(); |
| 163 | |
| 164 | <?php |
| 165 | $prev_project = ""; |
| 166 | $count = 0; |
| 167 | while($myrow = mysql_fetch_assoc($rs_train_project_list)) { |
| 168 | if($prev_project != $myrow['project_id']) { |
| 169 | if($count > 0) { |
| 170 | echo "}; |
| 171 | "; |
| 172 | } |
| 173 | echo "project_trains['" . $myrow['project_id'] . "'] = {"; |
| 174 | $count = 0; |
| 175 | } |
| 176 | if($count > 0) { |
| 177 | echo ","; |
| 178 | } |
| 179 | echo "'" . $myrow['version'] . "' : '" . $myrow['train_id'] . "'"; |
| 180 | $count++; |
| 181 | $prev_project = $myrow['project_id']; |
| 182 | } |
| 183 | echo "};"; |
| 184 | ?> |
| 185 | fnSetVersionList(); |
| 186 | |
| 187 | document.form1.submit.disabled = "disabled"; |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 188 | |
| 189 | </script> |