On 05/30/2012 01:58 PM, Denis Roy wrote:
    
      
However, it's clear that staging has some more work compared to the live
version.
    
    
    
    I went ahead and diff'ed staging and live.  Here is a summary of the
    differences:
    
    
    diff -ru ./addons/babel.eclipse.org/html/foot.php ../staging/addons/babel.eclipse.org/html/foot.php
    --- ./addons/babel.eclipse.org/html/foot.php    2010-04-28 16:01:44.000000000 -0400
    +++ ../staging/addons/babel.eclipse.org/html/foot.php    2010-07-28 10:11:16.000000000 -0400
    @@ -13,13 +13,14 @@
     *******************************************************************************/
     
     ?>
    +<div>
     <br /><center>
         <a target="_blank" href=""moz-txt-link-freetext" href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Babel&component=Server&bug_file_loc=">https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Babel&component=Server&bug_file_loc=<?= $_SERVER['SCRIPT_NAME'] ?>">Report errors or enhancements for server</a> | 
         <a target="_blank" href="" class="moz-txt-link-rfc2396E" href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Babel&component=EnglishStrings&bug_file_loc=URL_TO_THE_STRING&short_desc=Problem%20with%20KEY_NAME&comment=elaborate_here">"https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Babel&component=EnglishStrings&bug_file_loc=URL_TO_THE_STRING&short_desc=Problem%20with%20KEY_NAME&comment=elaborate_here">Report errors for English strings</a> | 
         <a href="" class="moz-txt-link-rfc2396E" href="https://dev.eclipse.org/mailman/listinfo/babel-translators">"https://dev.eclipse.org/mailman/listinfo/babel-translators">Discuss translations on translators mailing list</a>
     </center><br />
    -</div></div>
    -</div><div id="footer">
    +</div>
    +<div id="footer">
     <ul id="footernav">
     <li class="first"><a href="">Home</a></li>
     <li><a href="" class="moz-txt-link-rfc2396E" href="http://www.eclipse.org/legal/privacy.php">"http://www.eclipse.org/legal/privacy.php">Privacy Policy</a></li>
    
**** I suppose this change is part of of the larger UI
    
    
    
    diff -ru ./addons/babel.eclipse.org/html/head.php ../staging/addons/babel.eclipse.org/html/head.php
    --- ./addons/babel.eclipse.org/html/head.php    2010-04-28 16:01:44.000000000 -0400
    +++ ../staging/addons/babel.eclipse.org/html/head.php    2010-07-28 10:11:16.000000000 -0400
    @@ -170,14 +170,15 @@
     
     <script src='' type='text/_javascript_'></script>
     <script src='' type='text/_javascript_'></script>
    +<script src='' type='text/_javascript_'></script>
     <script src='' type='text/_javascript_'></script>
     <script src='' type='text/_javascript_'></script>
     <script src='' type='text/_javascript_'></script>
     <script src='' type='text/_javascript_'></script>
    +<script src='' type='text/_javascript_'></script>
     <script src='' type='text/_javascript_'></script>
     <script src='' type='text/_javascript_'></script>
     
     <script language="_javascript_">
         document.getElementById("header-utils").innerHTML = "<ul><li><a href=''><?= $LoginString ?></a></li></ul>";
     </script>
    -<div id="container">
    \ No newline at end of file
    
**** On my development environment I had begin work on a search box and quick-jump style box, but that work isn't complete.  These JS files are likely part of that.
    diff -ru ./classes/export/import_translation_zip.php ../staging/classes/export/import_translation_zip.php
    --- ./classes/export/import_translation_zip.php    2009-02-02 14:18:27.000000000 -0500
    +++ ../staging/classes/export/import_translation_zip.php    2009-01-26 13:40:02.000000000 -0500
    @@ -191,5 +191,13 @@
             }
         }
     }
    +
    +function code2utf($num){
    +  if($num<128)return chr($num);
    +  if($num<2048)return chr(($num>>6)+192).chr(($num&63)+128);
    +  if($num<65536)return chr(($num>>12)+224).chr((($num>>6)&63)+128).chr(($num&63)+128);
    +  if($num<2097152)return chr(($num>>18)+240).chr((($num>>12)&63)+128).chr((($num>>6)&63)+128) .chr(($num&63)+128);
    +  return '';
    +}
     echo "Done.\n\n";
    -?>
    \ No newline at end of file
    +?>
    
