droy | ebd025c | 2009-10-08 20:42:48 +0000 | [diff] [blame] | 1 | <script src="js/mapFiles.js" type='text/javascript'></script> |
| 2 | <script src="js/train.js" type='text/javascript'></script> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 3 | <div id="maincontent"> |
droy | 82130d3 | 2008-12-17 16:56:46 +0000 | [diff] [blame] | 4 | <div id="rightcolumn"> |
| 5 | <div class="sideitem"> |
| 6 | <h6>Committer checklist</h6> |
| 7 | <ul> |
| 8 | <li>Externalize strings to .properties files</li> |
| 9 | <br /> |
| 10 | <li>Maintain your map files on the Babel server (this page) with every release</li> |
| 11 | <br /> |
| 12 | <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> |
droy | 82130d3 | 2008-12-17 16:56:46 +0000 | [diff] [blame] | 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();"> |
droy | 6e22cf5 | 2009-10-09 17:11:49 +0000 | [diff] [blame] | 40 | </select> * Indicates map files present</td> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 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> |
kitlo | e8ed9b2 | 2009-02-24 19:33:37 +0000 | [diff] [blame] | 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><b>NOTE: </b>The Release Train applies to all map files for the selected Project Release Version.</td> |
droy | 0a2317a | 2008-12-17 16:25:15 +0000 | [diff] [blame] | 62 | </tr> |
| 63 | <tr> |
| 64 | <td> </td><td></td> |
| 65 | </tr> |
| 66 | |
| 67 | <tr> |
droy | ebd025c | 2009-10-08 20:42:48 +0000 | [diff] [blame] | 68 | <td colspan="2"><a href="<?php echo imageRoot() ?>/viewcvs/index.cgi">ViewCVS</a> download URLs to map files (one per line):</td><td></td> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 69 | <td style='width:100px; color:red;'><?= $GLOBALS['g_ERRSTRS'][2] ?></td> |
| 70 | </tr> |
| 71 | <tr> |
droy | 6e22cf5 | 2009-10-09 17:11:49 +0000 | [diff] [blame] | 72 | <td colspan="3"><textarea id="files-area" name="fileFld" onclick="fnClickText();" rows="14" cols="120"></textarea></td> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 73 | </tr> |
| 74 | <tr> |
droy | ebd025c | 2009-10-08 20:42:48 +0000 | [diff] [blame] | 75 | <td colspan="2"><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="<?php echo imageRoot() ?>/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><br /> |
| 77 | <a href="<?php echo imageRoot() ?>/viewcvs/index.cgi/org.eclipse.releng/maps/core.map?view=co&pathrev=HEAD">http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng/maps/core.map?view=co&pathrev=HEAD</a> </td> |
droy | 0cf9cb7 | 2008-07-23 20:55:02 +0000 | [diff] [blame] | 78 | </tr> |
| 79 | <tr> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 80 | <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] | 81 | </table> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 82 | </form> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 83 | <script language="javascript"> |
| 84 | function fnSetVersionList() { |
| 85 | document.form1.version.options.length = 0; |
| 86 | |
droy | 80e86bc | 2008-02-04 16:05:41 +0000 | [diff] [blame] | 87 | if(typeof(versions[document.form1.project_id.value]) != "undefined") { |
| 88 | for(i = 0; i < versions[document.form1.project_id.value].length; i++) { |
| 89 | var opt = document.createElement("OPTION"); |
| 90 | document.form1.version.options.add(opt); |
| 91 | document.form1.version.options[i].text = versions[document.form1.project_id.value][i]; |
| 92 | document.form1.version.options[i].value = versions[document.form1.project_id.value][i]; |
| 93 | if(versions[document.form1.project_id.value][i] == "<?= $VERSION ?>") { |
| 94 | document.form1.version.options[i].selected = "selected"; |
| 95 | } |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 96 | } |
| 97 | } |
droy | 80e86bc | 2008-02-04 16:05:41 +0000 | [diff] [blame] | 98 | else { |
| 99 | var opt = document.createElement("OPTION"); |
| 100 | document.form1.version.options.add(opt); |
| 101 | document.form1.version.options[0].text = "unspecified"; |
| 102 | document.form1.version.options[0].value = "unspecified"; |
| 103 | } |
droy | 0a2317a | 2008-12-17 16:25:15 +0000 | [diff] [blame] | 104 | |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 105 | fnUpdateFileList(); |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 106 | } |
droy | 6e22cf5 | 2009-10-09 17:11:49 +0000 | [diff] [blame] | 107 | |
| 108 | function cleanVersion(_value) { |
| 109 | return _value.replace(/^\* /, ""); |
| 110 | } |
| 111 | |
| 112 | function fnClickText() { |
| 113 | if(document.form1.fileFld.value.substr(0,18) == "No map files found") { |
| 114 | document.form1.fileFld.value = ""; |
| 115 | } |
| 116 | } |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 117 | |
| 118 | function fnUpdateFileList() { |
droy | 6e22cf5 | 2009-10-09 17:11:49 +0000 | [diff] [blame] | 119 | showMapFiles(document.form1.project_id.value, cleanVersion(document.form1.version.options[document.form1.version.selectedIndex].value)); |
droy | 0a2317a | 2008-12-17 16:25:15 +0000 | [diff] [blame] | 120 | fnSetTrain(); |
| 121 | } |
| 122 | |
| 123 | function fnSetTrain() { |
| 124 | <?# Update train according to selected project/version ?> |
droy | b394abc | 2009-10-19 15:27:15 +0000 | [diff] [blame] | 125 | if(typeof(project_trains[document.form1.project_id.value][cleanVersion(document.form1.version.options[document.form1.version.selectedIndex].value)]) != "undefined") { |
droy | 0a2317a | 2008-12-17 16:25:15 +0000 | [diff] [blame] | 126 | for(i = 0; i < document.form1.train_id.length; i++) { |
| 127 | document.form1.train_id.options[i].selected = ""; |
droy | b394abc | 2009-10-19 15:27:15 +0000 | [diff] [blame] | 128 | if(document.form1.train_id.options[i].value == project_trains[document.form1.project_id.value][cleanVersion(document.form1.version.options[document.form1.version.selectedIndex].value)]) { |
droy | 0a2317a | 2008-12-17 16:25:15 +0000 | [diff] [blame] | 129 | document.form1.train_id.options[i].selected = "selected"; |
| 130 | } |
| 131 | } |
| 132 | } |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 133 | } |
droy | b394abc | 2009-10-19 15:27:15 +0000 | [diff] [blame] | 134 | |
atoulme | dbe670e | 2009-01-27 11:23:51 +0000 | [diff] [blame] | 135 | <?php |
| 136 | global $addon; |
| 137 | echo $addon->callHook('validate_map_file_url'); |
| 138 | ?> |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 139 | |
| 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 | } |
droy | 6e22cf5 | 2009-10-09 17:11:49 +0000 | [diff] [blame] | 157 | $str = ""; |
| 158 | if($myrow['map_count'] > 0) { |
| 159 | $str = "* "; |
| 160 | } |
| 161 | |
| 162 | echo "\"$str" . $myrow['version'] . "\""; |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 163 | $count++; |
| 164 | $prev_project = $myrow['project_id']; |
| 165 | } |
| 166 | echo "];"; |
| 167 | ?> |
| 168 | |
droy | 0a2317a | 2008-12-17 16:25:15 +0000 | [diff] [blame] | 169 | |
| 170 | var project_trains = new Array(); |
| 171 | |
| 172 | <?php |
| 173 | $prev_project = ""; |
| 174 | $count = 0; |
| 175 | while($myrow = mysql_fetch_assoc($rs_train_project_list)) { |
| 176 | if($prev_project != $myrow['project_id']) { |
| 177 | if($count > 0) { |
| 178 | echo "}; |
| 179 | "; |
| 180 | } |
| 181 | echo "project_trains['" . $myrow['project_id'] . "'] = {"; |
| 182 | $count = 0; |
| 183 | } |
| 184 | if($count > 0) { |
| 185 | echo ","; |
| 186 | } |
droy | 6e22cf5 | 2009-10-09 17:11:49 +0000 | [diff] [blame] | 187 | |
droy | 0a2317a | 2008-12-17 16:25:15 +0000 | [diff] [blame] | 188 | echo "'" . $myrow['version'] . "' : '" . $myrow['train_id'] . "'"; |
| 189 | $count++; |
| 190 | $prev_project = $myrow['project_id']; |
| 191 | } |
| 192 | echo "};"; |
| 193 | ?> |
| 194 | fnSetVersionList(); |
droy | 8aedeec | 2008-01-25 19:04:14 +0000 | [diff] [blame] | 195 | </script> |