**** On my development environment I had begin work on a search box and quick-jump style box, but that work isn't complete.  This function is likely part of that.
    
diff -ru ./html/callback/getProjects.php ../staging/html/callback/getProjects.php
    --- ./html/callback/getProjects.php    2008-07-16 11:14:43.000000000 -0400
    +++ ../staging/html/callback/getProjects.php    2012-03-05 15:05:01.000000000 -0500
    @@ -15,19 +15,10 @@
     $return = "";
     
     if(isset($_SESSION['language'])) {
    -    $query = "select 
    -            DISTINCT projects.*  
    -          from 
    -              projects,
    -              files,
    -              strings
    -          where 
    -              projects.project_id =files.project_id
    -          and
    -              files.file_id = strings.file_id
    -          and
    -              projects.is_active = 1
    -          ";
    +    $query = "SELECT /* getProjects.php */ DISTINCT P.project_id, P.is_active
    +FROM projects AS P
    +INNER JOIN files AS F ON P.project_id = F.project_id
    +WHERE P.is_active = 1";
     
     
         $res = mysql_query($query,$dbh);
    
**** Query optimization
    
diff -ru ./html/callback/getTranslationHints.php ../staging/html/callback/getTranslationHints.php
    --- ./html/callback/getTranslationHints.php    2010-03-29 14:26:13.000000000 -0400
    +++ ../staging/html/callback/getTranslationHints.php    2012-05-30 13:48:02.000000000 -0400
    @@ -33,6 +33,21 @@
         ORDER BY LENGTH(t.value) ASC LIMIT 15";
     */
     
    +$train_id = "";
    +$query = "SELECT train_id FROM release_trains ORDER BY train_version LIMIT 2";
    +$res = mysql_query($query,$dbh);
    +while($line = mysql_fetch_array($res, MYSQL_ASSOC)){
    +    if($train_id != "") {
    +        $train_id .= ",";
    +    }
    +    $train_id .= "'" . $line['train_id'] . "'";
    +}
    +
    +if($train_id == "") {
    +    $train_id = 'indigo';
    +}
    +
    +
     $query = "SELECT DISTINCT t.value 
     FROM translations as t 
      INNER JOIN strings AS s ON s.string_id = t.string_id
    @@ -40,7 +55,7 @@
      INNER JOIN release_train_projects AS tr ON tr.project_id = f.project_id AND tr.version = f.version
     WHERE s.value like '%" . addslashes($tr_string). "%' 
      AND t.is_active
    - AND tr.train_id = 'galileo'
    + AND tr.train_id IN (" . $train_id . ")
      AND t.language_id = '".addslashes($language)."'
     ORDER BY LENGTH(t.value) ASC LIMIT 15";
     # print $query."\n";
    @@ -54,7 +69,7 @@
         echo "</ul>";
     }
     else {
    -    echo "No hints found.";
    +    echo "No hints found.  Press [clear] to start over.";
     }
     
     ?>
    \ No newline at end of file
    
**** On Live the Translation Hints has "galileo" as the reference release train hard-coded.  This fixes that.
    
    diff -ru ./html/js/translationHint.js ../staging/html/js/translationHint.js
    --- ./html/js/translationHint.js    2008-08-25 17:02:45.000000000 -0400
    +++ ../staging/html/js/translationHint.js    2012-05-30 13:44:02.000000000 -0400
    @@ -25,7 +25,7 @@
                 YAHOO.log('failed!');
             } 
         } 
    -    YAHOO.util.Connect.asyncRequest('POST', "callback/getTranslationHints.php", callback, "tr_string="+trString);
    +    YAHOO.util.Connect.asyncRequest('POST', "callback/getTranslationHints.php", callback, "tr_string="+encodeURIComponent(trString));
         this.setupCB();
     }
     
    
    **** This contains the fix for bug 241988